summaryrefslogtreecommitdiff
path: root/deps/npm
diff options
context:
space:
mode:
authorFallenRiteMonk <fallenritemonk@gmail.com>2018-04-05 11:52:34 -0400
committerMyles Borins <mylesborins@google.com>2018-04-05 16:01:07 -0400
commit25a816dcda7b1db0929501acfe13f2fe5119759b (patch)
treed3df4377a11dfb643b5976d2048d9bb4ee527903 /deps/npm
parentb29c36b80746733994257b7380245102bc3c4cd6 (diff)
downloadandroid-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.gz
android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.tar.bz2
android-node-v8-25a816dcda7b1db0929501acfe13f2fe5119759b.zip
deps: upgrade npm to 5.8.0
PR-URL: https://github.com/nodejs/node/pull/19560 Fixes: https://github.com/nodejs/node/issues/19271 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm')
-rw-r--r--deps/npm/.github/issue_template.md1
-rw-r--r--deps/npm/AUTHORS25
-rw-r--r--deps/npm/CHANGELOG.md453
-rw-r--r--deps/npm/Makefile2
-rw-r--r--deps/npm/bin/npx5
-rw-r--r--deps/npm/bin/npx.cmd3
-rw-r--r--deps/npm/doc/cli/npm-ci.md58
-rw-r--r--deps/npm/doc/cli/npm-install.md6
-rw-r--r--deps/npm/doc/cli/npm-ls.md2
-rw-r--r--deps/npm/doc/cli/npm-prune.md16
-rw-r--r--deps/npm/doc/cli/npm-team.md3
-rw-r--r--deps/npm/doc/cli/npm-update.md28
-rw-r--r--deps/npm/doc/cli/npm.md2
-rw-r--r--deps/npm/doc/files/npm-folders.md2
-rw-r--r--deps/npm/doc/files/npm-package-locks.md19
-rw-r--r--deps/npm/doc/files/package-lock.json.md10
-rw-r--r--deps/npm/doc/files/package.json.md44
-rw-r--r--deps/npm/doc/misc/npm-coding-style.md2
-rw-r--r--deps/npm/doc/misc/npm-config.md18
-rw-r--r--deps/npm/doc/misc/npm-developers.md2
-rw-r--r--deps/npm/doc/misc/npm-index.md4
-rw-r--r--deps/npm/doc/misc/semver.md22
-rw-r--r--deps/npm/html/doc/README.html2
-rw-r--r--deps/npm/html/doc/cli/npm-access.html2
-rw-r--r--deps/npm/html/doc/cli/npm-adduser.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bin.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-build.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bundle.html2
-rw-r--r--deps/npm/html/doc/cli/npm-cache.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ci.html64
-rw-r--r--deps/npm/html/doc/cli/npm-completion.html2
-rw-r--r--deps/npm/html/doc/cli/npm-config.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dedupe.html2
-rw-r--r--deps/npm/html/doc/cli/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dist-tag.html2
-rw-r--r--deps/npm/html/doc/cli/npm-docs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-doctor.html12
-rw-r--r--deps/npm/html/doc/cli/npm-edit.html2
-rw-r--r--deps/npm/html/doc/cli/npm-explore.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help.html2
-rw-r--r--deps/npm/html/doc/cli/npm-init.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install.html9
-rw-r--r--deps/npm/html/doc/cli/npm-link.html2
-rw-r--r--deps/npm/html/doc/cli/npm-logout.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ls.html6
-rw-r--r--deps/npm/html/doc/cli/npm-outdated.html9
-rw-r--r--deps/npm/html/doc/cli/npm-owner.html2
-rw-r--r--deps/npm/html/doc/cli/npm-pack.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ping.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/cli/npm-profile.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prune.html14
-rw-r--r--deps/npm/html/doc/cli/npm-publish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/cli/npm-repo.html2
-rw-r--r--deps/npm/html/doc/cli/npm-restart.html2
-rw-r--r--deps/npm/html/doc/cli/npm-root.html2
-rw-r--r--deps/npm/html/doc/cli/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/cli/npm-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/cli/npm-star.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stars.html2
-rw-r--r--deps/npm/html/doc/cli/npm-start.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stop.html2
-rw-r--r--deps/npm/html/doc/cli/npm-team.html5
-rw-r--r--deps/npm/html/doc/cli/npm-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-token.html2
-rw-r--r--deps/npm/html/doc/cli/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/cli/npm-unpublish.html4
-rw-r--r--deps/npm/html/doc/cli/npm-update.html48
-rw-r--r--deps/npm/html/doc/cli/npm-version.html2
-rw-r--r--deps/npm/html/doc/cli/npm-view.html2
-rw-r--r--deps/npm/html/doc/cli/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/cli/npm.html8
-rw-r--r--deps/npm/html/doc/files/npm-folders.html14
-rw-r--r--deps/npm/html/doc/files/npm-global.html14
-rw-r--r--deps/npm/html/doc/files/npm-json.html43
-rw-r--r--deps/npm/html/doc/files/npm-package-locks.html19
-rw-r--r--deps/npm/html/doc/files/npm-shrinkwrap.json.html2
-rw-r--r--deps/npm/html/doc/files/npmrc.html2
-rw-r--r--deps/npm/html/doc/files/package-lock.json.html8
-rw-r--r--deps/npm/html/doc/files/package.json.html43
-rw-r--r--deps/npm/html/doc/index.html4
-rw-r--r--deps/npm/html/doc/misc/npm-coding-style.html4
-rw-r--r--deps/npm/html/doc/misc/npm-config.html19
-rw-r--r--deps/npm/html/doc/misc/npm-developers.html6
-rw-r--r--deps/npm/html/doc/misc/npm-disputes.html14
-rw-r--r--deps/npm/html/doc/misc/npm-index.html4
-rw-r--r--deps/npm/html/doc/misc/npm-orgs.html2
-rw-r--r--deps/npm/html/doc/misc/npm-registry.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scope.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scripts.html16
-rw-r--r--deps/npm/html/doc/misc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/misc/semver.html29
-rw-r--r--deps/npm/lib/auth/legacy.js92
-rw-r--r--deps/npm/lib/ci.js37
-rw-r--r--deps/npm/lib/config/cmd-list.js2
-rw-r--r--deps/npm/lib/config/core.js5
-rw-r--r--deps/npm/lib/config/defaults.js4
-rw-r--r--deps/npm/lib/config/pacote.js1
-rw-r--r--deps/npm/lib/dedupe.js2
-rw-r--r--deps/npm/lib/install.js72
-rw-r--r--deps/npm/lib/install/action/extract-worker.js4
-rw-r--r--deps/npm/lib/install/action/extract.js32
-rw-r--r--deps/npm/lib/install/actions.js2
-rw-r--r--deps/npm/lib/install/copy-tree.js17
-rw-r--r--deps/npm/lib/install/deps.js75
-rw-r--r--deps/npm/lib/install/diff-trees.js3
-rw-r--r--deps/npm/lib/install/has-modern-meta.js19
-rw-r--r--deps/npm/lib/install/inflate-shrinkwrap.js29
-rw-r--r--deps/npm/lib/install/read-shrinkwrap.js66
-rw-r--r--deps/npm/lib/install/save.js7
-rw-r--r--deps/npm/lib/pack.js6
-rw-r--r--deps/npm/lib/profile.js28
-rw-r--r--deps/npm/lib/prune.js2
-rw-r--r--deps/npm/lib/shrinkwrap.js14
-rw-r--r--deps/npm/lib/token.js27
-rw-r--r--deps/npm/lib/utils/error-message.js32
-rw-r--r--deps/npm/lib/utils/parse-json.js3
-rw-r--r--deps/npm/lib/utils/stringify-package.js17
-rw-r--r--deps/npm/lib/utils/unsupported.js5
-rw-r--r--deps/npm/lib/version.js24
-rw-r--r--deps/npm/lib/xmas.js2
-rw-r--r--deps/npm/man/man1/npm-README.14
-rw-r--r--deps/npm/man/man1/npm-access.12
-rw-r--r--deps/npm/man/man1/npm-adduser.14
-rw-r--r--deps/npm/man/man1/npm-bin.12
-rw-r--r--deps/npm/man/man1/npm-bugs.14
-rw-r--r--deps/npm/man/man1/npm-build.12
-rw-r--r--deps/npm/man/man1/npm-bundle.12
-rw-r--r--deps/npm/man/man1/npm-cache.16
-rw-r--r--deps/npm/man/man1/npm-ci.176
-rw-r--r--deps/npm/man/man1/npm-completion.12
-rw-r--r--deps/npm/man/man1/npm-config.12
-rw-r--r--deps/npm/man/man1/npm-dedupe.12
-rw-r--r--deps/npm/man/man1/npm-deprecate.12
-rw-r--r--deps/npm/man/man1/npm-dist-tag.12
-rw-r--r--deps/npm/man/man1/npm-docs.14
-rw-r--r--deps/npm/man/man1/npm-doctor.12
-rw-r--r--deps/npm/man/man1/npm-edit.12
-rw-r--r--deps/npm/man/man1/npm-explore.12
-rw-r--r--deps/npm/man/man1/npm-help-search.12
-rw-r--r--deps/npm/man/man1/npm-help.12
-rw-r--r--deps/npm/man/man1/npm-init.12
-rw-r--r--deps/npm/man/man1/npm-install-test.12
-rw-r--r--deps/npm/man/man1/npm-install.110
-rw-r--r--deps/npm/man/man1/npm-link.12
-rw-r--r--deps/npm/man/man1/npm-logout.14
-rw-r--r--deps/npm/man/man1/npm-ls.16
-rw-r--r--deps/npm/man/man1/npm-outdated.19
-rw-r--r--deps/npm/man/man1/npm-owner.12
-rw-r--r--deps/npm/man/man1/npm-pack.12
-rw-r--r--deps/npm/man/man1/npm-ping.12
-rw-r--r--deps/npm/man/man1/npm-prefix.12
-rw-r--r--deps/npm/man/man1/npm-profile.12
-rw-r--r--deps/npm/man/man1/npm-prune.118
-rw-r--r--deps/npm/man/man1/npm-publish.12
-rw-r--r--deps/npm/man/man1/npm-rebuild.12
-rw-r--r--deps/npm/man/man1/npm-repo.12
-rw-r--r--deps/npm/man/man1/npm-restart.12
-rw-r--r--deps/npm/man/man1/npm-root.12
-rw-r--r--deps/npm/man/man1/npm-run-script.16
-rw-r--r--deps/npm/man/man1/npm-search.14
-rw-r--r--deps/npm/man/man1/npm-shrinkwrap.12
-rw-r--r--deps/npm/man/man1/npm-star.12
-rw-r--r--deps/npm/man/man1/npm-stars.12
-rw-r--r--deps/npm/man/man1/npm-start.14
-rw-r--r--deps/npm/man/man1/npm-stop.12
-rw-r--r--deps/npm/man/man1/npm-team.15
-rw-r--r--deps/npm/man/man1/npm-test.12
-rw-r--r--deps/npm/man/man1/npm-token.12
-rw-r--r--deps/npm/man/man1/npm-uninstall.12
-rw-r--r--deps/npm/man/man1/npm-unpublish.14
-rw-r--r--deps/npm/man/man1/npm-update.162
-rw-r--r--deps/npm/man/man1/npm-version.12
-rw-r--r--deps/npm/man/man1/npm-view.12
-rw-r--r--deps/npm/man/man1/npm-whoami.12
-rw-r--r--deps/npm/man/man1/npm.18
-rw-r--r--deps/npm/man/man1/npx.19
-rw-r--r--deps/npm/man/man5/npm-folders.514
-rw-r--r--deps/npm/man/man5/npm-global.514
-rw-r--r--deps/npm/man/man5/npm-json.549
-rw-r--r--deps/npm/man/man5/npm-package-locks.523
-rw-r--r--deps/npm/man/man5/npm-shrinkwrap.json.52
-rw-r--r--deps/npm/man/man5/npmrc.52
-rw-r--r--deps/npm/man/man5/package-lock.json.510
-rw-r--r--deps/npm/man/man5/package.json.549
-rw-r--r--deps/npm/man/man7/npm-coding-style.74
-rw-r--r--deps/npm/man/man7/npm-config.727
-rw-r--r--deps/npm/man/man7/npm-developers.74
-rw-r--r--deps/npm/man/man7/npm-disputes.76
-rw-r--r--deps/npm/man/man7/npm-index.75
-rw-r--r--deps/npm/man/man7/npm-orgs.72
-rw-r--r--deps/npm/man/man7/npm-registry.72
-rw-r--r--deps/npm/man/man7/npm-scope.72
-rw-r--r--deps/npm/man/man7/npm-scripts.716
-rw-r--r--deps/npm/man/man7/removing-npm.72
-rw-r--r--deps/npm/man/man7/semver.726
-rwxr-xr-xdeps/npm/node_modules/JSONStream/bin.js10
-rwxr-xr-xdeps/npm/node_modules/JSONStream/index.js8
-rw-r--r--deps/npm/node_modules/JSONStream/package.json24
-rw-r--r--deps/npm/node_modules/cacache/CHANGELOG.md25
-rw-r--r--deps/npm/node_modules/cacache/README.md4
-rw-r--r--deps/npm/node_modules/cacache/lib/content/read.js10
-rw-r--r--deps/npm/node_modules/cacache/lib/entry-index.js7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/license7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE24
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js143
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE35
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js630
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown61
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js10
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md102
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md97
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js241
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/.npmignore)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/LICENSE)2
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json67
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js291
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/README.md)19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/index.js)29
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/package.json)46
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/LICENSE)2
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md59
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js22
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js52
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json54
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js85
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml (renamed from deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml)10
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md70
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js103
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json69
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js121
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/.npmignore)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md54
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js105
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore1
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md39
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js33
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json50
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json55
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json60
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml8
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json64
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js181
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore (renamed from deps/npm/node_modules/mississippi/node_modules/pump/.npmignore)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml5
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/license)2
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md41
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md7
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js58
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore (renamed from deps/npm/node_modules/mississippi/node_modules/pumpify/.npmignore)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/license)2
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json56
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js122
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore3
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html336
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md9
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md136
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore)0
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json86
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json65
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js96
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/package.json66
-rw-r--r--deps/npm/node_modules/cacache/node_modules/mississippi/readme.md411
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md190
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/README.md462
-rw-r--r--deps/npm/node_modules/cacache/node_modules/ssri/index.js334
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md21
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/README.md18
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/index.js16
-rw-r--r--deps/npm/node_modules/cacache/node_modules/y18n/package.json32
-rw-r--r--deps/npm/node_modules/cacache/package.json42
-rw-r--r--deps/npm/node_modules/detect-newline/index.js24
-rw-r--r--deps/npm/node_modules/detect-newline/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license)0
-rw-r--r--deps/npm/node_modules/detect-newline/package.json70
-rw-r--r--deps/npm/node_modules/detect-newline/readme.md42
-rw-r--r--deps/npm/node_modules/find-npm-prefix/find-prefix.js50
-rw-r--r--deps/npm/node_modules/find-npm-prefix/package.json22
-rw-r--r--deps/npm/node_modules/hosted-git-info/CHANGELOG.md17
-rw-r--r--deps/npm/node_modules/hosted-git-info/README.md7
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host-info.js14
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host.js31
-rw-r--r--deps/npm/node_modules/hosted-git-info/package.json34
-rw-r--r--deps/npm/node_modules/ini/ini.js128
-rw-r--r--deps/npm/node_modules/ini/package.json40
-rw-r--r--deps/npm/node_modules/init-package-json/CHANGELOG.md17
-rw-r--r--deps/npm/node_modules/init-package-json/default-input.js9
-rw-r--r--deps/npm/node_modules/init-package-json/init-package-json.js2
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json64
-rw-r--r--deps/npm/node_modules/init-package-json/package.json40
-rw-r--r--deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md36
-rw-r--r--deps/npm/node_modules/json-parse-better-errors/LICENSE.md7
-rw-r--r--deps/npm/node_modules/json-parse-better-errors/README.md53
-rw-r--r--deps/npm/node_modules/json-parse-better-errors/index.js32
-rw-r--r--deps/npm/node_modules/json-parse-better-errors/package.json (renamed from deps/npm/node_modules/cacache/node_modules/ssri/package.json)62
-rw-r--r--deps/npm/node_modules/libcipm/CHANGELOG.md339
-rw-r--r--deps/npm/node_modules/libcipm/LICENSE.md7
-rw-r--r--deps/npm/node_modules/libcipm/README.md37
-rw-r--r--deps/npm/node_modules/libcipm/index.js386
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js29
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/npm-config.js72
-rw-r--r--deps/npm/node_modules/libcipm/lib/config/pacote-opts.js135
-rw-r--r--deps/npm/node_modules/libcipm/lib/extract.js53
-rw-r--r--deps/npm/node_modules/libcipm/lib/silentlog.js13
-rw-r--r--deps/npm/node_modules/libcipm/lib/worker.js16
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/LICENSE (renamed from deps/npm/node_modules/libnpx/node_modules/npm-package-arg/LICENSE)8
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/README.md44
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/index.js73
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/LICENSE (renamed from deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE)0
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/README.md (renamed from deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md)0
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/npa.js (renamed from deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js)0
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/npm-package-arg/package.json)6
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/lock-verify/package.json64
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/CHANGELOG.md46
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/LICENSE.md (renamed from deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md)0
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/README.md147
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/index.js192
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/package.json83
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/CHANGELOG.md55
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/LICENSE20
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/README.md346
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/index.js349
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/CHANGELOG.md36
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/README.md223
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/genfun.js296
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/method.js86
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/role.js17
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/util.js37
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/package.json79
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/protoduck/package.json88
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/.travis.yml12
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/LICENSE.md13
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/README.md144
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/child.js5
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/index.js13
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/calc.js22
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/index.js41
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/index.d.ts44
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/child/index.js52
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/farm.js339
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/fork.js32
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/index.js34
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/.travis.yml11
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/README.md145
-rwxr-xr-xdeps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/build.js43
-rwxr-xr-xdeps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/cli.js22
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/custom.js57
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/errno.js313
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.npmignore (renamed from deps/npm/node_modules/mississippi/.npmignore)0
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml10
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md11
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md47
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json58
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/prr.js63
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/test.js169
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/package.json62
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/test.js88
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/package.json86
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/package.json60
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/child.js85
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/debug.js11
-rw-r--r--deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/index.js541
-rw-r--r--deps/npm/node_modules/libcipm/package.json104
-rw-r--r--deps/npm/node_modules/libnpx/CHANGELOG.md31
-rw-r--r--deps/npm/node_modules/libnpx/LICENSE.md17
-rw-r--r--deps/npm/node_modules/libnpx/README.md6
-rw-r--r--deps/npm/node_modules/libnpx/child.js18
-rw-r--r--deps/npm/node_modules/libnpx/get-prefix.js32
-rw-r--r--deps/npm/node_modules/libnpx/index.js19
-rw-r--r--deps/npm/node_modules/libnpx/libnpx.19
-rw-r--r--deps/npm/node_modules/libnpx/locales/ar.json29
-rw-r--r--deps/npm/node_modules/libnpx/locales/fr.json28
-rw-r--r--deps/npm/node_modules/libnpx/locales/ko.json8
-rw-r--r--deps/npm/node_modules/libnpx/locales/pt_BR.json38
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md22
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/dotenv/README.md69
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/dotenv/appveyor.yml13
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/dotenv/lib/main.js39
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/dotenv/package.json39
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/npm-package-arg/README.md81
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/npm-package-arg/npa.js270
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/y18n/CHANGELOG.md21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/y18n/README.md18
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/y18n/index.js16
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/y18n/package.json48
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/CHANGELOG.md170
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/README.md24
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/completion.sh.hbs4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/index.js3
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/apply-extends.js21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/argsert.js30
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/assign.js15
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/command.js330
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/completion.js51
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/levenshtein.js10
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/obj-filter.js7
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/usage.js303
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/validation.js267
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/lib/yerror.js1
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/en.json4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/hi.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/id.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/ja.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/ko.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/nl.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/nn.json39
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/pl.json5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/pt_BR.json6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/tr.json4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/locales/zh_CN.json6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/CHANGELOG.md26
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/README.md6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/index.js6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/package.json)5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/package.json)9
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/package.json94
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js)4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license9
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/index.js4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/package.json75
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/readme.md38
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json81
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md)9
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/package.json)16
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/index.js2
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license20
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/package.json53
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/readme.md4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/index.js26
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json47
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/index.js47
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/index.js11
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/index.js35
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/README.md144
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/index.js133
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.editorconfig18
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.istanbul.yml4
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.npmignore5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.travis.yml17
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/README.md16
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/index.js10
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/package.json44
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/package.json46
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/package.json45
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/readme.md83
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/parse.js751
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/unicode.js71
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/index.js68
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/package.json45
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/readme.md119
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/index.js14
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/package.json43
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/readme.md36
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/package.json48
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/readme.md45
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/index.js26
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/index.js68
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/license21
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/package.json80
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/readme.md119
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/package.json45
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/readme.md42
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/package.json49
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/readme.md79
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/package.json49
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/readme.md80
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/LICENSE (renamed from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/LICENSE)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/README.md (renamed from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/README.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/index.js (renamed from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/package.json (renamed from deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/package.json)6
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/CHANGELOG.md77
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/README.md27
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/index.js113
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js8
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/index.js (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/license (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/package.json (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json)5
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/readme.md (renamed from deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md)0
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/package.json65
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/package.json54
-rw-r--r--deps/npm/node_modules/libnpx/node_modules/yargs/yargs.js490
-rw-r--r--deps/npm/node_modules/libnpx/package.json58
-rw-r--r--deps/npm/node_modules/libnpx/parse-args.js134
-rw-r--r--deps/npm/node_modules/mississippi/changelog.md10
-rw-r--r--deps/npm/node_modules/mississippi/index.js1
-rw-r--r--deps/npm/node_modules/mississippi/license7
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json15
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/README.md2
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/index.js19
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md51
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js21
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json69
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/test.js62
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/package.json27
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/duplexify/test.js1
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js8
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/end-of-stream/package.json17
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pump/README.md9
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pump/index.js4
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pump/package.json31
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js16
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/index.js1
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/package.json25
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/pumpify/test.js20
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/index.js26
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/package.json15
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/test.js40
-rw-r--r--deps/npm/node_modules/mississippi/package.json41
-rw-r--r--deps/npm/node_modules/mississippi/readme.md43
-rw-r--r--deps/npm/node_modules/node-gyp/.jshintrc7
-rw-r--r--deps/npm/node_modules/npm-lifecycle/CHANGELOG.md10
-rw-r--r--deps/npm/node_modules/npm-lifecycle/index.js4
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/.npmignore (renamed from deps/npm/node_modules/node-gyp/.npmignore)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/CHANGELOG.md (renamed from deps/npm/node_modules/node-gyp/CHANGELOG.md)2
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/LICENSE (renamed from deps/npm/node_modules/node-gyp/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/README.md (renamed from deps/npm/node_modules/node-gyp/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/addon.gypi (renamed from deps/npm/node_modules/node-gyp/addon.gypi)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js (renamed from deps/npm/node_modules/node-gyp/bin/node-gyp.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/.npmignore (renamed from deps/npm/node_modules/node-gyp/gyp/.npmignore)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/AUTHORS (renamed from deps/npm/node_modules/node-gyp/gyp/AUTHORS)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/DEPS (renamed from deps/npm/node_modules/node-gyp/gyp/DEPS)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/LICENSE (renamed from deps/npm/node_modules/node-gyp/gyp/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/OWNERS (renamed from deps/npm/node_modules/node-gyp/gyp/OWNERS)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/PRESUBMIT.py (renamed from deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml (renamed from deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/buildbot_run.py (renamed from deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS (renamed from deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/README (renamed from deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json (renamed from deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/codereview.settings (renamed from deps/npm/node_modules/node-gyp/gyp/codereview.settings)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc (renamed from deps/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp (renamed from deps/npm/node_modules/node-gyp/gyp/gyp)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp.bat (renamed from deps/npm/node_modules/node-gyp/gyp/gyp.bat)10
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py (renamed from deps/npm/node_modules/node-gyp/gyp/gyp_main.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyptest.py (renamed from deps/npm/node_modules/node-gyp/gyp/gyptest.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/__init__.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py)2
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py)1
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input_test.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py)1
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py (renamed from deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples (renamed from deps/npm/node_modules/node-gyp/gyp/samples/samples)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples.bat (renamed from deps/npm/node_modules/node-gyp/gyp/samples/samples.bat)10
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/setup.py (renamed from deps/npm/node_modules/node-gyp/gyp/setup.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/README (renamed from deps/npm/node_modules/node-gyp/gyp/tools/README)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/README (renamed from deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec (renamed from deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec (renamed from deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec)36
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/README (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/README)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp.el (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified (renamed from deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/graphviz.py (renamed from deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_gyp.py (renamed from deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_sln.py (renamed from deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_vcproj.py (renamed from deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/Find-VS2017.cs (renamed from deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js (renamed from deps/npm/node_modules/node-gyp/lib/build.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/clean.js (renamed from deps/npm/node_modules/node-gyp/lib/clean.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js (renamed from deps/npm/node_modules/node-gyp/lib/configure.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-node-directory.js (renamed from deps/npm/node_modules/node-gyp/lib/find-node-directory.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-vs2017.js (renamed from deps/npm/node_modules/node-gyp/lib/find-vs2017.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/install.js (renamed from deps/npm/node_modules/node-gyp/lib/install.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/list.js (renamed from deps/npm/node_modules/node-gyp/lib/list.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/node-gyp.js (renamed from deps/npm/node_modules/node-gyp/lib/node-gyp.js)1
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/process-release.js (renamed from deps/npm/node_modules/node-gyp/lib/process-release.js)2
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/rebuild.js (renamed from deps/npm/node_modules/node-gyp/lib/rebuild.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/remove.js (renamed from deps/npm/node_modules/node-gyp/lib/remove.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.npmignore (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.travis.yml (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/LICENSE (renamed from deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/pipe.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/fstream.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/abstract.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/collect.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/get-type.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/package.json)8
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/minimatch.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md)10
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js)1
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json)6
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json)7
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json)16
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json)6
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.travis.yml (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/README.md)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/bin/nopt.js (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/examples/my-program.js (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/lib/nopt.js (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/package.json)7
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/test/basic.js (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/README.md)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/bin/semver (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/package.json)6
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/range.bnf (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/semver.js (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/semver.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.npmignore (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.travis.yml (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/extracter.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/packer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/reader.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extract.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/header.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/pack.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/parse.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json)21
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/package.json (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/package.json)21
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/tar.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/tar.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz)bin4096 -> 4096 bytes
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar)bin4608 -> 4608 bytes
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract-move.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz)bin19352 -> 19352 bytes
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/header.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse-discard.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/package.json (renamed from deps/npm/node_modules/node-gyp/package.json)23
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/src/win_delay_load_hook.cc (renamed from deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc)0
-rwxr-xr-xdeps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/docker.sh (renamed from deps/npm/node_modules/node-gyp/test/docker.sh)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca-bundle.crt (renamed from deps/npm/node_modules/node-gyp/test/fixtures/ca-bundle.crt)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca.crt (renamed from deps/npm/node_modules/node-gyp/test/fixtures/ca.crt)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.crt (renamed from deps/npm/node_modules/node-gyp/test/fixtures/server.crt)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.key (renamed from deps/npm/node_modules/node-gyp/test/fixtures/server.key)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/simple-proxy.js (renamed from deps/npm/node_modules/node-gyp/test/simple-proxy.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-addon.js (renamed from deps/npm/node_modules/node-gyp/test/test-addon.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-configure-python.js (renamed from deps/npm/node_modules/node-gyp/test/test-configure-python.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-download.js (renamed from deps/npm/node_modules/node-gyp/test/test-download.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-accessible-sync.js (renamed from deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-node-directory.js (renamed from deps/npm/node_modules/node-gyp/test/test-find-node-directory.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-python.js (renamed from deps/npm/node_modules/node-gyp/test/test-find-python.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-options.js (renamed from deps/npm/node_modules/node-gyp/test/test-options.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-process-release.js (renamed from deps/npm/node_modules/node-gyp/test/test-process-release.js)0
-rw-r--r--deps/npm/node_modules/npm-lifecycle/package.json40
-rw-r--r--deps/npm/node_modules/npm-profile/CHANGELOG.md28
-rw-r--r--deps/npm/node_modules/npm-profile/README.md156
-rw-r--r--deps/npm/node_modules/npm-profile/index.js187
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md15
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md22
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js14
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js46
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md25
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/CHANGELOG.md423
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/LICENSE.md3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.es.md628
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.md624
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/en.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/es.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/get.js190
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/index.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/path.js26
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/read.js115
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/rm.js21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/write.js162
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/entry-index.js224
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/memoization.js69
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/fix-owner.js44
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/hash-to-segments.js11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/move-file.js55
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/tmp.js32
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/y.js25
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/verify.js213
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.js44
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.json6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.js46
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.json6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/ls.js6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/package.json126
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/put.js71
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/rm.js28
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/verify.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js497
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json28
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js33
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js301
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js61
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js385
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js181
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js64
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js98
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js75
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md14
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js13
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md14
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js13
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml14
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md35
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile44
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md176
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json28
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js22
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js37
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js15
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js124
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json22
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE24
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js143
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml4
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE35
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js4
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js630
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json83
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown61
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json83
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md102
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md97
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js239
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json67
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js291
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md52
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js87
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json66
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md59
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js22
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js52
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json54
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js85
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml8
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md70
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js103
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json69
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js121
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md54
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js105
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md39
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js33
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json50
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json55
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js80
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js (renamed from deps/npm/node_modules/mississippi/node_modules/pump/test.js)0
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml8
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json67
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js181
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md41
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json56
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js122
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html336
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md9
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md136
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json86
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json65
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js96
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/package.json64
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/readme.md399
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml1
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md14
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js13
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/CHANGELOG.md175
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/LICENSE.md3
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/README.md462
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/index.js334
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/package.json90
-rw-r--r--deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json25
-rw-r--r--deps/npm/node_modules/npm-profile/package.json31
-rw-r--r--deps/npm/node_modules/npm-registry-client/CHANGELOG.md11
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/access.js8
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/adduser.js3
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/org.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/publish.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/request.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/team.js4
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json15
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE15
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md81
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js270
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json64
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md175
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md3
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md462
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js334
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json89
-rw-r--r--deps/npm/node_modules/npm-registry-client/package.json42
-rw-r--r--deps/npm/node_modules/osenv/.npmignore13
-rw-r--r--deps/npm/node_modules/osenv/.travis.yml9
-rw-r--r--deps/npm/node_modules/osenv/package.json42
-rw-r--r--deps/npm/node_modules/osenv/test/unix.js71
-rw-r--r--deps/npm/node_modules/osenv/test/windows.js74
-rw-r--r--deps/npm/node_modules/osenv/x.tap39
-rw-r--r--deps/npm/node_modules/pacote/CHANGELOG.md170
-rw-r--r--deps/npm/node_modules/pacote/extract.js124
-rw-r--r--deps/npm/node_modules/pacote/lib/extract-stream.js26
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/file.js14
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/git.js20
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js12
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js4
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js80
-rw-r--r--deps/npm/node_modules/pacote/lib/finalize-manifest.js12
-rw-r--r--deps/npm/node_modules/pacote/lib/util/git.js155
-rw-r--r--deps/npm/node_modules/pacote/lib/util/gunzip-maybe.js24
-rw-r--r--deps/npm/node_modules/pacote/lib/util/opt-check.js5
-rw-r--r--deps/npm/node_modules/pacote/lib/util/pack-dir.js4
-rw-r--r--deps/npm/node_modules/pacote/lib/with-tarball-stream.js135
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js12
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js46
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md25
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json12
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md6
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js497
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json26
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js33
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js301
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js61
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js385
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js181
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js64
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js98
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js75
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml14
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md35
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile44
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md176
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json30
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/inspector-log.js15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js124
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md11
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml14
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md35
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile44
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md176
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json28
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js124
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json25
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/index.js10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE24
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js143
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE35
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js630
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json83
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown61
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json83
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md102
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml6
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md97
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js241
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json67
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js291
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md52
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js87
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json66
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore3
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml6
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md59
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js52
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json54
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js85
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md70
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js103
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json69
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js121
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md54
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js105
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md39
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js33
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json50
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json55
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js80
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js58
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js46
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md56
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js56
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md56
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js82
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json59
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js62
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js53
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json67
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js181
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md41
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js58
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json53
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json56
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js122
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore3
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html336
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md136
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json86
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json65
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js96
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/package.json63
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/readme.md399
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md11
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js58
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md51
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js744
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js742
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js19
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js3
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js130
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js101
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json50
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/LICENSE21
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/README.md8
-rw-r--r--deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/protoduck/CHANGELOG.md17
-rw-r--r--deps/npm/node_modules/pacote/node_modules/protoduck/LICENSE20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/protoduck/package.json22
-rw-r--r--deps/npm/node_modules/pacote/package.json67
-rw-r--r--deps/npm/node_modules/pacote/tarball.js108
-rw-r--r--deps/npm/node_modules/query-string/index.js13
-rw-r--r--deps/npm/node_modules/query-string/package.json22
-rw-r--r--deps/npm/node_modules/query-string/readme.md42
-rw-r--r--deps/npm/node_modules/read-package-json/CHANGELOG.md11
-rw-r--r--deps/npm/node_modules/read-package-json/package.json36
-rw-r--r--deps/npm/node_modules/read-package-json/read-json.js24
-rw-r--r--deps/npm/node_modules/readable-stream/.npmignore9
-rw-r--r--deps/npm/node_modules/readable-stream/.travis.yml14
-rw-r--r--deps/npm/node_modules/readable-stream/README.md5
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_duplex.js6
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_readable.js62
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_transform.js68
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_writable.js37
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js13
-rw-r--r--deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js10
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js4
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json31
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/readme.md4
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/test.js24
-rw-r--r--deps/npm/node_modules/readable-stream/package.json51
-rw-r--r--deps/npm/node_modules/semver/README.md22
-rwxr-xr-xdeps/npm/node_modules/semver/bin/semver14
-rw-r--r--deps/npm/node_modules/semver/package.json31
-rw-r--r--deps/npm/node_modules/semver/range.bnf4
-rw-r--r--deps/npm/node_modules/semver/semver.js28
-rw-r--r--deps/npm/node_modules/ssri/CHANGELOG.md56
-rw-r--r--deps/npm/node_modules/ssri/README.md26
-rw-r--r--deps/npm/node_modules/ssri/index.js50
-rw-r--r--deps/npm/node_modules/ssri/package.json37
-rw-r--r--deps/npm/node_modules/tar/README.md66
-rw-r--r--deps/npm/node_modules/tar/lib/create.js23
-rw-r--r--deps/npm/node_modules/tar/lib/extract.js45
-rw-r--r--deps/npm/node_modules/tar/lib/header.js4
-rw-r--r--deps/npm/node_modules/tar/lib/list.js12
-rw-r--r--deps/npm/node_modules/tar/lib/mkdir.js1
-rw-r--r--deps/npm/node_modules/tar/lib/pack.js14
-rw-r--r--deps/npm/node_modules/tar/lib/parse.js15
-rw-r--r--deps/npm/node_modules/tar/lib/replace.js40
-rw-r--r--deps/npm/node_modules/tar/lib/unpack.js177
-rw-r--r--deps/npm/node_modules/tar/lib/write-entry.js45
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE (renamed from deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE)0
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/README.md70
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/index.js386
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/package.json65
-rw-r--r--deps/npm/node_modules/tar/node_modules/minizlib/index.js32
-rw-r--r--deps/npm/node_modules/tar/node_modules/minizlib/package.json24
-rw-r--r--deps/npm/node_modules/tar/package.json32
-rw-r--r--deps/npm/node_modules/uuid/.eslintrc.json5
-rw-r--r--deps/npm/node_modules/uuid/CHANGELOG.md57
-rw-r--r--deps/npm/node_modules/uuid/HISTORY.md27
-rw-r--r--deps/npm/node_modules/uuid/README.md162
-rw-r--r--deps/npm/node_modules/uuid/README_js.md280
-rwxr-xr-xdeps/npm/node_modules/uuid/bin/uuid15
-rw-r--r--deps/npm/node_modules/uuid/lib/md5-browser.js216
-rw-r--r--deps/npm/node_modules/uuid/lib/md5.js25
-rw-r--r--deps/npm/node_modules/uuid/lib/rng-browser.js21
-rw-r--r--deps/npm/node_modules/uuid/lib/rng.js10
-rw-r--r--deps/npm/node_modules/uuid/lib/sha1-browser.js6
-rw-r--r--deps/npm/node_modules/uuid/lib/sha1.js28
-rw-r--r--deps/npm/node_modules/uuid/lib/v35.js53
-rw-r--r--deps/npm/node_modules/uuid/package.json33
-rw-r--r--deps/npm/node_modules/uuid/v1.js37
-rw-r--r--deps/npm/node_modules/uuid/v3.js4
-rw-r--r--deps/npm/node_modules/uuid/v4.js2
-rw-r--r--deps/npm/node_modules/uuid/v5.js45
-rw-r--r--deps/npm/node_modules/worker-farm/.travis.yml1
-rw-r--r--deps/npm/node_modules/worker-farm/lib/farm.js4
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore1
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml11
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/README.md10
-rwxr-xr-xdeps/npm/node_modules/worker-farm/node_modules/errno/cli.js8
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/custom.js10
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml2
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE39
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md11
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md8
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json30
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/package.json30
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/worker-farm/node_modules/errno/test.js79
-rw-r--r--deps/npm/node_modules/worker-farm/package.json26
-rw-r--r--deps/npm/node_modules/worker-farm/tests/child.js85
-rw-r--r--deps/npm/node_modules/worker-farm/tests/debug.js11
-rw-r--r--deps/npm/node_modules/worker-farm/tests/index.js541
-rw-r--r--deps/npm/node_modules/write-file-atomic/README.md2
-rw-r--r--deps/npm/node_modules/write-file-atomic/index.js177
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/CHANGELOG.md27
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/LICENSE.txt16
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/README.md40
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/index.js157
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/package.json66
-rw-r--r--deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/signals.js53
-rw-r--r--deps/npm/node_modules/write-file-atomic/package.json24
-rw-r--r--deps/npm/package.json58
-rwxr-xr-xdeps/npm/scripts/maketest40
-rw-r--r--deps/npm/test/broken-under-nyc-and-travis/lifecycle-path.js2
-rw-r--r--deps/npm/test/tap/adduser-always-auth.js3
-rw-r--r--deps/npm/test/tap/adduser-legacy-auth.js3
-rw-r--r--deps/npm/test/tap/adduser-oauth.js3
-rw-r--r--deps/npm/test/tap/adduser-saml.js3
-rw-r--r--deps/npm/test/tap/auto-prune.js148
-rw-r--r--deps/npm/test/tap/bundled-dependencies-no-pkgjson.js55
-rw-r--r--deps/npm/test/tap/ci.js304
-rw-r--r--deps/npm/test/tap/config-envReplace.js55
-rw-r--r--deps/npm/test/tap/config-list.js2
-rw-r--r--deps/npm/test/tap/install-contributors-count.js70
-rw-r--r--deps/npm/test/tap/install-save-consistent-newlines.js122
-rw-r--r--deps/npm/test/tap/override-bundled.js10
-rw-r--r--deps/npm/test/tap/shrinkwrap-resolve-conflict.js117
-rw-r--r--deps/npm/test/tap/tagged-version-matching.js30
-rw-r--r--deps/npm/test/tap/unit-deps-earliestInstallable.js5
-rw-r--r--deps/npm/test/tap/unit-token-validate-cidr.js19
-rw-r--r--deps/npm/test/tap/version-consistent-newlines.js91
1451 files changed, 43796 insertions, 23927 deletions
diff --git a/deps/npm/.github/issue_template.md b/deps/npm/.github/issue_template.md
index f3a5861866..ec78009f76 100644
--- a/deps/npm/.github/issue_template.md
+++ b/deps/npm/.github/issue_template.md
@@ -3,6 +3,7 @@
- [ ] npm is crashing.
- [ ] npm is producing an incorrect install.
- [ ] npm is doing something I don't understand.
+ - [ ] npm is producing incorrect or undesirable behavior.
- [ ] Other (_see below for feature requests_):
#### What's going wrong?
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 014462125a..2349eb1c3d 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -536,3 +536,28 @@ Jacob Wejendorp <jacob@wejendorp.dk>
Alejandro LĆ³pez <a.lopez.sanchez@outlook.es>
Victor Belozyorov <hi@vbelozyorov.com>
Bradley Farias <bfarias@godaddy.com>
+Kyle E. Mitchell <kyle@kemitchell.com>
+Tuan Anh Tran <me@tuananh.org>
+Nathan Woltman <nwoltman@outlook.com>
+Kyra <kyranet@users.noreply.github.com>
+LeŠ°h Neukirchen <chneukirchen@gmail.com>
+Kyle Spier-Swenson <kyleshome@gmail.com>
+Joe Bowbeer <joe.bowbeer@gmail.com>
+Nalin Bhardwaj <6984346+nalinbhardwaj@users.noreply.github.com>
+Nicolas Garnier <ngarnier@users.noreply.github.com>
+Vladislav Rassokhin <vladrassokhin@gmail.com>
+Josh Goldberg <joshuakgoldberg@outlook.com>
+laggingreflex <laggingreflex@gmail.com>
+Kristofer Selbekk <selbekk@users.noreply.github.com>
+sreenivas alapati <sreenivas9alapati@gmail.com>
+Ben Creasy <ben@bencreasy.com>
+Allan Kimmer Jensen <allankimmerjensen@gmail.com>
+rinfan <rinfan@users.noreply.github.com>
+Matt Hoyle <code@deployable.co>
+Mason Pawsey <mpawsey@csub.edu>
+Johannes Bader <olydis@users.noreply.github.com>
+Michael Zabka <zabka.michael@gmail.com>
+Bruce MacNaughton <bmacnaughton@gmail.com>
+Christopher Patty <christopher.patty@aggiemail.usu.edu>
+Max Stoiber <contact@mxstbr.com>
+Enrico Weigelt <enrico.weigelt@gr13.net>
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index 0e42392d65..867868f83c 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,449 @@
+## v5.8.0 (2018-03-08):
+
+Hey again, everyone! While last release was focused largely around PRs from the
+CLI team, this release is mostly pulling in community PRs in npm itself and its
+dependencies! We've got a good chunk of wonderful contributions for y'all, and
+even new features and performance improvements! šŸŽ‰
+
+We're hoping to continue our biweekly (as in every-other-week biweekly) release
+schedule from now on, so you should be seeing more steady npm releases from here
+on out. And that's good, 'cause we've got a _ton_ of new stuff on our roadmap
+for this year. Keep an eye out for exciting news. šŸ‘€
+
+### FEATURES
+
+* [`2f513fe1c`](https://github.com/npm/npm/commit/2f513fe1ce6db055b04a63fe4360212a83f77b34)
+ [#19904](https://github.com/npm/npm/pull/19904)
+ Make a best-attempt at preserving line ending style when saving
+ `package.json`/`package-lock.json`/`npm-shrinkwrap.json`. This goes
+ hand-in-hand with a previous patch to preserve detected indentation style.
+ ([@tuananh](https://github.com/tuananh))
+* [`d3cfd41a2`](https://github.com/npm/npm/commit/d3cfd41a28253db5a18260f68642513cbbc93e3b)
+ `pacote@7.6.1` ([@zkat](https://github.com/zkat))
+ * Enable `file:`-based `resolved` URIs in `package-lock.json`.
+ * Retry git-based operations on certain types of failure.
+* [`ecfbb16dc`](https://github.com/npm/npm/commit/ecfbb16dc705f28aa61b3223bdbf9e47230a0fa4)
+ [#19929](https://github.com/npm/npm/pull/19929)
+ Add support for the [`NO_COLOR` standard](http://no-color.org). This gives a
+ cross-application, consistent way of disabling ANSI color code output. Note
+ that npm already supported this through `--no-color` or
+ `npm_config_color='false'` configurations, so this is just another way to do
+ it.
+ ([@chneukirchen](https://github.com/chneukirchen))
+* [`fc8761daf`](https://github.com/npm/npm/commit/fc8761daf1e8749481457973890fa516eb96a195)
+ [#19629](https://github.com/npm/npm/pull/19629)
+ Give more detailed, contextual information when npm fails to parse
+ `package-lock.json` and `npm-shrinkwrap.json`, instead of saying `JSON parse
+ error` and leaving you out in the cold.
+ ([@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg))
+* [`1d368e1e6`](https://github.com/npm/npm/commit/1d368e1e63229f236b9dbabf628989fa3aa98bdb)
+ [#19157](https://github.com/npm/npm/pull/19157)
+ Add `--no-proxy` config option. Previously, you needed to use the `NO_PROXY`
+ environment variable to use this feature -- now it's an actual npm option.
+ ([@Saturate](https://github.com/Saturate))
+* [`f0e998daa`](https://github.com/npm/npm/commit/f0e998daa049810d5f928615132250021e46451d)
+ [#18426](https://github.com/npm/npm/pull/18426)
+ Do environment variable replacement in config files even for config keys or
+ fragments of keys.
+ ([@misak113](https://github.com/misak113))
+* [`9847c82a8`](https://github.com/npm/npm/commit/9847c82a8528cfdf5968e9bb00abd8ed47903b5c)
+ [#18384](https://github.com/npm/npm/pull/18384)
+ Better error messaging and suggestions when users get `EPERM`/`EACCES` errors.
+ ([@chrisjpatty](https://github.com/chrisjpatty))
+* [`b9d0c0c01`](https://github.com/npm/npm/commit/b9d0c0c0173542a8d741a9a17b9fb34fbaf5068e)
+ [#19448](https://github.com/npm/npm/pull/19448)
+ Holiday celebrations now include all JavaScripters, not just Node developers.
+ ([@isaacs](https://github.com/isaacs))
+
+### NPM CI
+
+I hope y'all have been having fun with `npm ci` so far! Since this is the first
+release since that went out, we've had a few fixes and improvements now that
+folks have actually gotten their hands on it! Benchmarks have been super
+promising so far, and I've gotten messages from a lot of you saying you've sped
+up your CI work by **2-5x** in some cases! Have a good example? Tell us on
+Twitter!
+
+`npm ci` is, right now, [the fastest
+installer](http://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable)
+you can use in CI situations, so go check it out if you haven't already! We'll
+continue doing performance improvements on it, and a lot of those will help make
+`npm install` fast as well. šŸŽšŸ˜Ž
+
+* [`0d7f203d9`](https://github.com/npm/npm/commit/0d7f203d9e86cc6c8d69107689ea60fc7cbab424)
+ `libcipm@1.6.0`
+ ([@zkat](https://github.com/zkat))
+
+This `libcipm` release includes a number of improvements:
+
+* **PERFORMANCE** Reduce calls to `read-package-json` and separate JSON update phase from man/bin linking phase. `npm ci` should be noticeably faster.
+* **FEATURE** Progress bar now fills up as packages are installed, instead of sitting there doing nothing.
+* **BUGFIX** Add support for `--only` and `--also` options.
+* **BUFGIX** Linking binaries and running scripts in parallel was causing packages to sometimes clobber each other when hoisted, as well as potentially running too many run-scripts in parallel. This is now a serial operation, and it turns out to have had relatively little actual performance impact.
+* **BUGFIX** Stop adding `_from` to directory deps (aka `file:packages/my-dep`).
+
+### BUGFIXES
+
+* [`58d2aa58d`](https://github.com/npm/npm/commit/58d2aa58d5f9c4db49f57a5f33952b3106778669)
+ [#20027](https://github.com/npm/npm/pull/20027)
+ Use a specific mtime when packing tarballs instead of the beginning of epoch
+ time. This should allow `npm pack` to generate tarballs with identical hashes
+ for identical contents, while fixing issues with some `zip` implementations
+ that do not support pre-1980 timestamps.
+ ([@isaacs](https://github.com/isaacs))
+* [`4f319de1d`](https://github.com/npm/npm/commit/4f319de1d6e8aca5fb68f78023425233da4f07f6)
+ Don't fall back to couch adduser if we didn't try couch login.
+ ([@iarna](https://github.com/iarna))
+* [`c8230c9bb`](https://github.com/npm/npm/commit/c8230c9bbd596156a4a8cfe62f2370f81d22bd9f)
+ [#19608](https://github.com/npm/npm/pull/19608)
+ Fix issue where using the npm-bundled `npx` on Windows was invoking `npx
+ prefix` (and downloading that package).
+ ([@laggingreflex](https://github.com/laggingreflex))
+* [`d70c01970`](https://github.com/npm/npm/commit/d70c01970311f4e84b35eef8559c114136a9ebc7)
+ [#18953](https://github.com/npm/npm/pull/18953)
+ Avoid using code that depends on `node@>=4` in the `unsupported` check, so npm
+ can report the issue normally instead of syntax-crashing.
+ ([@deployable](https://github.com/deployable))
+
+### DOCUMENTATION
+
+* [`4477ca2d9`](https://github.com/npm/npm/commit/4477ca2d993088ac40ef5cf39d1f9c68be3d6252)
+ `marked@0.3.17`: Fixes issue preventing correct rendering of backticked
+ strings. man pages should be rendering correctly now instead of having empty
+ spaces wherever backticks were used.
+ ([@joshbruce](https://github.com/joshbruce))
+* [`71076ebda`](https://github.com/npm/npm/commit/71076ebdaddd04f2bf330fe668f15750bcff00ea)
+ [#19950](https://github.com/npm/npm/pull/19950)
+ Add a note to install --production.
+ ([@kyranet](https://github.com/kyranet))
+* [`3a33400b8`](https://github.com/npm/npm/commit/3a33400b89a8dd00fa9a49fcb57a8add36f79fa6)
+ [#19957](https://github.com/npm/npm/pull/19957)
+ nudge around some details in ci docs
+ ([@zkat](https://github.com/zkat))
+* [`06038246a`](https://github.com/npm/npm/commit/06038246a3fa58d6f42bb4ab897aa534ff6ed282)
+ [#19893](https://github.com/npm/npm/pull/19893)
+ Add a common open reason to the issue template.
+ ([@MrStonedOne](https://github.com/MrStonedOne))
+* [`7376dd8af`](https://github.com/npm/npm/commit/7376dd8afb654929adade126b4925461aa52da12)
+ [#19870](https://github.com/npm/npm/pull/19870)
+ Fix typo in `npm-config.md`
+ ([@joebowbeer](https://github.com/joebowbeer))
+* [`5390ed4fa`](https://github.com/npm/npm/commit/5390ed4fa2b480f7c58fff6ee670120149ec2d45)
+ [#19858](https://github.com/npm/npm/pull/19858)
+ Fix documented default value for config save option. It was still documented
+ as `false`, even though `npm@5.0.0` set it to `true` by default.
+ ([@nalinbhardwaj](https://github.com/nalinbhardwaj))
+* [`dc36d850a`](https://github.com/npm/npm/commit/dc36d850a1d763f71a98c99db05ca875dab124ed)
+ [#19552](https://github.com/npm/npm/pull/19552)
+ Rework `npm update` docs now that `--save` is on by default.
+ ([@selbekk](https://github.com/selbekk))
+* [`5ec5dffc8`](https://github.com/npm/npm/commit/5ec5dffc80527d9330388ff82926dd890f4945af)
+ [#19726](https://github.com/npm/npm/pull/19726)
+ Clarify that `name` and `version` fields are optional if your package is not
+ supposed to be installable as a dependency.
+ ([@ngarnier](https://github.com/ngarnier))
+* [`046500994`](https://github.com/npm/npm/commit/0465009942d6423f878c1359e91972fa5990f996)
+ [#19676](https://github.com/npm/npm/pull/19676)
+ Fix documented cache location on Windows.
+ ([@VladRassokhin](https://github.com/VladRassokhin))
+* [`ffa84cd0f`](https://github.com/npm/npm/commit/ffa84cd0f43c07858506764b4151ba6af11ea120)
+ [#19475](https://github.com/npm/npm/pull/19475)
+ Added example for `homepage` field from `package.json`.
+ ([@cg-cnu](https://github.com/cg-cnu))
+* [`de72d9a18`](https://github.com/npm/npm/commit/de72d9a18ae650ebaee0fdd6694fc89b1cbe8e95)
+ [#19307](https://github.com/npm/npm/pull/19307)
+ Document the `requires` field in `npm help package-lock.json`.
+ ([@jcrben](https://github.com/jcrben))
+* [`35c4abded`](https://github.com/npm/npm/commit/35c4abdedfa622f27e8ee47aa6e293f435323623)
+ [#18976](https://github.com/npm/npm/pull/18976)
+ Typo fix in coding style documentation.
+ ([@rinfan](https://github.com/rinfan))
+* [`0616fd22a`](https://github.com/npm/npm/commit/0616fd22a4e4f2b2998bb70d86d269756aab64be)
+ [#19216](https://github.com/npm/npm/pull/19216)
+ Add `edit` section to description in `npm-team.md`.
+ ([@WispProxy](https://github.com/WispProxy))
+* [`c2bbaaa58`](https://github.com/npm/npm/commit/c2bbaaa582d024cc48b410757efbb81d95837d43)
+ [#19194](https://github.com/npm/npm/pull/19194)
+ Tiny style fix in `npm.md`.
+ ([@WispProxy](https://github.com/WispProxy))
+* [`dcdfdcbb0`](https://github.com/npm/npm/commit/dcdfdcbb0035ef3290bd0912f562e26f6fc4ea94)
+ [#19192](https://github.com/npm/npm/pull/19192)
+ Document `--development` flag in `npm-ls.md`.
+ ([@WispProxy](https://github.com/WispProxy))
+* [`d7ff07135`](https://github.com/npm/npm/commit/d7ff07135a685dd89c15e29d6a28fca33cf448b0)
+ [#18514](https://github.com/npm/npm/pull/18514)
+ Make it so `javascript` -> `JavaScript`. This is important.
+ ([@masonpawsey](https://github.com/masonpawsey))
+* [`7a8705113`](https://github.com/npm/npm/commit/7a870511327d31e8921d6afa845ec8065c60064b)
+ [#18407](https://github.com/npm/npm/pull/18407)
+ Clarify the mechanics of the `file` field in `package.json` a bit.
+ ([@bmacnaughton](https://github.com/bmacnaughton))
+* [`b2a1cf084`](https://github.com/npm/npm/commit/b2a1cf0844ceaeb51ed04f3ae81678527ec9ae68)
+ [#18382](https://github.com/npm/npm/pull/18382)
+ Document the [`browser`
+ field](https://github.com/defunctzombie/package-browser-field-spec) in
+ `package.json`.
+ ([@mxstbr](https://github.com/mxstbr))
+
+### MISC
+
+* [`b8a48a959`](https://github.com/npm/npm/commit/b8a48a9595b379cfc2a2c576f61062120ea0caf7)
+ [#19907](https://github.com/npm/npm/pull/19907)
+ Consolidate code for stringifying `package.json` and package locks. Also adds
+ tests have been added to test that `package[-lock].json` files are written to
+ disk with their original line endings.
+ ([@nwoltman](https://github.com/nwoltman))
+* [`b4f707d9f`](https://github.com/npm/npm/commit/b4f707d9f543f0995ed5811827a892fc8b2192b5)
+ [#19879](https://github.com/npm/npm/pull/19879)
+ Remove unused devDependency `nock` from `.gitignore`.
+ ([@watilde](https://github.com/watilde))
+* [`8150dd5f7`](https://github.com/npm/npm/commit/8150dd5f72520eb143f75e44787a5775bd8b8ebc)
+ [#16540](https://github.com/npm/npm/pull/16540)
+ Stop doing an `uninstall` when using `make clean`.
+ ([@metux](https://github.com/metux))
+
+### OTHER DEPENDENCY BUMPS
+
+* [`ab237a2a5`](https://github.com/npm/npm/commit/ab237a2a5dcf70ee490e2f0322dfedb1560251d4)
+ `init-package-json@1.10.3`
+ ([@zkat](https://github.com/zkat))
+* [`f6d668941`](https://github.com/npm/npm/commit/f6d6689414f00a67a1f34afc6791bdc7d7be4d9b)
+ `npm-lifecycle@2.0.1`
+ ([@zkat](https://github.com/zkat))
+* [`882bfbdfa`](https://github.com/npm/npm/commit/882bfbdfaa3eb09b35875e648545cb6967f72562)
+ `npm-registry-client@8.5.1`
+ ([@zkat](https://github.com/zkat))
+* [`6ae38055b`](https://github.com/npm/npm/commit/6ae38055ba69db5785ee6c394372de0333763822)
+ `read-package-json@2.0.1`: Support git packed refs `--all` mode.
+ ([@zkat](https://github.com/zkat))
+* [`89db703ae`](https://github.com/npm/npm/commit/89db703ae4e25b9fb6c9d7c5119520107a23a752)
+ `readable-stream@2.3.5`
+ ([@mcollina](https://github.com/mcollina))
+* [`634dfa5f4`](https://github.com/npm/npm/commit/634dfa5f476b7954b136105a8f9489f5631085a3)
+ `worker-farm@1.5.4`
+ ([@rvagg](https://github.com/rvagg))
+* [`92ad34439`](https://github.com/npm/npm/commit/92ad344399f7a23e308d0f3f02547656a47ae6c5)
+ `hosted-git-info@2.6.0`
+ ([@zkat](https://github.com/zkat))
+* [`75279c488`](https://github.com/npm/npm/commit/75279c4884d02bd7d451b66616e320eb8cb03bcb)
+ `tar@4.4.0`
+ ([@isaacs](https://github.com/isaacs))
+* [`228aba276`](https://github.com/npm/npm/commit/228aba276b19c987cd5989f9bb9ffbe25edb4030)
+ `write-file-atomic@2.3.0`
+ ([@iarna](https://github.com/iarna))
+* [`006e9d272`](https://github.com/npm/npm/commit/006e9d272914fc3ba016f110b1411dd20f8a937d)
+ `libnpx@10.0.1`
+ ([@zkat](https://github.com/zkat))
+* [`9985561e6`](https://github.com/npm/npm/commit/9985561e666473deeb352c1d4252adf17c2fa01d)
+ `mississippi@3.0.0`
+ ([@bcomnes](https://github.com/bcomnes))
+* [`1dc6b3b52`](https://github.com/npm/npm/commit/1dc6b3b525967bc8526aa4765e987136cb570e8e)
+ `tap@11.1.2`
+ ([@isaacs](https://github.com/isaacs))
+
+## v5.7.1 (2018-02-22):
+
+This release reverts a patch that could cause some ownership changes on system
+files when running from some directories when also using `sudo`. šŸ˜²
+
+Thankfully, it only affected users running `npm@next`, which is part of our
+staggered release system, which we use to prevent issues like this from going
+out into the wider world before we can catch them. Users on `latest` would have
+never seen this!
+
+The original patch was added to increase consistency and reliability of methods
+npm uses to avoid writing files as `root` in places it shouldn't, but the change
+was applied in places that should have used regular `mkdirp`. This release
+reverts that patch.
+
+* [`74e149da6`](https://github.com/npm/npm/commit/74e149da6efe6ed89477faa81fef08eee7999ad0)
+ [`#19883`](https://github.com/npm/npm/issue/19883)
+ Revert "*: Switch from mkdirp to correctMkdir to preserve perms and owners"
+ This reverts commit [`94227e15`](https://github.com/npm/npm/commit/94227e15eeced836b3d7b3d2b5e5cc41d4959cff).
+ ([@zkat](https://github.com/zkat))
+
+## v5.7.0 (2018-02-20):
+
+Hey y'all, it's been a while. Expect our release rate to increase back to
+normal here, as we've got a lot in the pipeline. Right now we've got a
+bunch of things from folks at npm. In the next release we'll be focusing on
+user contributions and there are a lot of them queued up!
+
+This release brings a bunch of exciting new features and bug fixes.
+
+### PACKAGE-LOCK GIT MERGE CONFLICT RESOLUTION
+
+Allow `npm install` to fix `package-lock.json` and `npm-shrinkwrap.json`
+files that have merge conflicts in them without your having to edit them.
+It works in conjunction with
+[`npm-merge-driver`](https://www.npmjs.com/package/npm-merge-driver) to
+entirely eliminate package-lock merge conflicts.
+
+* [`e27674c22`](https://github.com/npm/npm/commit/e27674c221dc17473f23bffa50123e49a021ae34)
+ Automatically resolve merge conflicts in lock-files.
+ ([@zkat](https://github.com/zkat))
+
+### NPM CI
+
+The new `npm ci` command installs from your lock-file ONLY. If your
+`package.json` and your lock-file are out of sync then it will report an error.
+
+It works by throwing away your `node_modules` and recreating it from scratch.
+
+Beyond guaranteeing you that you'll only get what is in your lock-file it's
+also much faster (2x-10x!) than `npm install` when you don't start with a
+`node_modules`.
+
+As you may take from the name, we expect it to be a big boon to continuous
+integration environments. We also expect that folks who do production
+deploys from git tags will see major gains.
+
+* [`5e4de9c99`](https://github.com/npm/npm/commit/5e4de9c99c934e25ef7b9c788244cc3c993da559)
+ Add new `npm ci` installer.
+ ([@zkat](https://github.com/zkat))
+
+### OTHER NEW FEATURES
+
+* [`4d418c21b`](https://github.com/npm/npm/commit/4d418c21b051f23a3b6fb085449fdf4bf4f826f5)
+ [#19817](https://github.com/npm/npm/pull/19817)
+ Include contributor count in installation summary.
+ ([@kemitchell](https://github.com/kemitchell))
+* [`17079c2a8`](https://github.com/npm/npm/commit/17079c2a880d3a6f8a67c8f17eedc7eb51b8f0f8)
+ Require password to change email through `npm profile`.
+ ([@iarna](https://github.com/iarna))
+* [`e7c5d226a`](https://github.com/npm/npm/commit/e7c5d226ac0ad3da0e38f16721c710909d0a9847)
+ [`4f5327c05`](https://github.com/npm/npm/commit/4f5327c0556764aa1bbc9b58b1a8c8a84136c56a)
+ [#19780](https://github.com/npm/npm/pull/19780)
+ Add support for web-based logins. This is not yet available on the registry, however.
+ ([@isaacs](https://github.com/isaacs))
+
+### BIG FIXES TO PRUNING
+
+* [`827951590`](https://github.com/npm/npm/commit/8279515903cfa3026cf7096189485cdf29f74a8f)
+ Handle running `npm install package-name` with a `node_modules` containing
+ packages without sufficient metadata to verify their origin. The only way
+ to get install packages like this is to use a non-`npm` package manager.
+ Previously `npm` removed any packages that it couldn't verify. Now it
+ will leave them untouched as long as you're not asking for a full install.
+ On a full install they will be reinstalled (but the same versions will be
+ maintained).
+
+ This will fix problems for folks who are using a third party package
+ manager to install packages that have `postinstall` scripts that run
+ `npm install`.
+ ([@iarna](https://github.com/iarna))
+* [`3b305ee71`](https://github.com/npm/npm/commit/3b305ee71e2bf852ff3037366a1774b8c5fcc0a5)
+ Only auto-prune on installs that will create a lock-file. This restores
+ `npm@4` compatible behavior when the lock-file is disabled. When using a
+ lock-file `npm` will continue to remove anything in your `node_modules`
+ that's not in your lock-file. ([@iarna](https://github.com/iarna))
+* [`cec5be542`](https://github.com/npm/npm/commit/cec5be5427f7f5106a905de8630e1243e9b36ef4)
+ Fix bug where `npm prune --production` would remove dev deps from the lock
+ file. It will now only remove them from `node_modules` not from your lock
+ file.
+ ([@iarna](https://github.com/iarna))
+* [`857dab03f`](https://github.com/npm/npm/commit/857dab03f2d58586b45d41d3e5af0fb2d4e824d0)
+ Fix bug where git dependencies would be removed or reinstalled when
+ installing other dependencies.
+ ([@iarna](https://github.com/iarna))
+
+### BUG FIXES TO TOKENS AND PROFILES
+
+* [`a66e0cd03`](https://github.com/npm/npm/commit/a66e0cd0314893b745e6b9f6ca1708019b1d7aa3)
+ For CIDR filtered tokens, allow comma separated CIDR ranges, as documented. Previously
+ you could only pass in multiple cidr ranges with multiple `--cidr` command line options.
+ ([@iarna](https://github.com/iarna))
+* [`d259ab014`](https://github.com/npm/npm/commit/d259ab014748634a89cad5b20eb7a40f3223c0d5)
+ Fix token revocation when an OTP is required. Previously you had to pass
+ it in via `--otp`. Now it will prompt you for an OTP like other
+ `npm token` commands.
+ ([@iarna](https://github.com/iarna))
+* [`f8b1f6aec`](https://github.com/npm/npm/commit/f8b1f6aecadd3b9953c2b8b05d15f3a9cff67cfd)
+ Update token and profile commands to support legacy (username/password) authentication.
+ (The npm registry uses tokens, not username/password pairs, to authenticate commands.)
+ ([@iarna](https://github.com/iarna))
+
+### OTHER BUG FIXES
+
+* [`6954dfc19`](https://github.com/npm/npm/commit/6954dfc192f88ac263f1fcc66cf820a21f4379f1)
+ Fix a bug where packages would get pushed deeper into the tree when upgrading without
+ an existing copy on disk. Having packages deeper in the tree ordinarily is harmless but
+ is not when peerDependencies are in play.
+ ([@iarna](https://github.com/iarna))
+* [`1ca916a1e`](https://github.com/npm/npm/commit/1ca916a1e9cf94691d1ff2e5e9d0204cfaba39e1)
+ Fix bug where when switching from a linked module to a non-linked module, the dependencies
+ of the module wouldn't be installed on the first run of `npm install`.
+ ([@iarna](https://github.com/iarna))
+* [`8c120ebb2`](https://github.com/npm/npm/commit/8c120ebb28e87bc6fe08a3fad1bb87b50026a33a)
+ Fix integrity matching to eliminate spurious EINTEGRITY errors.
+ ([@zkat](https://github.com/zkat))
+* [`94227e15e`](https://github.com/npm/npm/commit/94227e15eeced836b3d7b3d2b5e5cc41d4959cff)
+ More consistently make directories using perm and ownership preserving features.
+ ([@iarna](https://github.com/iarna))
+
+### DEPENDENCY UPDATES
+
+* [`364b23c7f`](https://github.com/npm/npm/commit/364b23c7f8a231c0df3866d6a8bde4d3f37bbc00)
+ [`f2049f9e7`](https://github.com/npm/npm/commit/f2049f9e7992e6edcfce8619b59746789367150f)
+ `cacache@10.0.4`
+ ([@zkat](https://github.com/zkat))
+* [`d183d7675`](https://github.com/npm/npm/commit/d183d76757e8a29d63a999d7fb4edcc1486c25c1)
+ `find-npm-prefix@1.0.2`:
+ ([@iarna](https://github.com/iarna))
+* [`ffd6ea62c`](https://github.com/npm/npm/commit/ffd6ea62ce583baff38cf4901cf599639bc193c8)
+ `fs-minipass@1.2.5`
+* [`ee63b8a31`](https://github.com/npm/npm/commit/ee63b8a311ac53b0cf2efa79babe61a2c4083ef6)
+ `ini@1.3.5`
+ ([@isaacs](https://github.com/isaacs))
+* [`6f73f5509`](https://github.com/npm/npm/commit/6f73f5509e9e8d606526565c7ceb71c62642466e)
+ `JSONStream@1.3.2`
+ ([@dominictarr](https://github.com/dominictarr))
+* [`26cd64869`](https://github.com/npm/npm/commit/26cd648697c1324979289e381fe837f9837f3874)
+ [`9bc6230cf`](https://github.com/npm/npm/commit/9bc6230cf34a09b7e4358145ff0ac3c69c23c3f6)
+ `libcipm@1.3.3`
+ ([@zkat](https://github.com/zkat))
+* [`21a39be42`](https://github.com/npm/npm/commit/21a39be4241a60a898d11a5967f3fc9868ef70c9)
+ `marked@0.3.1`:5
+ ([@joshbruce](https://github.com/joshbruce))
+* [`dabdf57b2`](https://github.com/npm/npm/commit/dabdf57b2d60d665728894b4c1397b35aa9d41c0)
+ `mississippi@2.0.0`
+* [`2594c5867`](https://github.com/npm/npm/commit/2594c586723023edb1db172779afb2cbf8b30c08)
+ `npm-registry-couchapp@2.7.1`
+ ([@iarna](https://github.com/iarna))
+* [`8abb3f230`](https://github.com/npm/npm/commit/8abb3f230f119fe054353e70cb26248fc05db0b9)
+ `osenv@0.1.5`
+ ([@isaacs](https://github.com/isaacs))
+* [`11a0b00bd`](https://github.com/npm/npm/commit/11a0b00bd3c18625075dcdf4a5cb6500b33c6265)
+ `pacote@7.3.3`
+ ([@zkat](https://github.com/zkat))
+* [`9b6bdb2c7`](https://github.com/npm/npm/commit/9b6bdb2c77e49f6d473e70de4cd83c58d7147965)
+ `query-string@5.1.0`
+ ([@sindresorhus](https://github.com/sindresorhus))
+* [`d6d17d6b5`](https://github.com/npm/npm/commit/d6d17d6b532cf4c3461b1cf2e0404f7c62c47ec4)
+ `readable-stream@2.3.4`
+ ([@mcollina](https://github.com/mcollina))
+* [`51370aad5`](https://github.com/npm/npm/commit/51370aad561b368ccc95c1c935c67c8cd2844d40)
+ `semver@5.5.0`
+ ([@isaacs](https://github.com/isaacs))
+* [`0db14bac7`](https://github.com/npm/npm/commit/0db14bac762dd59c3fe17c20ee96d2426257cdd5)
+ [`81da938ab`](https://github.com/npm/npm/commit/81da938ab6efb881123cdcb44f7f84551924c988)
+ [`9999e83f8`](https://github.com/npm/npm/commit/9999e83f87c957113a12a6bf014a2099d720d716)
+ `ssri@5.2.4`
+ ([@zkat](https://github.com/zkat))
+* [`f526992ab`](https://github.com/npm/npm/commit/f526992ab6f7322a0b3a8d460dc48a2aa4a59a33)
+ `tap@11.1.1`
+ ([@isaacs](https://github.com/isaacs))
+* [`be096b409`](https://github.com/npm/npm/commit/be096b4090e2a33ae057912d28fadc5a53bd3391)
+ [`dc3059522`](https://github.com/npm/npm/commit/dc3059522758470adc225f0651be72c274bd29ef)
+ `tar@4.3.3`
+* [`6b552daac`](https://github.com/npm/npm/commit/6b552daac952f413ed0e2df762024ad219a8dc0a)
+ `uuid@3.2.1`
+ ([@broofa](https://github.com/broofa))
+* [`8c9011b72`](https://github.com/npm/npm/commit/8c9011b724ad96060e7e82d9470e9cc3bb64e9c6)
+ `worker-farm@1.5.2`
+ ([@rvagg](https://github.com/rvagg))
+
+
## v5.6.0 (2017-11-27):
### Features!
@@ -29,11 +475,6 @@ You may have noticed this is a semver-minor bump. Wondering why? This is why!
will allow npm to explicitly cache git dependencies.
([@isaacs](https://github.com/isaacs))
-### Performance
-
-* [`39ba4aa74`](https://github.com/npm/npm/commit/39ba4aa7479220e61573c0c1977124c2199f49d0)
- `tar@4.1.0`: Reduce number of overall fs operations during packing/unpacking.
-
### Node 9
Previously, it turns out npm broke on the latest Node, `node@9`. We went ahead
@@ -239,7 +680,7 @@ A very quick, record time, patch release, of a bug fix to a (sigh) last minute b
* [`e628e058b`](https://github.com/npm/npm/commit/e628e058b)
Fix login to properly recognize OTP request and store bearer tokens.
- ([@Rebecca Turner](https://github.com/Rebecca Turner))
+ ([@iarna](https://github.com/iarna))
## v5.5.0 (2017-10-04):
diff --git a/deps/npm/Makefile b/deps/npm/Makefile
index 42b7beda93..42e465e7d1 100644
--- a/deps/npm/Makefile
+++ b/deps/npm/Makefile
@@ -65,7 +65,7 @@ dev: install
link: uninstall
node bin/npm-cli.js link -f
-clean: markedclean marked-manclean doc-clean uninstall
+clean: markedclean marked-manclean doc-clean
rm -rf npmrc
node bin/npm-cli.js cache clean
diff --git a/deps/npm/bin/npx b/deps/npm/bin/npx
index a49c608bab..261e339850 100644
--- a/deps/npm/bin/npx
+++ b/deps/npm/bin/npx
@@ -12,18 +12,19 @@ if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi
+NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
NPX_CLI_JS="$basedir/node_modules/npm/bin/npx-cli.js"
case `uname` in
*MINGW*)
- NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g`
+ NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
fi
;;
*CYGWIN*)
- NPM_PREFIX=`"$NODE_EXE" "$NPX_CLI_JS" prefix -g`
+ NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ]; then
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
diff --git a/deps/npm/bin/npx.cmd b/deps/npm/bin/npx.cmd
index 02fcbd9ffc..9339ebd065 100644
--- a/deps/npm/bin/npx.cmd
+++ b/deps/npm/bin/npx.cmd
@@ -8,8 +8,9 @@ IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
+SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
-FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPX_CLI_JS%" prefix -g') DO (
+FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
)
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
diff --git a/deps/npm/doc/cli/npm-ci.md b/deps/npm/doc/cli/npm-ci.md
new file mode 100644
index 0000000000..b1406e36a5
--- /dev/null
+++ b/deps/npm/doc/cli/npm-ci.md
@@ -0,0 +1,58 @@
+npm-ci(1) -- Install a project with a clean slate
+===================================
+
+## SYNOPSIS
+
+ npm ci
+
+## EXAMPLE
+
+Make sure you have a package-lock and an up-to-date install:
+
+```
+$ cd ./my/npm/project
+$ npm install
+added 154 packages in 10s
+$ ls | grep package-lock
+```
+
+Run `npm ci` in that project
+
+```
+$ npm ci
+added 154 packages in 5s
+```
+
+Configure Travis to build using `npm ci` instead of `npm install`:
+
+```
+# .travis.yml
+install:
+- npm ci
+# keep the npm cache around to speed up installs
+cache:
+ directories:
+ - "$HOME/.npm"
+```
+
+## DESCRIPTION
+
+This command is similar to `npm-install(1)`, except it's meant to be used in
+automated environments such as test platforms, continuous integration, and
+deployment. It can be significantly faster than a regular npm install by
+skipping certain user-oriented features. It is also more strict than a regular
+install, which can help catch errors or inconsistencies caused by the
+incrementally-installed local environments of most npm users.
+
+In short, the main differences between using `npm install` and `npm ci` are:
+
+* The project **must** have an existing `package-lock.json` or `npm-shrinkwrap.json`.
+* If dependencies in the package lock do not match those in `package.json`, `npm ci` will exit with an error, instead of updating the package lock.
+* `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command.
+* If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install.
+* It will never write to `package.json` or any of the package-locks: installs are essentially frozen.
+
+## SEE ALSO
+
+* npm-install(1)
+* npm-package-locks(5)
diff --git a/deps/npm/doc/cli/npm-install.md b/deps/npm/doc/cli/npm-install.md
index 0489ddf94e..370c8f248b 100644
--- a/deps/npm/doc/cli/npm-install.md
+++ b/deps/npm/doc/cli/npm-install.md
@@ -55,6 +55,9 @@ after packing it up into a tarball (b).
is set to `production`), npm will not install modules listed in
`devDependencies`.
+ > NOTE: The `--production` flag has no particular meaning when adding a
+ dependency to a project.
+
* `npm install <folder>`:
Install the package in the directory as a symlink in the current project.
@@ -347,7 +350,8 @@ The `--no-shrinkwrap` argument, which will ignore an available
package lock or shrinkwrap file and use the package.json instead.
The `--no-package-lock` argument will prevent npm from creating a
-`package-lock.json` file.
+`package-lock.json` file. When running with package-lock's disabled npm
+will not automatically prune your node modules when installing.
The `--nodedir=/path/to/node/source` argument will allow npm to find the
node source code so that npm can compile native modules.
diff --git a/deps/npm/doc/cli/npm-ls.md b/deps/npm/doc/cli/npm-ls.md
index e665a735c3..7b10a19d69 100644
--- a/deps/npm/doc/cli/npm-ls.md
+++ b/deps/npm/doc/cli/npm-ls.md
@@ -76,7 +76,7 @@ Max display depth of the dependency tree.
Display only the dependency tree for packages in `dependencies`.
-### dev
+### dev / development
* Type: Boolean
* Default: false
diff --git a/deps/npm/doc/cli/npm-prune.md b/deps/npm/doc/cli/npm-prune.md
index c7f340ca7b..0dde244251 100644
--- a/deps/npm/doc/cli/npm-prune.md
+++ b/deps/npm/doc/cli/npm-prune.md
@@ -3,7 +3,7 @@ npm-prune(1) -- Remove extraneous packages
## SYNOPSIS
- npm prune [[<@scope>/]<pkg>...] [--production]
+ npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
## DESCRIPTION
@@ -16,9 +16,21 @@ package's dependencies list.
If the `--production` flag is specified or the `NODE_ENV` environment
variable is set to `production`, this command will remove the packages
-specified in your `devDependencies`. Setting `--production=false` will
+specified in your `devDependencies`. Setting `--no-production` will
negate `NODE_ENV` being set to `production`.
+If the `--dry-run` flag is used then no changes will actually be made.
+
+If the `--json` flag is used then the changes `npm prune` made (or would
+have made with `--dry-run`) are printed as a JSON object.
+
+In normal operation with package-locks enabled, extraneous modules are
+pruned automatically when modules are installed and you'll only need
+this command with the `--production` flag.
+
+If you've disabled package-locks then extraneous modules will not be removed
+and it's up to you to run `npm prune` from time-to-time to remove them.
+
## SEE ALSO
* npm-uninstall(1)
diff --git a/deps/npm/doc/cli/npm-team.md b/deps/npm/doc/cli/npm-team.md
index 5a8b4b63e3..9e01a451c7 100644
--- a/deps/npm/doc/cli/npm-team.md
+++ b/deps/npm/doc/cli/npm-team.md
@@ -34,6 +34,9 @@ when operating on them, separated by a colon (`:`). That is, if you have a
under that organization. If performed on a team, it will instead return a list
of all users belonging to that particular team.
+* edit:
+ Edit a current team.
+
## DETAILS
`npm team` always operates directly on the current registry, configurable from
diff --git a/deps/npm/doc/cli/npm-update.md b/deps/npm/doc/cli/npm-update.md
index d6ec30d2ae..b6cf2af78b 100644
--- a/deps/npm/doc/cli/npm-update.md
+++ b/deps/npm/doc/cli/npm-update.md
@@ -26,6 +26,10 @@ As of `npm@2.6.1`, the `npm update` will only inspect top-level packages.
Prior versions of `npm` would also recursively inspect all dependencies.
To get the old behavior, use `npm --depth 9999 update`.
+As of `npm@5.0.0`, the `npm update` will change `package.json` to save the
+new version as the minimum required dependency. To get the old behavior,
+use `npm update --no-save`.
+
## EXAMPLES
IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For
@@ -104,30 +108,6 @@ If the dependence were on `^0.4.0`:
Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
-### Recording Updates with `--save`
-
-When you want to update a package and save the new version as
-the minimum required dependency in `package.json`, you can use
-`npm update -S` or `npm update --save`. For example if
-`package.json` contains:
-
-```
-"dependencies": {
- "dep1": "^1.1.1"
-}
-```
-
-Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`),
-and `package.json` will be modified:
-
-```
-"dependencies": {
- "dep1": "^1.2.2"
-}
-```
-
-Note that `npm` will only write an updated version to `package.json`
-if it installs a new package.
### Updating Globally-Installed Packages
diff --git a/deps/npm/doc/cli/npm.md b/deps/npm/doc/cli/npm.md
index ec867e5f9e..e41e7252e3 100644
--- a/deps/npm/doc/cli/npm.md
+++ b/deps/npm/doc/cli/npm.md
@@ -93,7 +93,7 @@ npm is extremely configurable. It reads its configuration options from
* Command line switches:
Set a config with `--key val`. All keys take a value, even if they
are booleans (the config parser doesn't know what the options are at
- the time of parsing.) If no value is provided, then the option is set
+ the time of parsing). If no value is provided, then the option is set
to boolean `true`.
* Environment Variables:
Set any config by prefixing the name in an environment variable with
diff --git a/deps/npm/doc/files/npm-folders.md b/deps/npm/doc/files/npm-folders.md
index 74c7883443..456cb58bc8 100644
--- a/deps/npm/doc/files/npm-folders.md
+++ b/deps/npm/doc/files/npm-folders.md
@@ -68,7 +68,7 @@ Man pages are not installed on Windows systems.
### Cache
See `npm-cache(1)`. Cache files are stored in `~/.npm` on Posix, or
-`~/npm-cache` on Windows.
+`%AppData%/npm-cache` on Windows.
This is controlled by the `cache` configuration param.
diff --git a/deps/npm/doc/files/npm-package-locks.md b/deps/npm/doc/files/npm-package-locks.md
index c57fc85658..cbb62bdc38 100644
--- a/deps/npm/doc/files/npm-package-locks.md
+++ b/deps/npm/doc/files/npm-package-locks.md
@@ -136,6 +136,25 @@ on. Additionally, the diffs from these changes are human-readable and will
inform you of any changes npm has made to your `node_modules`, so you can notice
if any transitive dependencies were updated, hoisted, etc.
+### Resolving lockfile conflicts
+
+Occasionally, two separate npm install will create package locks that cause
+merge conflicts in source control systems. As of `npm@5.7.0`, these conflicts
+can be resolved by manually fixing any `package.json` conflicts, and then
+running `npm install [--package-lock-only]` again. npm will automatically
+resolve any conflicts for you and write a merged package lock that includes all
+the dependencies from both branches in a reasonable tree. If
+`--package-lock-only` is provided, it will do this without also modifying your
+local `node_modules/`.
+
+To make this process seamless on git, consider installing
+[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how
+to do this itself without any user interaction. In short: `$ npx
+npm-merge-driver install -g` will let you do this, and even works with
+pre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if
+`package.json` itself conflicts, you will have to resolve that by hand and run
+`npm install` manually, even with the merge driver.
+
## SEE ALSO
* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
diff --git a/deps/npm/doc/files/package-lock.json.md b/deps/npm/doc/files/package-lock.json.md
index 4c134fc229..1b4ba93497 100644
--- a/deps/npm/doc/files/package-lock.json.md
+++ b/deps/npm/doc/files/package-lock.json.md
@@ -120,6 +120,15 @@ transitive dependency of a non-optional dependency of the top level.
All optional dependencies should be included even if they're uninstallable
on the current platform.
+
+#### requires
+
+This is a mapping of module name to version. This is a list of everything
+this module requires, regardless of where it will be installed. The version
+should match via normal matching rules a dependency either in our
+`dependencies` or in a level higher than us.
+
+
#### dependencies
The dependencies of this dependency, exactly as at the top level.
@@ -128,5 +137,6 @@ The dependencies of this dependency, exactly as at the top level.
* npm-shrinkwrap(1)
* npm-shrinkwrap.json(5)
+* npm-package-locks(5)
* package.json(5)
* npm-install(1)
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index d91984d1d4..e8db328ed5 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -11,11 +11,11 @@ settings described in `npm-config(7)`.
## name
-The *most* important things in your package.json are the name and version fields.
-Those are actually required, and your package won't install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.
+If you plan to publish your package, the *most* important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don't
+plan to publish your package, the name and version fields are optional.
The name is what your thing is called.
@@ -44,11 +44,11 @@ A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
## version
-The *most* important things in your package.json are the name and version fields.
-Those are actually required, and your package won't install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.
+If you plan to publish your package, the *most* important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don't
+plan to publish your package, the name and version fields are optional.
Version must be parseable by
[node-semver](https://github.com/isaacs/node-semver), which is bundled
@@ -70,6 +70,10 @@ discover your package as it's listed in `npm search`.
The url to the project homepage.
+Example:
+
+ "homepage": "https://github.com/owner/project#readme"
+
## bugs
The url to your project's issue tracker and / or the email address to which
@@ -168,13 +172,15 @@ npm also sets a top-level "maintainers" field with your npm user info.
## files
-The optional "files" field is an array of file patterns that describes
+The optional `files` field is an array of file patterns that describes
the entries to be included when your package is installed as a
-dependency. If the files array is omitted, everything except
-automatically-excluded files will be included in your publish. If you
-name a folder in the array, then it will also include the files inside
-that folder (unless they would be ignored by another rule in this
-section.).
+dependency. File patterns follow a similar syntax to `.gitignore`, but
+reversed: including a file, directory, or glob pattern (`*`, `**/*`, and such)
+will make it so that file is included in the tarball when it's packed. Omitting
+the field will make it default to `["*"]`, which means it will include all files.
+
+Some special files and directories are also included or excluded regardless of
+whether they exist in the `files` array (see below).
You can also provide a `.npmignore` file in the root of your package or
in subdirectories, which will keep files from being included. At the
@@ -226,6 +232,12 @@ This should be a module ID relative to the root of your package folder.
For most modules, it makes the most sense to have a main script and often not
much else.
+## browser
+
+If your module is meant to be used client-side the browser field should be
+used instead of the main field. This is helpful to hint users that it might
+rely on primitives that aren't available in Node.js modules. (e.g. `window`)
+
## bin
A lot of packages have one or more executable files that they'd like to
diff --git a/deps/npm/doc/misc/npm-coding-style.md b/deps/npm/doc/misc/npm-coding-style.md
index e6837bfbf3..1199f63fcc 100644
--- a/deps/npm/doc/misc/npm-coding-style.md
+++ b/deps/npm/doc/misc/npm-coding-style.md
@@ -115,7 +115,7 @@ Good:
## Whitespace
-Put a single space in front of ( for anything other than a function call.
+Put a single space in front of `(` for anything other than a function call.
Also use a single space wherever it makes things more readable.
Don't leave trailing whitespace at the end of lines. Don't indent empty
diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md
index 0ab0418918..8ff052bc97 100644
--- a/deps/npm/doc/misc/npm-config.md
+++ b/deps/npm/doc/misc/npm-config.md
@@ -284,6 +284,9 @@ This is a list of CIDR address to be used when configuring limited access tokens
If false, never shows colors. If `"always"` then always shows colors.
If true, then only prints color codes for tty file descriptors.
+This option can also be changed using the environment: colors are
+disabled when the environment variable `NO_COLOR` is set to any value.
+
### depth
* Default: Infinity
@@ -672,6 +675,13 @@ impact how lifecycle scripts are called.
The node version to use when checking a package's `engines` map.
+### no-proxy
+
+* Default: null
+* Type: String or Array
+
+A comma-separated string or an array of domain extensions that a proxy should not be used for.
+
### offline
* Default: false
@@ -731,6 +741,10 @@ when publishing or changing package permissions with `npm access`.
If set to false, then ignore `package-lock.json` files when installing. This
will also prevent _writing_ `package-lock.json` if `save` is true.
+When package package-locks are disabled, automatic pruning of extraneous
+modules will also be disabled. To remove extraneous modules with
+package-locks disabled use `npm prune`.
+
This option is an alias for `--shrinkwrap`.
### package-lock-only
@@ -738,7 +752,7 @@ This option is an alias for `--shrinkwrap`.
* Default: false
* Type: Boolean
-If set to true, it will update only the `package-json`,
+If set to true, it will update only the `package-lock.json`,
instead of checking `node_modules` and downloading dependencies.
### parseable
@@ -835,7 +849,7 @@ Remove failed installs.
### save
-* Default: false
+* Default: true
* Type: Boolean
Save installed packages to a package.json file as dependencies.
diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md
index 2f54b98fb9..55c8d9b08d 100644
--- a/deps/npm/doc/misc/npm-developers.md
+++ b/deps/npm/doc/misc/npm-developers.md
@@ -57,7 +57,7 @@ least, you need:
use the name to specify that it runs on node, or is in JavaScript.
You can use the "engines" field to explicitly state the versions of
node (or whatever else) that your program requires, and it's pretty
- well assumed that it's javascript.
+ well assumed that it's JavaScript.
It does not necessarily need to match your github repository name.
diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md
index 64fb25de2e..1656836709 100644
--- a/deps/npm/doc/misc/npm-index.md
+++ b/deps/npm/doc/misc/npm-index.md
@@ -41,6 +41,10 @@ REMOVED
Manipulates packages cache
+### npm-ci(1)
+
+Install a project with a clean slate
+
### npm-completion(1)
Tab Completion for npm
diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md
index 993621a6fd..ab6f72c13e 100644
--- a/deps/npm/doc/misc/semver.md
+++ b/deps/npm/doc/misc/semver.md
@@ -20,6 +20,8 @@ semver.clean(' =v1.2.3 ') // '1.2.3'
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
```
As a command-line utility:
@@ -52,6 +54,10 @@ Options:
-l --loose
Interpret versions and ranges loosely
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@@ -364,3 +370,19 @@ satisfy the range.
If you want to know if a version satisfies or does not satisfy a
range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver
+string to semver. It looks for the first digit in a string, and
+consumes all remaining characters which satisfy at least a partial semver
+(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
+Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
+All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
+Only text which lacks digits will fail coercion (`version one` is not valid).
+The maximum length for any semver component considered for coercion is 16 characters;
+longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
+The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
+higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index 48f8433f62..b5554e850e 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -127,5 +127,5 @@ doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@5.6.0</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html
index 5fb7cfb002..6c89adf6c5 100644
--- a/deps/npm/html/doc/cli/npm-access.html
+++ b/deps/npm/html/doc/cli/npm-access.html
@@ -86,5 +86,5 @@ with an HTTP 402 status code (logically enough), unless you use
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-access &mdash; npm@5.6.0</p>
+<p id="footer">npm-access &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 90d247f5f5..346f3ad958 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -81,5 +81,5 @@ username/password entry in legacy npm.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-adduser &mdash; npm@5.6.0</p>
+<p id="footer">npm-adduser &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 677f621a97..f792161c99 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bin &mdash; npm@5.6.0</p>
+<p id="footer">npm-bin &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 3437dd4380..de15127729 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -55,5 +55,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bugs &mdash; npm@5.6.0</p>
+<p id="footer">npm-bugs &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index 51544a4532..2c28fca9d6 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -40,5 +40,5 @@ directly, run:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-build &mdash; npm@5.6.0</p>
+<p id="footer">npm-build &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 94cf6ed12b..9c74d31fa7 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -31,5 +31,5 @@ install packages into the local space.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bundle &mdash; npm@5.6.0</p>
+<p id="footer">npm-bundle &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index 71d5297a9c..0402d67bd9 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -89,5 +89,5 @@ verify</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-cache &mdash; npm@5.6.0</p>
+<p id="footer">npm-cache &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-ci.html b/deps/npm/html/doc/cli/npm-ci.html
new file mode 100644
index 0000000000..e380a1d9ee
--- /dev/null
+++ b/deps/npm/html/doc/cli/npm-ci.html
@@ -0,0 +1,64 @@
+<!doctype html>
+<html>
+ <title>npm-ci</title>
+ <meta charset="utf-8">
+ <link rel="stylesheet" type="text/css" href="../../static/style.css">
+ <link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-ci.html">
+ <script async=true src="../../static/toc.js"></script>
+
+ <body>
+ <div id="wrapper">
+
+<h1><a href="../cli/npm-ci.html">npm-ci</a></h1> <p>Install a project with a clean slate</p>
+<h2 id="synopsis">SYNOPSIS</h2>
+<pre><code>npm ci
+</code></pre><h2 id="example">EXAMPLE</h2>
+<p>Make sure you have a package-lock and an up-to-date install:</p>
+<pre><code>$ cd ./my/npm/project
+$ npm install
+added 154 packages in 10s
+$ ls | grep package-lock
+</code></pre><p>Run <code>npm ci</code> in that project</p>
+<pre><code>$ npm ci
+added 154 packages in 5s
+</code></pre><p>Configure Travis to build using <code>npm ci</code> instead of <code>npm install</code>:</p>
+<pre><code># .travis.yml
+install:
+- npm ci
+# keep the npm cache around to speed up installs
+cache:
+ directories:
+ - &quot;$HOME/.npm&quot;
+</code></pre><h2 id="description">DESCRIPTION</h2>
+<p>This command is similar to <code><a href="../cli/npm-install.html">npm-install(1)</a></code>, except it&#39;s meant to be used in
+automated environments such as test platforms, continuous integration, and
+deployment. It can be significantly faster than a regular npm install by
+skipping certain user-oriented features. It is also more strict than a regular
+install, which can help catch errors or inconsistencies caused by the
+incrementally-installed local environments of most npm users.</p>
+<p>In short, the main differences between using <code>npm install</code> and <code>npm ci</code> are:</p>
+<ul>
+<li>The project <strong>must</strong> have an existing <code>package-lock.json</code> or <code>npm-shrinkwrap.json</code>.</li>
+<li>If dependencies in the package lock do not match those in <code>package.json</code>, <code>npm ci</code> will exit with an error, instead of updating the package lock.</li>
+<li><code>npm ci</code> can only install entire projects at a time: individual dependencies cannot be added with this command.</li>
+<li>If a <code>node_modules</code> is already present, it will be automatically removed before <code>npm ci</code> begins its install.</li>
+<li>It will never write to <code>package.json</code> or any of the package-locks: installs are essentially frozen.</li>
+</ul>
+<h2 id="see-also">SEE ALSO</h2>
+<ul>
+<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
+<li><a href="../files/npm-package-locks.html">npm-package-locks(5)</a></li>
+</ul>
+
+</div>
+
+<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
+<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr>
+<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr>
+<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr>
+<tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr>
+<tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr>
+<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
+<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
+</table>
+<p id="footer">npm-ci &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 7a37048a8a..2757893f2a 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -43,5 +43,5 @@ completions based on the arguments.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-completion &mdash; npm@5.6.0</p>
+<p id="footer">npm-completion &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index ccacfe9c39..87d6d9ce62 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -68,5 +68,5 @@ global config.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@5.6.0</p>
+<p id="footer">npm-config &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index e21605193f..cd318e501b 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -61,5 +61,5 @@ result in new modules being installed.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dedupe &mdash; npm@5.6.0</p>
+<p id="footer">npm-dedupe &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index f82a6b6d18..d33d15145a 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -38,5 +38,5 @@ something like this:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-deprecate &mdash; npm@5.6.0</p>
+<p id="footer">npm-deprecate &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 6f8bc9744f..6e67c419ff 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -88,5 +88,5 @@ begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dist-tag &mdash; npm@5.6.0</p>
+<p id="footer">npm-dist-tag &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 165159af15..3efa2a1aec 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-docs &mdash; npm@5.6.0</p>
+<p id="footer">npm-docs &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html
index 8eba9f172d..92ca7d5122 100644
--- a/deps/npm/html/doc/cli/npm-doctor.html
+++ b/deps/npm/html/doc/cli/npm-doctor.html
@@ -32,7 +32,7 @@ old versions of npm. Since npm is constantly improving, running <code>npm@latest
better than an old version.</p>
<p><code>npm doctor</code> verifies the following items in your environment, and if there are
any recommended changes, it will display them.</p>
-<h3 id="-npm-ping-"><code>npm ping</code></h3>
+<h3 id="npm-ping"><code>npm ping</code></h3>
<p>By default, npm installs from the primary npm registry, <code>registry.npmjs.org</code>.
<code>npm doctor</code> hits a special ping endpoint within the registry. This can also be
checked with <code>npm ping</code>. If this check fails, you may be using a proxy that
@@ -42,7 +42,7 @@ HTTPS to <code>registry.npmjs.org</code>.</p>
what that is by running <code>npm config get registry</code>), and if you&#39;re using a
private registry that doesn&#39;t support the <code>/whoami</code> endpoint supported by the
primary registry, this check may fail.</p>
-<h3 id="-npm-v-"><code>npm -v</code></h3>
+<h3 id="npm-v"><code>npm -v</code></h3>
<p>While Node.js may come bundled with a particular version of npm, it&#39;s the
policy of the CLI team that we recommend all users run <code>npm@latest</code> if they
can. As the CLI is maintained by a small team of contributors, there are only
@@ -50,21 +50,21 @@ resources for a single line of development, so npm&#39;s own long-term support
releases typically only receive critical security and regression fixes. The
team believes that the latest tested version of npm is almost always likely to
be the most functional and defect-free version of npm.</p>
-<h3 id="-node-v-"><code>node -v</code></h3>
+<h3 id="node-v"><code>node -v</code></h3>
<p>For most users, in most circumstances, the best version of Node will be the
latest long-term support (LTS) release. Those of you who want access to new
ECMAscript features or bleeding-edge changes to Node&#39;s standard library may be
running a newer version, and some of you may be required to run an older
version of Node because of enterprise change control policies. That&#39;s OK! But
in general, the npm team recommends that most users run Node.js LTS.</p>
-<h3 id="-npm-config-get-registry-"><code>npm config get registry</code></h3>
+<h3 id="npm-config-get-registry"><code>npm config get registry</code></h3>
<p>Some of you may be installing from private package registries for your project
or company. That&#39;s great! Others of you may be following tutorials or
StackOverflow questions in an effort to troubleshoot problems you may be
having. Sometimes, this may entail changing the registry you&#39;re pointing at.
This part of <code>npm doctor</code> just lets you, and maybe whoever&#39;s helping you with
support, know that you&#39;re not using the default registry.</p>
-<h3 id="-which-git-"><code>which git</code></h3>
+<h3 id="which-git"><code>which git</code></h3>
<p>While it&#39;s documented in the <a href="../../doc/README.html">README</a>, it may not be obvious that npm needs Git
installed to do many of the things that it does. Also, in some cases
ā€“ especially on Windows ā€“ you may have Git set up in such a way that it&#39;s not
@@ -103,4 +103,4 @@ cache, you should probably run <code>npm cache clean</code> and reset the cache.
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-doctor &mdash; npm@5.6.0</p>
+<p id="footer">npm-doctor &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 651990084d..b31046dec4 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -49,5 +49,5 @@ or <code>&quot;notepad&quot;</code> on Windows.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-edit &mdash; npm@5.6.0</p>
+<p id="footer">npm-edit &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index bab3a861ec..c4632c3d19 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -49,5 +49,5 @@ Windows</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-explore &mdash; npm@5.6.0</p>
+<p id="footer">npm-explore &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 01b1ff62d2..018d15ca53 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -45,5 +45,5 @@ where the terms were found in the documentation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help-search &mdash; npm@5.6.0</p>
+<p id="footer">npm-help-search &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 8adf3b3843..7f6d9b1277 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help &mdash; npm@5.6.0</p>
+<p id="footer">npm-help &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 115c9b2185..fdb928bef6 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -48,5 +48,5 @@ defaults and not prompt you for any options.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-init &mdash; npm@5.6.0</p>
+<p id="footer">npm-init &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html
index 71262400b3..69455af2ab 100644
--- a/deps/npm/html/doc/cli/npm-install-test.html
+++ b/deps/npm/html/doc/cli/npm-install-test.html
@@ -42,5 +42,5 @@ takes exactly the same arguments as <code>npm install</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install-test &mdash; npm@5.6.0</p>
+<p id="footer">npm-install-test &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 5989cc25a1..dfd815337c 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -54,6 +54,10 @@ after packing it up into a tarball (b).</p>
<p> With the <code>--production</code> flag (or when the <code>NODE_ENV</code> environment variable
is set to <code>production</code>), npm will not install modules listed in
<code>devDependencies</code>.</p>
+<blockquote>
+<p>NOTE: The <code>--production</code> flag has no particular meaning when adding a
+ dependency to a project.</p>
+</blockquote>
</li>
<li><p><code>npm install &lt;folder&gt;</code>:</p>
<p> Install the package in the directory as a symlink in the current project.
@@ -281,7 +285,8 @@ being installed.</p>
<p>The <code>--no-shrinkwrap</code> argument, which will ignore an available
package lock or shrinkwrap file and use the package.json instead.</p>
<p>The <code>--no-package-lock</code> argument will prevent npm from creating a
-<code>package-lock.json</code> file.</p>
+<code>package-lock.json</code> file. When running with package-lock&#39;s disabled npm
+will not automatically prune your node modules when installing.</p>
<p>The <code>--nodedir=/path/to/node/source</code> argument will allow npm to find the
node source code so that npm can compile native modules.</p>
<p>The <code>--only={prod[uction]|dev[elopment]}</code> argument will cause either only
@@ -369,5 +374,5 @@ affects a real use-case, it will be investigated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install &mdash; npm@5.6.0</p>
+<p id="footer">npm-install &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 57a6ae8673..f0990ecd97 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -74,5 +74,5 @@ include that scope, e.g.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-link &mdash; npm@5.6.0</p>
+<p id="footer">npm-link &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html
index a06341b2d2..1b57798fca 100644
--- a/deps/npm/html/doc/cli/npm-logout.html
+++ b/deps/npm/html/doc/cli/npm-logout.html
@@ -51,5 +51,5 @@ it takes precedence.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-logout &mdash; npm@5.6.0</p>
+<p id="footer">npm-logout &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index 4ba0917179..5d0594174b 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
-<pre><code>npm@5.6.0 /path/to/npm
+<pre><code>npm@5.8.0 /path/to/npm
ā””ā”€ā”¬ init-package-json@0.0.4
ā””ā”€ā”€ promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@@ -68,7 +68,7 @@ project.</p>
<li>Default: false</li>
</ul>
<p>Display only the dependency tree for packages in <code>dependencies</code>.</p>
-<h3 id="dev">dev</h3>
+<h3 id="dev-development">dev / development</h3>
<ul>
<li>Type: Boolean</li>
<li>Default: false</li>
@@ -110,5 +110,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ls &mdash; npm@5.6.0</p>
+<p id="footer">npm-ls &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index d59e0548a3..c11626edac 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -58,10 +58,9 @@ The installed committish might satisfy the dependency specifier (if it&#39;s
something immutable, like a commit SHA), or it might not, so <code>npm outdated</code> and
<code>npm update</code> have to fetch Git repos to check. This is why currently doing a
reinstall of a Git dependency always forces a new clone and install.</li>
-<li><code>npm@3.5.2</code> is marked as &quot;wanted&quot;, but &quot;latest&quot; is <code>npm@3.5.1</code> because npm
-uses dist-tags to manage its <code>latest</code> and <code>next</code> release channels. <code>npm update</code>
-will install the <em>newest</em> version, but <code>npm install npm</code> (with no semver range)
-will install whatever&#39;s tagged as <code>latest</code>.</li>
+<li><a href="mailto:`npm@3.5.2">`npm@3.5.2</a><code>is marked as &quot;wanted&quot;, but &quot;latest&quot; is</code><a href="mailto:npm@3.5.1">npm@3.5.1</a><code>because npm
+uses dist-tags to manage its</code>latest<code>and</code>next<code>release channels.</code>npm update<code>will install the _newest_ version, but</code>npm install npm<code>(with no semver range)
+will install whatever&#39;s tagged as</code>latest`.</li>
<li><code>once</code> is just plain out of date. Reinstalling <code>node_modules</code> from scratch or
running <code>npm update</code> will bring it up to spec.</li>
</ul>
@@ -116,5 +115,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-outdated &mdash; npm@5.6.0</p>
+<p id="footer">npm-outdated &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 6b28ab48d1..a7096783ed 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -54,5 +54,5 @@ with <code>--otp</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-owner &mdash; npm@5.6.0</p>
+<p id="footer">npm-owner &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 35e6670bef..12d616316b 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-pack &mdash; npm@5.6.0</p>
+<p id="footer">npm-pack &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html
index 4b67c2686e..4332ceed24 100644
--- a/deps/npm/html/doc/cli/npm-ping.html
+++ b/deps/npm/html/doc/cli/npm-ping.html
@@ -36,5 +36,5 @@ If it works it will output something like:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ping &mdash; npm@5.6.0</p>
+<p id="footer">npm-ping &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index ebb2f6a3c6..286b1120b0 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ to contain a package.json file unless <code>-g</code> is also specified.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prefix &mdash; npm@5.6.0</p>
+<p id="footer">npm-prefix &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-profile.html b/deps/npm/html/doc/cli/npm-profile.html
index 3d952205f4..069842d35a 100644
--- a/deps/npm/html/doc/cli/npm-profile.html
+++ b/deps/npm/html/doc/cli/npm-profile.html
@@ -90,4 +90,4 @@ available on non npmjs.com registries.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-profile &mdash; npm@5.6.0</p>
+<p id="footer">npm-profile &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index f71aa0c212..053139b8ed 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -11,7 +11,7 @@
<h1><a href="../cli/npm-prune.html">npm-prune</a></h1> <p>Remove extraneous packages</p>
<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm prune [[&lt;@scope&gt;/]&lt;pkg&gt;...] [--production]
+<pre><code>npm prune [[&lt;@scope&gt;/]&lt;pkg&gt;...] [--production] [--dry-run] [--json]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command removes &quot;extraneous&quot; packages. If a package name is
provided, then only packages matching one of the supplied names are
@@ -20,8 +20,16 @@ removed.</p>
package&#39;s dependencies list.</p>
<p>If the <code>--production</code> flag is specified or the <code>NODE_ENV</code> environment
variable is set to <code>production</code>, this command will remove the packages
-specified in your <code>devDependencies</code>. Setting <code>--production=false</code> will
+specified in your <code>devDependencies</code>. Setting <code>--no-production</code> will
negate <code>NODE_ENV</code> being set to <code>production</code>.</p>
+<p>If the <code>--dry-run</code> flag is used then no changes will actually be made.</p>
+<p>If the <code>--json</code> flag is used then the changes <code>npm prune</code> made (or would
+have made with <code>--dry-run</code>) are printed as a JSON object.</p>
+<p>In normal operation with package-locks enabled, extraneous modules are
+pruned automatically when modules are installed and you&#39;ll only need
+this command with the <code>--production</code> flag.</p>
+<p>If you&#39;ve disabled package-locks then extraneous modules will not be removed
+and it&#39;s up to you to run <code>npm prune</code> from time-to-time to remove them.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-uninstall.html">npm-uninstall(1)</a></li>
@@ -40,5 +48,5 @@ negate <code>NODE_ENV</code> being set to <code>production</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prune &mdash; npm@5.6.0</p>
+<p id="footer">npm-prune &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index c8a0b691e1..f962efaf66 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -85,5 +85,5 @@ packs them into a tarball to be uploaded to the registry.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-publish &mdash; npm@5.6.0</p>
+<p id="footer">npm-publish &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 136192342a..38ecbdc6eb 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -35,5 +35,5 @@ the new binary.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-rebuild &mdash; npm@5.6.0</p>
+<p id="footer">npm-rebuild &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 12e6b1748e..d9f1fa3ffc 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -41,5 +41,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-repo &mdash; npm@5.6.0</p>
+<p id="footer">npm-repo &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index 4f9aacecf1..27a313d236 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-restart &mdash; npm@5.6.0</p>
+<p id="footer">npm-restart &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index a4e9aa9bd6..095eef0115 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-root &mdash; npm@5.6.0</p>
+<p id="footer">npm-root &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 489fbccb09..16aa9fe916 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -80,5 +80,5 @@ you will be given a warning to run <code>npm install</code>, just in case you&#3
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-run-script &mdash; npm@5.6.0</p>
+<p id="footer">npm-run-script &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index df759928a7..b3d07f1948 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -109,5 +109,5 @@ setting.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-search &mdash; npm@5.6.0</p>
+<p id="footer">npm-search &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 629f5b69a7..3be9dd200b 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -41,5 +41,5 @@ of package locks in npm, see <a href="../files/npm-package-locks.html">npm-packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-shrinkwrap &mdash; npm@5.6.0</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index a957ff479f..76de028dbc 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-star &mdash; npm@5.6.0</p>
+<p id="footer">npm-star &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index ff6dbfb314..8654f69055 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -36,5 +36,5 @@ you will most certainly enjoy this command.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stars &mdash; npm@5.6.0</p>
+<p id="footer">npm-stars &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index 0c0dfb3ae1..936fa2cfe1 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -39,5 +39,5 @@ more details.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-start &mdash; npm@5.6.0</p>
+<p id="footer">npm-start &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 9c04332e68..b4937b90b5 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -34,5 +34,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stop &mdash; npm@5.6.0</p>
+<p id="footer">npm-stop &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html
index 81d74fa0a7..595f7cc14d 100644
--- a/deps/npm/html/doc/cli/npm-team.html
+++ b/deps/npm/html/doc/cli/npm-team.html
@@ -39,6 +39,9 @@ If performed on an organization name, will return a list of existing teams
under that organization. If performed on a team, it will instead return a list
of all users belonging to that particular team.</p>
</li>
+<li><p>edit:
+Edit a current team.</p>
+</li>
</ul>
<h2 id="details">DETAILS</h2>
<p><code>npm team</code> always operates directly on the current registry, configurable from
@@ -67,5 +70,5 @@ use the <code>npm access</code> command to grant or revoke the appropriate permi
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-team &mdash; npm@5.6.0</p>
+<p id="footer">npm-team &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index 280e69f3a1..598ac741cd 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -36,5 +36,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-test &mdash; npm@5.6.0</p>
+<p id="footer">npm-test &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-token.html b/deps/npm/html/doc/cli/npm-token.html
index 8ec2f5fbec..cb2d4d56c0 100644
--- a/deps/npm/html/doc/cli/npm-token.html
+++ b/deps/npm/html/doc/cli/npm-token.html
@@ -73,4 +73,4 @@ This will NOT accept the truncated token found in <code>npm token list</code> ou
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-token &mdash; npm@5.6.0</p>
+<p id="footer">npm-token &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index dd430d0796..f2b0d5f0e3 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -63,5 +63,5 @@ npm uninstall lodash --no-save
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-uninstall &mdash; npm@5.6.0</p>
+<p id="footer">npm-uninstall &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index 721de2828f..4abc6240e7 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -29,7 +29,7 @@ package again, a new version number must be used.</p>
<p>With the default registry (<code>registry.npmjs.org</code>), unpublish is
only allowed with versions published in the last 24 hours. If you
are trying to unpublish a version published longer ago than that,
-contact support@npmjs.com.</p>
+contact <a href="mailto:support@npmjs.com">support@npmjs.com</a>.</p>
<p>The scope is optional and follows the usual rules for <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
@@ -51,5 +51,5 @@ contact support@npmjs.com.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-unpublish &mdash; npm@5.6.0</p>
+<p id="footer">npm-unpublish &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index ddaf4104df..588ca80be2 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -24,12 +24,15 @@ as well.</p>
packages.</p>
<p>If no package name is specified, all packages in the specified location (global
or local) will be updated.</p>
-<p>As of <code>npm@2.6.1</code>, the <code>npm update</code> will only inspect top-level packages.
-Prior versions of <code>npm</code> would also recursively inspect all dependencies.
-To get the old behavior, use <code>npm --depth 9999 update</code>.</p>
+<p>As of <a href="mailto:`npm@2.6.1">`npm@2.6.1</a><code>, the</code>npm update<code>will only inspect top-level packages.
+Prior versions of</code>npm<code>would also recursively inspect all dependencies.
+To get the old behavior, use</code>npm --depth 9999 update`.</p>
+<p>As of <a href="mailto:`npm@5.0.0">`npm@5.0.0</a><code>, the</code>npm update<code>will change</code>package.json<code>to save the
+new version as the minimum required dependency. To get the old behavior,
+use</code>npm update --no-save`.</p>
<h2 id="examples">EXAMPLES</h2>
-<p>IMPORTANT VERSION NOTE: these examples assume <code>npm@2.6.1</code> or later. For
-older versions of <code>npm</code>, you must specify <code>--depth 0</code> to get the behavior
+<p>IMPORTANT VERSION NOTE: these examples assume <a href="mailto:`npm@2.6.1">`npm@2.6.1</a><code>or later. For
+older versions of</code>npm<code>, you must specify</code>--depth 0` to get the behavior
described below.</p>
<p>For the examples below, assume that the current package is <code>app</code> and it depends
on dependencies, <code>dep1</code> (<code>dep2</code>, .. etc.). The published versions of <code>dep1</code> are:</p>
@@ -52,45 +55,28 @@ on dependencies, <code>dep1</code> (<code>dep2</code>, .. etc.). The published
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^1.1.1&quot;
}
-</code></pre><p>Then <code>npm update</code> will install <code>dep1@1.2.2</code>, because <code>1.2.2</code> is <code>latest</code> and
-<code>1.2.2</code> satisfies <code>^1.1.1</code>.</p>
+</code></pre><p>Then <code>npm update</code> will install <a href="mailto:`dep1@1.2.2">`dep1@1.2.2</a><code>, because</code>1.2.2<code>is</code>latest<code>and</code>1.2.2<code>satisfies</code>^1.1.1`.</p>
<h3 id="tilde-dependencies">Tilde Dependencies</h3>
<p>However, if <code>app</code>&#39;s <code>package.json</code> contains:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;~1.1.1&quot;
}
-</code></pre><p>In this case, running <code>npm update</code> will install <code>dep1@1.1.2</code>. Even though the <code>latest</code>
-tag points to <code>1.2.2</code>, this version does not satisfy <code>~1.1.1</code>, which is equivalent
-to <code>&gt;=1.1.1 &lt;1.2.0</code>. So the highest-sorting version that satisfies <code>~1.1.1</code> is used,
-which is <code>1.1.2</code>.</p>
+</code></pre><p>In this case, running <code>npm update</code> will install <a href="mailto:`dep1@1.1.2">`dep1@1.1.2</a><code>. Even though the</code>latest<code>tag points to</code>1.2.2<code>, this version does not satisfy</code>~1.1.1<code>, which is equivalent
+to</code>&gt;=1.1.1 &lt;1.2.0<code>. So the highest-sorting version that satisfies</code>~1.1.1<code>is used,
+which is</code>1.1.2`.</p>
<h3 id="caret-dependencies-below-1-0-0">Caret Dependencies below 1.0.0</h3>
<p>Suppose <code>app</code> has a caret dependency on a version below <code>1.0.0</code>, for example:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^0.2.0&quot;
}
-</code></pre><p><code>npm update</code> will install <code>dep1@0.2.0</code>, because there are no other
-versions which satisfy <code>^0.2.0</code>.</p>
+</code></pre><p><code>npm update</code> will install <a href="mailto:`dep1@0.2.0">`dep1@0.2.0</a><code>, because there are no other
+versions which satisfy</code>^0.2.0`.</p>
<p>If the dependence were on <code>^0.4.0</code>:</p>
<pre><code>&quot;dependencies&quot;: {
&quot;dep1&quot;: &quot;^0.4.0&quot;
}
-</code></pre><p>Then <code>npm update</code> will install <code>dep1@0.4.1</code>, because that is the highest-sorting
-version that satisfies <code>^0.4.0</code> (<code>&gt;= 0.4.0 &lt;0.5.0</code>)</p>
-<h3 id="recording-updates-with-save-">Recording Updates with <code>--save</code></h3>
-<p>When you want to update a package and save the new version as
-the minimum required dependency in <code>package.json</code>, you can use
-<code>npm update -S</code> or <code>npm update --save</code>. For example if
-<code>package.json</code> contains:</p>
-<pre><code>&quot;dependencies&quot;: {
- &quot;dep1&quot;: &quot;^1.1.1&quot;
-}
-</code></pre><p>Then <code>npm update --save</code> will install <code>dep1@1.2.2</code> (i.e., <code>latest</code>),
-and <code>package.json</code> will be modified:</p>
-<pre><code>&quot;dependencies&quot;: {
- &quot;dep1&quot;: &quot;^1.2.2&quot;
-}
-</code></pre><p>Note that <code>npm</code> will only write an updated version to <code>package.json</code>
-if it installs a new package.</p>
+</code></pre><p>Then <code>npm update</code> will install <a href="mailto:`dep1@0.4.1">`dep1@0.4.1</a><code>, because that is the highest-sorting
+version that satisfies</code>^0.4.0<code>(</code>&gt;= 0.4.0 &lt;0.5.0`)</p>
<h3 id="updating-globally-installed-packages">Updating Globally-Installed Packages</h3>
<p><code>npm update -g</code> will apply the <code>update</code> action to each globally installed
package that is <code>outdated</code> -- that is, has a version that is different from
@@ -118,5 +104,5 @@ be <em>downgraded</em>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-update &mdash; npm@5.6.0</p>
+<p id="footer">npm-update &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index e8da71b67a..1d7928f651 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -120,5 +120,5 @@ to the same value as the current version.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-version &mdash; npm@5.6.0</p>
+<p id="footer">npm-version &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index a94ea56271..afd73b5f7b 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -86,5 +86,5 @@ the field name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-view &mdash; npm@5.6.0</p>
+<p id="footer">npm-view &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index 5995b1e11c..6fe4949ba6 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -33,5 +33,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-whoami &mdash; npm@5.6.0</p>
+<p id="footer">npm-whoami &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index 52f4a22544..6bd2eca74e 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
-<p>5.6.0</p>
+<p>5.8.0</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -79,7 +79,7 @@ Use the <code>npm publish</code> command to upload your code to the registry.</l
<ul>
<li>Command line switches:<br>Set a config with <code>--key val</code>. All keys take a value, even if they
are booleans (the config parser doesn&#39;t know what the options are at
-the time of parsing.) If no value is provided, then the option is set
+the time of parsing). If no value is provided, then the option is set
to boolean <code>true</code>.</li>
<li>Environment Variables:<br>Set any config by prefixing the name in an environment variable with
<code>npm_config_</code>. For example, <code>export npm_config_key=val</code>.</li>
@@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#109;&#97;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#105;&#x40;&#105;&#x7a;&#115;&#46;&#109;&#x65;">&#105;&#x40;&#105;&#x7a;&#115;&#46;&#109;&#x65;</a></p>
+<a href="mailto:&#x69;&#64;&#x69;&#122;&#115;&#x2e;&#109;&#101;">&#x69;&#64;&#x69;&#122;&#115;&#x2e;&#109;&#101;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
@@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm &mdash; npm@5.6.0</p>
+<p id="footer">npm &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index ff8a247b5a..671ecd8575 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -58,7 +58,7 @@ when you run <code>npm test</code>.)</p>
<p>Man pages are not installed on Windows systems.</p>
<h3 id="cache">Cache</h3>
<p>See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code>. Cache files are stored in <code>~/.npm</code> on Posix, or
-<code>~/npm-cache</code> on Windows.</p>
+<code>%AppData%/npm-cache</code> on Windows.</p>
<p>This is controlled by the <code>cache</code> configuration param.</p>
<h3 id="temp-files">Temp Files</h3>
<p>Temporary files are stored by default in the folder specified by the
@@ -135,15 +135,15 @@ highest level possible, below the localized &quot;target&quot; folder.</p>
`-- baz (1.2.3) &lt;---[D]
`-- node_modules
`-- quux (3.2.0) &lt;---[E]
-</code></pre><p>Since foo depends directly on <code>bar@1.2.3</code> and <code>baz@1.2.3</code>, those are
-installed in foo&#39;s <code>node_modules</code> folder.</p>
+</code></pre><p>Since foo depends directly on <a href="mailto:`bar@1.2.3">`bar@1.2.3</a><code>and</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>, those are
+installed in foo&#39;s</code>node_modules` folder.</p>
<p>Even though the latest copy of blerg is 1.3.7, foo has a specific
dependency on version 1.2.5. So, that gets installed at [A]. Since the
-parent installation of blerg satisfies bar&#39;s dependency on <code>blerg@1.x</code>,
+parent installation of blerg satisfies bar&#39;s dependency on <a href="mailto:`blerg@1.x">`blerg@1.x</a>`,
it does not install another copy under [B].</p>
<p>Bar [B] also has dependencies on baz and asdf, so those are installed in
-bar&#39;s <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot
-re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D],
+bar&#39;s <code>node_modules</code> folder. Because it depends on <a href="mailto:`baz@2.x">`baz@2.x</a><code>, it cannot
+re-use the</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>installed in the parent</code>node_modules` folder [D],
and must install its own copy [C].</p>
<p>Underneath bar, the <code>baz -&gt; quux -&gt; bar</code> dependency creates a cycle.
However, because bar is already in quux&#39;s ancestry [B], it does not
@@ -181,5 +181,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-folders &mdash; npm@5.6.0</p>
+<p id="footer">npm-folders &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index ff8a247b5a..671ecd8575 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -58,7 +58,7 @@ when you run <code>npm test</code>.)</p>
<p>Man pages are not installed on Windows systems.</p>
<h3 id="cache">Cache</h3>
<p>See <code><a href="../cli/npm-cache.html">npm-cache(1)</a></code>. Cache files are stored in <code>~/.npm</code> on Posix, or
-<code>~/npm-cache</code> on Windows.</p>
+<code>%AppData%/npm-cache</code> on Windows.</p>
<p>This is controlled by the <code>cache</code> configuration param.</p>
<h3 id="temp-files">Temp Files</h3>
<p>Temporary files are stored by default in the folder specified by the
@@ -135,15 +135,15 @@ highest level possible, below the localized &quot;target&quot; folder.</p>
`-- baz (1.2.3) &lt;---[D]
`-- node_modules
`-- quux (3.2.0) &lt;---[E]
-</code></pre><p>Since foo depends directly on <code>bar@1.2.3</code> and <code>baz@1.2.3</code>, those are
-installed in foo&#39;s <code>node_modules</code> folder.</p>
+</code></pre><p>Since foo depends directly on <a href="mailto:`bar@1.2.3">`bar@1.2.3</a><code>and</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>, those are
+installed in foo&#39;s</code>node_modules` folder.</p>
<p>Even though the latest copy of blerg is 1.3.7, foo has a specific
dependency on version 1.2.5. So, that gets installed at [A]. Since the
-parent installation of blerg satisfies bar&#39;s dependency on <code>blerg@1.x</code>,
+parent installation of blerg satisfies bar&#39;s dependency on <a href="mailto:`blerg@1.x">`blerg@1.x</a>`,
it does not install another copy under [B].</p>
<p>Bar [B] also has dependencies on baz and asdf, so those are installed in
-bar&#39;s <code>node_modules</code> folder. Because it depends on <code>baz@2.x</code>, it cannot
-re-use the <code>baz@1.2.3</code> installed in the parent <code>node_modules</code> folder [D],
+bar&#39;s <code>node_modules</code> folder. Because it depends on <a href="mailto:`baz@2.x">`baz@2.x</a><code>, it cannot
+re-use the</code><a href="mailto:baz@1.2.3">baz@1.2.3</a><code>installed in the parent</code>node_modules` folder [D],
and must install its own copy [C].</p>
<p>Underneath bar, the <code>baz -&gt; quux -&gt; bar</code> dependency creates a cycle.
However, because bar is already in quux&#39;s ancestry [B], it does not
@@ -181,5 +181,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-folders &mdash; npm@5.6.0</p>
+<p id="footer">npm-folders &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index 3a6e77c981..b2bb723967 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -16,11 +16,11 @@ file. It must be actual JSON, not just a JavaScript object literal.</p>
<p>A lot of the behavior described in this document is affected by the config
settings described in <code><a href="../misc/npm-config.html">npm-config(7)</a></code>.</p>
<h2 id="name">name</h2>
-<p>The <em>most</em> important things in your package.json are the name and version fields.
-Those are actually required, and your package won&#39;t install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.</p>
+<p>If you plan to publish your package, the <em>most</em> important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don&#39;t
+plan to publish your package, the name and version fields are optional.</p>
<p>The name is what your thing is called.</p>
<p>Some rules:</p>
<ul>
@@ -45,11 +45,11 @@ already, before you get too attached to it. <a href="https://www.npmjs.com/">htt
<p>A name can be optionally prefixed by a scope, e.g. <code>@myorg/mypackage</code>. See
<code><a href="../misc/npm-scope.html">npm-scope(7)</a></code> for more detail.</p>
<h2 id="version">version</h2>
-<p>The <em>most</em> important things in your package.json are the name and version fields.
-Those are actually required, and your package won&#39;t install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.</p>
+<p>If you plan to publish your package, the <em>most</em> important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don&#39;t
+plan to publish your package, the name and version fields are optional.</p>
<p>Version must be parseable by
<a href="https://github.com/isaacs/node-semver">node-semver</a>, which is bundled
with npm as a dependency. (<code>npm install semver</code> to use it yourself.)</p>
@@ -62,7 +62,9 @@ package, as it&#39;s listed in <code>npm search</code>.</p>
discover your package as it&#39;s listed in <code>npm search</code>.</p>
<h2 id="homepage">homepage</h2>
<p>The url to the project homepage.</p>
-<h2 id="bugs">bugs</h2>
+<p>Example:</p>
+<pre><code>&quot;homepage&quot;: &quot;https://github.com/owner/project#readme&quot;
+</code></pre><h2 id="bugs">bugs</h2>
<p>The url to your project&#39;s issue tracker and / or the email address to which
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
@@ -129,13 +131,14 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
-<p>The optional &quot;files&quot; field is an array of file patterns that describes
+<p>The optional <code>files</code> field is an array of file patterns that describes
the entries to be included when your package is installed as a
-dependency. If the files array is omitted, everything except
-automatically-excluded files will be included in your publish. If you
-name a folder in the array, then it will also include the files inside
-that folder (unless they would be ignored by another rule in this
-section.).</p>
+dependency. File patterns follow a similar syntax to <code>.gitignore</code>, but
+reversed: including a file, directory, or glob pattern (<code>*</code>, <code>**/*</code>, and such)
+will make it so that file is included in the tarball when it&#39;s packed. Omitting
+the field will make it default to <code>[&quot;*&quot;]</code>, which means it will include all files.</p>
+<p>Some special files and directories are also included or excluded regardless of
+whether they exist in the <code>files</code> array (see below).</p>
<p>You can also provide a <code>.npmignore</code> file in the root of your package or
in subdirectories, which will keep files from being included. At the
root of your package it will not override the &quot;files&quot; field, but in
@@ -179,6 +182,10 @@ That is, if your package is named <code>foo</code>, and a user installs it, and
<p>This should be a module ID relative to the root of your package folder.</p>
<p>For most modules, it makes the most sense to have a main script and often not
much else.</p>
+<h2 id="browser">browser</h2>
+<p>If your module is meant to be used client-side the browser field should be
+used instead of the main field. This is helpful to hint users that it might
+rely on primitives that aren&#39;t available in Node.js modules. (e.g. <code>window</code>)</p>
<h2 id="bin">bin</h2>
<p>A lot of packages have one or more executable files that they&#39;d like to
install into the PATH. npm makes this pretty easy (in fact, it uses this
@@ -603,5 +610,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package.json &mdash; npm@5.6.0</p>
+<p id="footer">package.json &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html
index 775c6b4ca2..45cb7aae23 100644
--- a/deps/npm/html/doc/files/npm-package-locks.html
+++ b/deps/npm/html/doc/files/npm-package-locks.html
@@ -53,7 +53,7 @@ registry, then a normal <code>npm install A</code> will install:</p>
<pre><code>A@0.1.0
`-- B@0.0.1
`-- C@0.0.1
-</code></pre><p>However, if B@0.0.2 is published, then a fresh <code>npm install A</code> will
+</code></pre><p>However, if <a href="mailto:B@0.0.2">B@0.0.2</a> is published, then a fresh <code>npm install A</code> will
install:</p>
<pre><code>A@0.1.0
`-- B@0.0.2
@@ -61,7 +61,7 @@ install:</p>
</code></pre><p>assuming the new version did not modify B&#39;s dependencies. Of course,
the new version of B could include a new version of C and any number
of new dependencies. If such changes are undesirable, the author of A
-could specify a dependency on B@0.0.1. However, if A&#39;s author and B&#39;s
+could specify a dependency on <a href="mailto:B@0.0.1">B@0.0.1</a>. However, if A&#39;s author and B&#39;s
author are not the same person, there&#39;s no way for A&#39;s author to say
that he or she does not want to pull in newly published versions of C
when B hasn&#39;t changed at all.</p>
@@ -125,6 +125,19 @@ package source to get the exact same dependency tree that you were developing
on. Additionally, the diffs from these changes are human-readable and will
inform you of any changes npm has made to your <code>node_modules</code>, so you can notice
if any transitive dependencies were updated, hoisted, etc.</p>
+<h3 id="resolving-lockfile-conflicts">Resolving lockfile conflicts</h3>
+<p>Occasionally, two separate npm install will create package locks that cause
+merge conflicts in source control systems. As of <a href="mailto:`npm@5.7.0">`npm@5.7.0</a><code>, these conflicts
+can be resolved by manually fixing any</code>package.json<code>conflicts, and then
+running</code>npm install [--package-lock-only]<code>again. npm will automatically
+resolve any conflicts for you and write a merged package lock that includes all
+the dependencies from both branches in a reasonable tree. If</code>--package-lock-only<code>is provided, it will do this without also modifying your
+local</code>node_modules/`.</p>
+<p>To make this process seamless on git, consider installing
+<a href="https://npm.im/npm-merge-driver"><code>npm-merge-driver</code></a>, which will teach git how
+to do this itself without any user interaction. In short: <code>$ npx
+npm-merge-driver install -g</code> will let you do this, and even works with
+<a href="mailto:pre-`npm@5.7.0">pre-`npm@5.7.0</a><code>versions of npm 5, albeit a bit more noisily. Note that if</code>package.json<code>itself conflicts, you will have to resolve that by hand and run</code>npm install` manually, even with the merge driver.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527">https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527</a></li>
@@ -145,4 +158,4 @@ if any transitive dependencies were updated, hoisted, etc.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-package-locks &mdash; npm@5.6.0</p>
+<p id="footer">npm-package-locks &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html
index 50718ad9fd..606e188671 100644
--- a/deps/npm/html/doc/files/npm-shrinkwrap.json.html
+++ b/deps/npm/html/doc/files/npm-shrinkwrap.json.html
@@ -42,4 +42,4 @@ to the manual page for <a href="../files/package-lock.json.html">package-lock.js
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-shrinkwrap.json &mdash; npm@5.6.0</p>
+<p id="footer">npm-shrinkwrap.json &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index 7441c92b7e..4fc6535058 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -85,5 +85,5 @@ manner.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npmrc &mdash; npm@5.6.0</p>
+<p id="footer">npmrc &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html
index 3f6a2e21f5..284a2e83d9 100644
--- a/deps/npm/html/doc/files/package-lock.json.html
+++ b/deps/npm/html/doc/files/package-lock.json.html
@@ -103,12 +103,18 @@ dependencies that are both an optional dependency of the top level and a
transitive dependency of a non-optional dependency of the top level.</p>
<p>All optional dependencies should be included even if they&#39;re uninstallable
on the current platform.</p>
+<h4 id="requires">requires</h4>
+<p>This is a mapping of module name to version. This is a list of everything
+this module requires, regardless of where it will be installed. The version
+should match via normal matching rules a dependency either in our
+<code>dependencies</code> or in a level higher than us.</p>
<h4 id="dependencies">dependencies</h4>
<p>The dependencies of this dependency, exactly as at the top level.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></li>
<li><a href="../files/npm-shrinkwrap.json.html">npm-shrinkwrap.json(5)</a></li>
+<li><a href="../files/npm-package-locks.html">npm-package-locks(5)</a></li>
<li><a href="../files/package.json.html">package.json(5)</a></li>
<li><a href="../cli/npm-install.html">npm-install(1)</a></li>
</ul>
@@ -124,4 +130,4 @@ on the current platform.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package-lock.json &mdash; npm@5.6.0</p>
+<p id="footer">package-lock.json &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index 3a6e77c981..b2bb723967 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -16,11 +16,11 @@ file. It must be actual JSON, not just a JavaScript object literal.</p>
<p>A lot of the behavior described in this document is affected by the config
settings described in <code><a href="../misc/npm-config.html">npm-config(7)</a></code>.</p>
<h2 id="name">name</h2>
-<p>The <em>most</em> important things in your package.json are the name and version fields.
-Those are actually required, and your package won&#39;t install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.</p>
+<p>If you plan to publish your package, the <em>most</em> important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don&#39;t
+plan to publish your package, the name and version fields are optional.</p>
<p>The name is what your thing is called.</p>
<p>Some rules:</p>
<ul>
@@ -45,11 +45,11 @@ already, before you get too attached to it. <a href="https://www.npmjs.com/">htt
<p>A name can be optionally prefixed by a scope, e.g. <code>@myorg/mypackage</code>. See
<code><a href="../misc/npm-scope.html">npm-scope(7)</a></code> for more detail.</p>
<h2 id="version">version</h2>
-<p>The <em>most</em> important things in your package.json are the name and version fields.
-Those are actually required, and your package won&#39;t install without
-them. The name and version together form an identifier that is assumed
-to be completely unique. Changes to the package should come along with
-changes to the version.</p>
+<p>If you plan to publish your package, the <em>most</em> important things in your
+package.json are the name and version fields as they will be required. The name
+and version together form an identifier that is assumed to be completely unique.
+Changes to the package should come along with changes to the version. If you don&#39;t
+plan to publish your package, the name and version fields are optional.</p>
<p>Version must be parseable by
<a href="https://github.com/isaacs/node-semver">node-semver</a>, which is bundled
with npm as a dependency. (<code>npm install semver</code> to use it yourself.)</p>
@@ -62,7 +62,9 @@ package, as it&#39;s listed in <code>npm search</code>.</p>
discover your package as it&#39;s listed in <code>npm search</code>.</p>
<h2 id="homepage">homepage</h2>
<p>The url to the project homepage.</p>
-<h2 id="bugs">bugs</h2>
+<p>Example:</p>
+<pre><code>&quot;homepage&quot;: &quot;https://github.com/owner/project#readme&quot;
+</code></pre><h2 id="bugs">bugs</h2>
<p>The url to your project&#39;s issue tracker and / or the email address to which
issues should be reported. These are helpful for people who encounter issues
with your package.</p>
@@ -129,13 +131,14 @@ is an object with a &quot;name&quot; field and optionally &quot;url&quot; and &q
</code></pre><p>Both email and url are optional either way.</p>
<p>npm also sets a top-level &quot;maintainers&quot; field with your npm user info.</p>
<h2 id="files">files</h2>
-<p>The optional &quot;files&quot; field is an array of file patterns that describes
+<p>The optional <code>files</code> field is an array of file patterns that describes
the entries to be included when your package is installed as a
-dependency. If the files array is omitted, everything except
-automatically-excluded files will be included in your publish. If you
-name a folder in the array, then it will also include the files inside
-that folder (unless they would be ignored by another rule in this
-section.).</p>
+dependency. File patterns follow a similar syntax to <code>.gitignore</code>, but
+reversed: including a file, directory, or glob pattern (<code>*</code>, <code>**/*</code>, and such)
+will make it so that file is included in the tarball when it&#39;s packed. Omitting
+the field will make it default to <code>[&quot;*&quot;]</code>, which means it will include all files.</p>
+<p>Some special files and directories are also included or excluded regardless of
+whether they exist in the <code>files</code> array (see below).</p>
<p>You can also provide a <code>.npmignore</code> file in the root of your package or
in subdirectories, which will keep files from being included. At the
root of your package it will not override the &quot;files&quot; field, but in
@@ -179,6 +182,10 @@ That is, if your package is named <code>foo</code>, and a user installs it, and
<p>This should be a module ID relative to the root of your package folder.</p>
<p>For most modules, it makes the most sense to have a main script and often not
much else.</p>
+<h2 id="browser">browser</h2>
+<p>If your module is meant to be used client-side the browser field should be
+used instead of the main field. This is helpful to hint users that it might
+rely on primitives that aren&#39;t available in Node.js modules. (e.g. <code>window</code>)</p>
<h2 id="bin">bin</h2>
<p>A lot of packages have one or more executable files that they&#39;d like to
install into the PATH. npm makes this pretty easy (in fact, it uses this
@@ -603,5 +610,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package.json &mdash; npm@5.6.0</p>
+<p id="footer">package.json &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 914307420c..4ea5d5ab90 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -30,6 +30,8 @@
<p>REMOVED</p>
<h3 id="npm-cache-1-"><a href="cli/npm-cache.html">npm-cache(1)</a></h3>
<p>Manipulates packages cache</p>
+<h3 id="npm-ci-1-"><a href="cli/npm-ci.html">npm-ci(1)</a></h3>
+<p>Install a project with a clean slate</p>
<h3 id="npm-completion-1-"><a href="cli/npm-completion.html">npm-completion(1)</a></h3>
<p>Tab Completion for npm</p>
<h3 id="npm-config-1-"><a href="cli/npm-config.html">npm-config(1)</a></h3>
@@ -172,5 +174,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-index &mdash; npm@5.6.0</p>
+<p id="footer">npm-index &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index f96dd270bf..a5a446d7a9 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -91,7 +91,7 @@ final token in the list on a line by itself. For example:</p>
<pre><code>var ok = &#39;String contains &quot;double&quot; quotes&#39;
var alsoOk = &quot;String contains &#39;single&#39; quotes or apostrophe&quot;
</code></pre><h2 id="whitespace">Whitespace</h2>
-<p>Put a single space in front of ( for anything other than a function call.
+<p>Put a single space in front of <code>(</code> for anything other than a function call.
Also use a single space wherever it makes things more readable.</p>
<p>Don&#39;t leave trailing whitespace at the end of lines. Don&#39;t indent empty
lines. Don&#39;t use more spaces than are helpful.</p>
@@ -153,5 +153,5 @@ set to anything.&quot;</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-coding-style &mdash; npm@5.6.0</p>
+<p id="footer">npm-coding-style &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index a23b10727a..f191df813a 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -239,6 +239,8 @@ PEM format (Windows calls it &quot;Base-64 encoded X.509 (.CER)&quot;) with newl
</ul>
<p>If false, never shows colors. If <code>&quot;always&quot;</code> then always shows colors.
If true, then only prints color codes for tty file descriptors.</p>
+<p>This option can also be changed using the environment: colors are
+disabled when the environment variable <code>NO_COLOR</code> is set to any value.</p>
<h3 id="depth">depth</h3>
<ul>
<li>Default: Infinity</li>
@@ -560,7 +562,7 @@ combination). Passed to the <code>http</code> <code>Agent</code> used to make th
<p>Any &quot;%s&quot; in the message will be replaced with the version number.</p>
<h3 id="metrics-registry">metrics-registry</h3>
<ul>
-<li>Default: The value of <code>registry</code> (which defaults to &quot;<a href="https://registry.npmjs.org/">https://registry.npmjs.org/</a>&quot;)</li>
+<li>Default: The value of <code>registry</code> (which defaults to &quot;<a href="https://registry.npmjs.org/&quot;">https://registry.npmjs.org/&quot;</a>)</li>
<li>Type: String</li>
</ul>
<p>The registry you want to send cli metrics to if <code>send-metrics</code> is true.</p>
@@ -578,6 +580,12 @@ impact how lifecycle scripts are called.</p>
<li>Type: semver or false</li>
</ul>
<p>The node version to use when checking a package&#39;s <code>engines</code> map.</p>
+<h3 id="no-proxy">no-proxy</h3>
+<ul>
+<li>Default: null</li>
+<li>Type: String or Array</li>
+</ul>
+<p>A comma-separated string or an array of domain extensions that a proxy should not be used for.</p>
<h3 id="offline">offline</h3>
<ul>
<li>Default: false</li>
@@ -628,13 +636,16 @@ when publishing or changing package permissions with <code>npm access</code>.</p
</ul>
<p>If set to false, then ignore <code>package-lock.json</code> files when installing. This
will also prevent <em>writing</em> <code>package-lock.json</code> if <code>save</code> is true.</p>
+<p>When package package-locks are disabled, automatic pruning of extraneous
+modules will also be disabled. To remove extraneous modules with
+package-locks disabled use <code>npm prune</code>.</p>
<p>This option is an alias for <code>--shrinkwrap</code>.</p>
<h3 id="package-lock-only">package-lock-only</h3>
<ul>
<li>Default: false</li>
<li>Type: Boolean</li>
</ul>
-<p>If set to true, it will update only the <code>package-json</code>,
+<p>If set to true, it will update only the <code>package-lock.json</code>,
instead of checking <code>node_modules</code> and downloading dependencies.</p>
<h3 id="parseable">parseable</h3>
<ul>
@@ -718,7 +729,7 @@ honored by the underlying <code>request</code> library.</p>
<p>Remove failed installs.</p>
<h3 id="save">save</h3>
<ul>
-<li>Default: false</li>
+<li>Default: true</li>
<li>Type: Boolean</li>
</ul>
<p>Save installed packages to a package.json file as dependencies.</p>
@@ -1024,5 +1035,5 @@ exit successfully.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@5.6.0</p>
+<p id="footer">npm-config &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index bdf212ed4b..b88c2020a0 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -20,7 +20,7 @@ that your users will do to install your program.</p>
<p>These are man pages. If you install npm, you should be able to
then do <code>man npm-thing</code> to get the documentation on a particular
topic, or <code>npm help thing</code> to see the same information.</p>
-<h2 id="what-is-a-package-">What is a <code>package</code></h2>
+<h2 id="what-is-a-package">What is a <code>package</code></h2>
<p>A package is:</p>
<ul>
<li>a) a folder containing a program described by a package.json file</li>
@@ -53,7 +53,7 @@ This should be a string that identifies your project. Please do not
use the name to specify that it runs on node, or is in JavaScript.
You can use the &quot;engines&quot; field to explicitly state the versions of
node (or whatever else) that your program requires, and it&#39;s pretty
-well assumed that it&#39;s javascript.</p>
+well assumed that it&#39;s JavaScript.</p>
<p>It does not necessarily need to match your github repository name.</p>
<p>So, <code>node-foo</code> and <code>bar-js</code> are bad names. <code>foo</code> or <code>bar</code> are better.</p>
</li>
@@ -204,5 +204,5 @@ from a fresh checkout.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-developers &mdash; npm@5.6.0</p>
+<p id="footer">npm-developers &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index fdf53fcad0..517ebfc33a 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -20,7 +20,7 @@ Conduct.</p>
<h2 id="tl-dr">TL;DR</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#109;&#97;&#105;&#108;&#116;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#112;&#112;&#111;&#x72;&#x74;&#x40;&#x6e;&#x70;&#x6d;&#106;&#x73;&#x2e;&#99;&#111;&#109;</a></li>
+<li>Email the author, CC <a href="mailto:&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#64;&#110;&#112;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#116;&#64;&#110;&#112;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -44,7 +44,7 @@ publishes it to the npm registry. Being a simple little thing, it never
really has to be updated. Alice works for Foo Inc, the makers of the
critically acclaimed and widely-marketed <code>foo</code> JavaScript toolkit framework.
They publish it to npm as <code>foojs</code>, but people are routinely confused when
-<code>npm install</code>foo`` is some different thing.</li>
+<code>npm install</code>foo<code></code> is some different thing.</li>
<li><p>Yusuf writes a parser for the widely-known <code>foo</code> file format, because he
needs it for work. Then, he gets a new job, and never updates the prototype.
Later on, Alice writes a much more complete <code>foo</code> parser, but can&#39;t publish,
@@ -55,12 +55,12 @@ because Yusuf&#39;s <code>foo</code> is in the way.</p>
</li>
<li>Alice emails Yusuf, explaining the situation <strong>as respectfully as possible</strong>,
and what she would like to do with the module name. She adds the npm support
-staff <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#115;&#x75;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#x6f;&#109;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#116;&#x40;&#x6e;&#112;&#109;&#106;&#x73;&#46;&#x63;&#x6f;&#109;</a> to the CC list of the email. Mention in the email
+staff <a href="mailto:&#115;&#x75;&#112;&#x70;&#111;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#116;&#x40;&#110;&#112;&#109;&#x6a;&#x73;&#46;&#99;&#x6f;&#x6d;</a> to the CC list of the email. Mention in the email
that Yusuf can run npm owner <code>add alice foo</code> to add Alice as an owner of the
foo package.</li>
<li>After a reasonable amount of time, if Yusuf has not responded, or if Yusuf
and Alice can&#39;t come to any sort of resolution, email support
-<a href="&#109;&#x61;&#x69;&#108;&#116;&#x6f;&#x3a;&#115;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#109;">&#115;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#x40;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is usually at least
+<a href="mailto:&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;">&#115;&#117;&#112;&#112;&#111;&#x72;&#116;&#x40;&#110;&#x70;&#x6d;&#x6a;&#x73;&#x2e;&#x63;&#111;&#109;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is usually at least
4 weeks.)</li>
</ol>
<h2 id="reasoning">REASONING</h2>
@@ -96,12 +96,12 @@ application database or otherwise putting non-packagey things into it.</li>
<a href="https://www.npmjs.com/policies/conduct">Code of Conduct</a> such as hateful
language, pornographic content, or harassment.</li>
</ol>
-<p>If you see bad behavior like this, please report it to <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#97;&#x62;&#117;&#x73;&#101;&#64;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#109;">&#97;&#x62;&#117;&#x73;&#101;&#64;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#109;</a> right
+<p>If you see bad behavior like this, please report it to <a href="mailto:&#97;&#98;&#117;&#x73;&#101;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#46;&#x63;&#x6f;&#x6d;">&#97;&#98;&#117;&#x73;&#101;&#64;&#110;&#x70;&#x6d;&#x6a;&#x73;&#46;&#x63;&#x6f;&#x6d;</a> right
away. <strong>You are never expected to resolve abusive behavior on your own. We are
here to help.</strong></p>
<h2 id="trademarks">TRADEMARKS</h2>
<p>If you think another npm publisher is infringing your trademark, such as by
-using a confusingly similar package name, email <a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#97;&#x62;&#117;&#115;&#101;&#64;&#110;&#112;&#109;&#106;&#115;&#46;&#x63;&#x6f;&#x6d;">&#97;&#x62;&#117;&#115;&#101;&#64;&#110;&#112;&#109;&#106;&#115;&#46;&#x63;&#x6f;&#x6d;</a> with a link to
+using a confusingly similar package name, email <a href="mailto:&#x61;&#x62;&#x75;&#x73;&#101;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#46;&#99;&#111;&#109;">&#x61;&#x62;&#x75;&#x73;&#101;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#46;&#99;&#111;&#109;</a> with a link to
the package or user account on <a href="https://npmjs.com">https://npmjs.com</a>. Attach a
copy of your trademark registration certificate.</p>
<p>If we see that the package&#39;s publisher is intentionally misleading others by
@@ -134,5 +134,5 @@ License.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-disputes &mdash; npm@5.6.0</p>
+<p id="footer">npm-disputes &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 927748e176..03d8909267 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -30,6 +30,8 @@
<p>REMOVED</p>
<h3 id="npm-cache-1-"><a href="../cli/npm-cache.html">npm-cache(1)</a></h3>
<p>Manipulates packages cache</p>
+<h3 id="npm-ci-1-"><a href="../cli/npm-ci.html">npm-ci(1)</a></h3>
+<p>Install a project with a clean slate</p>
<h3 id="npm-completion-1-"><a href="../cli/npm-completion.html">npm-completion(1)</a></h3>
<p>Tab Completion for npm</p>
<h3 id="npm-config-1-"><a href="../cli/npm-config.html">npm-config(1)</a></h3>
@@ -172,5 +174,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-index &mdash; npm@5.6.0</p>
+<p id="footer">npm-index &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html
index 5a11a10ca8..3ff8b5e6e8 100644
--- a/deps/npm/html/doc/misc/npm-orgs.html
+++ b/deps/npm/html/doc/misc/npm-orgs.html
@@ -86,5 +86,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-orgs &mdash; npm@5.6.0</p>
+<p id="footer">npm-orgs &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index cfa610d0e8..beb59f87ae 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -90,5 +90,5 @@ effectively implement the entire CouchDB API anyway.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-registry &mdash; npm@5.6.0</p>
+<p id="footer">npm-registry &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index e610f3e9e3..997749d734 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -99,5 +99,5 @@ that registry instead.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scope &mdash; npm@5.6.0</p>
+<p id="footer">npm-scope &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index bc43c028f1..57468301ca 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -64,15 +64,15 @@ names will be run for those as well (e.g. <code>premyscript</code>, <code>myscri
<p><pkg> -- npm run <stage>`.</p>
<h2 id="prepublish-and-prepare">PREPUBLISH AND PREPARE</h2>
<h3 id="deprecation-note">DEPRECATION NOTE</h3>
-<p>Since <code>npm@1.1.71</code>, the npm CLI has run the <code>prepublish</code> script for both <code>npm
-publish</code> and <code>npm install</code>, because it&#39;s a convenient way to prepare a package
+<p>Since <a href="mailto:`npm@1.1.71">`npm@1.1.71</a><code>, the npm CLI has run the</code>prepublish<code>script for both</code>npm
+publish<code>and</code>npm install<code>, because it&#39;s a convenient way to prepare a package
for use (some common use cases are described in the section below). It has
-also turned out to be, in practice, <a href="https://github.com/npm/npm/issues/10074">very
-confusing</a>. As of <code>npm@4.0.0</code>, a new
-event has been introduced, <code>prepare</code>, that preserves this existing behavior. A
-<em>new</em> event, <code>prepublishOnly</code> has been added as a transitional strategy to
+also turned out to be, in practice, [very
+confusing](https://github.com/npm/npm/issues/10074). As of</code><a href="mailto:npm@4.0.0">npm@4.0.0</a><code>, a new
+event has been introduced,</code>prepare<code>, that preserves this existing behavior. A
+_new_ event,</code>prepublishOnly<code>has been added as a transitional strategy to
allow users to avoid the confusing behavior of existing npm versions and only
-run on <code>npm publish</code> (for instance, running the tests one last time to ensure
+run on</code>npm publish` (for instance, running the tests one last time to ensure
they&#39;re in good shape).</p>
<p>See <a href="https://github.com/npm/npm/issues/10074">https://github.com/npm/npm/issues/10074</a> for a much lengthier
justification, with further reading, for this change.</p>
@@ -239,5 +239,5 @@ scripts is for compilation which must be done on the target architecture.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scripts &mdash; npm@5.6.0</p>
+<p id="footer">npm-scripts &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 1727455c62..9db0d76f51 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">removing-npm &mdash; npm@5.6.0</p>
+<p id="footer">removing-npm &mdash; npm@5.8.0</p>
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index afe72d3099..a464806594 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -24,6 +24,8 @@ semver.clean(&#39; =v1.2.3 &#39;) // &#39;1.2.3&#39;
semver.satisfies(&#39;1.2.3&#39;, &#39;1.x || &gt;=2.5.0 || 5.0.0 - 7.2.3&#39;) // true
semver.gt(&#39;1.2.3&#39;, &#39;9.8.7&#39;) // false
semver.lt(&#39;1.2.3&#39;, &#39;9.8.7&#39;) // true
+semver.valid(semver.coerce(&#39;v2&#39;)) // &#39;2.0.0&#39;
+semver.valid(semver.coerce(&#39;42.6.7.9.3-alpha&#39;)) // &#39;42.6.7&#39;
</code></pre>
<p>As a command-line utility:</p>
<pre><code>$ semver -h
@@ -53,6 +55,10 @@ Options:
-l --loose
Interpret versions and ranges loosely
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@@ -133,7 +139,7 @@ will append the value of the string as a prerelease identifier:</p>
deterministic ways.</p>
<p>Advanced ranges may be combined in the same way as primitive
comparators using white space or <code>||</code>.</p>
-<h4 id="hyphen-ranges-x-y-z-a-b-c-">Hyphen Ranges <code>X.Y.Z - A.B.C</code></h4>
+<h4 id="hyphen-ranges-x-y-z-a-b-c">Hyphen Ranges <code>X.Y.Z - A.B.C</code></h4>
<p>Specifies an inclusive set.</p>
<ul>
<li><code>1.2.3 - 2.3.4</code> := <code>&gt;=1.2.3 &lt;=2.3.4</code></li>
@@ -166,7 +172,7 @@ character is in fact optional.</p>
<li><code>1</code> := <code>1.x.x</code> := <code>&gt;=1.0.0 &lt;2.0.0</code></li>
<li><code>1.2</code> := <code>1.2.x</code> := <code>&gt;=1.2.0 &lt;1.3.0</code></li>
</ul>
-<h4 id="tilde-ranges-1-2-3-1-2-1-">Tilde Ranges <code>~1.2.3</code> <code>~1.2</code> <code>~1</code></h4>
+<h4 id="tilde-ranges-1-2-3-1-2-1">Tilde Ranges <code>~1.2.3</code> <code>~1.2</code> <code>~1</code></h4>
<p>Allows patch-level changes if a minor version is specified on the
comparator. Allows minor-level changes if not.</p>
<ul>
@@ -182,7 +188,7 @@ equal to <code>beta.2</code>. So, <code>1.2.3-beta.4</code> would be allowed, b
<code>1.2.4-beta.2</code> would not, because it is a prerelease of a
different <code>[major, minor, patch]</code> tuple.</li>
</ul>
-<h4 id="caret-ranges-1-2-3-0-2-5-0-0-4-">Caret Ranges <code>^1.2.3</code> <code>^0.2.5</code> <code>^0.0.4</code></h4>
+<h4 id="caret-ranges-1-2-3-0-2-5-0-0-4">Caret Ranges <code>^1.2.3</code> <code>^0.2.5</code> <code>^0.0.4</code></h4>
<p>Allows changes that do not modify the left-most non-zero digit in the
<code>[major, minor, patch]</code> tuple. In other words, this allows patch and
minor updates for versions <code>1.0.0</code> and above, patch updates for
@@ -324,6 +330,21 @@ range (since <code>1.2.8</code> satisfies, which is lower), and it also does not
satisfy the range.</p>
<p>If you want to know if a version satisfies or does not satisfy a
range, use the <code>satisfies(version, range)</code> function.</p>
+<h3 id="coercion">Coercion</h3>
+<ul>
+<li><code>coerce(version)</code>: Coerces a string to semver if possible</li>
+</ul>
+<p>This aims to provide a very forgiving translation of a non-semver
+string to semver. It looks for the first digit in a string, and
+consumes all remaining characters which satisfy at least a partial semver
+(e.g., <code>1</code>, <code>1.2</code>, <code>1.2.3</code>) up to the max permitted length (256 characters).
+Longer versions are simply truncated (<code>4.6.3.9.2-alpha2</code> becomes <code>4.6.3</code>).
+All surrounding text is simply ignored (<code>v3.4 replaces v3.3.1</code> becomes <code>3.4.0</code>).
+Only text which lacks digits will fail coercion (<code>version one</code> is not valid).
+The maximum length for any semver component considered for coercion is 16 characters;
+longer components will be ignored (<code>10000000000000000.4.7.4</code> becomes <code>4.7.4</code>).
+The maximum value for any semver component is <code>Integer.MAX_SAFE_INTEGER || (2**53 - 1)</code>;
+higher value components are invalid (<code>9999999999999999.4.7.4</code> is likely invalid).</p>
</div>
@@ -336,5 +357,5 @@ range, use the <code>satisfies(version, range)</code> function.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">semver &mdash; npm@5.6.0</p>
+<p id="footer">semver &mdash; npm@5.8.0</p>
diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js
index 92bf44c119..08de61bff0 100644
--- a/deps/npm/lib/auth/legacy.js
+++ b/deps/npm/lib/auth/legacy.js
@@ -6,52 +6,74 @@ const npm = require('../npm.js')
const output = require('../utils/output.js')
const pacoteOpts = require('../config/pacote')
const fetchOpts = require('../config/fetch-opts')
+const opener = require('opener')
-module.exports.login = function login (creds, registry, scope, cb) {
- let username = creds.username || ''
- let password = creds.password || ''
- let email = creds.email || ''
- const auth = {}
- if (npm.config.get('otp')) auth.otp = npm.config.get('otp')
+const openerPromise = (url) => new Promise((resolve, reject) => {
+ opener(url, { command: npm.config.get('browser') }, (er) => er ? reject(er) : resolve())
+})
- return read.username('Username:', username, {log: log}).then((u) => {
- username = u
- return read.password('Password: ', password)
+const loginPrompter = (creds) => {
+ const opts = { log: log }
+ return read.username('Username:', creds.username, opts).then((u) => {
+ creds.username = u
+ return read.password('Password:', creds.password)
}).then((p) => {
- password = p
- return read.email('Email: (this IS public) ', email, {log: log})
+ creds.password = p
+ return read.email('Email: (this IS public) ', creds.email, opts)
}).then((e) => {
- email = e
- return profile.login(username, password, {registry: registry, auth: auth}).catch((err) => {
- if (err.code === 'EOTP') throw err
- return profile.adduser(username, email, password, {
- registry: registry,
- opts: fetchOpts.fromPacote(pacoteOpts())
- })
- }).catch((err) => {
- if (err.code === 'EOTP' && !auth.otp) {
- return read.otp('Authenticator provided OTP:').then((otp) => {
- auth.otp = otp
- return profile.login(username, password, {registry: registry, auth: auth})
- })
- } else {
- throw err
- }
+ creds.email = e
+ return creds
+ })
+}
+
+module.exports.login = (creds, registry, scope, cb) => {
+ const conf = {
+ log: log,
+ creds: creds,
+ registry: registry,
+ auth: {
+ otp: npm.config.get('otp')
+ },
+ scope: scope,
+ opts: fetchOpts.fromPacote(pacoteOpts())
+ }
+ login(conf).then((newCreds) => cb(null, newCreds)).catch(cb)
+}
+
+function login (conf) {
+ return profile.login(openerPromise, loginPrompter, conf)
+ .catch((err) => {
+ if (err.code === 'EOTP') throw err
+ const u = conf.creds.username
+ const p = conf.creds.password
+ const e = conf.creds.email
+ if (!(u && p && e)) throw err
+ return profile.adduserCouch(u, e, p, conf)
+ })
+ .catch((err) => {
+ if (err.code !== 'EOTP') throw err
+ return read.otp('Authenticator provided OTP:').then((otp) => {
+ conf.auth.otp = otp
+ const u = conf.creds.username
+ const p = conf.creds.password
+ return profile.loginCouch(u, p, conf)
})
}).then((result) => {
const newCreds = {}
if (result && result.token) {
newCreds.token = result.token
} else {
- newCreds.username = username
- newCreds.password = password
- newCreds.email = email
+ newCreds.username = conf.creds.username
+ newCreds.password = conf.creds.password
+ newCreds.email = conf.creds.email
newCreds.alwaysAuth = npm.config.get('always-auth')
}
- log.info('adduser', 'Authorized user %s', username)
- const scopeMessage = scope ? ' to scope ' + scope : ''
- output('Logged in as %s%s on %s.', username, scopeMessage, registry)
- cb(null, newCreds)
- }).catch(cb)
+ const usermsg = conf.creds.username ? ' user ' + conf.creds.username : ''
+ conf.log.info('login', 'Authorized' + usermsg)
+ const scopeMessage = conf.scope ? ' to scope ' + conf.scope : ''
+ const userout = conf.creds.username ? ' as ' + conf.creds.username : ''
+ output('Logged in%s%s on %s.', userout, scopeMessage, conf.registry)
+ return newCreds
+ })
}
diff --git a/deps/npm/lib/ci.js b/deps/npm/lib/ci.js
new file mode 100644
index 0000000000..6a3183d977
--- /dev/null
+++ b/deps/npm/lib/ci.js
@@ -0,0 +1,37 @@
+'use strict'
+
+const Installer = require('libcipm')
+const lifecycleOpts = require('./config/lifecycle.js')
+const npm = require('./npm.js')
+const npmlog = require('npmlog')
+const pacoteOpts = require('./config/pacote.js')
+
+ci.usage = 'npm ci'
+
+ci.completion = (cb) => cb(null, [])
+
+Installer.CipmConfig.impl(npm.config, {
+ get: npm.config.get,
+ set: npm.config.set,
+ toLifecycle (moreOpts) {
+ return lifecycleOpts(moreOpts)
+ },
+ toPacote (moreOpts) {
+ return pacoteOpts(moreOpts)
+ }
+})
+
+module.exports = ci
+function ci (args, cb) {
+ return new Installer({
+ config: npm.config,
+ log: npmlog
+ })
+ .run()
+ .then(
+ (details) => console.error(`added ${details.pkgCount} packages in ${
+ details.runTime / 1000
+ }s`)
+ )
+ .then(() => cb(), cb)
+}
diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js
index 49c445a4f0..1f618cdb9a 100644
--- a/deps/npm/lib/config/cmd-list.js
+++ b/deps/npm/lib/config/cmd-list.js
@@ -22,6 +22,7 @@ var affordances = {
'la': 'ls',
'll': 'ls',
'verison': 'version',
+ 'ic': 'ci',
'isntall': 'install',
'dist-tags': 'dist-tag',
'apihelp': 'help',
@@ -46,6 +47,7 @@ var affordances = {
// these are filenames in .
var cmdList = [
+ 'ci',
'install',
'install-test',
'uninstall',
diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js
index 50cf4772e7..54a74bb847 100644
--- a/deps/npm/lib/config/core.js
+++ b/deps/npm/lib/config/core.js
@@ -331,7 +331,10 @@ Conf.prototype.parse = function (content, file) {
Conf.prototype.add = function (data, marker) {
try {
Object.keys(data).forEach(function (k) {
- data[k] = parseField(data[k], k)
+ const newKey = envReplace(k)
+ const newField = parseField(data[k], newKey)
+ delete data[k]
+ data[newKey] = newField
})
} catch (e) {
this.emit('error', e)
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index c049f213fa..865805eb27 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -130,7 +130,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
cidr: null,
- color: true,
+ color: process.env.NO_COLOR == null,
depth: Infinity,
description: true,
dev: false,
@@ -193,6 +193,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
'progress': !process.env.TRAVIS && !process.env.CI,
proxy: null,
'https-proxy': null,
+ 'no-proxy': null,
'user-agent': 'npm/{npm-version} ' +
'node/{node-version} ' +
'{platform} ' +
@@ -312,6 +313,7 @@ exports.types = {
'metrics-registry': [null, String],
'node-options': [null, String],
'node-version': [null, semver],
+ 'no-proxy': [null, String, Array],
offline: Boolean,
'onload-script': [null, String],
only: [null, 'dev', 'development', 'prod', 'production'],
diff --git a/deps/npm/lib/config/pacote.js b/deps/npm/lib/config/pacote.js
index ec43178c77..0793d3a6fc 100644
--- a/deps/npm/lib/config/pacote.js
+++ b/deps/npm/lib/config/pacote.js
@@ -37,6 +37,7 @@ function pacoteOpts (moreOpts) {
preferOnline: npm.config.get('prefer-online') || npm.config.get('cache-max') <= 0,
projectScope: npm.projectScope,
proxy: npm.config.get('https-proxy') || npm.config.get('proxy'),
+ noProxy: npm.config.get('no-proxy'),
refer: npm.registry.refer,
registry: npm.config.get('registry'),
retry: {
diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js
index 71e60619c4..c763499f6b 100644
--- a/deps/npm/lib/dedupe.js
+++ b/deps/npm/lib/dedupe.js
@@ -142,7 +142,7 @@ function hoistChildren_ (tree, diff, seen, next) {
[andComputeMetadata(tree)]
], done)
}
- var hoistTo = earliestInstallable(tree, tree.parent, child.package)
+ var hoistTo = earliestInstallable(tree, tree.parent, child.package, log)
if (hoistTo) {
move(child, hoistTo, diff)
chain([
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 42906f2394..7a7d75c908 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -220,6 +220,8 @@ function Installer (where, dryrun, args, opts) {
this.noPackageJsonOk = !!args.length
this.topLevelLifecycles = !args.length
+ this.autoPrune = npm.config.get('package-lock')
+
const dev = npm.config.get('dev')
const only = npm.config.get('only')
const onlyProd = /^prod(uction)?$/.test(only)
@@ -436,8 +438,8 @@ Installer.prototype.pruneIdealTree = function (cb) {
// if our lock file didn't have the requires field and there
// are any fake children then forgo pruning until we have more info.
if (!this.idealTree.hasRequiresFromLock && this.idealTree.children.some((n) => n.fakeChild)) return cb()
- var toPrune = this.idealTree.children
- .filter(isExtraneous)
+ const toPrune = this.idealTree.children
+ .filter((child) => isExtraneous(child) && (this.autoPrune || child.removing))
.map((n) => ({name: moduleName(n)}))
return removeExtraneous(toPrune, this.idealTree, cb)
}
@@ -692,27 +694,19 @@ Installer.prototype.readLocalPackageData = function (cb) {
Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) {
validate('F', arguments)
log.silly('install', 'cloneCurrentTreeToIdealTree')
- this.idealTree = copyTree(this.currentTree, (child) => {
- // Filter out any children we didn't install ourselves. They need to be
- // reinstalled in order for things to be correct.
- return child.isTop || isLink(child) || (
- child.package &&
- child.package._resolved &&
- (child.package._integrity || child.package._shasum)
- )
- })
+
+ this.idealTree = copyTree(this.currentTree)
this.idealTree.warnings = []
cb()
}
-function isLink (child) {
- return child.isLink || (child.parent && isLink(child.parent))
-}
-
Installer.prototype.loadShrinkwrap = function (cb) {
validate('F', arguments)
log.silly('install', 'loadShrinkwrap')
- readShrinkwrap.andInflate(this.idealTree, cb)
+ readShrinkwrap.andInflate(this.idealTree, iferr(cb, () => {
+ computeMetadata(this.idealTree)
+ cb()
+ }))
}
Installer.prototype.getInstalledModules = function () {
@@ -774,6 +768,9 @@ Installer.prototype.printInstalledForHuman = function (diffs, cb) {
var added = 0
var updated = 0
var moved = 0
+ // Count the number of contributors to packages added, tracking
+ // contributors we've seen, so we can produce a running unique count.
+ var contributors = new Set()
diffs.forEach(function (action) {
var mutation = action[0]
var pkg = action[1]
@@ -784,6 +781,26 @@ Installer.prototype.printInstalledForHuman = function (diffs, cb) {
++moved
} else if (mutation === 'add') {
++added
+ // Count contributors to added packages. Start by combining `author`
+ // and `contributors` data into a single array of contributor-people
+ // for this package.
+ var people = []
+ var meta = pkg.package
+ if (meta.author) people.push(meta.author)
+ if (meta.contributors && Array.isArray(meta.contributors)) {
+ people = people.concat(meta.contributors)
+ }
+ // Make sure a normalized string for every person behind this
+ // package is in `contributors`.
+ people.forEach(function (person) {
+ // Ignore errors from malformed `author` and `contributors`.
+ try {
+ var normalized = normalizePerson(person)
+ } catch (error) {
+ return
+ }
+ if (!contributors.has(normalized)) contributors.add(normalized)
+ })
} else if (mutation === 'update' || mutation === 'update-linked') {
++updated
}
@@ -795,7 +812,11 @@ Installer.prototype.printInstalledForHuman = function (diffs, cb) {
}).join('\n') + '\n'
}
var actions = []
- if (added) actions.push('added ' + packages(added))
+ if (added) {
+ var action = 'added ' + packages(added)
+ if (contributors.size) action += from(contributors.size)
+ actions.push(action)
+ }
if (removed) actions.push('removed ' + packages(removed))
if (updated) actions.push('updated ' + packages(updated))
if (moved) actions.push('moved ' + packages(moved))
@@ -815,6 +836,23 @@ Installer.prototype.printInstalledForHuman = function (diffs, cb) {
function packages (num) {
return num + ' package' + (num > 1 ? 's' : '')
}
+
+ function from (num) {
+ return ' from ' + num + ' contributor' + (num > 1 ? 's' : '')
+ }
+
+ // Values of `author` and elements of `contributors` in `package.json`
+ // files can be e-mail style strings or Objects with `name`, `email,
+ // and `url` String properties. Convert Objects to Strings so that
+ // we can efficiently keep a set of contributors we have already seen.
+ function normalizePerson (argument) {
+ if (typeof argument === 'string') return argument
+ var returned = ''
+ if (argument.name) returned += argument.name
+ if (argument.email) returned += ' <' + argument.email + '>'
+ if (argument.url) returned += ' (' + argument.email + ')'
+ return returned
+ }
}
Installer.prototype.printInstalledForJSON = function (diffs, cb) {
diff --git a/deps/npm/lib/install/action/extract-worker.js b/deps/npm/lib/install/action/extract-worker.js
index 24508c7804..2b082b4a57 100644
--- a/deps/npm/lib/install/action/extract-worker.js
+++ b/deps/npm/lib/install/action/extract-worker.js
@@ -10,9 +10,9 @@ module.exports = (args, cb) => {
const spec = parsed[0]
const extractTo = parsed[1]
const opts = parsed[2]
- if (!opts.log && opts.loglevel) {
+ if (!opts.log) {
opts.log = npmlog
- opts.log.level = opts.loglevel
}
+ opts.log.level = opts.loglevel || opts.log.level
BB.resolve(extract(spec, extractTo, opts)).nodeify(cb)
}
diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js
index 6b827f36ea..e8d7a6c4f6 100644
--- a/deps/npm/lib/install/action/extract.js
+++ b/deps/npm/lib/install/action/extract.js
@@ -4,9 +4,7 @@ const BB = require('bluebird')
const stat = BB.promisify(require('graceful-fs').stat)
const gentlyRm = BB.promisify(require('../../utils/gently-rm.js'))
-const log = require('npmlog')
const mkdirp = BB.promisify(require('mkdirp'))
-const moduleName = require('../../utils/module-name.js')
const moduleStagingPath = require('../module-staging-path.js')
const move = require('../../utils/move.js')
const npa = require('npm-package-arg')
@@ -59,12 +57,11 @@ function extract (staging, pkg, log) {
pacoteOpts = require('../../config/pacote')
}
const opts = pacoteOpts({
- integrity: pkg.package._integrity
+ integrity: pkg.package._integrity,
+ resolved: pkg.package._resolved
})
const args = [
- pkg.package._resolved
- ? npa.resolve(pkg.package.name, pkg.package._resolved)
- : pkg.package._requested,
+ pkg.package._requested,
extractTo,
opts
]
@@ -112,18 +109,6 @@ function readBundled (pkg, staging, extractTo) {
}, {concurrency: 10})
}
-function getTree (pkg) {
- while (pkg.parent) pkg = pkg.parent
- return pkg
-}
-
-function warn (pkg, code, msg) {
- const tree = getTree(pkg)
- const err = new Error(msg)
- err.code = code
- tree.warnings.push(err)
-}
-
function stageBundledModule (bundler, child, staging, parentPath) {
const stageFrom = path.join(parentPath, 'node_modules', child.package.name)
const stageTo = moduleStagingPath(staging, child)
@@ -146,15 +131,6 @@ function finishModule (bundler, child, stageTo, stageFrom) {
return move(stageFrom, stageTo)
})
} else {
- return stat(stageFrom).then(() => {
- const bundlerId = packageId(bundler)
- if (!getTree(bundler).warnings.some((w) => {
- return w.code === 'EBUNDLEOVERRIDE'
- })) {
- warn(bundler, 'EBUNDLEOVERRIDE', `${bundlerId} had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions.`)
- }
- log.verbose('bundle', `EBUNDLEOVERRIDE: Replacing ${bundlerId}'s bundled version of ${moduleName(child)} with ${packageId(child)}.`)
- return gentlyRm(stageFrom)
- }, () => {})
+ return stat(stageFrom).then(() => gentlyRm(stageFrom), () => {})
}
}
diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js
index 9608a943a5..a34d03ffe2 100644
--- a/deps/npm/lib/install/actions.js
+++ b/deps/npm/lib/install/actions.js
@@ -118,7 +118,7 @@ function doParallel (type, staging, actionsToRun, log, next) {
}
return acc
}, [])
- log.silly('doParallel', type + ' ' + actionsToRun.length)
+ log.silly('doParallel', type + ' ' + acts.length)
time(log)
if (!acts.length) { return next() }
return withInit(actions[type], () => {
diff --git a/deps/npm/lib/install/copy-tree.js b/deps/npm/lib/install/copy-tree.js
index a5b558cf59..2bf7064f33 100644
--- a/deps/npm/lib/install/copy-tree.js
+++ b/deps/npm/lib/install/copy-tree.js
@@ -1,27 +1,26 @@
'use strict'
var createNode = require('./node.js').create
-module.exports = function (tree, filter) {
- return copyTree(tree, {}, filter)
+module.exports = function (tree) {
+ return copyTree(tree, {})
}
-function copyTree (tree, cache, filter) {
- if (filter && !filter(tree)) { return null }
+function copyTree (tree, cache) {
if (cache[tree.path]) { return cache[tree.path] }
var newTree = cache[tree.path] = createNode(Object.assign({}, tree))
- copyModuleList(newTree, 'children', cache, filter)
+ copyModuleList(newTree, 'children', cache)
newTree.children.forEach(function (child) {
child.parent = newTree
})
- copyModuleList(newTree, 'requires', cache, filter)
- copyModuleList(newTree, 'requiredBy', cache, filter)
+ copyModuleList(newTree, 'requires', cache)
+ copyModuleList(newTree, 'requiredBy', cache)
return newTree
}
-function copyModuleList (tree, key, cache, filter) {
+function copyModuleList (tree, key, cache) {
var newList = []
if (tree[key]) {
tree[key].forEach(function (child) {
- const copy = copyTree(child, cache, filter)
+ const copy = copyTree(child, cache)
if (copy) {
newList.push(copy)
}
diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js
index 93c4adffd7..54cc5258fa 100644
--- a/deps/npm/lib/install/deps.js
+++ b/deps/npm/lib/install/deps.js
@@ -33,6 +33,7 @@ var getSaveType = require('./save.js').getSaveType
var unixFormatPath = require('../utils/unix-format-path.js')
var isExtraneous = require('./is-extraneous.js')
var isRegistry = require('../utils/is-registry.js')
+var hasModernMeta = require('./has-modern-meta.js')
// The export functions in this module mutate a dependency tree, adding
// items to them.
@@ -111,7 +112,7 @@ function computeMetadata (tree, seen) {
const reqs = tree.swRequires || {}
for (let name of Object.keys(deps)) {
if (findChild(name, deps[name])) continue
- if (findChild(name, reqs[name])) continue
+ if (name in reqs && findChild(name, reqs[name])) continue
tree.missingDeps[name] = deps[name]
}
if (tree.isTop) {
@@ -332,9 +333,21 @@ exports.removeDeps = function (args, tree, saveToDependencies, next) {
parent.requires = parent.requires.filter((child) => child !== pkgToRemove)
}
pkgToRemove.requiredBy = pkgToRemove.requiredBy.filter((parent) => parent !== tree)
+ flagAsRemoving(pkgToRemove)
}
next()
}
+
+function flagAsRemoving (toRemove, seen) {
+ if (!seen) seen = new Set()
+ if (seen.has(toRemove)) return
+ seen.add(toRemove)
+ toRemove.removing = true
+ toRemove.requires.forEach((required) => {
+ flagAsRemoving(required, seen)
+ })
+}
+
exports.removeExtraneous = function (args, tree, next) {
for (let pkg of args) {
var pkgName = moduleName(pkg)
@@ -526,7 +539,7 @@ function addDependency (name, versionSpec, tree, log, done) {
}
var child = findRequirement(tree, name, req)
if (!child && swReq) child = findRequirement(tree, name, swReq)
- if (child) {
+ if (hasModernMeta(child)) {
resolveWithExistingModule(child, tree)
if (child.package._shrinkwrap === undefined) {
readShrinkwrap.andInflate(child, function (er) { next(er, child, log) })
@@ -534,12 +547,42 @@ function addDependency (name, versionSpec, tree, log, done) {
next(null, child, log)
}
} else {
+ if (child) {
+ if (req.registry) {
+ req = childDependencySpecifier(tree, name, child.package.version)
+ }
+ if (child.fromBundle) reportBundleOverride(child, log)
+ removeObsoleteDep(child, log)
+ }
fetchPackageMetadata(req, packageRelativePath(tree), {tracker: log.newItem('fetchMetadata')}, iferr(next, function (pkg) {
resolveWithNewModule(pkg, tree, log, next)
}))
}
}
+function getTop (pkg) {
+ const seen = new Set()
+ while (pkg.parent && !seen.has(pkg.parent)) {
+ pkg = pkg.parent
+ seen.add(pkg)
+ }
+ return pkg
+}
+
+function reportBundleOverride (child, log) {
+ const code = 'EBUNDLEOVERRIDE'
+ const top = getTop(child.fromBundle)
+ const bundlerId = packageId(child.fromBundle)
+ if (!top.warnings.some((w) => {
+ return w.code === code
+ })) {
+ const err = new Error(`${bundlerId} had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions.`)
+ err.code = code
+ top.warnings.push(err)
+ }
+ if (log) log.verbose('bundle', `${code}: Replacing ${bundlerId}'s bundled version of ${moduleName(child)} with ${packageId(child)}.`)
+}
+
function resolveWithExistingModule (child, tree) {
validate('OO', arguments)
addRequiredDep(tree, child)
@@ -592,7 +635,7 @@ function resolveWithNewModule (pkg, tree, log, next) {
return isInstallable(pkg, (err) => {
let installable = !err
addBundled(pkg, (bundleErr) => {
- var parent = earliestInstallable(tree, tree, pkg) || tree
+ var parent = earliestInstallable(tree, tree, pkg, log) || tree
var isLink = pkg._requested.type === 'directory'
var child = createChild({
package: pkg,
@@ -609,7 +652,10 @@ function resolveWithNewModule (pkg, tree, log, next) {
var hasBundled = child.children.length
var replaced = replaceModuleByName(parent, 'children', child)
- if (replaced) removeObsoleteDep(replaced)
+ if (replaced) {
+ if (replaced.fromBundle) reportBundleOverride(replaced, log)
+ removeObsoleteDep(replaced)
+ }
addRequiredDep(tree, child)
child.location = flatNameFromTree(child)
@@ -694,12 +740,25 @@ function preserveSymlinks () {
// Find the highest level in the tree that we can install this module in.
// If the module isn't installed above us yet, that'd be the very top.
// If it is, then it's the level below where its installed.
-var earliestInstallable = exports.earliestInstallable = function (requiredBy, tree, pkg) {
- validate('OOO', arguments)
+var earliestInstallable = exports.earliestInstallable = function (requiredBy, tree, pkg, log) {
+ validate('OOOO', arguments)
+
function undeletedModuleMatches (child) {
return !child.removed && moduleName(child) === pkg.name
}
- if (tree.children.some(undeletedModuleMatches)) return null
+ const undeletedMatches = tree.children.filter(undeletedModuleMatches)
+ if (undeletedMatches.length) {
+ // if there's a conflict with another child AT THE SAME level then we're replacing it, so
+ // mark it as removed and continue with resolution normally.
+ if (tree === requiredBy) {
+ undeletedMatches.forEach((pkg) => {
+ if (pkg.fromBundle) reportBundleOverride(pkg, log)
+ removeObsoleteDep(pkg, log)
+ })
+ } else {
+ return null
+ }
+ }
// If any of the children of this tree have conflicting
// binaries then we need to decline to install this package here.
@@ -738,5 +797,5 @@ var earliestInstallable = exports.earliestInstallable = function (requiredBy, tr
if (!preserveSymlinks() && /^[.][.][\\/]/.test(path.relative(tree.parent.realpath, tree.realpath))) return tree
- return (earliestInstallable(requiredBy, tree.parent, pkg) || tree)
+ return (earliestInstallable(requiredBy, tree.parent, pkg, log) || tree)
}
diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js
index 4316f351cc..06e6b77a91 100644
--- a/deps/npm/lib/install/diff-trees.js
+++ b/deps/npm/lib/install/diff-trees.js
@@ -70,6 +70,9 @@ function sriMatch (aa, bb) {
function pkgAreEquiv (aa, bb) {
// coming in we know they share a pathā€¦
+ // if one is inside a link and the other is not, then they are not equivalent
+ // this happens when we're replacing a linked dep with a non-linked version
+ if (aa.isInLink !== bb.isInLink) return false
// if they share package metadata _identity_, they're the same thing
if (aa.package === bb.package) return true
// if they share integrity information, they're the same thing
diff --git a/deps/npm/lib/install/has-modern-meta.js b/deps/npm/lib/install/has-modern-meta.js
new file mode 100644
index 0000000000..382e74c70c
--- /dev/null
+++ b/deps/npm/lib/install/has-modern-meta.js
@@ -0,0 +1,19 @@
+'use strict'
+module.exports = hasModernMeta
+
+const npa = require('npm-package-arg')
+const moduleName = require('../utils/module-name.js')
+
+function isLink (child) {
+ return child.isLink || (child.parent && isLink(child.parent))
+}
+
+function hasModernMeta (child) {
+ if (!child) return false
+ const resolved = child.package._resolved && npa.resolve(moduleName(child), child.package._resolved)
+ return child.isTop || isLink(child) || (
+ child.package &&
+ resolved &&
+ (child.package._integrity || child.package._shasum || resolved.type === 'git')
+ )
+}
diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js
index 43ac9136f0..e596ca94ab 100644
--- a/deps/npm/lib/install/inflate-shrinkwrap.js
+++ b/deps/npm/lib/install/inflate-shrinkwrap.js
@@ -14,6 +14,8 @@ const realizeShrinkwrapSpecifier = require('./realize-shrinkwrap-specifier.js')
const validate = require('aproba')
const path = require('path')
const isRegistry = require('../utils/is-registry.js')
+const hasModernMeta = require('./has-modern-meta.js')
+const ssri = require('ssri')
module.exports = function (tree, sw, opts, finishInflating) {
if (!fetchPackageMetadata) {
@@ -68,7 +70,7 @@ function normalizePackageDataNoErrors (pkg) {
function inflatableChild (onDiskChild, name, topPath, tree, sw, requested, opts) {
validate('OSSOOOO|ZSSOOOO', arguments)
- if (onDiskChild && childIsEquivalent(sw, requested, onDiskChild)) {
+ if (hasModernMeta(onDiskChild) && childIsEquivalent(sw, requested, onDiskChild)) {
// The version on disk matches the shrinkwrap entry.
if (!onDiskChild.fromShrinkwrap) onDiskChild.fromShrinkwrap = true
onDiskChild.package._requested = requested
@@ -106,7 +108,7 @@ function makeFakeChild (name, topPath, tree, sw, requested) {
name: name,
version: sw.version,
_id: name + '@' + sw.version,
- _resolved: adaptResolved(requested, sw.resolved),
+ _resolved: sw.resolved,
_requested: requested,
_optional: sw.optional,
_development: sw.dev,
@@ -144,23 +146,6 @@ function makeFakeChild (name, topPath, tree, sw, requested) {
return child
}
-function adaptResolved (requested, resolved) {
- const registry = requested.scope
- ? npm.config.get(`${requested.scope}:registry`) || npm.config.get('registry')
- : npm.config.get('registry')
- if (!isRegistry(requested) || (resolved && resolved.indexOf(registry) === 0)) {
- // Nothing to worry about here. Pass it through.
- return resolved
- } else {
- // We could fast-path for registry.npmjs.org here, but if we do, it
- // would end up getting written back to the `resolved` field. By always
- // returning `null` for other registries, `pacote.extract()` will take
- // care of any required metadata fetches internally, without altering
- // the tree we're going to write out to shrinkwrap/lockfile.
- return null
- }
-}
-
function fetchChild (topPath, tree, sw, requested) {
return fetchPackageMetadata(requested, topPath).then((pkg) => {
pkg._from = sw.from || requested.raw
@@ -196,7 +181,11 @@ function fetchChild (topPath, tree, sw, requested) {
function childIsEquivalent (sw, requested, child) {
if (!child) return false
if (child.fromShrinkwrap) return true
- if (sw.integrity && child.package._integrity === sw.integrity) return true
+ if (
+ sw.integrity &&
+ child.package._integrity &&
+ ssri.parse(sw.integrity).match(child.package._integrity)
+ ) return true
if (child.isLink && requested.type === 'directory') return path.relative(child.realpath, requested.fetchSpec) === ''
if (sw.resolved) return child.package._resolved === sw.resolved
diff --git a/deps/npm/lib/install/read-shrinkwrap.js b/deps/npm/lib/install/read-shrinkwrap.js
index 45e883caa2..a48a4aea00 100644
--- a/deps/npm/lib/install/read-shrinkwrap.js
+++ b/deps/npm/lib/install/read-shrinkwrap.js
@@ -25,14 +25,7 @@ function readShrinkwrap (child, next) {
log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
}
const name = shrinkwrap ? 'npm-shrinkwrap.json' : 'package-lock.json'
- let parsed = null
- if (shrinkwrap || lockfile) {
- try {
- parsed = parseJSON(shrinkwrap || lockfile)
- } catch (ex) {
- throw ex
- }
- }
+ const parsed = parsePkgLock(shrinkwrap || lockfile, name)
if (parsed && parsed.lockfileVersion !== PKGLOCK_VERSION) {
log.warn('read-shrinkwrap', `This version of npm is compatible with lockfileVersion@${PKGLOCK_VERSION}, but ${name} was generated for lockfileVersion@${parsed.lockfileVersion || 0}. I'll try to do my best with it!`)
}
@@ -43,7 +36,8 @@ function readShrinkwrap (child, next) {
function maybeReadFile (name, child) {
return readFileAsync(
- path.join(child.path, name)
+ path.join(child.path, name),
+ 'utf8'
).catch({code: 'ENOENT'}, () => null)
}
@@ -56,3 +50,57 @@ module.exports.andInflate = function (child, next) {
}
}))
}
+
+const PARENT_RE = /\|{7,}/g
+const OURS_RE = /\<{7,}/g
+const THEIRS_RE = /\={7,}/g
+const END_RE = /\>{7,}/g
+
+module.exports._isDiff = isDiff
+function isDiff (str) {
+ return str.match(OURS_RE) && str.match(THEIRS_RE) && str.match(END_RE)
+}
+
+module.exports._parsePkgLock = parsePkgLock
+function parsePkgLock (str, filename) {
+ if (!str) { return null }
+ try {
+ return parseJSON(str)
+ } catch (e) {
+ if (isDiff(str)) {
+ log.warn('conflict', `A git conflict was detected in ${filename}. Attempting to auto-resolve.`)
+ const pieces = str.split(/[\n\r]+/g).reduce((acc, line) => {
+ if (line.match(PARENT_RE)) acc.state = 'parent'
+ else if (line.match(OURS_RE)) acc.state = 'ours'
+ else if (line.match(THEIRS_RE)) acc.state = 'theirs'
+ else if (line.match(END_RE)) acc.state = 'top'
+ else {
+ if (acc.state === 'top' || acc.state === 'ours') acc.ours += line
+ if (acc.state === 'top' || acc.state === 'theirs') acc.theirs += line
+ if (acc.state === 'top' || acc.state === 'parent') acc.parent += line
+ }
+ return acc
+ }, {
+ state: 'top',
+ ours: '',
+ theirs: '',
+ parent: ''
+ })
+ try {
+ const ours = parseJSON(pieces.ours)
+ const theirs = parseJSON(pieces.theirs)
+ return reconcileLockfiles(ours, theirs)
+ } catch (_e) {
+ log.error('conflict', `Automatic conflict resolution failed. Please manually resolve conflicts in ${filename} and try again.`)
+ log.silly('conflict', `Error during resolution: ${_e}`)
+ throw e
+ }
+ } else {
+ throw e
+ }
+ }
+}
+
+function reconcileLockfiles (parent, ours, theirs) {
+ return Object.assign({}, ours, theirs)
+}
diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js
index f0c61f555d..3f62643b80 100644
--- a/deps/npm/lib/install/save.js
+++ b/deps/npm/lib/install/save.js
@@ -3,6 +3,7 @@
const createShrinkwrap = require('../shrinkwrap.js').createShrinkwrap
const deepSortObject = require('../utils/deep-sort-object.js')
const detectIndent = require('detect-indent')
+const detectNewline = require('detect-newline')
const fs = require('graceful-fs')
const iferr = require('iferr')
const log = require('npmlog')
@@ -10,6 +11,7 @@ const moduleName = require('../utils/module-name.js')
const npm = require('../npm.js')
const parseJSON = require('../utils/parse-json.js')
const path = require('path')
+const stringifyPackage = require('../utils/stringify-package')
const validate = require('aproba')
const without = require('lodash.without')
const writeFileAtomic = require('write-file-atomic')
@@ -60,7 +62,8 @@ function savePackageJson (tree, next) {
// don't use readJson, because we don't want to do all the other
// tricky npm-specific stuff that's in there.
fs.readFile(saveTarget, 'utf8', iferr(next, function (packagejson) {
- const indent = detectIndent(packagejson).indent || ' '
+ const indent = detectIndent(packagejson).indent
+ const newline = detectNewline(packagejson)
try {
tree.package = parseJSON(packagejson)
} catch (ex) {
@@ -122,7 +125,7 @@ function savePackageJson (tree, next) {
tree.package.bundleDependencies = deepSortObject(bundle)
}
- var json = JSON.stringify(tree.package, null, indent) + '\n'
+ var json = stringifyPackage(tree.package, indent, newline)
if (json === packagejson) {
log.verbose('shrinkwrap', 'skipping write for package.json because there were no changes.')
next()
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index f6a0eff805..b6a08d8650 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -120,7 +120,9 @@ function packDirectory (mani, dir, target) {
cwd: dir,
prefix: 'package/',
portable: true,
- noMtime: true,
+ // Provide a specific date in the 1980s for the benefit of zip,
+ // which is confounded by files dated at the Unix epoch 0.
+ mtime: new Date('1985-10-26T08:15:00.000Z'),
gzip: true
}
@@ -170,7 +172,7 @@ function packGitDep (manifest, dir) {
return acc
}, [])
const child = cp.spawn(process.env.NODE || process.execPath, [
- require.main.filename,
+ require.resolve('../bin/npm-cli.js'),
'install',
'--dev',
'--prod',
diff --git a/deps/npm/lib/profile.js b/deps/npm/lib/profile.js
index 587a26ca8b..016e898157 100644
--- a/deps/npm/lib/profile.js
+++ b/deps/npm/lib/profile.js
@@ -82,7 +82,18 @@ function config () {
registry: npm.config.get('registry'),
otp: npm.config.get('otp')
}
- conf.auth = npm.config.getCredentialsByURI(conf.registry)
+ const creds = npm.config.getCredentialsByURI(conf.registry)
+ if (creds.token) {
+ conf.auth = {token: creds.token}
+ } else if (creds.username) {
+ conf.auth = {basic: {username: creds.username, password: creds.password}}
+ } else if (creds.auth) {
+ const auth = Buffer.from(creds.auth, 'base64').toString().split(':', 2)
+ conf.auth = {basic: {username: auth[0], password: auth[1]}}
+ } else {
+ conf.auth = {}
+ }
+
if (conf.otp) conf.auth.otp = conf.otp
return conf
}
@@ -155,12 +166,17 @@ function set (args) {
return Promise.reject(Error(`"${prop}" is not a property we can set. Valid properties are: ` + writableProfileKeys.join(', ')))
}
return Bluebird.try(() => {
- if (prop !== 'password') return
- return readUserInfo.password('Current password: ').then((current) => {
- return readPasswords().then((newpassword) => {
- value = {old: current, new: newpassword}
+ if (prop === 'password') {
+ return readUserInfo.password('Current password: ').then((current) => {
+ return readPasswords().then((newpassword) => {
+ value = {old: current, new: newpassword}
+ })
})
- })
+ } else if (prop === 'email') {
+ return readUserInfo.password('Password: ').then((current) => {
+ return {password: current, email: value}
+ })
+ }
function readPasswords () {
return readUserInfo.password('New password: ').then((password1) => {
return readUserInfo.password(' Again: ').then((password2) => {
diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js
index 4ac8139576..010e471e4b 100644
--- a/deps/npm/lib/prune.js
+++ b/deps/npm/lib/prune.js
@@ -26,6 +26,7 @@ function prune (args, cb) {
function Pruner (where, dryrun, args) {
Installer.call(this, where, dryrun, args)
+ this.autoPrune = true
}
util.inherits(Pruner, Installer)
@@ -64,3 +65,4 @@ Pruner.prototype.loadAllDepsIntoIdealTree = function (cb) {
Pruner.prototype.runPreinstallTopLevelLifecycles = function (cb) { cb() }
Pruner.prototype.runPostinstallTopLevelLifecycles = function (cb) { cb() }
+Pruner.prototype.saveToDependencies = function (cb) { cb() }
diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js
index ddfff2c681..603056ec94 100644
--- a/deps/npm/lib/shrinkwrap.js
+++ b/deps/npm/lib/shrinkwrap.js
@@ -4,6 +4,7 @@ const BB = require('bluebird')
const chain = require('slide').chain
const detectIndent = require('detect-indent')
+const detectNewline = require('detect-newline')
const readFile = BB.promisify(require('graceful-fs').readFile)
const getRequested = require('./install/get-requested.js')
const id = require('./install/deps.js')
@@ -18,6 +19,7 @@ const npm = require('./npm.js')
const path = require('path')
const readPackageTree = BB.promisify(require('read-package-tree'))
const ssri = require('ssri')
+const stringifyPackage = require('./utils/stringify-package')
const validate = require('aproba')
const writeFileAtomic = require('write-file-atomic')
const unixFormatPath = require('./utils/unix-format-path.js')
@@ -179,11 +181,12 @@ function save (dir, pkginfo, opts, cb) {
{
path: path.resolve(dir, opts.defaultFile || PKGLOCK),
data: '{}',
- indent: (pkg && pkg.indent) || 2
+ indent: pkg && pkg.indent,
+ newline: pkg && pkg.newline
}
)
- const updated = updateLockfileMetadata(pkginfo, pkg && pkg.data)
- const swdata = JSON.stringify(updated, null, info.indent) + '\n'
+ const updated = updateLockfileMetadata(pkginfo, pkg && JSON.parse(pkg.raw))
+ const swdata = stringifyPackage(updated, info.indent, info.newline)
if (swdata === info.raw) {
// skip writing if file is identical
log.verbose('shrinkwrap', `skipping write for ${path.basename(info.path)} because there were no changes.`)
@@ -244,9 +247,8 @@ function checkPackageFile (dir, name) {
return {
path: file,
raw: data,
- data: JSON.parse(data),
- indent: detectIndent(data).indent || 2
+ indent: detectIndent(data).indent,
+ newline: detectNewline(data)
}
}).catch({code: 'ENOENT'}, () => {})
}
-
diff --git a/deps/npm/lib/token.js b/deps/npm/lib/token.js
index 2a3b65e6ad..350582782d 100644
--- a/deps/npm/lib/token.js
+++ b/deps/npm/lib/token.js
@@ -13,6 +13,8 @@ const pulseTillDone = require('./utils/pulse-till-done.js')
module.exports = token
+token._validateCIDRList = validateCIDRList
+
token.usage =
'npm token list\n' +
'npm token revoke <tokenKey>\n' +
@@ -81,7 +83,17 @@ function config () {
registry: npm.config.get('registry'),
otp: npm.config.get('otp')
}
- conf.auth = npm.config.getCredentialsByURI(conf.registry)
+ const creds = npm.config.getCredentialsByURI(conf.registry)
+ if (creds.token) {
+ conf.auth = {token: creds.token}
+ } else if (creds.username) {
+ conf.auth = {basic: {username: creds.username, password: creds.password}}
+ } else if (creds.auth) {
+ const auth = Buffer.from(creds.auth, 'base64').toString().split(':', 2)
+ conf.auth = {basic: {username: auth[0], password: auth[1]}}
+ } else {
+ conf.auth = {}
+ }
if (conf.otp) conf.auth.otp = conf.otp
return conf
}
@@ -149,8 +161,14 @@ function rm (args) {
}
})
return Bluebird.map(toRemove, (key) => {
- progress.info('token', 'removing', key)
- profile.removeToken(key, conf).then(() => profile.completeWork(1))
+ return profile.removeToken(key, conf).catch((ex) => {
+ if (ex.code !== 'EOTP') throw ex
+ log.info('token', 'failed because revoking this token requires OTP')
+ return readUserInfo.otp('Authenticator provided OTP:').then((otp) => {
+ conf.auth.otp = otp
+ return profile.removeToken(key, conf)
+ })
+ })
})
})).then(() => {
if (conf.json) {
@@ -205,7 +223,8 @@ function validateCIDR (cidr) {
}
function validateCIDRList (cidrs) {
- const list = Array.isArray(cidrs) ? cidrs : cidrs ? cidrs.split(/,\s*/) : []
+ const maybeList = cidrs ? (Array.isArray(cidrs) ? cidrs : [cidrs]) : []
+ const list = maybeList.length === 1 ? maybeList[0].split(/,\s*/) : maybeList
list.forEach(validateCIDR)
return list
}
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index 85504f5edc..cd31d7d714 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -23,8 +23,17 @@ function errorMessage (er) {
case 'EACCES':
case 'EPERM':
short.push(['', er])
- detail.push(['', ['\nPlease try running this command again as root/Administrator.'
- ].join('\n')])
+ detail.push([
+ '',
+ [
+ '\nThe operation was rejected by your operating system.',
+ (process.platform === 'win32'
+ ? 'It\'s possible that the file was already in use (by a text editor or antivirus),\nor that you lack permissions to access it.'
+ : 'It is likely you do not have the permissions to access this file as the current user'),
+ '\nIf you believe this might be a permissions issue, please double-check the',
+ 'permissions of the file and its containing directories, or try running',
+ 'the command again as root/Administrator (though this is not recommended).'
+ ].join('\n')])
break
case 'ELIFECYCLE':
@@ -52,6 +61,25 @@ function errorMessage (er) {
break
case 'EJSONPARSE':
+ const path = require('path')
+ // Check whether we ran into a conflict in our own package.json
+ if (er.file === path.join(npm.prefix, 'package.json')) {
+ const isDiff = require('../install/read-shrinkwrap.js')._isDiff
+ const txt = require('fs').readFileSync(er.file, 'utf8')
+ if (isDiff(txt)) {
+ detail.push([
+ '',
+ [
+ 'Merge conflict detected in your package.json.',
+ '',
+ 'Please resolve the package.json conflict and retry the command:',
+ '',
+ `$ ${process.argv.join(' ')}`
+ ].join('\n')
+ ])
+ break
+ }
+ }
short.push(['', er.message])
short.push(['', 'File: ' + er.file])
detail.push([
diff --git a/deps/npm/lib/utils/parse-json.js b/deps/npm/lib/utils/parse-json.js
index 5c0b959a0d..c4149d282d 100644
--- a/deps/npm/lib/utils/parse-json.js
+++ b/deps/npm/lib/utils/parse-json.js
@@ -1,6 +1,7 @@
'use strict'
+var parseJsonWithErrors = require('json-parse-better-errors')
var parseJSON = module.exports = function (content) {
- return JSON.parse(stripBOM(content))
+ return parseJsonWithErrors(stripBOM(content))
}
parseJSON.noExceptions = function (content) {
diff --git a/deps/npm/lib/utils/stringify-package.js b/deps/npm/lib/utils/stringify-package.js
new file mode 100644
index 0000000000..0cc9de0a36
--- /dev/null
+++ b/deps/npm/lib/utils/stringify-package.js
@@ -0,0 +1,17 @@
+'use strict'
+
+module.exports = stringifyPackage
+
+const DEFAULT_INDENT = 2
+const CRLF = '\r\n'
+const LF = '\n'
+
+function stringifyPackage (data, indent, newline) {
+ const json = JSON.stringify(data, null, indent || DEFAULT_INDENT)
+
+ if (newline === CRLF) {
+ return json.replace(/\n/g, CRLF) + CRLF
+ }
+
+ return json + LF
+}
diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js
index b586d035ce..15fa7396d0 100644
--- a/deps/npm/lib/utils/unsupported.js
+++ b/deps/npm/lib/utils/unsupported.js
@@ -5,8 +5,7 @@ var supportedNode = [
{ver: '6', min: '6.0.0'},
{ver: '7', min: '7.0.0'},
{ver: '8', min: '8.0.0'},
- {ver: '9', min: '9.0.0'},
- {ver: '10', min: '10.0.0'}
+ {ver: '9', min: '9.0.0'}
]
var knownBroken = '<4.7.0'
@@ -26,7 +25,7 @@ exports.checkForBrokenNode = function () {
supportedNode.forEach(function (rel) {
if (semver.satisfies(nodejs.version, rel.ver)) {
console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has")
- console.error(`a bug known to break npm. Please update to at least ${rel.min} to use this`)
+ console.error('a bug known to break npm. Please update to at least ' + rel.min + ' to use this')
console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/')
process.exit(1)
}
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index edcd664f2a..23880b61a5 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -4,6 +4,7 @@ const BB = require('bluebird')
const assert = require('assert')
const chain = require('slide').chain
const detectIndent = require('detect-indent')
+const detectNewline = require('detect-newline')
const fs = require('graceful-fs')
const readFile = BB.promisify(require('graceful-fs').readFile)
const git = require('./utils/git.js')
@@ -14,6 +15,7 @@ const output = require('./utils/output.js')
const parseJSON = require('./utils/parse-json.js')
const path = require('path')
const semver = require('semver')
+const stringifyPackage = require('./utils/stringify-package')
const writeFileAtomic = require('write-file-atomic')
version.usage = 'npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]' +
@@ -33,7 +35,7 @@ function version (args, silent, cb_) {
}
if (args.length > 1) return cb_(version.usage)
- readPackage(function (er, data, indent) {
+ readPackage(function (er, data, indent, newline) {
if (!args.length) return dump(data, cb_)
if (er) {
@@ -115,14 +117,16 @@ function readPackage (cb) {
fs.readFile(packagePath, 'utf8', function (er, data) {
if (er) return cb(new Error(er))
var indent
+ var newline
try {
- indent = detectIndent(data).indent || ' '
+ indent = detectIndent(data).indent
+ newline = detectNewline(data)
data = JSON.parse(data)
} catch (e) {
er = e
data = null
}
- cb(er, data, indent)
+ cb(er, data, indent, newline)
})
}
@@ -132,10 +136,10 @@ function updatePackage (newVersion, silent, cb_) {
cb_(er)
}
- readPackage(function (er, data, indent) {
+ readPackage(function (er, data, indent, newline) {
if (er) return cb(new Error(er))
data.version = newVersion
- write(data, 'package.json', indent, cb)
+ write(data, 'package.json', indent, newline, cb)
})
}
@@ -168,15 +172,17 @@ function updateShrinkwrap (newVersion, cb) {
const file = shrinkwrap ? SHRINKWRAP : PKGLOCK
let data
let indent
+ let newline
try {
data = parseJSON(shrinkwrap || lockfile)
- indent = detectIndent(shrinkwrap || lockfile).indent || ' '
+ indent = detectIndent(shrinkwrap || lockfile).indent
+ newline = detectNewline(shrinkwrap || lockfile)
} catch (err) {
log.error('version', `Bad ${file} data.`)
return cb(err)
}
data.version = newVersion
- write(data, file, indent, (err) => {
+ write(data, file, indent, newline, (err) => {
if (err) {
log.error('version', `Failed to update version in ${file}`)
return cb(err)
@@ -321,14 +327,14 @@ function addLocalFile (file, options, ignoreFailure) {
: p
}
-function write (data, file, indent, cb) {
+function write (data, file, indent, newline, cb) {
assert(data && typeof data === 'object', 'must pass data to version write')
assert(typeof file === 'string', 'must pass filename to write to version write')
log.verbose('version.write', 'data', data, 'to', file)
writeFileAtomic(
path.join(npm.localPrefix, file),
- new Buffer(JSON.stringify(data, null, indent || 2) + '\n'),
+ new Buffer(stringifyPackage(data, indent, newline)),
cb
)
}
diff --git a/deps/npm/lib/xmas.js b/deps/npm/lib/xmas.js
index 25535533e1..65c0c131ab 100644
--- a/deps/npm/lib/xmas.js
+++ b/deps/npm/lib/xmas.js
@@ -48,7 +48,7 @@ module.exports = function (args, cb) {
w('\n\n')
log.heading = ''
log.addLevel('npm', 100000, log.headingStyle)
- log.npm('loves you', 'Happy Xmas, Noders!')
+ log.npm('loves you', 'Happy Xmas, JavaScripters!')
cb()
}
var dg = false
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index a878813f91..2c1580ecff 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "December 2017" "" ""
+.TH "NPM" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
@@ -162,7 +162,7 @@ https://github\.com/npm/npm/issues
Be sure to include \fIall\fR of the output from the npm command that didn't work
as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\.
.P
-You can also find npm people in \fB#npm\fP on https://package\.community/ or
+You can also find npm people in \fB#npm\fP on https:// or
on Twitter \fIhttps://twitter\.com/npm_support\fR\|\. Whoever responds will no
doubt tell you to put the output in a gist or email\.
.SH SEE ALSO
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 124fb542ef..61a9833898 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ACCESS" "1" "December 2017" "" ""
+.TH "NPM\-ACCESS" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-access\fR \- Set access level on published packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index 1d0dc7d63f..e2a304cb3e 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ADDUSER" "1" "December 2017" "" ""
+.TH "NPM\-ADDUSER" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-adduser\fR \- Add a registry user account
.SH SYNOPSIS
@@ -31,7 +31,7 @@ your existing record\.
.SH CONFIGURATION
.SS registry
.P
-Default: https://registry\.npmjs\.org/
+Default: https://
.P
The base URL of the npm package registry\. If \fBscope\fP is also specified,
this registry will only be used for packages with that scope\. \fBscope\fP defaults
diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1
index a146ed8ce2..985a50dc52 100644
--- a/deps/npm/man/man1/npm-bin.1
+++ b/deps/npm/man/man1/npm-bin.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BIN" "1" "December 2017" "" ""
+.TH "NPM\-BIN" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-bin\fR \- Display npm bin folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index e4a7489178..3c38f6368a 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUGS" "1" "December 2017" "" ""
+.TH "NPM\-BUGS" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe
.SH SYNOPSIS
@@ -30,7 +30,7 @@ The browser that is called by the \fBnpm bugs\fP command to open websites\.
.SS registry
.RS 0
.IP \(bu 2
-Default: https://registry\.npmjs\.org/
+Default: https://
.IP \(bu 2
Type: url
diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1
index 6ea78934f1..98563d426b 100644
--- a/deps/npm/man/man1/npm-build.1
+++ b/deps/npm/man/man1/npm-build.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUILD" "1" "December 2017" "" ""
+.TH "NPM\-BUILD" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-build\fR \- Build a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1
index 6eb57d7c10..41e2e06315 100644
--- a/deps/npm/man/man1/npm-bundle.1
+++ b/deps/npm/man/man1/npm-bundle.1
@@ -1,4 +1,4 @@
-.TH "NPM\-BUNDLE" "1" "December 2017" "" ""
+.TH "NPM\-BUNDLE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-bundle\fR \- REMOVED
.SH DESCRIPTION
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index 133b61730f..aa7bcbb40a 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CACHE" "1" "December 2017" "" ""
+.TH "NPM\-CACHE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-cache\fR \- Manipulates packages cache
.SH SYNOPSIS
@@ -88,9 +88,9 @@ npm help publish
.IP \(bu 2
npm help pack
.IP \(bu 2
-https://npm\.im/cacache
+https://
.IP \(bu 2
-https://npm\.im/pacote
+https://
.RE
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
new file mode 100644
index 0000000000..2c44344b38
--- /dev/null
+++ b/deps/npm/man/man1/npm-ci.1
@@ -0,0 +1,76 @@
+.TH "NPM\-CI" "1" "April 2018" "" ""
+.SH "NAME"
+\fBnpm-ci\fR \- Install a project with a clean slate
+.SH SYNOPSIS
+.P
+.RS 2
+.nf
+npm ci
+.fi
+.RE
+.SH EXAMPLE
+.P
+Make sure you have a package\-lock and an up\-to\-date install:
+.P
+.RS 2
+.nf
+$ cd \./my/npm/project
+$ npm install
+added 154 packages in 10s
+$ ls | grep package\-lock
+.fi
+.RE
+.P
+Run \fBnpm ci\fP in that project
+.P
+.RS 2
+.nf
+$ npm ci
+added 154 packages in 5s
+.fi
+.RE
+.P
+Configure Travis to build using \fBnpm ci\fP instead of \fBnpm install\fP:
+.P
+.RS 2
+.nf
+# \.travis\.yml
+install:
+\- npm ci
+# keep the npm cache around to speed up installs
+cache:
+ directories:
+ \- "$HOME/\.npm"
+.fi
+.RE
+.SH DESCRIPTION
+.P
+This command is similar to npm help \fBnpm\-install\fP, except it's meant to be used in
+automated environments such as test platforms, continuous integration, and
+deployment\. It can be significantly faster than a regular npm install by
+skipping certain user\-oriented features\. It is also more strict than a regular
+install, which can help catch errors or inconsistencies caused by the
+incrementally\-installed local environments of most npm users\.
+.P
+In short, the main differences between using \fBnpm install\fP and \fBnpm ci\fP are:
+.RS 0
+.IP \(bu 2
+The project \fBmust\fR have an existing \fBpackage\-lock\.json\fP or \fBnpm\-shrinkwrap\.json\fP\|\.
+.IP \(bu 2
+If dependencies in the package lock do not match those in \fBpackage\.json\fP, \fBnpm ci\fP will exit with an error, instead of updating the package lock\.
+.IP \(bu 2
+\fBnpm ci\fP can only install entire projects at a time: individual dependencies cannot be added with this command\.
+.IP \(bu 2
+If a \fBnode_modules\fP is already present, it will be automatically removed before \fBnpm ci\fP begins its install\.
+.IP \(bu 2
+It will never write to \fBpackage\.json\fP or any of the package\-locks: installs are essentially frozen\.
+
+.RE
+.SH SEE ALSO
+.RS 0
+.IP \(bu 2
+npm help install
+.IP \(bu 2
+npm help 5 package\-locks
+
+.RE
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index 131cd3f0d6..1f9498201d 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM\-COMPLETION" "1" "December 2017" "" ""
+.TH "NPM\-COMPLETION" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-completion\fR \- Tab Completion for npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index c284370d3f..5c5986dd04 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "1" "December 2017" "" ""
+.TH "NPM\-CONFIG" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-config\fR \- Manage the npm configuration files
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index c1ccfc6bf2..b767ce12dc 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEDUPE" "1" "December 2017" "" ""
+.TH "NPM\-DEDUPE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-dedupe\fR \- Reduce duplication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index d50b3eb39a..369336588b 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DEPRECATE" "1" "December 2017" "" ""
+.TH "NPM\-DEPRECATE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-deprecate\fR \- Deprecate a version of a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index ba49d77fa8..41438a1612 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DIST\-TAG" "1" "December 2017" "" ""
+.TH "NPM\-DIST\-TAG" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index f913d4ee51..16252953ec 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCS" "1" "December 2017" "" ""
+.TH "NPM\-DOCS" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-docs\fR \- Docs for a package in a web browser maybe
.SH SYNOPSIS
@@ -32,7 +32,7 @@ The browser that is called by the \fBnpm docs\fP command to open websites\.
.SS registry
.RS 0
.IP \(bu 2
-Default: https://registry\.npmjs\.org/
+Default: https://
.IP \(bu 2
Type: url
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index 649b81f2e7..82afa30d5a 100644
--- a/deps/npm/man/man1/npm-doctor.1
+++ b/deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
-.TH "NPM\-DOCTOR" "1" "December 2017" "" ""
+.TH "NPM\-DOCTOR" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-doctor\fR \- Check your environments
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 96275a8d9a..728ccc572d 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EDIT" "1" "December 2017" "" ""
+.TH "NPM\-EDIT" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-edit\fR \- Edit an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index 9ed823aeef..dec8b7b566 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM\-EXPLORE" "1" "December 2017" "" ""
+.TH "NPM\-EXPLORE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-explore\fR \- Browse an installed package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 4252dff698..e9d81a6d3a 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP\-SEARCH" "1" "December 2017" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-help-search\fR \- Search npm help documentation
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index dea51fb5dc..da9e274538 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM\-HELP" "1" "December 2017" "" ""
+.TH "NPM\-HELP" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-help\fR \- Get help on npm
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 3395281ac7..21f1e0eb32 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INIT" "1" "December 2017" "" ""
+.TH "NPM\-INIT" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-init\fR \- Interactively create a package\.json file
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index 34a306b520..69cbb84971 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
-.TH "NPM" "" "December 2017" "" ""
+.TH "NPM" "" "April 2018" "" ""
.SH "NAME"
\fBnpm\fR
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index bdbc6794c9..981b81ba03 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM\-INSTALL" "1" "December 2017" "" ""
+.TH "NPM\-INSTALL" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
@@ -62,6 +62,11 @@ after packing it up into a tarball (b)\.
With the \fB\-\-production\fP flag (or when the \fBNODE_ENV\fP environment variable
is set to \fBproduction\fP), npm will not install modules listed in
\fBdevDependencies\fP\|\.
+.QP
+NOTE: The \fB\-\-production\fP flag has no particular meaning when adding a
+ dependency to a project\.
+
+.
.IP \(bu 2
\fBnpm install <folder>\fP:
Install the package in the directory as a symlink in the current project\.
@@ -397,7 +402,8 @@ The \fB\-\-no\-shrinkwrap\fP argument, which will ignore an available
package lock or shrinkwrap file and use the package\.json instead\.
.P
The \fB\-\-no\-package\-lock\fP argument will prevent npm from creating a
-\fBpackage\-lock\.json\fP file\.
+\fBpackage\-lock\.json\fP file\. When running with package\-lock's disabled npm
+will not automatically prune your node modules when installing\.
.P
The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the
node source code so that npm can compile native modules\.
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 471db86d33..ef5ed800b4 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LINK" "1" "December 2017" "" ""
+.TH "NPM\-LINK" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index fab4c6c135..d69551cc49 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LOGOUT" "1" "December 2017" "" ""
+.TH "NPM\-LOGOUT" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-logout\fR \- Log out of the registry
.SH SYNOPSIS
@@ -23,7 +23,7 @@ connected to that scope, if set\.
.SH CONFIGURATION
.SS registry
.P
-Default: https://registry\.npmjs\.org/
+Default: https://
.P
The base URL of the npm package registry\. If \fBscope\fP is also specified,
it takes precedence\.
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index c28056f2d0..3bd018a7d0 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM\-LS" "1" "December 2017" "" ""
+.TH "NPM\-LS" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-ls\fR \- List installed packages
.SH SYNOPSIS
@@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@5.6.0 /path/to/npm
+npm@5.8.0 /path/to/npm
ā””ā”€ā”¬ init\-package\-json@0\.0\.4
ā””ā”€ā”€ promzard@0\.1\.5
.fi
@@ -98,7 +98,7 @@ Default: false
.RE
.P
Display only the dependency tree for packages in \fBdependencies\fP\|\.
-.SS dev
+.SS dev / development
.RS 0
.IP \(bu 2
Type: Boolean
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index e301f08e44..dd8ef735b4 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OUTDATED" "1" "December 2017" "" ""
+.TH "NPM\-OUTDATED" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-outdated\fR \- Check for outdated packages
.SH SYNOPSIS
@@ -75,10 +75,9 @@ something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP
\fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a
reinstall of a Git dependency always forces a new clone and install\.
.IP \(bu 2
-\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm
-uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP
-will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range)
-will install whatever's tagged as \fBlatest\fP\|\.
+\fBis marked as "wanted", but "latest" is\fP\fBbecause npm
+uses dist\-tags to manage its\fPlatest\fBand\fPnext\fBrelease channels\.\fPnpm update\fBwill install the _newest_ version, but\fPnpm install npm\fB(with no semver range)
+will install whatever's tagged as\fPlatest`\.
.IP \(bu 2
\fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or
running \fBnpm update\fP will bring it up to spec\.
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 8e0617d6e7..24ed19c507 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM\-OWNER" "1" "December 2017" "" ""
+.TH "NPM\-OWNER" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-owner\fR \- Manage package owners
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 633ceac020..c476f7e2e6 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PACK" "1" "December 2017" "" ""
+.TH "NPM\-PACK" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-pack\fR \- Create a tarball from a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index 3c5a3ed999..140d8786fc 100644
--- a/deps/npm/man/man1/npm-ping.1
+++ b/deps/npm/man/man1/npm-ping.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PING" "1" "December 2017" "" ""
+.TH "NPM\-PING" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-ping\fR \- Ping npm registry
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index f69b65b9ca..f493f38f41 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PREFIX" "1" "December 2017" "" ""
+.TH "NPM\-PREFIX" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-prefix\fR \- Display prefix
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
index 37252a530e..7534b26e10 100644
--- a/deps/npm/man/man1/npm-profile.1
+++ b/deps/npm/man/man1/npm-profile.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PROFILE" "1" "December 2017" "" ""
+.TH "NPM\-PROFILE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-profile\fR \- Change settings on your registry profile
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index f84d2e41ec..2355eb731f 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,11 +1,11 @@
-.TH "NPM\-PRUNE" "1" "December 2017" "" ""
+.TH "NPM\-PRUNE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-prune\fR \- Remove extraneous packages
.SH SYNOPSIS
.P
.RS 2
.nf
-npm prune [[<@scope>/]<pkg>\.\.\.] [\-\-production]
+npm prune [[<@scope>/]<pkg>\.\.\.] [\-\-production] [\-\-dry\-run] [\-\-json]
.fi
.RE
.SH DESCRIPTION
@@ -19,8 +19,20 @@ package's dependencies list\.
.P
If the \fB\-\-production\fP flag is specified or the \fBNODE_ENV\fP environment
variable is set to \fBproduction\fP, this command will remove the packages
-specified in your \fBdevDependencies\fP\|\. Setting \fB\-\-production=false\fP will
+specified in your \fBdevDependencies\fP\|\. Setting \fB\-\-no\-production\fP will
negate \fBNODE_ENV\fP being set to \fBproduction\fP\|\.
+.P
+If the \fB\-\-dry\-run\fP flag is used then no changes will actually be made\.
+.P
+If the \fB\-\-json\fP flag is used then the changes \fBnpm prune\fP made (or would
+have made with \fB\-\-dry\-run\fP) are printed as a JSON object\.
+.P
+In normal operation with package\-locks enabled, extraneous modules are
+pruned automatically when modules are installed and you'll only need
+this command with the \fB\-\-production\fP flag\.
+.P
+If you've disabled package\-locks then extraneous modules will not be removed
+and it's up to you to run \fBnpm prune\fP from time\-to\-time to remove them\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index 2764e9e4c4..0710adc465 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-PUBLISH" "1" "December 2017" "" ""
+.TH "NPM\-PUBLISH" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index ab2b80391a..711b5736bb 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REBUILD" "1" "December 2017" "" ""
+.TH "NPM\-REBUILD" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-rebuild\fR \- Rebuild a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 85b22ead2d..20c2cc8471 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM\-REPO" "1" "December 2017" "" ""
+.TH "NPM\-REPO" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-repo\fR \- Open package repository page in the browser
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index b269a5fb75..84a3a7f59c 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RESTART" "1" "December 2017" "" ""
+.TH "NPM\-RESTART" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-restart\fR \- Restart a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index 63901eef3c..81bb047606 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM\-ROOT" "1" "December 2017" "" ""
+.TH "NPM\-ROOT" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-root\fR \- Display npm root
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 2cdde2a46c..83a6d80e4e 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM\-RUN\-SCRIPT" "1" "December 2017" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-run-script\fR \- Run arbitrary package scripts
.SH SYNOPSIS
@@ -18,7 +18,7 @@ used by the test, start, restart, and stop commands, but can be called
directly, as well\. When the scripts in the package are printed out, they're
separated into lifecycle (test, start, restart) and directly\-run scripts\.
.P
-As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
+As of ` \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
use custom arguments when executing scripts\. The special option \fB\-\-\fP is used by
getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass
all the arguments after the \fB\-\-\fP directly to your script:
@@ -62,7 +62,7 @@ to run your tests\.
The actual shell your script is run within is platform dependent\. By default,
on Unix\-like systems it is the \fB/bin/sh\fP command, on Windows it is the \fBcmd\.exe\fP\|\.
The actual shell referred to by \fB/bin/sh\fP also depends on the system\.
-As of \fBnpm@5\.1\.0\fP \fIhttps://github\.com/npm/npm/releases/tag/v5\.1\.0\fR you can
+As of ` \fIhttps://github\.com/npm/npm/releases/tag/v5\.1\.0\fR you can
customize the shell with the \fBscript\-shell\fP configuration\.
.P
Scripts are run from the root of the module, regardless of what your current
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index f175c8628c..28982e22ff 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SEARCH" "1" "December 2017" "" ""
+.TH "NPM\-SEARCH" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
@@ -110,7 +110,7 @@ The age of the cache, in seconds, before another registry request is made\.
.SS registry
.RS 0
.IP \(bu 2
-Default: https://registry\.npmjs\.org/
+Default: https://
.IP \(bu 2
Type: url
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index 00347defa6..44f1cd127f 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP" "1" "December 2017" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 44e5147205..b39425f07e 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STAR" "1" "December 2017" "" ""
+.TH "NPM\-STAR" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-star\fR \- Mark your favorite packages
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index c5a7de3cc3..eeb58181f4 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STARS" "1" "December 2017" "" ""
+.TH "NPM\-STARS" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-stars\fR \- View packages marked as favorites
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index 57b75de5b8..c83efc2aa0 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM\-START" "1" "December 2017" "" ""
+.TH "NPM\-START" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-start\fR \- Start a package
.SH SYNOPSIS
@@ -14,7 +14,7 @@ This runs an arbitrary command specified in the package's \fB"start"\fP property
its \fB"scripts"\fP object\. If no \fB"start"\fP property is specified on the
\fB"scripts"\fP object, it will run \fBnode server\.js\fP\|\.
.P
-As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
+As of ` \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can
use custom arguments when executing scripts\. Refer to npm help run\-script for
more details\.
.SH SEE ALSO
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 674ed9a530..f9acafd280 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM\-STOP" "1" "December 2017" "" ""
+.TH "NPM\-STOP" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-stop\fR \- Stop a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index cb75eeeec9..7f56095981 100644
--- a/deps/npm/man/man1/npm-team.1
+++ b/deps/npm/man/man1/npm-team.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEAM" "1" "December 2017" "" ""
+.TH "NPM\-TEAM" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-team\fR \- Manage organization teams and team memberships
.SH SYNOPSIS
@@ -37,6 +37,9 @@ ls:
If performed on an organization name, will return a list of existing teams
under that organization\. If performed on a team, it will instead return a list
of all users belonging to that particular team\.
+.IP \(bu 2
+edit:
+Edit a current team\.
.RE
.SH DETAILS
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index 2b03620434..44d3ea8889 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TEST" "1" "December 2017" "" ""
+.TH "NPM\-TEST" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-test\fR \- Test a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
index 8eb645e9fa..5744363e80 100644
--- a/deps/npm/man/man1/npm-token.1
+++ b/deps/npm/man/man1/npm-token.1
@@ -1,4 +1,4 @@
-.TH "NPM\-TOKEN" "1" "December 2017" "" ""
+.TH "NPM\-TOKEN" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-token\fR \- Manage your authentication tokens
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index be83b3f7a8..1c00131e26 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNINSTALL" "1" "December 2017" "" ""
+.TH "NPM\-UNINSTALL" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-uninstall\fR \- Remove a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 224e04f1bb..17e1007223 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UNPUBLISH" "1" "December 2017" "" ""
+.TH "NPM\-UNPUBLISH" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-unpublish\fR \- Remove a package from the registry
.SH SYNOPSIS
@@ -32,7 +32,7 @@ package again, a new version number must be used\.
With the default registry (\fBregistry\.npmjs\.org\fP), unpublish is
only allowed with versions published in the last 24 hours\. If you
are trying to unpublish a version published longer ago than that,
-contact support@npmjs\.com\.
+contact \|\.
.P
The scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\.
.SH SEE ALSO
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index d8ae500df0..3e492ebfac 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM\-UPDATE" "1" "December 2017" "" ""
+.TH "NPM\-UPDATE" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -25,13 +25,17 @@ packages\.
If no package name is specified, all packages in the specified location (global
or local) will be updated\.
.P
-As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\.
-Prior versions of \fBnpm\fP would also recursively inspect all dependencies\.
-To get the old behavior, use \fBnpm \-\-depth 9999 update\fP\|\.
+As of \fB, the\fPnpm update\fBwill only inspect top\-level packages\.
+Prior versions of\fPnpm\fBwould also recursively inspect all dependencies\.
+To get the old behavior, use\fPnpm \-\-depth 9999 update`\.
+.P
+As of \fB, the\fPnpm update\fBwill change\fPpackage\.json\fBto save the
+new version as the minimum required dependency\. To get the old behavior,
+use\fPnpm update \-\-no\-save`\.
.SH EXAMPLES
.P
-IMPORTANT VERSION NOTE: these examples assume \fBnpm@2\.6\.1\fP or later\. For
-older versions of \fBnpm\fP, you must specify \fB\-\-depth 0\fP to get the behavior
+IMPORTANT VERSION NOTE: these examples assume \fBor later\. For
+older versions of\fPnpm\fB, you must specify\fP\-\-depth 0` to get the behavior
described below\.
.P
For the examples below, assume that the current package is \fBapp\fP and it depends
@@ -67,8 +71,7 @@ If \fBapp\fP\|'s \fBpackage\.json\fP contains:
.fi
.RE
.P
-Then \fBnpm update\fP will install \fBdep1@1\.2\.2\fP, because \fB1\.2\.2\fP is \fBlatest\fP and
-\fB1\.2\.2\fP satisfies \fB^1\.1\.1\fP\|\.
+Then \fBnpm update\fP will install \fB, because\fP1\.2\.2\fBis\fPlatest\fBand\fP1\.2\.2\fBsatisfies\fP^1\.1\.1`\.
.SS Tilde Dependencies
.P
However, if \fBapp\fP\|'s \fBpackage\.json\fP contains:
@@ -81,10 +84,9 @@ However, if \fBapp\fP\|'s \fBpackage\.json\fP contains:
.fi
.RE
.P
-In this case, running \fBnpm update\fP will install \fBdep1@1\.1\.2\fP\|\. Even though the \fBlatest\fP
-tag points to \fB1\.2\.2\fP, this version does not satisfy \fB~1\.1\.1\fP, which is equivalent
-to \fB>=1\.1\.1 <1\.2\.0\fP\|\. So the highest\-sorting version that satisfies \fB~1\.1\.1\fP is used,
-which is \fB1\.1\.2\fP\|\.
+In this case, running \fBnpm update\fP will install \fB\|\. Even though the\fPlatest\fBtag points to\fP1\.2\.2\fB, this version does not satisfy\fP~1\.1\.1\fB, which is equivalent
+to\fP>=1\.1\.1 <1\.2\.0\fB\|\. So the highest\-sorting version that satisfies\fP~1\.1\.1\fBis used,
+which is\fP1\.1\.2`\.
.SS Caret Dependencies below 1\.0\.0
.P
Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example:
@@ -97,8 +99,8 @@ Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for e
.fi
.RE
.P
-\fBnpm update\fP will install \fBdep1@0\.2\.0\fP, because there are no other
-versions which satisfy \fB^0\.2\.0\fP\|\.
+\fBnpm update\fP will install \fB, because there are no other
+versions which satisfy\fP^0\.2\.0`\.
.P
If the dependence were on \fB^0\.4\.0\fP:
.P
@@ -110,36 +112,8 @@ If the dependence were on \fB^0\.4\.0\fP:
.fi
.RE
.P
-Then \fBnpm update\fP will install \fBdep1@0\.4\.1\fP, because that is the highest\-sorting
-version that satisfies \fB^0\.4\.0\fP (\fB>= 0\.4\.0 <0\.5\.0\fP)
-.SS Recording Updates with \fB\-\-save\fP
-.P
-When you want to update a package and save the new version as
-the minimum required dependency in \fBpackage\.json\fP, you can use
-\fBnpm update \-S\fP or \fBnpm update \-\-save\fP\|\. For example if
-\fBpackage\.json\fP contains:
-.P
-.RS 2
-.nf
-"dependencies": {
- "dep1": "^1\.1\.1"
-}
-.fi
-.RE
-.P
-Then \fBnpm update \-\-save\fP will install \fBdep1@1\.2\.2\fP (i\.e\., \fBlatest\fP),
-and \fBpackage\.json\fP will be modified:
-.P
-.RS 2
-.nf
-"dependencies": {
- "dep1": "^1\.2\.2"
-}
-.fi
-.RE
-.P
-Note that \fBnpm\fP will only write an updated version to \fBpackage\.json\fP
-if it installs a new package\.
+Then \fBnpm update\fP will install \fB, because that is the highest\-sorting
+version that satisfies\fP^0\.4\.0\fB(\fP>= 0\.4\.0 <0\.5\.0`)
.SS Updating Globally\-Installed Packages
.P
\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 9601e4f188..7e0ea7e733 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VERSION" "1" "December 2017" "" ""
+.TH "NPM\-VERSION" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-version\fR \- Bump a package version
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 2c18268271..025942b589 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM\-VIEW" "1" "December 2017" "" ""
+.TH "NPM\-VIEW" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-view\fR \- View registry info
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 2f096ac2a0..7ae19f9393 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM\-WHOAMI" "1" "December 2017" "" ""
+.TH "NPM\-WHOAMI" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-whoami\fR \- Display npm username
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 42eb296250..a60fc686ea 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "December 2017" "" ""
+.TH "NPM" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
-5.6.0
+5.8.0
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
@@ -105,7 +105,7 @@ Command line switches:
.br
Set a config with \fB\-\-key val\fP\|\. All keys take a value, even if they
are booleans (the config parser doesn't know what the options are at
-the time of parsing\.) If no value is provided, then the option is set
+the time of parsing)\. If no value is provided, then the option is set
to boolean \fBtrue\fP\|\.
.IP \(bu 2
Environment Variables:
@@ -156,7 +156,7 @@ If you would like to contribute, but don't know what to work on, read
the contributing guidelines and check the issues list\.
.RS 0
.IP \(bu 2
-https://github\.com/npm/npm/wiki/Contributing\-Guidelines
+https://
.IP \(bu 2
https://github\.com/npm/npm/issues
diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1
index 912effdc3b..f52e3c7a51 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "October 2017" "npx@9.7.0" "User Commands"
+.TH "NPX" "1" "March 2018" "npx@10.0.0" "User Commands"
.SH "NAME"
\fBnpx\fR \- execute npm package binaries
.SH SYNOPSIS
@@ -101,6 +101,13 @@ $ npx \-\-node\-arg=\-\-inspect cowsay
Debugger listening on ws://127\.0\.0\.1:9229/\.\.\.\.
.fi
.RE
+.SS Specify a node version to run npm scripts (or anything else!)
+.P
+.RS 2
+.nf
+npx \-p node@8 npm run build
+.fi
+.RE
.SH SHELL AUTO FALLBACK
.P
You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\.
diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5
index a252685bd0..a0200f590f 100644
--- a/deps/npm/man/man5/npm-folders.5
+++ b/deps/npm/man/man5/npm-folders.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "December 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2018" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -69,7 +69,7 @@ Man pages are not installed on Windows systems\.
.SS Cache
.P
See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or
-\fB~/npm\-cache\fP on Windows\.
+\fB%AppData%/npm\-cache\fP on Windows\.
.P
This is controlled by the \fBcache\fP configuration param\.
.SS Temp Files
@@ -173,17 +173,17 @@ foo
.fi
.RE
.P
-Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are
-installed in foo's \fBnode_modules\fP folder\.
+Since foo depends directly on \fBand\fP\fB, those are
+installed in foo's\fPnode_modules` folder\.
.P
Even though the latest copy of blerg is 1\.3\.7, foo has a specific
dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the
-parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP,
+parent installation of blerg satisfies bar's dependency on `,
it does not install another copy under [B]\.
.P
Bar [B] also has dependencies on baz and asdf, so those are installed in
-bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot
-re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D],
+bar's \fBnode_modules\fP folder\. Because it depends on \fB, it cannot
+re\-use the\fP\fBinstalled in the parent\fPnode_modules` folder [D],
and must install its own copy [C]\.
.P
Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\.
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index a252685bd0..a0200f590f 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "NPM\-FOLDERS" "5" "December 2017" "" ""
+.TH "NPM\-FOLDERS" "5" "April 2018" "" ""
.SH "NAME"
\fBnpm-folders\fR \- Folder Structures Used by npm
.SH DESCRIPTION
@@ -69,7 +69,7 @@ Man pages are not installed on Windows systems\.
.SS Cache
.P
See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or
-\fB~/npm\-cache\fP on Windows\.
+\fB%AppData%/npm\-cache\fP on Windows\.
.P
This is controlled by the \fBcache\fP configuration param\.
.SS Temp Files
@@ -173,17 +173,17 @@ foo
.fi
.RE
.P
-Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are
-installed in foo's \fBnode_modules\fP folder\.
+Since foo depends directly on \fBand\fP\fB, those are
+installed in foo's\fPnode_modules` folder\.
.P
Even though the latest copy of blerg is 1\.3\.7, foo has a specific
dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the
-parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP,
+parent installation of blerg satisfies bar's dependency on `,
it does not install another copy under [B]\.
.P
Bar [B] also has dependencies on baz and asdf, so those are installed in
-bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot
-re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D],
+bar's \fBnode_modules\fP folder\. Because it depends on \fB, it cannot
+re\-use the\fP\fBinstalled in the parent\fPnode_modules` folder [D],
and must install its own copy [C]\.
.P
Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\.
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 0a4328f73f..7350a99a88 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "December 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2018" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -10,11 +10,11 @@ A lot of the behavior described in this document is affected by the config
settings described in npm help 7 \fBnpm\-config\fP\|\.
.SH name
.P
-The \fImost\fR important things in your package\.json are the name and version fields\.
-Those are actually required, and your package won't install without
-them\. The name and version together form an identifier that is assumed
-to be completely unique\. Changes to the package should come along with
-changes to the version\.
+If you plan to publish your package, the \fImost\fR important things in your
+package\.json are the name and version fields as they will be required\. The name
+and version together form an identifier that is assumed to be completely unique\.
+Changes to the package should come along with changes to the version\. If you don't
+plan to publish your package, the name and version fields are optional\.
.P
The name is what your thing is called\.
.P
@@ -54,11 +54,11 @@ A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\.
npm help 7 \fBnpm\-scope\fP for more detail\.
.SH version
.P
-The \fImost\fR important things in your package\.json are the name and version fields\.
-Those are actually required, and your package won't install without
-them\. The name and version together form an identifier that is assumed
-to be completely unique\. Changes to the package should come along with
-changes to the version\.
+If you plan to publish your package, the \fImost\fR important things in your
+package\.json are the name and version fields as they will be required\. The name
+and version together form an identifier that is assumed to be completely unique\.
+Changes to the package should come along with changes to the version\. If you don't
+plan to publish your package, the name and version fields are optional\.
.P
Version must be parseable by
node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled
@@ -76,6 +76,14 @@ discover your package as it's listed in \fBnpm search\fP\|\.
.SH homepage
.P
The url to the project homepage\.
+.P
+Example:
+.P
+.RS 2
+.nf
+"homepage": "https://github\.com/owner/project#readme"
+.fi
+.RE
.SH bugs
.P
The url to your project's issue tracker and / or the email address to which
@@ -207,13 +215,15 @@ Both email and url are optional either way\.
npm also sets a top\-level "maintainers" field with your npm user info\.
.SH files
.P
-The optional "files" field is an array of file patterns that describes
+The optional \fBfiles\fP field is an array of file patterns that describes
the entries to be included when your package is installed as a
-dependency\. If the files array is omitted, everything except
-automatically\-excluded files will be included in your publish\. If you
-name a folder in the array, then it will also include the files inside
-that folder (unless they would be ignored by another rule in this
-section\.)\.
+dependency\. File patterns follow a similar syntax to \fB\|\.gitignore\fP, but
+reversed: including a file, directory, or glob pattern (\fB*\fP, \fB**/*\fP, and such)
+will make it so that file is included in the tarball when it's packed\. Omitting
+the field will make it default to \fB["*"]\fP, which means it will include all files\.
+.P
+Some special files and directories are also included or excluded regardless of
+whether they exist in the \fBfiles\fP array (see below)\.
.P
You can also provide a \fB\|\.npmignore\fP file in the root of your package or
in subdirectories, which will keep files from being included\. At the
@@ -288,6 +298,11 @@ This should be a module ID relative to the root of your package folder\.
.P
For most modules, it makes the most sense to have a main script and often not
much else\.
+.SH browser
+.P
+If your module is meant to be used client\-side the browser field should be
+used instead of the main field\. This is helpful to hint users that it might
+rely on primitives that aren't available in Node\.js modules\. (e\.g\. \fBwindow\fP)
.SH bin
.P
A lot of packages have one or more executable files that they'd like to
diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5
index 241a45d9bb..ddc19cba22 100644
--- a/deps/npm/man/man5/npm-package-locks.5
+++ b/deps/npm/man/man5/npm-package-locks.5
@@ -1,4 +1,4 @@
-.TH "NPM\-PACKAGE\-LOCKS" "5" "December 2017" "" ""
+.TH "NPM\-PACKAGE\-LOCKS" "5" "April 2018" "" ""
.SH "NAME"
\fBnpm-package-locks\fR \- An explanation of npm lockfiles
.SH DESCRIPTION
@@ -71,7 +71,7 @@ A@0\.1\.0
.fi
.RE
.P
-However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fP will
+However, if is published, then a fresh \fBnpm install A\fP will
install:
.P
.RS 2
@@ -85,7 +85,7 @@ A@0\.1\.0
assuming the new version did not modify B's dependencies\. Of course,
the new version of B could include a new version of C and any number
of new dependencies\. If such changes are undesirable, the author of A
-could specify a dependency on B@0\.0\.1\. However, if A's author and B's
+could specify a dependency on \|\. However, if A's author and B's
author are not the same person, there's no way for A's author to say
that he or she does not want to pull in newly published versions of C
when B hasn't changed at all\.
@@ -167,10 +167,25 @@ package source to get the exact same dependency tree that you were developing
on\. Additionally, the diffs from these changes are human\-readable and will
inform you of any changes npm has made to your \fBnode_modules\fP, so you can notice
if any transitive dependencies were updated, hoisted, etc\.
+.SS Resolving lockfile conflicts
+.P
+Occasionally, two separate npm install will create package locks that cause
+merge conflicts in source control systems\. As of \fB, these conflicts
+can be resolved by manually fixing any\fPpackage\.json\fBconflicts, and then
+running\fPnpm install [\-\-package\-lock\-only]\fBagain\. npm will automatically
+resolve any conflicts for you and write a merged package lock that includes all
+the dependencies from both branches in a reasonable tree\. If\fP\-\-package\-lock\-only\fBis provided, it will do this without also modifying your
+local\fPnode_modules/`\.
+.P
+To make this process seamless on git, consider installing
+\fBnpm\-merge\-driver\fP \fIhttps://npm\.im/npm\-merge\-driver\fR, which will teach git how
+to do this itself without any user interaction\. In short: \fB$ npx
+npm\-merge\-driver install \-g\fP will let you do this, and even works with
+\fBversions of npm 5, albeit a bit more noisily\. Note that if\fPpackage\.json\fBitself conflicts, you will have to resolve that by hand and run\fPnpm install` manually, even with the merge driver\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
-https://medium\.com/@sdboyer/so\-you\-want\-to\-write\-a\-package\-manager\-4ae9c17d9527
+https://
.IP \(bu 2
npm help 5 package\.json
.IP \(bu 2
diff --git a/deps/npm/man/man5/npm-shrinkwrap.json.5 b/deps/npm/man/man5/npm-shrinkwrap.json.5
index a832963dc6..e9500136f6 100644
--- a/deps/npm/man/man5/npm-shrinkwrap.json.5
+++ b/deps/npm/man/man5/npm-shrinkwrap.json.5
@@ -1,4 +1,4 @@
-.TH "NPM\-SHRINKWRAP\.JSON" "5" "December 2017" "" ""
+.TH "NPM\-SHRINKWRAP\.JSON" "5" "April 2018" "" ""
.SH "NAME"
\fBnpm-shrinkwrap.json\fR \- A publishable lockfile
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index 26d65c2598..78dd35ac35 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "December 2017" "" ""
+.TH "NPMRC" "5" "April 2018" "" ""
.SH "NAME"
\fBnpmrc\fR \- The npm config files
.SH DESCRIPTION
diff --git a/deps/npm/man/man5/package-lock.json.5 b/deps/npm/man/man5/package-lock.json.5
index 0196cc87e6..e33d30df31 100644
--- a/deps/npm/man/man5/package-lock.json.5
+++ b/deps/npm/man/man5/package-lock.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\-LOCK\.JSON" "5" "December 2017" "" ""
+.TH "PACKAGE\-LOCK\.JSON" "5" "April 2018" "" ""
.SH "NAME"
\fBpackage-lock.json\fR \- A manifestation of the manifest
.SH DESCRIPTION
@@ -127,6 +127,12 @@ transitive dependency of a non\-optional dependency of the top level\.
.P
All optional dependencies should be included even if they're uninstallable
on the current platform\.
+.SS requires
+.P
+This is a mapping of module name to version\. This is a list of everything
+this module requires, regardless of where it will be installed\. The version
+should match via normal matching rules a dependency either in our
+\fBdependencies\fP or in a level higher than us\.
.SS dependencies
.P
The dependencies of this dependency, exactly as at the top level\.
@@ -137,6 +143,8 @@ npm help shrinkwrap
.IP \(bu 2
npm help 5 shrinkwrap\.json
.IP \(bu 2
+npm help 5 package\-locks
+.IP \(bu 2
npm help 5 package\.json
.IP \(bu 2
npm help install
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index 0a4328f73f..7350a99a88 100644
--- a/deps/npm/man/man5/package.json.5
+++ b/deps/npm/man/man5/package.json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE\.JSON" "5" "December 2017" "" ""
+.TH "PACKAGE\.JSON" "5" "April 2018" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -10,11 +10,11 @@ A lot of the behavior described in this document is affected by the config
settings described in npm help 7 \fBnpm\-config\fP\|\.
.SH name
.P
-The \fImost\fR important things in your package\.json are the name and version fields\.
-Those are actually required, and your package won't install without
-them\. The name and version together form an identifier that is assumed
-to be completely unique\. Changes to the package should come along with
-changes to the version\.
+If you plan to publish your package, the \fImost\fR important things in your
+package\.json are the name and version fields as they will be required\. The name
+and version together form an identifier that is assumed to be completely unique\.
+Changes to the package should come along with changes to the version\. If you don't
+plan to publish your package, the name and version fields are optional\.
.P
The name is what your thing is called\.
.P
@@ -54,11 +54,11 @@ A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\.
npm help 7 \fBnpm\-scope\fP for more detail\.
.SH version
.P
-The \fImost\fR important things in your package\.json are the name and version fields\.
-Those are actually required, and your package won't install without
-them\. The name and version together form an identifier that is assumed
-to be completely unique\. Changes to the package should come along with
-changes to the version\.
+If you plan to publish your package, the \fImost\fR important things in your
+package\.json are the name and version fields as they will be required\. The name
+and version together form an identifier that is assumed to be completely unique\.
+Changes to the package should come along with changes to the version\. If you don't
+plan to publish your package, the name and version fields are optional\.
.P
Version must be parseable by
node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled
@@ -76,6 +76,14 @@ discover your package as it's listed in \fBnpm search\fP\|\.
.SH homepage
.P
The url to the project homepage\.
+.P
+Example:
+.P
+.RS 2
+.nf
+"homepage": "https://github\.com/owner/project#readme"
+.fi
+.RE
.SH bugs
.P
The url to your project's issue tracker and / or the email address to which
@@ -207,13 +215,15 @@ Both email and url are optional either way\.
npm also sets a top\-level "maintainers" field with your npm user info\.
.SH files
.P
-The optional "files" field is an array of file patterns that describes
+The optional \fBfiles\fP field is an array of file patterns that describes
the entries to be included when your package is installed as a
-dependency\. If the files array is omitted, everything except
-automatically\-excluded files will be included in your publish\. If you
-name a folder in the array, then it will also include the files inside
-that folder (unless they would be ignored by another rule in this
-section\.)\.
+dependency\. File patterns follow a similar syntax to \fB\|\.gitignore\fP, but
+reversed: including a file, directory, or glob pattern (\fB*\fP, \fB**/*\fP, and such)
+will make it so that file is included in the tarball when it's packed\. Omitting
+the field will make it default to \fB["*"]\fP, which means it will include all files\.
+.P
+Some special files and directories are also included or excluded regardless of
+whether they exist in the \fBfiles\fP array (see below)\.
.P
You can also provide a \fB\|\.npmignore\fP file in the root of your package or
in subdirectories, which will keep files from being included\. At the
@@ -288,6 +298,11 @@ This should be a module ID relative to the root of your package folder\.
.P
For most modules, it makes the most sense to have a main script and often not
much else\.
+.SH browser
+.P
+If your module is meant to be used client\-side the browser field should be
+used instead of the main field\. This is helpful to hint users that it might
+rely on primitives that aren't available in Node\.js modules\. (e\.g\. \fBwindow\fP)
.SH bin
.P
A lot of packages have one or more executable files that they'd like to
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index 508198722d..0e2ed879ea 100644
--- a/deps/npm/man/man7/npm-coding-style.7
+++ b/deps/npm/man/man7/npm-coding-style.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CODING\-STYLE" "7" "December 2017" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-coding-style\fR \- npm's "funny" coding style
.SH DESCRIPTION
@@ -147,7 +147,7 @@ var alsoOk = "String contains 'single' quotes or apostrophe"
.RE
.SH Whitespace
.P
-Put a single space in front of ( for anything other than a function call\.
+Put a single space in front of \fB(\fP for anything other than a function call\.
Also use a single space wherever it makes things more readable\.
.P
Don't leave trailing whitespace at the end of lines\. Don't indent empty
diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7
index aec6d8014c..fa82fb1886 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "7" "December 2017" "" ""
+.TH "NPM\-CONFIG" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -394,6 +394,9 @@ Type: Boolean or \fB"always"\fP
.P
If false, never shows colors\. If \fB"always"\fP then always shows colors\.
If true, then only prints color codes for tty file descriptors\.
+.P
+This option can also be changed using the environment: colors are
+disabled when the environment variable \fBNO_COLOR\fP is set to any value\.
.SS depth
.RS 0
.IP \(bu 2
@@ -902,7 +905,7 @@ Any "%s" in the message will be replaced with the version number\.
.SS metrics\-registry
.RS 0
.IP \(bu 2
-Default: The value of \fBregistry\fP (which defaults to "https://registry\.npmjs\.org/")
+Default: The value of \fBregistry\fP (which defaults to "https://
.IP \(bu 2
Type: String
@@ -931,6 +934,16 @@ Type: semver or false
.RE
.P
The node version to use when checking a package's \fBengines\fP map\.
+.SS no\-proxy
+.RS 0
+.IP \(bu 2
+Default: null
+.IP \(bu 2
+Type: String or Array
+
+.RE
+.P
+A comma\-separated string or an array of domain extensions that a proxy should not be used for\.
.SS offline
.RS 0
.IP \(bu 2
@@ -1009,6 +1022,10 @@ Type: Boolean
If set to false, then ignore \fBpackage\-lock\.json\fP files when installing\. This
will also prevent \fIwriting\fR \fBpackage\-lock\.json\fP if \fBsave\fP is true\.
.P
+When package package\-locks are disabled, automatic pruning of extraneous
+modules will also be disabled\. To remove extraneous modules with
+package\-locks disabled use \fBnpm prune\fP\|\.
+.P
This option is an alias for \fB\-\-shrinkwrap\fP\|\.
.SS package\-lock\-only
.RS 0
@@ -1019,7 +1036,7 @@ Type: Boolean
.RE
.P
-If set to true, it will update only the \fBpackage\-json\fP,
+If set to true, it will update only the \fBpackage\-lock\.json\fP,
instead of checking \fBnode_modules\fP and downloading dependencies\.
.SS parseable
.RS 0
@@ -1133,7 +1150,7 @@ Rebuild bundled dependencies after installation\.
.SS registry
.RS 0
.IP \(bu 2
-Default: https://registry\.npmjs\.org/
+Default: https://
.IP \(bu 2
Type: url
@@ -1153,7 +1170,7 @@ Remove failed installs\.
.SS save
.RS 0
.IP \(bu 2
-Default: false
+Default: true
.IP \(bu 2
Type: Boolean
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index d9e483206a..ba2fcd2f00 100644
--- a/deps/npm/man/man7/npm-developers.7
+++ b/deps/npm/man/man7/npm-developers.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DEVELOPERS" "7" "December 2017" "" ""
+.TH "NPM\-DEVELOPERS" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-developers\fR \- Developer Guide
.SH DESCRIPTION
@@ -68,7 +68,7 @@ This should be a string that identifies your project\. Please do not
use the name to specify that it runs on node, or is in JavaScript\.
You can use the "engines" field to explicitly state the versions of
node (or whatever else) that your program requires, and it's pretty
-well assumed that it's javascript\.
+well assumed that it's JavaScript\.
It does not necessarily need to match your github repository name\.
So, \fBnode\-foo\fP and \fBbar\-js\fP are bad names\. \fBfoo\fP or \fBbar\fP are better\.
.IP \(bu 2
diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7
index 642abcf178..16c8298f3e 100644
--- a/deps/npm/man/man7/npm-disputes.7
+++ b/deps/npm/man/man7/npm-disputes.7
@@ -1,4 +1,4 @@
-.TH "NPM\-DISPUTES" "7" "December 2017" "" ""
+.TH "NPM\-DISPUTES" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-disputes\fR \- Handling Module Name Disputes
.P
@@ -46,7 +46,7 @@ publishes it to the npm registry\. Being a simple little thing, it never
really has to be updated\. Alice works for Foo Inc, the makers of the
critically acclaimed and widely\-marketed \fBfoo\fP JavaScript toolkit framework\.
They publish it to npm as \fBfoojs\fP, but people are routinely confused when
-\fBnpm install\fPfoo`` is some different thing\.
+\fBnpm install\fPfoo\fB\fP is some different thing\.
.IP 4. 3
Yusuf writes a parser for the widely\-known \fBfoo\fP file format, because he
needs it for work\. Then, he gets a new job, and never updates the prototype\.
@@ -120,7 +120,7 @@ here to help\.\fR
.P
If you think another npm publisher is infringing your trademark, such as by
using a confusingly similar package name, email abuse@npmjs\.com with a link to
-the package or user account on \fIhttps://npmjs\.com\fR\|\. Attach a
+the package or user account on https:// \fIhttps://npmjs\.com\fR\|\. Attach a
copy of your trademark registration certificate\.
.P
If we see that the package's publisher is intentionally misleading others by
diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7
index 77a70e6cc6..f87b00c8b4 100644
--- a/deps/npm/man/man7/npm-index.7
+++ b/deps/npm/man/man7/npm-index.7
@@ -1,4 +1,4 @@
-.TH "NPM\-INDEX" "7" "December 2017" "" ""
+.TH "NPM\-INDEX" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
@@ -31,6 +31,9 @@ REMOVED
.SS npm help cache
.P
Manipulates packages cache
+.SS npm help ci
+.P
+Install a project with a clean slate
.SS npm help completion
.P
Tab Completion for npm
diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7
index d1c3588ad8..86f0d13ffd 100644
--- a/deps/npm/man/man7/npm-orgs.7
+++ b/deps/npm/man/man7/npm-orgs.7
@@ -1,4 +1,4 @@
-.TH "NPM\-ORGS" "7" "December 2017" "" ""
+.TH "NPM\-ORGS" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-orgs\fR \- Working with Teams & Orgs
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index a51170a387..d2e8adcbf5 100644
--- a/deps/npm/man/man7/npm-registry.7
+++ b/deps/npm/man/man7/npm-registry.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REGISTRY" "7" "December 2017" "" ""
+.TH "NPM\-REGISTRY" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-registry\fR \- The JavaScript Package Registry
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7
index 16e42f4bf0..9b83b6b775 100644
--- a/deps/npm/man/man7/npm-scope.7
+++ b/deps/npm/man/man7/npm-scope.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCOPE" "7" "December 2017" "" ""
+.TH "NPM\-SCOPE" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-scope\fR \- Scoped packages
.SH DESCRIPTION
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index bd0383116b..97c36d4053 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -1,4 +1,4 @@
-.TH "NPM\-SCRIPTS" "7" "December 2017" "" ""
+.TH "NPM\-SCRIPTS" "7" "April 2018" "" ""
.SH "NAME"
\fBnpm-scripts\fR \- How npm handles the "scripts" field
.SH DESCRIPTION
@@ -78,15 +78,15 @@ names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP,
.SH PREPUBLISH AND PREPARE
.SS DEPRECATION NOTE
.P
-Since \fBnpm@1\.1\.71\fP, the npm CLI has run the \fBprepublish\fP script for both \fBnpm
-publish\fP and \fBnpm install\fP, because it's a convenient way to prepare a package
+Since \fB, the npm CLI has run the\fPprepublish\fBscript for both\fPnpm
+publish\fBand\fPnpm install\fB, because it's a convenient way to prepare a package
for use (some common use cases are described in the section below)\. It has
-also turned out to be, in practice, very
-confusing \fIhttps://github\.com/npm/npm/issues/10074\fR\|\. As of \fBnpm@4\.0\.0\fP, a new
-event has been introduced, \fBprepare\fP, that preserves this existing behavior\. A
-\fInew\fR event, \fBprepublishOnly\fP has been added as a transitional strategy to
+also turned out to be, in practice, [very
+confusing](https://github\.com/npm/npm/issues/10074)\. As of\fP\fB, a new
+event has been introduced,\fPprepare\fB, that preserves this existing behavior\. A
+_new_ event,\fPprepublishOnly\fBhas been added as a transitional strategy to
allow users to avoid the confusing behavior of existing npm versions and only
-run on \fBnpm publish\fP (for instance, running the tests one last time to ensure
+run on\fPnpm publish` (for instance, running the tests one last time to ensure
they're in good shape)\.
.P
See https://github\.com/npm/npm/issues/10074 for a much lengthier
diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7
index 62c5ae4261..312d5e2b4b 100644
--- a/deps/npm/man/man7/removing-npm.7
+++ b/deps/npm/man/man7/removing-npm.7
@@ -1,4 +1,4 @@
-.TH "NPM\-REMOVAL" "1" "December 2017" "" ""
+.TH "NPM\-REMOVAL" "1" "April 2018" "" ""
.SH "NAME"
\fBnpm-removal\fR \- Cleaning the Slate
.SH SYNOPSIS
diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7
index 23c1e018d5..7784c32c2f 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "December 2017" "" ""
+.TH "SEMVER" "7" "April 2018" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Install
@@ -23,6 +23,8 @@ semver\.clean(' =v1\.2\.3 ') // '1\.2\.3'
semver\.satisfies('1\.2\.3', '1\.x || >=2\.5\.0 || 5\.0\.0 \- 7\.2\.3') // true
semver\.gt('1\.2\.3', '9\.8\.7') // false
semver\.lt('1\.2\.3', '9\.8\.7') // true
+semver\.valid(semver\.coerce('v2')) // '2\.0\.0'
+semver\.valid(semver\.coerce('42\.6\.7\.9\.3\-alpha')) // '42\.6\.7'
.fi
.RE
.P
@@ -57,6 +59,10 @@ Options:
\-l \-\-loose
Interpret versions and ranges loosely
+\-c \-\-coerce
+ Coerce a string into SemVer if possible
+ (does not imply \-\-loose)
+
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions\.
@@ -455,4 +461,22 @@ satisfy the range\.
.P
If you want to know if a version satisfies or does not satisfy a
range, use the \fBsatisfies(version, range)\fP function\.
+.SS Coercion
+.RS 0
+.IP \(bu 2
+\fBcoerce(version)\fP: Coerces a string to semver if possible
+
+.RE
+.P
+This aims to provide a very forgiving translation of a non\-semver
+string to semver\. It looks for the first digit in a string, and
+consumes all remaining characters which satisfy at least a partial semver
+(e\.g\., \fB1\fP, \fB1\.2\fP, \fB1\.2\.3\fP) up to the max permitted length (256 characters)\.
+Longer versions are simply truncated (\fB4\.6\.3\.9\.2\-alpha2\fP becomes \fB4\.6\.3\fP)\.
+All surrounding text is simply ignored (\fBv3\.4 replaces v3\.3\.1\fP becomes \fB3\.4\.0\fP)\.
+Only text which lacks digits will fail coercion (\fBversion one\fP is not valid)\.
+The maximum length for any semver component considered for coercion is 16 characters;
+longer components will be ignored (\fB10000000000000000\.4\.7\.4\fP becomes \fB4\.7\.4\fP)\.
+The maximum value for any semver component is \fBInteger\.MAX_SAFE_INTEGER || (2**53 \- 1)\fP;
+higher value components are invalid (\fB9999999999999999\.4\.7\.4\fP is likely invalid)\.
diff --git a/deps/npm/node_modules/JSONStream/bin.js b/deps/npm/node_modules/JSONStream/bin.js
new file mode 100755
index 0000000000..32209630f2
--- /dev/null
+++ b/deps/npm/node_modules/JSONStream/bin.js
@@ -0,0 +1,10 @@
+#! /usr/bin/env node
+
+var JSONStream = require('./')
+
+if(!module.parent && process.title !== 'browser') {
+ process.stdin
+ .pipe(JSONStream.parse(process.argv[2]))
+ .pipe(JSONStream.stringify('[', ',\n', ']\n', 2))
+ .pipe(process.stdout)
+}
diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js
index 2cc9fff071..4e3b0ef678 100755
--- a/deps/npm/node_modules/JSONStream/index.js
+++ b/deps/npm/node_modules/JSONStream/index.js
@@ -1,5 +1,3 @@
-#! /usr/bin/env node
-
'use strict'
var Parser = require('jsonparse')
@@ -244,9 +242,3 @@ exports.stringifyObject = function (op, sep, cl, indent) {
return stream
}
-if(!module.parent && process.title !== 'browser') {
- process.stdin
- .pipe(exports.parse(process.argv[2]))
- .pipe(exports.stringify('[', ',\n', ']\n', 2))
- .pipe(process.stdout)
-}
diff --git a/deps/npm/node_modules/JSONStream/package.json b/deps/npm/node_modules/JSONStream/package.json
index 2086da717b..779fc7cae5 100644
--- a/deps/npm/node_modules/JSONStream/package.json
+++ b/deps/npm/node_modules/JSONStream/package.json
@@ -1,27 +1,27 @@
{
- "_from": "JSONStream@~1.3.1",
- "_id": "JSONStream@1.3.1",
+ "_from": "JSONStream@1.3.2",
+ "_id": "JSONStream@1.3.2",
"_inBundle": false,
- "_integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
+ "_integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
"_location": "/JSONStream",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "JSONStream@~1.3.1",
+ "raw": "JSONStream@1.3.2",
"name": "JSONStream",
"escapedName": "JSONStream",
- "rawSpec": "~1.3.1",
+ "rawSpec": "1.3.2",
"saveSpec": null,
- "fetchSpec": "~1.3.1"
+ "fetchSpec": "1.3.2"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
- "_shasum": "707f761e01dae9e16f1bcf93703b78c70966579a",
- "_spec": "JSONStream@~1.3.1",
+ "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
+ "_shasum": "c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea",
+ "_spec": "JSONStream@1.3.2",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Dominic Tarr",
@@ -29,7 +29,7 @@
"url": "http://bit.ly/dominictarr"
},
"bin": {
- "JSONStream": "./index.js"
+ "JSONStream": "./bin.js"
},
"bugs": {
"url": "https://github.com/dominictarr/JSONStream/issues"
@@ -71,5 +71,5 @@
"scripts": {
"test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done"
},
- "version": "1.3.1"
+ "version": "1.3.2"
}
diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md
index 0903d1d578..5c3e7911db 100644
--- a/deps/npm/node_modules/cacache/CHANGELOG.md
+++ b/deps/npm/node_modules/cacache/CHANGELOG.md
@@ -2,6 +2,31 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="10.0.4"></a>
+## [10.0.4](https://github.com/zkat/cacache/compare/v10.0.3...v10.0.4) (2018-02-16)
+
+
+
+<a name="10.0.3"></a>
+## [10.0.3](https://github.com/zkat/cacache/compare/v10.0.2...v10.0.3) (2018-02-16)
+
+
+### Bug Fixes
+
+* **content:** rethrow aggregate errors as ENOENT ([fa918f5](https://github.com/zkat/cacache/commit/fa918f5))
+
+
+
+<a name="10.0.2"></a>
+## [10.0.2](https://github.com/zkat/cacache/compare/v10.0.1...v10.0.2) (2018-01-07)
+
+
+### Bug Fixes
+
+* **ls:** deleted entries could cause a premature stream EOF ([347dc36](https://github.com/zkat/cacache/commit/347dc36))
+
+
+
<a name="10.0.1"></a>
## [10.0.1](https://github.com/zkat/cacache/compare/v10.0.0...v10.0.1) (2017-11-15)
diff --git a/deps/npm/node_modules/cacache/README.md b/deps/npm/node_modules/cacache/README.md
index ea69b8f540..4b284588a6 100644
--- a/deps/npm/node_modules/cacache/README.md
+++ b/deps/npm/node_modules/cacache/README.md
@@ -6,7 +6,7 @@ concurrency, and it will never give you corrupted data, even if cache files
get corrupted or manipulated.
It was originally written to be used as [npm](https://npm.im)'s local cache, but
-can just as easily be used on its own
+can just as easily be used on its own.
_Translations: [espaƱol](README.es.md)_
@@ -117,7 +117,7 @@ translations. To use the English API as documented in this README, use
`require('cacache')`, but may change in the future.
cacache also supports other languages! You can find the list of currently
-supported ones my looking in `./locales` in the source directory. You can use
+supported ones by looking in `./locales` in the source directory. You can use
the API in that language with `require('cacache/<lang>')`.
Want to add support for a new language? Please go ahead! You should be able to
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js
index b09ad5cb40..7a4da3beb8 100644
--- a/deps/npm/node_modules/cacache/lib/content/read.js
+++ b/deps/npm/node_modules/cacache/lib/content/read.js
@@ -95,6 +95,16 @@ function pickContentSri (cache, integrity) {
return BB.any(sri[sri.pickAlgorithm()].map(meta => {
return pickContentSri(cache, meta)
}))
+ .catch(err => {
+ if ([].some.call(err, e => e.code === 'ENOENT')) {
+ throw Object.assign(
+ new Error('No matching content found for ' + sri.toString()),
+ {code: 'ENOENT'}
+ )
+ } else {
+ throw err[0]
+ }
+ })
}
}
diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js
index face0fe79c..fe1cd06457 100644
--- a/deps/npm/node_modules/cacache/lib/entry-index.js
+++ b/deps/npm/node_modules/cacache/lib/entry-index.js
@@ -116,9 +116,10 @@ function lsStream (cache) {
}, new Map())
return getKeyToEntry.then(reduced => {
- return Array.from(reduced.values()).map(
- entry => stream.push(formatEntry(cache, entry))
- )
+ for (let entry of reduced.values()) {
+ const formatted = formatEntry(cache, entry)
+ formatted && stream.push(formatted)
+ }
}).catch({code: 'ENOENT'}, nop)
})
})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md b/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md
new file mode 100644
index 0000000000..93430828f8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/changelog.md
@@ -0,0 +1,7 @@
+# mississippi Change Log
+All notable changes to this project will be documented in this file.
+This project adheres to [Semantic Versioning](http://semver.org/).
+
+## 2.0.0 - 2018-01-30
+* Update to pump@2.0.1. (Use the individual modules to avoid potentially unnecessary major updates in your project)
+* Pin engines support to >= Node 4.0.0. Run Node LTS or greater.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/index.js
new file mode 100644
index 0000000000..d635b29c56
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/index.js
@@ -0,0 +1,10 @@
+module.exports.pipe = require('pump')
+module.exports.each = require('stream-each')
+module.exports.pipeline = require('pumpify')
+module.exports.duplex = require('duplexify')
+module.exports.through = require('through2')
+module.exports.concat = require('concat-stream')
+module.exports.finished = require('end-of-stream')
+module.exports.from = require('from2')
+module.exports.to = require('flush-write-stream')
+module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/license b/deps/npm/node_modules/cacache/node_modules/mississippi/license
new file mode 100644
index 0000000000..e34763968c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/license
@@ -0,0 +1,7 @@
+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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000000..1e836b4760
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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/cacache/node_modules/mississippi/node_modules/concat-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js
new file mode 100644
index 0000000000..b16ad1343f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/index.js
@@ -0,0 +1,143 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
+ } else {
+ strings.push(new Buffer(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = new Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
new file mode 100644
index 0000000000..cc4dba29d9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000000..11adfaec9e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
new file mode 100644
index 0000000000..8423d7c9b1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
@@ -0,0 +1,4 @@
+var Uint8Array = require('../').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
new file mode 100644
index 0000000000..5e540841f4
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
new file mode 100644
index 0000000000..089c4b2074
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "typedarray@^0.0.6",
+ "_id": "typedarray@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "_location": "/cacache/mississippi/concat-stream/typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray@^0.0.6",
+ "name": "typedarray",
+ "escapedName": "typedarray",
+ "rawSpec": "^0.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^0.0.6"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777",
+ "_spec": "typedarray@^0.0.6",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "TypedArray polyfill for old browsers",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "0.0.6"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000000..d18f6f7197
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
new file mode 100644
index 0000000000..e57dabdceb
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var vm = require('vm');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8');
+
+test('u8a without globals', function (t) {
+ var c = {
+ module: { exports: {} },
+ };
+ c.exports = c.module.exports;
+ vm.runInNewContext(src, c);
+ var TA = c.module.exports;
+ var ua = new(TA.Uint8Array)(5);
+
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
new file mode 100644
index 0000000000..df596a34f2
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
@@ -0,0 +1,10 @@
+var TA = require('../');
+var test = require('tape');
+
+test('tiny u8a test', function (t) {
+ var ua = new(TA.Uint8Array)(5);
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json
new file mode 100644
index 0000000000..feb704f2dc
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "concat-stream@^1.5.0",
+ "_id": "concat-stream@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
+ "_location": "/cacache/mississippi/concat-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "concat-stream@^1.5.0",
+ "name": "concat-stream",
+ "escapedName": "concat-stream",
+ "rawSpec": "^1.5.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+ "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26",
+ "_spec": "concat-stream@^1.5.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Max Ogden",
+ "email": "max@maxogden.com"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "deprecated": false,
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "1.6.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000000..9478721990
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md
new file mode 100644
index 0000000000..8352900fc6
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/README.md
@@ -0,0 +1,97 @@
+# duplexify
+
+Turn a writeable and readable stream into a single streams2 duplex stream.
+
+Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input
+and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)`
+
+```
+npm install duplexify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify)
+
+## Usage
+
+Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream)
+
+``` js
+var duplexify = require('duplexify')
+
+// turn writableStream and readableStream into a single duplex stream
+var dup = duplexify(writableStream, readableStream)
+
+dup.write('hello world') // will write to writableStream
+dup.on('data', function(data) {
+ // will read from readableStream
+})
+```
+
+You can also set the readable and writable parts asynchronously
+
+``` js
+var dup = duplexify()
+
+dup.write('hello world') // write will buffer until the writable
+ // part has been set
+
+// wait a bit ...
+dup.setReadable(readableStream)
+
+// maybe wait some more?
+dup.setWritable(writableStream)
+```
+
+If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream.
+To disable the readable or writable part call `setReadable` or `setWritable` with `null`.
+
+If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.
+You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
+error object as argument, in which case the error is emitted as part of the `error` event.
+
+``` js
+dup.on('error', function(err) {
+ console.log('readable or writable emitted an error - close will follow')
+})
+
+dup.on('close', function() {
+ console.log('the duplex stream is destroyed')
+})
+
+dup.destroy() // calls destroy on the readable and writable part (if present)
+```
+
+## HTTP request example
+
+Turn a node core http request into a duplex stream is as easy as
+
+``` js
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
+```
+
+## License
+
+MIT
+
+## Related
+
+`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js
new file mode 100644
index 0000000000..5585c19756
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/example.js
@@ -0,0 +1,21 @@
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify()
+ dup.setWritable(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js
new file mode 100644
index 0000000000..8323e654ac
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/index.js
@@ -0,0 +1,241 @@
+var stream = require('readable-stream')
+var eos = require('end-of-stream')
+var inherits = require('inherits')
+var shift = require('stream-shift')
+
+var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)
+ ? Buffer.from([0])
+ : new Buffer([0])
+
+var onuncork = function(self, fn) {
+ if (self._corked) self.once('uncork', fn)
+ else fn()
+}
+
+var destroyer = function(self, end) {
+ return function(err) {
+ if (err) self._destroyInterval(err)
+ else if (end && !self._ended) self.end()
+ }
+}
+
+var end = function(ws, fn) {
+ if (!ws) return fn()
+ if (ws._writableState && ws._writableState.finished) return fn()
+ if (ws._writableState) return ws.end(fn)
+ ws.end()
+ fn()
+}
+
+var toStreams2 = function(rs) {
+ return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)
+}
+
+var Duplexify = function(writable, readable, opts) {
+ if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)
+ stream.Duplex.call(this, opts)
+
+ this._writable = null
+ this._readable = null
+ this._readable2 = null
+
+ this._forwardDestroy = !opts || opts.destroy !== false
+ this._forwardEnd = !opts || opts.end !== false
+ this._corked = 1 // start corked
+ this._ondrain = null
+ this._drained = false
+ this._forwarding = false
+ this._unwrite = null
+ this._unread = null
+ this._ended = false
+ this._error = null
+ this._preferError = false
+
+ this.destroyed = false
+
+ if (writable) this.setWritable(writable)
+ if (readable) this.setReadable(readable)
+}
+
+inherits(Duplexify, stream.Duplex)
+
+Duplexify.obj = function(writable, readable, opts) {
+ if (!opts) opts = {}
+ opts.objectMode = true
+ opts.highWaterMark = 16
+ return new Duplexify(writable, readable, opts)
+}
+
+Duplexify.prototype.cork = function() {
+ if (++this._corked === 1) this.emit('cork')
+}
+
+Duplexify.prototype.uncork = function() {
+ if (this._corked && --this._corked === 0) this.emit('uncork')
+}
+
+Duplexify.prototype.setWritable = function(writable) {
+ if (this._unwrite) this._unwrite()
+
+ if (this.destroyed) {
+ if (writable && writable.destroy) writable.destroy()
+ return
+ }
+
+ if (writable === null || writable === false) {
+ this.end()
+ return
+ }
+
+ var self = this
+ var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))
+
+ var ondrain = function() {
+ var ondrain = self._ondrain
+ self._ondrain = null
+ if (ondrain) ondrain()
+ }
+
+ var clear = function() {
+ self._writable.removeListener('drain', ondrain)
+ unend()
+ }
+
+ if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks
+
+ this._writable = writable
+ this._writable.on('drain', ondrain)
+ this._unwrite = clear
+
+ this.uncork() // always uncork setWritable
+}
+
+Duplexify.prototype.setReadable = function(readable) {
+ if (this._unread) this._unread()
+
+ if (this.destroyed) {
+ if (readable && readable.destroy) readable.destroy()
+ return
+ }
+
+ if (readable === null || readable === false) {
+ this.push(null)
+ this.resume()
+ return
+ }
+
+ var self = this
+ var unend = eos(readable, {writable:false, readable:true}, destroyer(this))
+
+ var onreadable = function() {
+ self._forward()
+ }
+
+ var onend = function() {
+ self.push(null)
+ }
+
+ var clear = function() {
+ self._readable2.removeListener('readable', onreadable)
+ self._readable2.removeListener('end', onend)
+ unend()
+ }
+
+ this._drained = true
+ this._readable = readable
+ this._readable2 = readable._readableState ? readable : toStreams2(readable)
+ this._readable2.on('readable', onreadable)
+ this._readable2.on('end', onend)
+ this._unread = clear
+
+ this._forward()
+}
+
+Duplexify.prototype._read = function() {
+ this._drained = true
+ this._forward()
+}
+
+Duplexify.prototype._forward = function() {
+ if (this._forwarding || !this._readable2 || !this._drained) return
+ this._forwarding = true
+
+ var data
+
+ while (this._drained && (data = shift(this._readable2)) !== null) {
+ if (this.destroyed) continue
+ this._drained = this.push(data)
+ }
+
+ this._forwarding = false
+}
+
+Duplexify.prototype.destroy = function(err) {
+ if (this._preferError && !this._error && err) this._error = err
+
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ self._destroy(self._preferError ? self._error : err)
+ })
+}
+
+Duplexify.prototype._destroyInterval = function(err) {
+ if (this.destroyed) return
+ if (err.message !== 'premature close') return this.destroy(err)
+ this._preferError = true
+ this.destroy(null)
+}
+
+Duplexify.prototype._destroy = function(err) {
+ if (err) {
+ var ondrain = this._ondrain
+ this._ondrain = null
+ if (ondrain) ondrain(err)
+ else this.emit('error', err)
+ }
+
+ if (this._forwardDestroy) {
+ if (this._readable && this._readable.destroy) this._readable.destroy()
+ if (this._writable && this._writable.destroy) this._writable.destroy()
+ }
+
+ this.emit('close')
+}
+
+Duplexify.prototype._write = function(data, enc, cb) {
+ if (this.destroyed) return cb()
+ if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))
+ if (data === SIGNAL_FLUSH) return this._finish(cb)
+ if (!this._writable) return cb()
+
+ if (this._writable.write(data) === false) this._ondrain = cb
+ else cb()
+}
+
+
+Duplexify.prototype._finish = function(cb) {
+ var self = this
+ this.emit('preend')
+ onuncork(this, function() {
+ end(self._forwardEnd && self._writable, function() {
+ // haxx to not emit prefinish twice
+ if (self._writableState.prefinished === false) self._writableState.prefinished = true
+ self.emit('prefinish')
+ onuncork(self, cb)
+ })
+ })
+}
+
+Duplexify.prototype.end = function(data, enc, cb) {
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ this._ended = true
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+module.exports = Duplexify
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
index 3c3629e647..3c3629e647 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/.npmignore
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
index 0a5f461a69..bae9da7bfa 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/LICENSE
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015 JD Ballard
+Copyright (c) 2016 Mathias Buus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..46bdac375a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/cacache/mississippi/duplexify/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/duplexify"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json
new file mode 100644
index 0000000000..a3c86f5c54
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "duplexify@^3.4.2",
+ "_id": "duplexify@3.5.4",
+ "_inBundle": false,
+ "_integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
+ "_location": "/cacache/mississippi/duplexify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "duplexify@^3.4.2",
+ "name": "duplexify",
+ "escapedName": "duplexify",
+ "rawSpec": "^3.4.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.4.2"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi",
+ "/cacache/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
+ "_shasum": "4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4",
+ "_spec": "duplexify@^3.4.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/duplexify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
+ "devDependencies": {
+ "concat-stream": "^1.5.2",
+ "tape": "^4.0.0",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/duplexify",
+ "keywords": [
+ "duplex",
+ "streams2",
+ "streams",
+ "stream",
+ "writable",
+ "readable",
+ "async"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "duplexify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/duplexify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "3.5.4"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js
new file mode 100644
index 0000000000..4330e93cf0
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/duplexify/test.js
@@ -0,0 +1,291 @@
+var tape = require('tape')
+var through = require('through2')
+var concat = require('concat-stream')
+var net = require('net')
+var duplexify = require('./')
+
+tape('passthrough', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('passthrough + double end', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('async passthrough + end', function(t) {
+ t.plan(2)
+
+ var pt = through.obj({highWaterMark:1}, function(data, enc, cb) {
+ setTimeout(function() {
+ cb(null, data)
+ }, 100)
+ })
+
+ var dup = duplexify(pt, pt)
+
+ dup.write('hello ')
+ dup.write('world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('duplex', function(t) {
+ var readExpected = ['read-a', 'read-b', 'read-c']
+ var writeExpected = ['write-a', 'write-b', 'write-c']
+
+ t.plan(readExpected.length+writeExpected.length+2)
+
+ var readable = through.obj()
+ var writable = through.obj(function(data, enc, cb) {
+ t.same(data, writeExpected.shift(), 'onwrite should match')
+ cb()
+ })
+
+ var dup = duplexify.obj(writable, readable)
+
+ readExpected.slice().forEach(function(data) {
+ readable.write(data)
+ })
+ readable.end()
+
+ writeExpected.slice().forEach(function(data) {
+ dup.write(data)
+ })
+ dup.end()
+
+ dup.on('data', function(data) {
+ t.same(data, readExpected.shift(), 'ondata should match')
+ })
+ dup.on('end', function() {
+ t.ok(true, 'should end')
+ })
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+})
+
+tape('async', function(t) {
+ var dup = duplexify()
+ var pt = through()
+
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'i was async', 'same in as out')
+ t.end()
+ }))
+
+ dup.write('i')
+ dup.write(' was ')
+ dup.end('async')
+
+ setTimeout(function() {
+ dup.setWritable(pt)
+ setTimeout(function() {
+ dup.setReadable(pt)
+ }, 50)
+ }, 50)
+})
+
+tape('destroy', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('destroy both', function(t) {
+ t.plan(3)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ read.destroy = function() {
+ t.ok(true, 'read destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('bubble read errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'read-error', 'received read error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ read.emit('error', new Error('read-error'))
+ write.emit('error', new Error('write-error')) // only emit first error
+})
+
+tape('bubble write errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'write-error', 'received write error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ write.emit('error', new Error('write-error'))
+ read.emit('error', new Error('read-error')) // only emit first error
+})
+
+tape('reset writable / readable', function(t) {
+ t.plan(3)
+
+ var toUpperCase = function(data, enc, cb) {
+ cb(null, data.toString().toUpperCase())
+ }
+
+ var passthrough = through()
+ var upper = through(toUpperCase)
+ var dup = duplexify(passthrough, passthrough)
+
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'hello')
+ dup.setWritable(upper)
+ dup.setReadable(upper)
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HI')
+ t.end()
+ })
+ })
+ dup.write('hello')
+ dup.write('hi')
+ })
+ dup.write('hello')
+})
+
+tape('cork', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var ok = false
+
+ dup.on('prefinish', function() {
+ dup.cork()
+ setTimeout(function() {
+ ok = true
+ dup.uncork()
+ }, 100)
+ })
+ dup.on('finish', function() {
+ t.ok(ok)
+ t.end()
+ })
+ dup.end()
+})
+
+tape('prefinish not twice', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var prefinished = false
+
+ dup.on('prefinish', function() {
+ t.ok(!prefinished, 'only prefinish once')
+ prefinished = true
+ })
+
+ dup.on('finish', function() {
+ t.end()
+ })
+
+ dup.end()
+})
+
+tape('close', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+
+ passthrough.emit('close')
+ dup.on('close', function() {
+ t.ok(true, 'should forward close')
+ t.end()
+ })
+})
+
+tape('works with node native streams (net)', function(t) {
+ t.plan(1)
+
+ var server = net.createServer(function(socket) {
+ var dup = duplexify(socket, socket)
+
+ dup.once('data', function(chunk) {
+ t.same(chunk, Buffer('hello world'))
+ server.close()
+ socket.end()
+ t.end()
+ })
+ })
+
+ server.listen(0, function () {
+ var socket = net.connect(server.address().port)
+ var dup = duplexify(socket, socket)
+
+ dup.write(Buffer('hello world'))
+ })
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md
index df800c1eb6..f2560c939d 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/README.md
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/README.md
@@ -7,34 +7,35 @@ A node module that calls a callback when a readable/writable/duplex stream has c
## Usage
Simply pass a stream and a callback to the `eos`.
-Both legacy streams and streams2 are supported.
+Both legacy streams, streams2 and stream3 are supported.
``` js
var eos = require('end-of-stream');
eos(readableStream, function(err) {
+ // this will be set to the stream instance
if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended');
+ console.log('stream has ended', this === readableStream);
});
eos(writableStream, function(err) {
if (err) return console.log('stream had an error or closed early');
- console.log('stream has finished');
+ console.log('stream has finished', this === writableStream);
});
eos(duplexStream, function(err) {
if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended and finished');
+ console.log('stream has ended and finished', this === duplexStream);
});
eos(duplexStream, {readable:false}, function(err) {
if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended but might still be writable');
+ console.log('stream has finished but might still be readable');
});
eos(duplexStream, {writable:false}, function(err) {
if (err) return console.log('stream had an error or closed early');
- console.log('stream has ended but might still be readable');
+ console.log('stream has ended but might still be writable');
});
eos(readableStream, {error:false}, function(err) {
@@ -44,4 +45,8 @@ eos(readableStream, {error:false}, function(err) {
## License
-MIT \ No newline at end of file
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js
index 9f61ed5af9..be426c227c 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/index.js
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/index.js
@@ -6,6 +6,10 @@ var isRequest = function(stream) {
return stream.setHeader && typeof stream.abort === 'function';
};
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
var eos = function(stream, opts, callback) {
if (typeof opts === 'function') return eos(stream, null, opts);
if (!opts) opts = {};
@@ -23,17 +27,25 @@ var eos = function(stream, opts, callback) {
var onfinish = function() {
writable = false;
- if (!readable) callback();
+ if (!readable) callback.call(stream);
};
var onend = function() {
readable = false;
- if (!writable) callback();
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
};
var onclose = function() {
- if (readable && !(rs && rs.ended)) return callback(new Error('premature close'));
- if (writable && !(ws && ws.ended)) return callback(new Error('premature close'));
+ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
};
var onrequest = function() {
@@ -50,9 +62,11 @@ var eos = function(stream, opts, callback) {
stream.on('close', onlegacyfinish);
}
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
stream.on('end', onend);
stream.on('finish', onfinish);
- if (opts.error !== false) stream.on('error', callback);
+ if (opts.error !== false) stream.on('error', onerror);
stream.on('close', onclose);
return function() {
@@ -63,10 +77,11 @@ var eos = function(stream, opts, callback) {
stream.removeListener('end', onlegacyfinish);
stream.removeListener('close', onlegacyfinish);
stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
stream.removeListener('end', onend);
- stream.removeListener('error', callback);
+ stream.removeListener('error', onerror);
stream.removeListener('close', onclose);
};
};
-module.exports = eos; \ No newline at end of file
+module.exports = eos;
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json
index 433faa2e6c..f00849beb1 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/package.json
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/end-of-stream/package.json
@@ -1,44 +1,46 @@
{
- "_from": "end-of-stream@1.0.0",
- "_id": "end-of-stream@1.0.0",
- "_integrity": "sha1-1FlucCc0qT5A6a+GQxnqvZn/Lw4=",
- "_location": "/mississippi/duplexify/end-of-stream",
- "_phantomChildren": {
- "wrappy": "1.0.2"
- },
+ "_from": "end-of-stream@^1.1.0",
+ "_id": "end-of-stream@1.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "_location": "/cacache/mississippi/end-of-stream",
+ "_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "end-of-stream@1.0.0",
+ "raw": "end-of-stream@^1.1.0",
"name": "end-of-stream",
"escapedName": "end-of-stream",
- "rawSpec": "1.0.0",
+ "rawSpec": "^1.1.0",
"saveSpec": null,
- "fetchSpec": "1.0.0"
+ "fetchSpec": "^1.1.0"
},
"_requiredBy": [
- "/mississippi/duplexify"
+ "/cacache/mississippi",
+ "/cacache/mississippi/duplexify",
+ "/cacache/mississippi/pump",
+ "/cacache/mississippi/stream-each"
],
- "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz",
- "_shasum": "d4596e702734a93e40e9af864319eabd99ff2f0e",
- "_shrinkwrap": null,
- "_spec": "end-of-stream@1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/duplexify",
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43",
+ "_spec": "end-of-stream@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
"author": {
"name": "Mathias Buus",
"email": "mathiasbuus@gmail.com"
},
- "bin": null,
"bugs": {
"url": "https://github.com/mafintosh/end-of-stream/issues"
},
"bundleDependencies": false,
"dependencies": {
- "once": "~1.3.0"
+ "once": "^1.4.0"
},
"deprecated": false,
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
- "devDependencies": {},
+ "files": [
+ "index.js"
+ ],
"homepage": "https://github.com/mafintosh/end-of-stream",
"keywords": [
"stream",
@@ -52,8 +54,6 @@
"license": "MIT",
"main": "index.js",
"name": "end-of-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/end-of-stream.git"
@@ -61,5 +61,5 @@
"scripts": {
"test": "node test.js"
},
- "version": "1.0.0"
+ "version": "1.4.1"
}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
new file mode 100644
index 0000000000..3e70011a19
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+bundle.js
+test.html
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
new file mode 100644
index 0000000000..c042821703
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - '4.0'
+ - '5.0'
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
index 0a5f461a69..66a4d2a149 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/LICENSE
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015 JD Ballard
+Copyright (c) 2015 Mathias Buus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md
new file mode 100644
index 0000000000..7ea7b699b8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/README.md
@@ -0,0 +1,59 @@
+# flush-write-stream
+
+A write stream constructor that supports a flush function that is called before `finish` is emitted
+
+```
+npm install flush-write-stream
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream)
+
+## Usage
+
+``` js
+var writer = require('flush-write-stream')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+## API
+
+#### `var ws = writer([options], write, [flush])`
+
+Create a new writable stream. Options are forwarded to the stream constructor.
+
+#### `var ws = writer.obj([options], write, [flush])`
+
+Same as the above except `objectMode` is set to `true` per default.
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js
new file mode 100644
index 0000000000..fa6b5dab25
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/example.js
@@ -0,0 +1,22 @@
+var writer = require('./')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js
new file mode 100644
index 0000000000..e82e126126
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/index.js
@@ -0,0 +1,52 @@
+var stream = require('readable-stream')
+var inherits = require('inherits')
+
+var SIGNAL_FLUSH = new Buffer([0])
+
+module.exports = WriteStream
+
+function WriteStream (opts, write, flush) {
+ if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush)
+
+ if (typeof opts === 'function') {
+ flush = write
+ write = opts
+ opts = {}
+ }
+
+ stream.Writable.call(this, opts)
+
+ this.destroyed = false
+ this._worker = write || null
+ this._flush = flush || null
+}
+
+inherits(WriteStream, stream.Writable)
+
+WriteStream.obj = function (opts, worker, flush) {
+ if (typeof opts === 'function') return WriteStream.obj(null, opts, worker)
+ if (!opts) opts = {}
+ opts.objectMode = true
+ return new WriteStream(opts, worker, flush)
+}
+
+WriteStream.prototype._write = function (data, enc, cb) {
+ if (SIGNAL_FLUSH === data) this._flush(cb)
+ else this._worker(data, enc, cb)
+}
+
+WriteStream.prototype.end = function (data, enc, cb) {
+ if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments)
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+WriteStream.prototype.destroy = function (err) {
+ if (this.destroyed) return
+ this.destroyed = true
+ if (err) this.emit('error', err)
+ this.emit('close')
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json
new file mode 100644
index 0000000000..0fc9c77ed5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "flush-write-stream@^1.0.0",
+ "_id": "flush-write-stream@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
+ "_location": "/cacache/mississippi/flush-write-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "flush-write-stream@^1.0.0",
+ "name": "flush-write-stream",
+ "escapedName": "flush-write-stream",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+ "_shasum": "c81b90d8746766f1a609a46809946c45dd8ae417",
+ "_spec": "flush-write-stream@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/flush-write-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.4"
+ },
+ "deprecated": false,
+ "description": "A write stream constructor that supports a flush function that is called before finish is emitted",
+ "devDependencies": {
+ "tape": "^4.2.2"
+ },
+ "homepage": "https://github.com/mafintosh/flush-write-stream",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "flush-write-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/flush-write-stream.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js
new file mode 100644
index 0000000000..6cd0c20e1f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/flush-write-stream/test.js
@@ -0,0 +1,85 @@
+var tape = require('tape')
+var writer = require('./')
+
+tape('is a write stream', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var ws = writer.obj(write)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+})
+
+tape('is flushable', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer.obj(write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('can pass options', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer({objectMode: true}, write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('emits error on destroy', function (t) {
+ var expected = new Error()
+
+ var ws = writer({objectMode: true}, function () {})
+
+ ws.on('error', function (err) {
+ t.equal(err, expected)
+ })
+ ws.on('close', t.end)
+
+ ws.destroy(expected)
+})
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml
index 36201b1001..b03ffabcab 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/.travis.yml
@@ -1,12 +1,8 @@
language: node_js
+before_install:
+ - npm install -g npm
node_js:
- "0.8"
- "0.10"
- - "0.11"
- "0.12"
- - "1.7.1"
- - 1
- - 2
- - 3
- - 4
- - 5
+ - "iojs"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md
new file mode 100644
index 0000000000..146cb32a7d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/LICENSE.md
@@ -0,0 +1,21 @@
+## The MIT License (MIT) ##
+
+Copyright (c) 2014 Hugh Kennedy
+
+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/cacache/node_modules/mississippi/node_modules/from2/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md
new file mode 100644
index 0000000000..3e041a412a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/README.md
@@ -0,0 +1,70 @@
+# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
+
+`from2` is a high-level module for creating readable streams that properly handle backpressure.
+
+Convience wrapper for
+[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
+base class, with an API lifted from
+[from](http://github.com/dominictarr/from) and
+[through2](http://github.com/rvagg/through2).
+
+## Usage ##
+
+[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
+
+### `stream = from2([opts], read)` ###
+
+Where `opts` are the options to pass on to the `ReadableStream` constructor,
+and `read(size, next)` is called when data is requested from the stream.
+
+* `size` is the recommended amount of data (in bytes) to retrieve.
+* `next(err)` should be called when you're ready to emit more data.
+
+For example, here's a readable stream that emits the contents of a given
+string:
+
+``` javascript
+var from = require('from2')
+
+function fromString(string) {
+ return from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### `stream = from2.obj([opts], read)` ###
+
+Shorthand for `from2({ objectMode: true }, read)`.
+
+### `createStream = from2.ctor([opts], read)` ###
+
+If you're creating similar streams in quick succession you can improve
+performance by generating a stream **constructor** that you can reuse instead
+of creating one-off streams on each call.
+
+Takes the same options as `from2`, instead returning a constructor which you
+can use to create new streams.
+
+### See Also
+
+- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values.
+- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2.
+
+## License ##
+
+MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js
new file mode 100644
index 0000000000..cb200c610a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/index.js
@@ -0,0 +1,103 @@
+var Readable = require('readable-stream').Readable
+var inherits = require('inherits')
+
+module.exports = from2
+
+from2.ctor = ctor
+from2.obj = obj
+
+var Proto = ctor()
+
+function toFunction(list) {
+ list = list.slice()
+ return function (_, cb) {
+ var err = null
+ var item = list.length ? list.shift() : null
+ if (item instanceof Error) {
+ err = item
+ item = null
+ }
+
+ cb(err, item)
+ }
+}
+
+function from2(opts, read) {
+ if (typeof opts !== 'object' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ var rs = new Proto(opts)
+ rs._from = Array.isArray(read) ? toFunction(read) : (read || noop)
+ return rs
+}
+
+function ctor(opts, read) {
+ if (typeof opts === 'function') {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+
+ inherits(Class, Readable)
+ function Class(override) {
+ if (!(this instanceof Class)) return new Class(override)
+ this._reading = false
+ this._callback = check
+ this.destroyed = false
+ Readable.call(this, override || opts)
+
+ var self = this
+ var hwm = this._readableState.highWaterMark
+
+ function check(err, data) {
+ if (self.destroyed) return
+ if (err) return self.destroy(err)
+ if (data === null) return self.push(null)
+ self._reading = false
+ if (self.push(data)) self._read(hwm)
+ }
+ }
+
+ Class.prototype._from = read || noop
+ Class.prototype._read = function(size) {
+ if (this._reading || this.destroyed) return
+ this._reading = true
+ this._from(size, this._callback)
+ }
+
+ Class.prototype.destroy = function(err) {
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err) self.emit('error', err)
+ self.emit('close')
+ })
+ }
+
+ return Class
+}
+
+function obj(opts, read) {
+ if (typeof opts === 'function' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+ opts.objectMode = true
+ opts.highWaterMark = 16
+
+ return from2(opts, read)
+}
+
+function noop () {}
+
+function defaults(opts) {
+ opts = opts || {}
+ return opts
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json
new file mode 100644
index 0000000000..ff6f879e33
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "from2@^2.1.0",
+ "_id": "from2@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+ "_location": "/cacache/mississippi/from2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "from2@^2.1.0",
+ "name": "from2",
+ "escapedName": "from2",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+ "_shasum": "8bfb5502bde4a4d36cfdeea007fcca21d7e382af",
+ "_spec": "from2@^2.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Hugh Kennedy",
+ "email": "hughskennedy@gmail.com",
+ "url": "http://hughsk.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/hughsk/from2/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
+ "devDependencies": {
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/hughsk/from2",
+ "keywords": [
+ "from",
+ "stream",
+ "readable",
+ "pull",
+ "convenience",
+ "wrapper"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "from2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hughsk/from2.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "version": "2.3.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js
new file mode 100644
index 0000000000..150429b0f7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/from2/test.js
@@ -0,0 +1,121 @@
+var test = require('tape')
+var path = require('path')
+var from = require('./')
+var fs = require('fs')
+
+var tmp = path.resolve(
+ __dirname, 'tmp.txt'
+)
+
+function fromString(string) {
+ return from(function(size, next) {
+ if (string.length <= 0) return next(null, null)
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+ next(null, chunk)
+ })
+}
+
+test('from2', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+
+ stream
+ .pipe(fs.createWriteStream(tmp))
+ .on('close', function() {
+ t.equal(fs.readFileSync(tmp, 'utf8'), contents)
+ fs.unlinkSync(tmp)
+ t.end()
+ })
+})
+
+test('old mode', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+ var buffer = ''
+
+ stream.on('data', function(data) {
+ buffer += data
+ }).on('end', function() {
+ t.equal(buffer, contents)
+ t.end()
+ })
+})
+
+test('destroy', function(t) {
+ var stream = from(function(size, next) {
+ process.nextTick(function() {
+ next(null, 'no')
+ })
+ })
+
+ stream.on('data', function(data) {
+ t.ok(false)
+ }).on('close', function() {
+ t.ok(true)
+ t.end()
+ })
+
+ stream.destroy()
+})
+
+test('arrays', function (t) {
+ var input = ['a', 'b', 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+test('obj arrays', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+
+test('arrays can emit errors', function (t) {
+ var input = ['a', 'b', new Error('ooops'), 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('error', function(e){
+ t.deepEqual(['a', 'b'], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
+
+test('obj arrays can emit errors', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('error', function(e){
+ t.deepEqual([{foo:'a'}, {foo:'b'}], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore
index 3c3629e647..3c3629e647 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/.npmignore
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/.npmignore
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE
new file mode 100644
index 0000000000..4b30ed5d95
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md
new file mode 100644
index 0000000000..f53e130849
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md
@@ -0,0 +1,54 @@
+# parallel-transform
+
+[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms
+in parallel without changing the order of the output.
+
+ npm install parallel-transform
+
+It is easy to use
+
+``` js
+var transform = require('parallel-transform');
+
+var stream = transform(10, function(data, callback) { // 10 is the parallism level
+ setTimeout(function() {
+ callback(null, data);
+ }, Math.random() * 1000);
+});
+
+for (var i = 0; i < 10; i++) {
+ stream.write(''+i);
+}
+stream.end();
+
+stream.on('data', function(data) {
+ console.log(data); // prints 0,1,2,...
+});
+stream.on('end', function() {
+ console.log('stream has ended');
+});
+```
+
+If you run the above example you'll notice that it runs in parallel
+(does not take ~1 second between each print) and that the order is preserved
+
+## Stream options
+
+All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`.
+If you want to use your own stream options pass them as the second parameter
+
+``` js
+var stream = transform(10, {objectMode:false}, function(data, callback) {
+ // data is now a buffer
+ callback(null, data);
+});
+
+fs.createReadStream('filename').pipe(stream).pipe(process.stdout);
+```
+
+### Unordered
+Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order.
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js
new file mode 100644
index 0000000000..77329e4ccf
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/index.js
@@ -0,0 +1,105 @@
+var Transform = require('readable-stream').Transform;
+var inherits = require('inherits');
+var cyclist = require('cyclist');
+var util = require('util');
+
+var ParallelTransform = function(maxParallel, opts, ontransform) {
+ if (!(this instanceof ParallelTransform)) return new ParallelTransform(maxParallel, opts, ontransform);
+
+ if (typeof maxParallel === 'function') {
+ ontransform = maxParallel;
+ opts = null;
+ maxParallel = 1;
+ }
+ if (typeof opts === 'function') {
+ ontransform = opts;
+ opts = null;
+ }
+
+ if (!opts) opts = {};
+ if (!opts.highWaterMark) opts.highWaterMark = Math.max(maxParallel, 16);
+ if (opts.objectMode !== false) opts.objectMode = true;
+
+ Transform.call(this, opts);
+
+ this._maxParallel = maxParallel;
+ this._ontransform = ontransform;
+ this._destroyed = false;
+ this._flushed = false;
+ this._ordered = opts.ordered !== false;
+ this._buffer = this._ordered ? cyclist(maxParallel) : [];
+ this._top = 0;
+ this._bottom = 0;
+ this._ondrain = null;
+};
+
+inherits(ParallelTransform, Transform);
+
+ParallelTransform.prototype.destroy = function() {
+ if (this._destroyed) return;
+ this._destroyed = true;
+ this.emit('close');
+};
+
+ParallelTransform.prototype._transform = function(chunk, enc, callback) {
+ var self = this;
+ var pos = this._top++;
+
+ this._ontransform(chunk, function(err, data) {
+ if (self._destroyed) return;
+ if (err) {
+ self.emit('error', err);
+ self.push(null);
+ self.destroy();
+ return;
+ }
+ if (self._ordered) {
+ self._buffer.put(pos, (data === undefined || data === null) ? null : data);
+ }
+ else {
+ self._buffer.push(data);
+ }
+ self._drain();
+ });
+
+ if (this._top - this._bottom < this._maxParallel) return callback();
+ this._ondrain = callback;
+};
+
+ParallelTransform.prototype._flush = function(callback) {
+ this._flushed = true;
+ this._ondrain = callback;
+ this._drain();
+};
+
+ParallelTransform.prototype._drain = function() {
+ if (this._ordered) {
+ while (this._buffer.get(this._bottom) !== undefined) {
+ var data = this._buffer.del(this._bottom++);
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+ else {
+ while (this._buffer.length > 0) {
+ var data = this._buffer.pop();
+ this._bottom++;
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+
+
+ if (!this._drained() || !this._ondrain) return;
+
+ var ondrain = this._ondrain;
+ this._ondrain = null;
+ ondrain();
+};
+
+ParallelTransform.prototype._drained = function() {
+ var diff = this._top - this._bottom;
+ return this._flushed ? !diff : diff < this._maxParallel;
+};
+
+module.exports = ParallelTransform;
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
new file mode 100644
index 0000000000..ba99195bae
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
@@ -0,0 +1 @@
+bench
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
new file mode 100644
index 0000000000..50c35cc5fd
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
@@ -0,0 +1,39 @@
+# Cyclist
+
+Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.
+It is available through npm
+
+ npm install cyclist
+
+## What?
+
+Cyclist allows you to create a list of fixed size that is cyclic.
+In a cyclist list the element following the last one is the first one.
+This property can be really useful when for example trying to order data
+packets that can arrive out of order over a network stream.
+
+## Usage
+
+``` js
+var cyclist = require('cyclist');
+var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2
+ // this buffer can now hold 4 elements in total
+
+list.put(42, 'hello 42'); // store something and index 42
+list.put(43, 'hello 43'); // store something and index 43
+
+console.log(list.get(42)); // prints hello 42
+console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size
+```
+
+## API
+
+* `cyclist(size)` creates a new buffer
+* `cyclist#get(index)` get an object stored in the buffer
+* `cyclist#put(index,value)` insert an object into the buffer
+* `cyclist#del(index)` delete an object from an index
+* `cyclist#size` property containing current size of buffer
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
new file mode 100644
index 0000000000..baf710c3a9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
@@ -0,0 +1,33 @@
+var ensureTwoPower = function(n) {
+ if (n && !(n & (n - 1))) return n;
+ var p = 1;
+ while (p < n) p <<= 1;
+ return p;
+};
+
+var Cyclist = function(size) {
+ if (!(this instanceof Cyclist)) return new Cyclist(size);
+ size = ensureTwoPower(size);
+ this.mask = size-1;
+ this.size = size;
+ this.values = new Array(size);
+};
+
+Cyclist.prototype.put = function(index, val) {
+ var pos = index & this.mask;
+ this.values[pos] = val;
+ return pos;
+};
+
+Cyclist.prototype.get = function(index) {
+ return this.values[index & this.mask];
+};
+
+Cyclist.prototype.del = function(index) {
+ var pos = index & this.mask;
+ var val = this.values[pos];
+ this.values[pos] = undefined;
+ return val;
+};
+
+module.exports = Cyclist; \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
new file mode 100644
index 0000000000..aa45e955df
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "cyclist@~0.2.2",
+ "_id": "cyclist@0.2.2",
+ "_inBundle": false,
+ "_integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
+ "_location": "/cacache/mississippi/parallel-transform/cyclist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cyclist@~0.2.2",
+ "name": "cyclist",
+ "escapedName": "cyclist",
+ "rawSpec": "~0.2.2",
+ "saveSpec": null,
+ "fetchSpec": "~0.2.2"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/parallel-transform"
+ ],
+ "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+ "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640",
+ "_spec": "cyclist@~0.2.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/cyclist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Cyclist is an efficient cyclic list implemention.",
+ "homepage": "https://github.com/mafintosh/cyclist#readme",
+ "keywords": [
+ "circular",
+ "buffer",
+ "ring",
+ "cyclic",
+ "data"
+ ],
+ "name": "cyclist",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/cyclist.git"
+ },
+ "version": "0.2.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json
new file mode 100644
index 0000000000..f3d04cc934
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "parallel-transform@^1.1.0",
+ "_id": "parallel-transform@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
+ "_location": "/cacache/mississippi/parallel-transform",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "parallel-transform@^1.1.0",
+ "name": "parallel-transform",
+ "escapedName": "parallel-transform",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+ "_shasum": "d410f065b05da23081fcd10f28854c29bda33b06",
+ "_spec": "parallel-transform@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/parallel-transform/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "cyclist": "~0.2.2",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.1.5"
+ },
+ "deprecated": false,
+ "description": "Transform stream that allows you to run your transforms in parallel without changing the order",
+ "homepage": "https://github.com/mafintosh/parallel-transform#readme",
+ "keywords": [
+ "transform",
+ "stream",
+ "parallel",
+ "preserve",
+ "order"
+ ],
+ "license": "MIT",
+ "name": "parallel-transform",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/parallel-transform.git"
+ },
+ "version": "1.1.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js
new file mode 100644
index 0000000000..d9ca0335cb
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json
new file mode 100644
index 0000000000..5839908b06
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "pump@^2.0.1",
+ "_id": "pump@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+ "_location": "/cacache/mississippi/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^2.0.1",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.1"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi",
+ "/cacache/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
+ "_spec": "pump@^2.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "2.0.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..75ea4a292e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-browser.js
@@ -0,0 +1,62 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..034a65414d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res) {
+ process.exit(1)
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml
new file mode 100644
index 0000000000..32e71a6b55
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+
+node_js:
+ - "0.10"
+ - "4"
+ - "5"
+
+sudo: false
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md
new file mode 100644
index 0000000000..4988f7b126
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/README.md
@@ -0,0 +1,56 @@
+# pumpify
+
+Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).
+If one of the streams closes/errors all streams in the pipeline will be destroyed.
+
+```
+npm install pumpify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)
+
+## Usage
+
+Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`.
+`pipeline` is a duplex stream that writes to the first streams and reads from the last one.
+Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes
+all streams will be destroyed.
+
+``` js
+var pumpify = require('pumpify')
+var tar = require('tar-fs')
+var zlib = require('zlib')
+var fs = require('fs')
+
+var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))
+// you can also pass an array instead
+// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.
+Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).
+
+### Using `setPipeline(s1, s2, ...)`
+
+Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`
+
+``` js
+var untar = pumpify()
+
+setTimeout(function() {
+ // will start draining the input now
+ untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))
+}, 1000)
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+## License
+
+MIT
+
+## Related
+
+`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js
new file mode 100644
index 0000000000..45bb987e85
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/index.js
@@ -0,0 +1,56 @@
+var pump = require('pump')
+var inherits = require('inherits')
+var Duplexify = require('duplexify')
+
+var toArray = function(args) {
+ if (!args.length) return []
+ return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args)
+}
+
+var define = function(opts) {
+ var Pumpify = function() {
+ var streams = toArray(arguments)
+ if (!(this instanceof Pumpify)) return new Pumpify(streams)
+ Duplexify.call(this, null, null, opts)
+ if (streams.length) this.setPipeline(streams)
+ }
+
+ inherits(Pumpify, Duplexify)
+
+ Pumpify.prototype.setPipeline = function() {
+ var streams = toArray(arguments)
+ var self = this
+ var ended = false
+ var w = streams[0]
+ var r = streams[streams.length-1]
+
+ r = r.readable ? r : null
+ w = w.writable ? w : null
+
+ var onclose = function() {
+ streams[0].emit('error', new Error('stream was destroyed'))
+ }
+
+ this.on('close', onclose)
+ this.on('prefinish', function() {
+ if (!ended) self.cork()
+ })
+
+ pump(streams, function(err) {
+ self.removeListener('close', onclose)
+ if (err) return self.destroy(err)
+ ended = true
+ self.uncork()
+ })
+
+ if (this.destroyed) return onclose()
+ this.setWritable(w)
+ this.setReadable(r)
+ }
+
+ return Pumpify
+}
+
+module.exports = define({destroy:false})
+module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16})
+module.exports.ctor = define
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json
new file mode 100644
index 0000000000..a678869bc1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "pumpify@^1.3.3",
+ "_id": "pumpify@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
+ "_location": "/cacache/mississippi/pumpify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pumpify@^1.3.3",
+ "name": "pumpify",
+ "escapedName": "pumpify",
+ "rawSpec": "^1.3.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.3"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+ "_shasum": "80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb",
+ "_spec": "pumpify@^1.3.3",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pumpify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "duplexify": "^3.5.3",
+ "inherits": "^2.0.3",
+ "pump": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Combine an array of streams into a single duplex stream using pump and duplexify",
+ "devDependencies": {
+ "tape": "^4.8.0",
+ "through2": "^2.0.3"
+ },
+ "homepage": "https://github.com/mafintosh/pumpify",
+ "keywords": [
+ "pump",
+ "duplexify",
+ "duplex",
+ "streams",
+ "stream",
+ "pipeline",
+ "combine"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "pumpify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pumpify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js
new file mode 100644
index 0000000000..de6b16e346
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/pumpify/test.js
@@ -0,0 +1,181 @@
+var tape = require('tape')
+var through = require('through2')
+var pumpify = require('./')
+var stream = require('stream')
+
+tape('basic', function(t) {
+ t.plan(3)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'hello')
+ t.end()
+ })
+})
+
+tape('3 times', function(t) {
+ t.plan(4)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+})
+
+tape('destroy', function(t) {
+ var test = through()
+ test.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify(through(), test)
+
+ pipeline.destroy()
+})
+
+tape('close', function(t) {
+ var test = through()
+ var pipeline = pumpify(through(), test)
+
+ pipeline.on('error', function(err) {
+ t.same(err.message, 'lol')
+ t.end()
+ })
+
+ test.emit('error', new Error('lol'))
+})
+
+tape('end waits for last one', function(t) {
+ var ran = false
+
+ var a = through()
+ var b = through()
+ var c = through(function(data, enc, cb) {
+ setTimeout(function() {
+ ran = true
+ cb()
+ }, 100)
+ })
+
+ var pipeline = pumpify(a, b, c)
+
+ pipeline.write('foo')
+ pipeline.end(function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ t.ok(!ran)
+})
+
+tape('always wait for finish', function(t) {
+ var a = new stream.Readable()
+ a._read = function() {}
+ a.push('hello')
+
+ var pipeline = pumpify(a, through(), through())
+ var ran = false
+
+ pipeline.on('finish', function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ setTimeout(function() {
+ ran = true
+ a.push(null)
+ }, 100)
+})
+
+tape('async', function(t) {
+ var pipeline = pumpify()
+
+ t.plan(4)
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+
+ setTimeout(function() {
+ pipeline.setPipeline(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+ }, 100)
+})
+
+tape('early destroy', function(t) {
+ var a = through()
+ var b = through()
+ var c = through()
+
+ b.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify()
+
+ pipeline.destroy()
+ setTimeout(function() {
+ pipeline.setPipeline(a, b, c)
+ }, 100)
+})
+
+tape('preserves error', function (t) {
+ var a = through()
+ var b = through(function (data, enc, cb) {
+ cb(new Error('stop'))
+ })
+ var c = through()
+ var s = pumpify()
+
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ s.setPipeline(a, b, c)
+ s.resume()
+ s.write('hi')
+})
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore
index 3c3629e647..3c3629e647 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/.npmignore
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.npmignore
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml
new file mode 100644
index 0000000000..aa89858a8a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'stable'
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/license b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE
index 654d0bfe94..66a4d2a149 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/license
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+Copyright (c) 2015 Mathias Buus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md
new file mode 100644
index 0000000000..e0832d55bd
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/README.md
@@ -0,0 +1,41 @@
+# stream-each
+
+Iterate all the data in a stream
+
+```
+npm install stream-each
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)
+
+## Usage
+
+``` js
+var each = require('stream-each')
+
+each(stream, function (data, next) {
+ console.log('data from stream', data)
+ // when ready to consume next chunk
+ next()
+}, function (err) {
+ console.log('no more data')
+})
+```
+
+## API
+
+#### `each(stream, iterator, cb)`
+
+Iterate the data in the stream by calling the iterator function with `(data, next)`
+where data is a data chunk and next is a callback. Call next when you are ready to
+consume the next chunk. Optionally you can call next with an error to destroy the stream
+
+When the stream ends/errors the callback is called if provided
+
+## License
+
+MIT
+
+## Related
+
+`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md
new file mode 100644
index 0000000000..fc16de25f9
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/collaborators.md
@@ -0,0 +1,7 @@
+## Collaborators
+
+stream-each is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+</tbody></table>
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js
new file mode 100644
index 0000000000..7e67f7337a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/index.js
@@ -0,0 +1,58 @@
+var eos = require('end-of-stream')
+var shift = require('stream-shift')
+
+module.exports = each
+
+function each (stream, fn, cb) {
+ var want = true
+ var error = null
+ var ended = false
+ var running = false
+ var calling = false
+
+ stream.on('readable', onreadable)
+ onreadable()
+
+ if (cb) eos(stream, {readable: true, writable: false}, done)
+ return stream
+
+ function done (err) {
+ if (!error) error = err
+ ended = true
+ if (!running) cb(error)
+ }
+
+ function onreadable () {
+ if (want) read()
+ }
+
+ function afterRead (err) {
+ running = false
+
+ if (err) {
+ error = err
+ if (ended) return cb(error)
+ stream.destroy(err)
+ return
+ }
+ if (ended) return cb(error)
+ if (!calling) read()
+ }
+
+ function read () {
+ while (!running && !ended) {
+ want = false
+
+ var data = shift(stream)
+ if (data === null) {
+ want = true
+ return
+ }
+
+ running = true
+ calling = true
+ fn(data, afterRead)
+ calling = false
+ }
+ }
+}
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
index 3c3629e647..3c3629e647 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pumpify/.npmignore
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/license b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
index 654d0bfe94..bae9da7bfa 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/license
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+Copyright (c) 2016 Mathias Buus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..6ae1937fa1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/cacache/mississippi/stream-each/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json
new file mode 100644
index 0000000000..2dbe92f79b
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "stream-each@^1.1.0",
+ "_id": "stream-each@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
+ "_location": "/cacache/mississippi/stream-each",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-each@^1.1.0",
+ "name": "stream-each",
+ "escapedName": "stream-each",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+ "_shasum": "8e8c463f91da8991778765873fe4d960d8f616bd",
+ "_spec": "stream-each@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-each/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Iterate all the data in a stream",
+ "devDependencies": {
+ "standard": "^5.3.1",
+ "tape": "^4.2.1",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/stream-each",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-each",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-each.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.2.2"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js
new file mode 100644
index 0000000000..277634cd05
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/stream-each/test.js
@@ -0,0 +1,122 @@
+var tape = require('tape')
+var through = require('through2')
+var each = require('./')
+
+tape('each', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+})
+
+tape('each and callback', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.end()
+ })
+})
+
+tape('each (write after)', function (t) {
+ var s = through.obj()
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+
+ setTimeout(function () {
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+ }, 100)
+})
+
+tape('each error', function (t) {
+ var s = through.obj()
+ s.write('hello')
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ })
+})
+
+tape('each error and callback', function (t) {
+ var s = through.obj()
+ s.write('hello')
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ }, function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+})
+
+tape('each with falsey values', function (t) {
+ var s = through.obj()
+ s.write(0)
+ s.write(false)
+ s.write(undefined)
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = [0, false]
+ var count = 0
+ each(s, function (data, next) {
+ count++
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.same(count, 2)
+ })
+})
+
+tape('huge stack', function (t) {
+ var s = through.obj()
+
+ for (var i = 0; i < 5000; i++) {
+ s.write('foo')
+ }
+
+ s.end()
+
+ each(s, function (data, cb) {
+ if (data !== 'foo') t.fail('bad data')
+ cb()
+ }, function (err) {
+ t.error(err, 'no error')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore
new file mode 100644
index 0000000000..1e1dcab34c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/.npmignore
@@ -0,0 +1,3 @@
+test
+.jshintrc
+.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html
new file mode 100644
index 0000000000..ac478189ea
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.html
@@ -0,0 +1,336 @@
+<!doctype html>
+<!-- Created with GFM2HTML: https://github.com/rvagg/gfm2html -->
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title></title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="created-with" content="https://github.com/rvagg/gfm2html">
+
+ <style type="text/css">
+/* most of normalize.css */
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}[hidden],template{display:none;}html{font-family:sans-serif;/*1*/-ms-text-size-adjust:100%;/*2*/-webkit-text-size-adjust:100%;/*2*/}body{margin:0;}a{background:transparent;}a:focus{outline:thindotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em0;}abbr[title]{border-bottom:1pxdotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C""\201D""\2018""\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}table{border-collapse:collapse;border-spacing:0;}
+
+html {
+ font: 14px 'Helvetica Neue', Helvetica, arial, freesans, clean, sans-serif;
+}
+
+.container {
+ line-height: 1.6;
+ color: #333;
+ background: #eee;
+ border-radius: 3px;
+ padding: 3px;
+ width: 790px;
+ margin: 10px auto;
+}
+
+.body-content {
+ background-color: #fff;
+ border: 1px solid #CACACA;
+ padding: 30px;
+}
+
+.body-content > *:first-child {
+ margin-top: 0 !important;
+}
+
+a, a:visited {
+ color: #4183c4;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+p, blockquote, ul, ol, dl, table, pre {
+ margin: 15px 0;
+}
+
+ .markdown-body h1
+, .markdown-body h2
+, .markdown-body h3
+, .markdown-body h4
+, .markdown-body h5
+, .markdown-body h6 {
+ margin: 20px 0 10px;
+ padding: 0;
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 2.5em;
+ color: #000;
+ border-bottom: 1px solid #ddd;
+}
+
+h2 {
+ font-size: 2em;
+ border-bottom: 1px solid #eee;
+ color: #000;
+}
+
+img {
+ max-width: 100%;
+}
+
+hr {
+ background: transparent url("/img/hr.png") repeat-x 0 0;
+ border: 0 none;
+ color: #ccc;
+ height: 4px;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr:nth-child(2n) {
+ background-color: #f8f8f8;
+}
+
+.markdown-body tr {
+ border-top: 1px solid #ccc;
+ background-color: #fff;
+}
+
+td, th {
+ border: 1px solid #ccc;
+ padding: 6px 13px;
+}
+
+th {
+ font-weight: bold;
+}
+
+blockquote {
+ border-left: 4px solid #ddd;
+ padding: 0 15px;
+ color: #777;
+}
+
+blockquote > :last-child, blockquote > :first-child {
+ margin-bottom: 0px;
+}
+
+pre, code {
+ font-size: 13px;
+ font-family: 'UbuntuMono', monospace;
+ white-space: nowrap;
+ margin: 0 2px;
+ padding: 0px 5px;
+ border: 1px solid #eaeaea;
+ background-color: #f8f8f8;
+ border-radius: 3px;
+}
+
+pre > code {
+ white-space: pre;
+}
+
+pre {
+ overflow-x: auto;
+ white-space: pre;
+ padding: 10px;
+ line-height: 150%;
+ background-color: #f8f8f8;
+ border-color: #ccc;
+}
+
+pre code, pre tt {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: transparent;
+ border: none;
+}
+
+ .highlight .c
+, .highlight .cm
+, .highlight .cp
+, .highlight .c1 {
+ color:#999988;
+ font-style:italic;
+}
+
+.highlight .err {
+ color:#a61717;
+ background-color:#e3d2d2
+}
+
+ .highlight .o
+, .highlight .gs
+, .highlight .kc
+, .highlight .kd
+, .highlight .kn
+, .highlight .kp
+, .highlight .kr {
+ font-weight:bold
+}
+
+.highlight .cs {
+ color:#999999;
+ font-weight:bold;
+ font-style:italic
+}
+
+.highlight .gd {
+ color:#000000;
+ background-color:#ffdddd
+}
+
+.highlight .gd .x {
+ color:#000000;
+ background-color:#ffaaaa
+}
+
+.highlight .ge {
+ font-style:italic
+}
+
+ .highlight .gr
+, .highlight .gt {
+ color:#aa0000
+}
+
+ .highlight .gh
+, .highlight .bp {
+ color:#999999
+}
+
+.highlight .gi {
+ color:#000000;
+ background-color:#ddffdd
+}
+
+.highlight .gi .x {
+ color:#000000;
+ background-color:#aaffaa
+}
+
+.highlight .go {
+ color:#888888
+}
+
+ .highlight .gp
+, .highlight .nn {
+ color:#555555
+}
+
+
+.highlight .gu {
+ color:#800080;
+ font-weight:bold
+}
+
+
+.highlight .kt {
+ color:#445588;
+ font-weight:bold
+}
+
+ .highlight .m
+, .highlight .mf
+, .highlight .mh
+, .highlight .mi
+, .highlight .mo
+, .highlight .il {
+ color:#009999
+}
+
+ .highlight .s
+, .highlight .sb
+, .highlight .sc
+, .highlight .sd
+, .highlight .s2
+, .highlight .se
+, .highlight .sh
+, .highlight .si
+, .highlight .sx
+, .highlight .s1 {
+ color:#d14
+}
+
+.highlight .n {
+ color:#333333
+}
+
+ .highlight .na
+, .highlight .no
+, .highlight .nv
+, .highlight .vc
+, .highlight .vg
+, .highlight .vi
+, .highlight .nb {
+ color:#0086B3
+}
+
+.highlight .nc {
+ color:#445588;
+ font-weight:bold
+}
+
+.highlight .ni {
+ color:#800080
+}
+
+ .highlight .ne
+, .highlight .nf {
+ color:#990000;
+ font-weight:bold
+}
+
+.highlight .nt {
+ color:#000080
+}
+
+.highlight .ow {
+ font-weight:bold
+}
+
+.highlight .w {
+ color:#bbbbbb
+}
+
+.highlight .sr {
+ color:#009926
+}
+
+.highlight .ss {
+ color:#990073
+}
+
+.highlight .gc {
+ color:#999;
+ background-color:#EAF2F5
+}
+
+@media print {
+ .container {
+ background: transparent;
+ border-radius: 0;
+ padding: 0;
+ }
+
+ .body-content {
+ border: none;
+ }
+}
+</style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="body-content"><h1 id="the-mit-license-mit-">The MIT License (MIT)</h1>
+<p><strong>Copyright (c) 2016 Rod Vagg (the &quot;Original Author&quot;) and additional contributors</strong></p>
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.</p>
+</div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md
new file mode 100644
index 0000000000..7f0b93daaa
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/LICENSE.md
@@ -0,0 +1,9 @@
+# The MIT License (MIT)
+
+**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md
new file mode 100644
index 0000000000..a916f15ef5
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/README.md
@@ -0,0 +1,136 @@
+# through2
+
+[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+
+ this.push(chunk)
+
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+ .on('finish', function () {
+ doSomethingSpecial()
+ })
+```
+
+Or object streams:
+
+```js
+var all = []
+
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2.obj(function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
+
+## API
+
+<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false },
+ function (chunk, enc, cb) {
+ cb(null, 'wut?') // note we can use the second argument on the callback
+ // to provide data as an alternative to this.push('wut?')
+ }
+ )
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
+
+If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2(
+ function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
+ function (cb) { // flush function
+ this.push('tacking on an extra buffer to the end');
+ cb();
+ }
+ ))
+ .pipe(fs.createWriteStream('/tmp/wut.txt'));
+```
+
+<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit == "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+```
+
+## See Also
+
+ - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
+ - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
+ - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
+ - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
+ - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. 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/node-gyp/node_modules/nopt/.npmignore b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
index 3c3629e647..3c3629e647 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
new file mode 100644
index 0000000000..c682294f2c
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "xtend@~4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/cacache/mississippi/through2/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@~4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "~4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~4.0.1"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@~4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
new file mode 100644
index 0000000000..093a2b061e
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
@@ -0,0 +1,83 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
+
+test("null prototype", function(assert) {
+ var a = { a: "foo" }
+ var b = Object.create(null)
+ b.b = "bar";
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("null prototype mutable", function (assert) {
+ var a = { foo: "bar" }
+ var b = Object.create(null)
+ b.bar = "baz";
+
+ mutableExtend(a, b)
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json
new file mode 100644
index 0000000000..5a9aee5ec7
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "through2@^2.0.0",
+ "_id": "through2@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "_location": "/cacache/mississippi/through2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "through2@^2.0.0",
+ "name": "through2",
+ "escapedName": "through2",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/cacache/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
+ "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be",
+ "_spec": "through2@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache/node_modules/mississippi",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "r@va.gg",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/through2/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "readable-stream": "^2.1.5",
+ "xtend": "~4.0.1"
+ },
+ "deprecated": false,
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "devDependencies": {
+ "bl": "~1.1.2",
+ "faucet": "0.0.1",
+ "stream-spigot": "~3.0.5",
+ "tape": "~4.6.2"
+ },
+ "homepage": "https://github.com/rvagg/through2#readme",
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "license": "MIT",
+ "main": "through2.js",
+ "name": "through2",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/through2.git"
+ },
+ "scripts": {
+ "test": "node test/test.js | faucet",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "2.0.3"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js
new file mode 100644
index 0000000000..ef13980d7b
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/through2/through2.js
@@ -0,0 +1,96 @@
+var Transform = require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function DestroyableTransform(opts) {
+ Transform.call(this, opts)
+ this._destroyed = false
+}
+
+inherits(DestroyableTransform, Transform)
+
+DestroyableTransform.prototype.destroy = function(err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err)
+ self.emit('error', err)
+ self.emit('close')
+ })
+}
+
+// a noop _transform function
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+
+// create a new export function, used by both the main export and
+// the .ctor export, contains common logic for dealing with arguments
+function through2 (construct) {
+ return function (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ if (typeof flush != 'function')
+ flush = null
+
+ return construct(options, transform, flush)
+ }
+}
+
+
+// main export, just make me a transform stream!
+module.exports = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(options)
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
+
+
+// make me a reusable prototype that I can `new`, or implicitly `new`
+// with a constructor call
+module.exports.ctor = through2(function (options, transform, flush) {
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+
+ DestroyableTransform.call(this, this.options)
+ }
+
+ inherits(Through2, DestroyableTransform)
+
+ Through2.prototype._transform = transform
+
+ if (flush)
+ Through2.prototype._flush = flush
+
+ return Through2
+})
+
+
+module.exports.obj = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/package.json b/deps/npm/node_modules/cacache/node_modules/mississippi/package.json
new file mode 100644
index 0000000000..505c1ba830
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "mississippi@^2.0.0",
+ "_id": "mississippi@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==",
+ "_location": "/cacache/mississippi",
+ "_phantomChildren": {
+ "inherits": "2.0.3",
+ "once": "1.4.0",
+ "readable-stream": "2.3.5"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mississippi@^2.0.0",
+ "name": "mississippi",
+ "escapedName": "mississippi",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz",
+ "_shasum": "3442a508fafc28500486feea99409676e4ee5a6f",
+ "_spec": "mississippi@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
+ "author": {
+ "name": "max ogden"
+ },
+ "bugs": {
+ "url": "https://github.com/maxogden/mississippi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "concat-stream": "^1.5.0",
+ "duplexify": "^3.4.2",
+ "end-of-stream": "^1.1.0",
+ "flush-write-stream": "^1.0.0",
+ "from2": "^2.1.0",
+ "parallel-transform": "^1.1.0",
+ "pump": "^2.0.1",
+ "pumpify": "^1.3.3",
+ "stream-each": "^1.1.0",
+ "through2": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "a collection of useful streams",
+ "devDependencies": {},
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "homepage": "https://github.com/maxogden/mississippi#readme",
+ "license": "BSD-2-Clause",
+ "main": "index.js",
+ "name": "mississippi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/maxogden/mississippi.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md b/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md
new file mode 100644
index 0000000000..5fa6d66c89
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/mississippi/readme.md
@@ -0,0 +1,411 @@
+# mississippi
+
+a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
+
+the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
+
+## usage
+
+```js
+var miss = require('mississippi')
+```
+
+## methods
+
+- [pipe](#pipe)
+- [each](#each)
+- [pipeline](#pipeline)
+- [duplex](#duplex)
+- [through](#through)
+- [from](#from)
+- [to](#to)
+- [concat](#concat)
+- [finished](#finished)
+- [parallel](#parallel)
+
+### pipe
+
+##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
+
+Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
+
+When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
+
+`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
+
+#### original module
+
+`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
+
+#### example
+
+```js
+// lets do a simple file copy
+var fs = require('fs')
+
+var read = fs.createReadStream('./original.zip')
+var write = fs.createWriteStream('./copy.zip')
+
+// use miss.pipe instead of read.pipe(write)
+miss.pipe(read, write, function (err) {
+ if (err) return console.error('Copy error!', err)
+ console.log('Copied successfully')
+})
+```
+
+### each
+
+##### `miss.each(stream, each, [done])`
+
+Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
+
+Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
+
+#### original module
+
+`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
+
+#### example
+
+```js
+var fs = require('fs')
+var split = require('split2')
+
+var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
+
+var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
+miss.each(pipeline, eachLine, done)
+var sum = 0
+
+function eachLine (line, next) {
+ sum += parseInt(line.toString())
+ next()
+}
+
+function done (err) {
+ if (err) throw err
+ console.log('sum is', sum)
+}
+```
+
+### pipeline
+
+##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
+
+Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
+
+If you are pumping object streams together use `pipeline = miss.pipeline.obj(s1, s2, ...)`.
+
+If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
+
+#### original module
+
+`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
+
+#### example
+
+```js
+// first create some transform streams (note: these two modules are fictional)
+var imageResize = require('image-resizer-stream')({width: 400})
+var pngOptimizer = require('png-optimizer-stream')({quality: 60})
+
+// instead of doing a.pipe(b), use pipelin
+var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
+// `resizeAndOptimize` is a transform stream. when you write to it, it writes
+// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
+// it handles piping all the streams together for you
+
+// use it like any other transform stream
+var fs = require('fs')
+
+var read = fs.createReadStream('./image.png')
+var write = fs.createWriteStream('./resized-and-optimized.png')
+
+miss.pipe(read, resizeAndOptimize, write, function (err) {
+ if (err) return console.error('Image processing error!', err)
+ console.log('Image processed successfully')
+})
+```
+
+### duplex
+
+##### `var duplex = miss.duplex([writable, readable, opts])`
+
+Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
+
+The returned stream will emit data from the readable. When you write to it it writes to the writable.
+
+You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
+
+#### original module
+
+`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
+
+#### example
+
+```js
+// lets spawn a process and take its stdout and stdin and combine them into 1 stream
+var child = require('child_process')
+
+// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
+var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
+
+// duplexCurl will write to stdin and read from stdout
+var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
+```
+
+### through
+
+##### `var transformer = miss.through([options, transformFunction, flushFunction])`
+
+Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
+
+The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
+
+The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
+
+The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
+
+#### original module
+
+`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var read = fs.createReadStream('./boring_lowercase.txt')
+var write = fs.createWriteStream('./AWESOMECASE.TXT')
+
+// Leaving out the options object
+var uppercaser = miss.through(
+ function (chunk, enc, cb) {
+ cb(null, chunk.toString().toUpperCase())
+ },
+ function (cb) {
+ cb(null, 'ONE LAST BIT OF UPPERCASE')
+ }
+)
+
+miss.pipe(read, uppercaser, write, function (err) {
+ if (err) return console.error('Trouble uppercasing!')
+ console.log('Splendid uppercasing!')
+})
+```
+
+### from
+
+##### `miss.from([opts], read)`
+
+Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
+
+`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
+
+Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
+
+- `size` is the recommended amount of data (in bytes) to retrieve.
+- `next(err, chunk)` should be called when you're ready to emit more data.
+
+#### original module
+
+`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
+
+#### example
+
+```js
+
+
+function fromString(string) {
+ return miss.from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### to
+
+##### `miss.to([options], write, [flush])`
+
+Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
+
+`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
+
+Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
+
+- `data` is the received data to write the destination.
+- `enc` encoding of the piece of data received.
+- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
+
+`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
+
+#### original module
+
+`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
+
+#### example
+
+```js
+var ws = miss.to(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+### concat
+
+##### `var concat = miss.concat(cb)`
+
+Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
+
+Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
+
+Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
+
+#### original module
+
+`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = miss.concat(gotPicture)
+
+function callback (err) {
+ if (err) {
+ console.error(err)
+ process.exit(1)
+ }
+}
+
+miss.pipe(readStream, concatStream, callback)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+```
+
+### finished
+
+##### `miss.finished(stream, cb)`
+
+Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
+
+This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
+
+#### original module
+
+`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
+
+#### example
+
+```js
+var copySource = fs.createReadStream('./movie.mp4')
+var copyDest = fs.createWriteStream('./movie-copy.mp4')
+
+copySource.pipe(copyDest)
+
+miss.finished(copyDest, function(err) {
+ if (err) return console.log('write failed', err)
+ console.log('write success')
+})
+```
+
+### parallel
+
+##### `miss.parallel(concurrency, each)`
+
+This works like `through` except you can process items in parallel, while still preserving the original input order.
+
+This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
+
+Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
+
+#### original module
+
+`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
+
+#### example
+
+This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
+
+```js
+function getResponse (item, cb) {
+ var r = request(item.url)
+ r.on('error', function (err) {
+ cb(err)
+ })
+ r.on('response', function (re) {
+ cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
+ r.abort()
+ })
+}
+
+miss.pipe(
+ fs.createReadStream('./urls.txt'), // one url per line
+ split(),
+ miss.parallel(5, getResponse),
+ miss.through(function (row, enc, next) {
+ console.log(JSON.stringify(row))
+ next()
+ })
+)
+```
+
+## see also
+
+- [substack/stream-handbook](https://github.com/substack/stream-handbook)
+- [nodejs.org/api/stream.html](https://nodejs.org/api/stream.html)
+- [awesome-nodejs-streams](https://github.com/thejmazz/awesome-nodejs-streams)
+
+## license
+
+Licensed under the BSD 2-clause license.
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index 7ae2b000dc..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,190 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="5.0.0"></a>
-# [5.0.0](https://github.com/zkat/ssri/compare/v4.1.6...v5.0.0) (2017-10-23)
-
-
-### Features
-
-* **license:** relicense to ISC (#9) ([c82983a](https://github.com/zkat/ssri/commit/c82983a))
-
-
-### BREAKING CHANGES
-
-* **license:** the license has been changed from CC0-1.0 to ISC.
-
-
-
-<a name="4.1.6"></a>
-## [4.1.6](https://github.com/zkat/ssri/compare/v4.1.5...v4.1.6) (2017-06-07)
-
-
-### Bug Fixes
-
-* **checkStream:** make sure to pass all opts through ([0b1bcbe](https://github.com/zkat/ssri/commit/0b1bcbe))
-
-
-
-<a name="4.1.5"></a>
-## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05)
-
-
-### Bug Fixes
-
-* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e))
-
-
-
-<a name="4.1.4"></a>
-## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
-
-
-
-<a name="4.1.3"></a>
-## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **check:** handle various bad hash corner cases better ([c2c262b](https://github.com/zkat/ssri/commit/c2c262b))
-
-
-
-<a name="4.1.2"></a>
-## [4.1.2](https://github.com/zkat/ssri/compare/v4.1.1...v4.1.2) (2017-04-18)
-
-
-### Bug Fixes
-
-* **stream:** _flush can be called multiple times. use on("end") ([b1c4805](https://github.com/zkat/ssri/commit/b1c4805))
-
-
-
-<a name="4.1.1"></a>
-## [4.1.1](https://github.com/zkat/ssri/compare/v4.1.0...v4.1.1) (2017-04-12)
-
-
-### Bug Fixes
-
-* **pickAlgorithm:** error if pickAlgorithm() is used in an empty Integrity ([fab470e](https://github.com/zkat/ssri/commit/fab470e))
-
-
-
-<a name="4.1.0"></a>
-# [4.1.0](https://github.com/zkat/ssri/compare/v4.0.0...v4.1.0) (2017-04-07)
-
-
-### Features
-
-* adding ssri.create for a crypto style interface (#2) ([96f52ad](https://github.com/zkat/ssri/commit/96f52ad))
-
-
-
-<a name="4.0.0"></a>
-# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa))
-
-
-### BREAKING CHANGES
-
-* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors
-
-
-
-<a name="3.0.2"></a>
-## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03)
-
-
-
-<a name="3.0.1"></a>
-## [3.0.1](https://github.com/zkat/ssri/compare/v3.0.0...v3.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **package.json:** really should have these in the keywords because search ([a6ac6d0](https://github.com/zkat/ssri/commit/a6ac6d0))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/ssri/compare/v2.0.0...v3.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/zkat/ssri/commit/d04aa1f))
-
-
-### Features
-
-* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/zkat/ssri/commit/2301e74))
-* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/zkat/ssri/commit/049b89e))
-* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/zkat/ssri/commit/a9f021c))
-* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/zkat/ssri/commit/85208ba))
-* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/zkat/ssri/commit/1b29e6f))
-* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/zkat/ssri/commit/fd23e1b))
-* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/zkat/ssri/commit/c8ddf48))
-* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/zkat/ssri/commit/b97a796))
-* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/zkat/ssri/commit/02ed1ad))
-
-
-### BREAKING CHANGES
-
-* **hashes:** `.isIntegrityMetadata` is now `.isHash`. Also, any references to `IntegrityMetadata` now refer to `Hash`.
-* **integrityStream:** createCheckerStream has been removed and replaced with a general-purpose integrityStream.
-
-To convert existing createCheckerStream code, move the `sri` argument into `opts.integrity` in integrityStream. All other options should be the same.
-* **check:** `checkData`, `checkStream`, and `createCheckerStream` now yield a whole IntegrityMetadata instance representing the first successful hash match.
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/ssri/compare/v1.0.0...v2.0.0) (2017-03-24)
-
-
-### Bug Fixes
-
-* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/zkat/ssri/commit/122a32c))
-
-
-### Features
-
-* **api:** added serialize alias for unparse ([999b421](https://github.com/zkat/ssri/commit/999b421))
-* **concat:** add Integrity#concat() ([cae12c7](https://github.com/zkat/ssri/commit/cae12c7))
-* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/zkat/ssri/commit/58c18f7))
-* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/zkat/ssri/commit/3f0b64c))
-* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/zkat/ssri/commit/4acad30))
-* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/zkat/ssri/commit/f72e658))
-
-
-### BREAKING CHANGES
-
-* **pickAlgo:** ssri will prioritize specific hashes now
-* **stringify:** serialize and unparse have been removed. Use ssri.stringify instead.
-* **strict-mode:** functions that accepted an optional `sep` argument now expect `opts.sep`.
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-03-23)
-
-
-### Features
-
-* **api:** implemented initial api ([4fbb16b](https://github.com/zkat/ssri/commit/4fbb16b))
-
-
-### BREAKING CHANGES
-
-* **api:** Initial API established.
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/README.md b/deps/npm/node_modules/cacache/node_modules/ssri/README.md
deleted file mode 100644
index f2fc035da5..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/README.md
+++ /dev/null
@@ -1,462 +0,0 @@
-# ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest)
-
-[`ssri`](https://github.com/zkat/ssri), short for Standard Subresource
-Integrity, is a Node.js utility for parsing, manipulating, serializing,
-generating, and verifying [Subresource
-Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
-
-## Install
-
-`$ npm install --save ssri`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * Parsing & Serializing
- * [`parse`](#parse)
- * [`stringify`](#stringify)
- * [`Integrity#concat`](#integrity-concat)
- * [`Integrity#toString`](#integrity-to-string)
- * [`Integrity#toJSON`](#integrity-to-json)
- * [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
- * [`Integrity#hexDigest`](#integrity-hex-digest)
- * Integrity Generation
- * [`fromHex`](#from-hex)
- * [`fromData`](#from-data)
- * [`fromStream`](#from-stream)
- * [`create`](#create)
- * Integrity Verification
- * [`checkData`](#check-data)
- * [`checkStream`](#check-stream)
- * [`integrityStream`](#integrity-stream)
-
-### Example
-
-```javascript
-const ssri = require('ssri')
-
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Parsing and serializing
-const parsed = ssri.parse(integrity)
-ssri.stringify(parsed) // === integrity (works on non-Integrity objects)
-parsed.toString() // === integrity
-
-// Async stream functions
-ssri.checkStream(fs.createReadStream('./my-file'), integrity).then(...)
-ssri.fromStream(fs.createReadStream('./my-file')).then(sri => {
- sri.toString() === integrity
-})
-fs.createReadStream('./my-file').pipe(ssri.createCheckerStream(sri))
-
-// Sync data functions
-ssri.fromData(fs.readFileSync('./my-file')) // === parsed
-ssri.checkData(fs.readFileSync('./my-file'), integrity) // => 'sha512'
-```
-
-### Features
-
-* Parses and stringifies SRI strings.
-* Generates SRI strings from raw data or Streams.
-* Strict standard compliance.
-* `?foo` metadata option support.
-* Multiple entries for the same algorithm.
-* Object-based integrity hash manipulation.
-* Small footprint: no dependencies, concise implementation.
-* Full test coverage.
-* Customizable algorithm picker.
-
-### Contributing
-
-The ssri team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="parse"></a> `> ssri.parse(sri, [opts]) -> Integrity`
-
-Parses `sri` into an `Integrity` data structure. `sri` can be an integrity
-string, an `Hash`-like with `digest` and `algorithm` fields and an optional
-`options` field, or an `Integrity`-like object. The resulting object will be an
-`Integrity` instance that has this shape:
-
-```javascript
-{
- 'sha1': [{algorithm: 'sha1', digest: 'deadbeef', options: []}],
- 'sha512': [
- {algorithm: 'sha512', digest: 'c0ffee', options: []},
- {algorithm: 'sha512', digest: 'bad1dea', options: ['foo']}
- ],
-}
-```
-
-If `opts.single` is truthy, a single `Hash` object will be returned. That is, a
-single object that looks like `{algorithm, digest, options}`, as opposed to a
-larger object with multiple of these.
-
-If `opts.strict` is truthy, the resulting object will be filtered such that
-it strictly follows the Subresource Integrity spec, throwing away any entries
-with any invalid components. This also means a restricted set of algorithms
-will be used -- the spec limits them to `sha256`, `sha384`, and `sha512`.
-
-Strict mode is recommended if the integrity strings are intended for use in
-browsers, or in other situations where strict adherence to the spec is needed.
-
-##### Example
-
-```javascript
-ssri.parse('sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo') // -> Integrity object
-```
-
-#### <a name="stringify"></a> `> ssri.stringify(sri, [opts]) -> String`
-
-This function is identical to [`Integrity#toString()`](#integrity-to-string),
-except it can be used on _any_ object that [`parse`](#parse) can handle -- that
-is, a string, an `Hash`-like, or an `Integrity`-like.
-
-The `opts.sep` option defines the string to use when joining multiple entries
-together. To be spec-compliant, this _must_ be whitespace. The default is a
-single space (`' '`).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// Useful for cleaning up input SRI strings:
-ssri.stringify('\n\rsha512-foo\n\t\tsha384-bar')
-// -> 'sha512-foo sha384-bar'
-
-// Hash-like: only a single entry.
-ssri.stringify({
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Integrity-like: full multi-entry syntax. Similar to output of `ssri.parse`
-ssri.stringify({
- 'sha512': [
- {
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
- }
- ]
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-```
-
-#### <a name="integrity-concat"></a> `> Integrity#concat(otherIntegrity, [opts]) -> Integrity`
-
-Concatenates an `Integrity` object with another IntegrityLike, or an integrity
-string.
-
-This is functionally equivalent to concatenating the string format of both
-integrity arguments, and calling [`ssri.parse`](#ssri-parse) on the new string.
-
-If `opts.strict` is true, the new `Integrity` will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// This will combine the integrity checks for two different versions of
-// your index.js file so you can use a single integrity string and serve
-// either of these to clients, from a single `<script>` tag.
-const desktopIntegrity = ssri.fromData(fs.readFileSync('./index.desktop.js'))
-const mobileIntegrity = ssri.fromData(fs.readFileSync('./index.mobile.js'))
-
-// Note that browsers (and ssri) will succeed as long as ONE of the entries
-// for the *prioritized* algorithm succeeds. That is, in order for this fallback
-// to work, both desktop and mobile *must* use the same `algorithm` values.
-desktopIntegrity.concat(mobileIntegrity)
-```
-
-#### <a name="integrity-to-string"></a> `> Integrity#toString([opts]) -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `opts.sep`, which defaults to `' '`.
-
-If you want to serialize an object that didn't from from an `ssri` function,
-use [`ssri.stringify()`](#stringify).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-ssri.parse(integrity).toString() === integrity
-```
-
-#### <a name="integrity-to-json"></a> `> Integrity#toJSON() -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `' '`.
-
-This is a convenience method so you can pass an `Integrity` object directly to `JSON.stringify`.
-For more info check out [toJSON() behavior on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior).
-
-##### Example
-
-```javascript
-const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo"'
-
-JSON.stringify(ssri.parse(integrity)) === integrity
-```
-
-#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
-
-Returns the "best" algorithm from those available in the integrity object.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-WEakDigEST sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1').pickAlgorithm() // sha512
-```
-
-#### <a name="integrity-hex-digest"></a> `> Integrity#hexDigest() -> String`
-
-`Integrity` is assumed to be either a single-hash `Integrity` instance, or a
-`Hash` instance. Returns its `digest`, converted to a hex representation of the
-base64 data.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-deadbeef').hexDigest() // '75e69d6de79f'
-```
-
-#### <a name="from-hex"></a> `> ssri.fromHex(hexDigest, algorithm, [opts]) -> Integrity`
-
-Creates an `Integrity` object with a single entry, based on a hex-formatted
-hash. This is a utility function to help convert existing shasums to the
-Integrity format, and is roughly equivalent to something like:
-
-```javascript
-algorithm + '-' + Buffer.from(hexDigest, 'hex').toString('base64')
-```
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-If `opts.single` is true, a single `Hash` object will be returned.
-
-##### Example
-
-```javascript
-ssri.fromHex('75e69d6de79f', 'sha1').toString() // 'sha1-deadbeef'
-```
-
-#### <a name="from-data"></a> `> ssri.fromData(data, [opts]) -> Integrity`
-
-Creates an `Integrity` object from either string or `Buffer` data, calculating
-all the requested hashes and adding any specified options to the object.
-
-`opts.algorithms` determines which algorithms to generate hashes for. All
-results will be included in a single `Integrity` object. The default value for
-`opts.algorithms` is `['sha512']`. All algorithm strings must be hashes listed
-in `crypto.getHashes()` for the host Node.js platform.
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrityObj = ssri.fromData('foobarbaz', {
- algorithms: ['sha256', 'sha384', 'sha512']
-})
-integrity.toString('\n')
-// ->
-// sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0=
-// sha384-irnCxQ0CfQhYGlVAUdwTPC9bF3+YWLxlaDGM4xbYminxpbXEq+D+2GCEBTxcjES9
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="from-stream"></a> `> ssri.fromStream(stream, [opts]) -> Promise<Integrity>`
-
-Returns a Promise of an Integrity object calculated by reading data from
-a given `stream`.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-Additionally, `opts.Promise` may be passed in to inject a Promise library of
-choice. By default, ssri will use Node's built-in Promises.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-ssri.fromStream(fs.createReadStream('index.js'), {
- algorithms: ['sha1', 'sha512']
-}).then(integrity => {
- return ssri.checkStream(fs.createReadStream('index.js'), integrity)
-}) // succeeds
-```
-
-#### <a name="create"></a> `> ssri.create([opts]) -> <Hash>`
-
-Returns a Hash object with `update(<Buffer or string>[,enc])` and `digest()` methods.
-
-
-The Hash object provides the same methods as [crypto class Hash](https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_hash).
-`digest()` accepts no arguments and returns an Integrity object calculated by reading data from
-calls to update.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = ssri.create().update('foobarbaz').digest()
-integrity.toString()
-// ->
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="check-data"></a> `> ssri.checkData(data, sri, [opts]) -> Hash|false`
-
-Verifies `data` integrity against an `sri` argument. `data` may be either a
-`String` or a `Buffer`, and `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-If verification succeeds, `checkData` will return the name of the algorithm that
-was used for verification (a truthy value). Otherwise, it will return `false`.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const data = fs.readFileSync('index.js')
-ssri.checkData(data, ssri.fromData(data)) // -> 'sha512'
-ssri.checkData(data, 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0')
-ssri.checkData(data, 'sha1-BaDDigEST') // -> false
-```
-
-#### <a name="check-stream"></a> `> ssri.checkStream(stream, sri, [opts]) -> Promise<Hash>`
-
-Verifies the contents of `stream` against an `sri` argument. `stream` will be
-consumed in its entirety by this process. `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-`checkStream` will return a Promise that either resolves to the
-`Hash` that succeeded verification, or, if the verification fails
-or an error happens with `stream`, the Promise will be rejected.
-
-If the Promise is rejected because verification failed, the returned error will
-have `err.code` as `EINTEGRITY`.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be returned by a rejection if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- integrity
-)
-// ->
-// Promise<{
-// algorithm: 'sha512',
-// digest: 'sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1'
-// }>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0'
-) // -> Promise<Hash>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha1-BaDDigEST'
-) // -> Promise<Error<{code: 'EINTEGRITY'}>>
-```
-
-#### <a name="integrity-stream"></a> `> integrityStream(sri, [opts]) -> IntegrityStream`
-
-Returns a `Transform` stream that data can be piped through in order to generate
-and optionally check data integrity for piped data. When the stream completes
-successfully, it emits `size` and `integrity` events, containing the total
-number of bytes processed and a calculated `Integrity` instance based on stream
-data, respectively.
-
-If `opts.algorithms` is passed in, the listed algorithms will be calculated when
-generating the final `Integrity` instance. The default is `['sha512']`.
-
-If `opts.single` is passed in, a single `Hash` instance will be returned.
-
-If `opts.integrity` is passed in, it should be an `integrity` value understood
-by [`parse`](#parse) that the stream will check the data against. If
-verification succeeds, the integrity stream will emit a `verified` event whose
-value is a single `Hash` object that is the one that succeeded verification. If
-verification fails, the stream will error with an `EINTEGRITY` error code.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be emitted by the stream if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-fs.createReadStream('index.js')
-.pipe(ssri.checkStream(integrity))
-```
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/index.js b/deps/npm/node_modules/cacache/node_modules/ssri/index.js
deleted file mode 100644
index 8ece662ba6..0000000000
--- a/deps/npm/node_modules/cacache/node_modules/ssri/index.js
+++ /dev/null
@@ -1,334 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const Transform = require('stream').Transform
-
-const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
-
-const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
-const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/]+(?:=?=?))([?\x21-\x7E]*)$/
-const VCHAR_REGEX = /^[\x21-\x7E]+$/
-
-class Hash {
- get isHash () { return true }
- constructor (hash, opts) {
- const strict = !!(opts && opts.strict)
- this.source = hash.trim()
- // 3.1. Integrity metadata (called "Hash" by ssri)
- // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
- const match = this.source.match(
- strict
- ? STRICT_SRI_REGEX
- : SRI_REGEX
- )
- if (!match) { return }
- if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return }
- this.algorithm = match[1]
- this.digest = match[2]
-
- const rawOpts = match[3]
- this.options = rawOpts ? rawOpts.slice(1).split('?') : []
- }
- hexDigest () {
- return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
- }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- if (opts && opts.strict) {
- // Strict mode enforces the standard as close to the foot of the
- // letter as it can.
- if (!(
- // The spec has very restricted productions for algorithms.
- // https://www.w3.org/TR/CSP2/#source-list-syntax
- SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
- // Usually, if someone insists on using a "different" base64, we
- // leave it as-is, since there's multiple standards, and the
- // specified is not a URL-safe variant.
- // https://www.w3.org/TR/CSP2/#base64_value
- this.digest.match(BASE64_REGEX) &&
- // Option syntax is strictly visual chars.
- // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
- // https://tools.ietf.org/html/rfc5234#appendix-B.1
- (this.options || []).every(opt => opt.match(VCHAR_REGEX))
- )) {
- return ''
- }
- }
- const options = this.options && this.options.length
- ? `?${this.options.join('?')}`
- : ''
- return `${this.algorithm}-${this.digest}${options}`
- }
-}
-
-class Integrity {
- get isIntegrity () { return true }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- opts = opts || {}
- let sep = opts.sep || ' '
- if (opts.strict) {
- // Entries must be separated by whitespace, according to spec.
- sep = sep.replace(/\S+/g, ' ')
- }
- return Object.keys(this).map(k => {
- return this[k].map(hash => {
- return Hash.prototype.toString.call(hash, opts)
- }).filter(x => x.length).join(sep)
- }).filter(x => x.length).join(sep)
- }
- concat (integrity, opts) {
- const other = typeof integrity === 'string'
- ? integrity
- : stringify(integrity, opts)
- return parse(`${this.toString(opts)} ${other}`, opts)
- }
- hexDigest () {
- return parse(this, {single: true}).hexDigest()
- }
- pickAlgorithm (opts) {
- const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
- const keys = Object.keys(this)
- if (!keys.length) {
- throw new Error(`No algorithms available for ${
- JSON.stringify(this.toString())
- }`)
- }
- return keys.reduce((acc, algo) => {
- return pickAlgorithm(acc, algo) || acc
- })
- }
-}
-
-module.exports.parse = parse
-function parse (sri, opts) {
- opts = opts || {}
- if (typeof sri === 'string') {
- return _parse(sri, opts)
- } else if (sri.algorithm && sri.digest) {
- const fullSri = new Integrity()
- fullSri[sri.algorithm] = [sri]
- return _parse(stringify(fullSri, opts), opts)
- } else {
- return _parse(stringify(sri, opts), opts)
- }
-}
-
-function _parse (integrity, opts) {
- // 3.4.3. Parse metadata
- // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
- if (opts.single) {
- return new Hash(integrity, opts)
- }
- return integrity.trim().split(/\s+/).reduce((acc, string) => {
- const hash = new Hash(string, opts)
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.stringify = stringify
-function stringify (obj, opts) {
- if (obj.algorithm && obj.digest) {
- return Hash.prototype.toString.call(obj, opts)
- } else if (typeof obj === 'string') {
- return stringify(parse(obj, opts), opts)
- } else {
- return Integrity.prototype.toString.call(obj, opts)
- }
-}
-
-module.exports.fromHex = fromHex
-function fromHex (hexDigest, algorithm, opts) {
- const optString = (opts && opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- return parse(
- `${algorithm}-${
- Buffer.from(hexDigest, 'hex').toString('base64')
- }${optString}`, opts
- )
-}
-
-module.exports.fromData = fromData
-function fromData (data, opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
- return algorithms.reduce((acc, algo) => {
- const digest = crypto.createHash(algo).update(data).digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.fromStream = fromStream
-function fromStream (stream, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const istream = integrityStream(opts)
- return new P((resolve, reject) => {
- stream.pipe(istream)
- stream.on('error', reject)
- istream.on('error', reject)
- let sri
- istream.on('integrity', s => { sri = s })
- istream.on('end', () => resolve(sri))
- istream.on('data', () => {})
- })
-}
-
-module.exports.checkData = checkData
-function checkData (data, sri, opts) {
- opts = opts || {}
- sri = parse(sri, opts)
- if (!Object.keys(sri).length) { return false }
- const algorithm = sri.pickAlgorithm(opts)
- const digests = sri[algorithm] || []
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- return digests.find(hash => hash.digest === digest) || false
-}
-
-module.exports.checkStream = checkStream
-function checkStream (stream, sri, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const checker = integrityStream(Object.assign({}, opts, {
- integrity: sri
- }))
- return new P((resolve, reject) => {
- stream.pipe(checker)
- stream.on('error', reject)
- checker.on('error', reject)
- let sri
- checker.on('verified', s => { sri = s })
- checker.on('end', () => resolve(sri))
- checker.on('data', () => {})
- })
-}
-
-module.exports.integrityStream = integrityStream
-function integrityStream (opts) {
- opts = opts || {}
- // For verification
- const sri = opts.integrity && parse(opts.integrity, opts)
- const goodSri = sri && Object.keys(sri).length
- const algorithm = goodSri && sri.pickAlgorithm(opts)
- const digests = goodSri && sri[algorithm]
- // Calculating stream
- const algorithms = opts.algorithms || [algorithm || 'sha512']
- const hashes = algorithms.map(crypto.createHash)
- let streamSize = 0
- const stream = new Transform({
- transform (chunk, enc, cb) {
- streamSize += chunk.length
- hashes.forEach(h => h.update(chunk, enc))
- cb(null, chunk, enc)
- }
- }).on('end', () => {
- const optString = (opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- const newSri = parse(hashes.map((h, i) => {
- return `${algorithms[i]}-${h.digest('base64')}${optString}`
- }).join(' '), opts)
- const match = (
- // Integrity verification mode
- opts.integrity &&
- newSri[algorithm] &&
- digests &&
- digests.find(hash => {
- return newSri[algorithm].find(newhash => {
- return hash.digest === newhash.digest
- })
- })
- )
- if (typeof opts.size === 'number' && streamSize !== opts.size) {
- const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
- err.code = 'EBADSIZE'
- err.found = streamSize
- err.expected = opts.size
- err.sri = sri
- stream.emit('error', err)
- } else if (opts.integrity && !match) {
- const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = digests
- err.algorithm = algorithm
- err.sri = sri
- stream.emit('error', err)
- } else {
- stream.emit('size', streamSize)
- stream.emit('integrity', newSri)
- match && stream.emit('verified', match)
- }
- })
- return stream
-}
-
-module.exports.create = createIntegrity
-function createIntegrity (opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
-
- const hashes = algorithms.map(crypto.createHash)
-
- return {
- update: function (chunk, enc) {
- hashes.forEach(h => h.update(chunk, enc))
- return this
- },
- digest: function (enc) {
- const integrity = algorithms.reduce((acc, algo) => {
- const digest = hashes.shift().digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-
- return integrity
- }
- }
-}
-
-// This is a Best Effortā„¢ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'
-]
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md b/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md
new file mode 100644
index 0000000000..c259076ad6
--- /dev/null
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/CHANGELOG.md
@@ -0,0 +1,21 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10)
+
+
+### Bug Fixes
+
+* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123))
+
+
+### Features
+
+* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf))
+
+
+### BREAKING CHANGES
+
+* **__:** dropping Node 0.10/Node 0.12 support
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/README.md b/deps/npm/node_modules/cacache/node_modules/y18n/README.md
index 9859458f20..826474f209 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/README.md
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/README.md
@@ -4,6 +4,7 @@
[![Coverage Status][coveralls-image]][coveralls-url]
[![NPM version][npm-image]][npm-url]
[![js-standard-style][standard-image]][standard-url]
+[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
The bare-bones internationalization library used by yargs.
@@ -23,6 +24,19 @@ output:
`my awesome string foo`
+_using tagged template literals_
+
+```js
+var __ = require('y18n').__
+var str = 'foo'
+
+console.log(__`my awesome string ${str}`)
+```
+
+output:
+
+`my awesome string foo`
+
_pluralization support:_
```js
@@ -60,6 +74,10 @@ Create an instance of y18n with the config provided, options include:
Print a localized string, `%s` will be replaced with `arg`s.
+This function can also be used as a tag for a template literal. You can use it
+like this: <code>__&#96;hello ${'world'}&#96;</code>. This will be equivalent to
+`__('hello %s', 'world')`.
+
### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg)
Print a localized string with appropriate pluralization. If `%d` is provided
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/index.js b/deps/npm/node_modules/cacache/node_modules/y18n/index.js
index 91b159e342..d720681628 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/index.js
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/index.js
@@ -16,6 +16,9 @@ function Y18N (opts) {
}
Y18N.prototype.__ = function () {
+ if (typeof arguments[0] !== 'string') {
+ return this._taggedLiteral.apply(this, arguments)
+ }
var args = Array.prototype.slice.call(arguments)
var str = args.shift()
var cb = function () {} // start with noop.
@@ -40,6 +43,19 @@ Y18N.prototype.__ = function () {
return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args))
}
+Y18N.prototype._taggedLiteral = function (parts) {
+ var args = arguments
+ var str = ''
+ parts.forEach(function (part, i) {
+ var arg = args[i + 1]
+ str += part
+ if (typeof arg !== 'undefined') {
+ str += '%s'
+ }
+ })
+ return this.__.apply(null, [str].concat([].slice.call(arguments, 1)))
+}
+
Y18N.prototype._enqueueWrite = function (work) {
this.writeQueue.push(work)
if (this.writeQueue.length === 1) this._processWriteQueue()
diff --git a/deps/npm/node_modules/cacache/node_modules/y18n/package.json b/deps/npm/node_modules/cacache/node_modules/y18n/package.json
index a96457708a..a106ff8f0f 100644
--- a/deps/npm/node_modules/cacache/node_modules/y18n/package.json
+++ b/deps/npm/node_modules/cacache/node_modules/y18n/package.json
@@ -1,26 +1,26 @@
{
- "_from": "y18n@^3.2.1",
- "_id": "y18n@3.2.1",
+ "_from": "y18n@^4.0.0",
+ "_id": "y18n@4.0.0",
"_inBundle": false,
- "_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "_integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"_location": "/cacache/y18n",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "y18n@^3.2.1",
+ "raw": "y18n@^4.0.0",
"name": "y18n",
"escapedName": "y18n",
- "rawSpec": "^3.2.1",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "^3.2.1"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/cacache"
],
- "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41",
- "_spec": "y18n@^3.2.1",
+ "_resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+ "_shasum": "95ef94f85ecc81d007c264e190a120f0a3c8566b",
+ "_spec": "y18n@^4.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
"author": {
"name": "Ben Coe",
@@ -33,12 +33,13 @@
"deprecated": false,
"description": "the bare-bones internationalization library used by yargs",
"devDependencies": {
- "chai": "^3.4.1",
- "coveralls": "^2.11.6",
- "mocha": "^2.3.4",
- "nyc": "^6.1.1",
+ "chai": "^4.0.1",
+ "coveralls": "^3.0.0",
+ "mocha": "^4.0.1",
+ "nyc": "^11.0.1",
"rimraf": "^2.5.0",
- "standard": "^5.4.1"
+ "standard": "^10.0.0-beta.0",
+ "standard-version": "^4.2.0"
},
"files": [
"index.js"
@@ -59,7 +60,8 @@
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
+ "release": "standard-version",
"test": "nyc mocha"
},
- "version": "3.2.1"
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index 221c605109..64a6de6078 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,12 +1,10 @@
{
"_from": "cacache@latest",
- "_id": "cacache@10.0.1",
+ "_id": "cacache@10.0.4",
"_inBundle": false,
- "_integrity": "sha512-dRHYcs9LvG9cHgdPzjiI+/eS7e1xRhULrcyOx04RZQsszNJXU2SL9CyG60yLnge282Qq5nwTv+ieK2fH+WPZmA==",
+ "_integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==",
"_location": "/cacache",
- "_phantomChildren": {
- "safe-buffer": "5.1.1"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
@@ -19,10 +17,12 @@
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/pacote",
+ "/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz",
- "_shasum": "3e05f6e616117d9b54665b1b20c8aeb93ea5d36f",
+ "_resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz",
+ "_shasum": "6452367999eff9d4188aefd9a14e9d7c6a263460",
"_spec": "cacache@latest",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
@@ -56,33 +56,33 @@
}
],
"dependencies": {
- "bluebird": "^3.5.0",
+ "bluebird": "^3.5.1",
"chownr": "^1.0.1",
"glob": "^7.1.2",
"graceful-fs": "^4.1.11",
"lru-cache": "^4.1.1",
- "mississippi": "^1.3.0",
+ "mississippi": "^2.0.0",
"mkdirp": "^0.5.1",
"move-concurrently": "^1.0.1",
"promise-inflight": "^1.0.1",
- "rimraf": "^2.6.1",
- "ssri": "^5.0.0",
+ "rimraf": "^2.6.2",
+ "ssri": "^5.2.4",
"unique-filename": "^1.1.0",
- "y18n": "^3.2.1"
+ "y18n": "^4.0.0"
},
"deprecated": false,
"description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
"devDependencies": {
"benchmark": "^2.1.4",
- "chalk": "^2.0.1",
- "cross-env": "^5.0.1",
- "nyc": "^11.1.0",
+ "chalk": "^2.3.1",
+ "cross-env": "^5.1.3",
+ "nyc": "^11.4.1",
"require-inject": "^1.4.2",
"safe-buffer": "^5.1.1",
- "standard": "^10.0.2",
- "standard-version": "^4.2.0",
+ "standard": "^10.0.3",
+ "standard-version": "^4.3.0",
"tacks": "^1.2.2",
- "tap": "^10.7.0",
+ "tap": "^11.1.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -118,12 +118,12 @@
"benchmarks": "node test/benchmarks",
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t",
- "pretest": "standard lib test *.js",
+ "pretest": "standard",
"release": "standard-version -s",
"test": "cross-env CACACHE_UPDATE_LOCALE_FILES=true nyc --all -- tap -J test/*.js",
"test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "10.0.1"
+ "version": "10.0.4"
}
diff --git a/deps/npm/node_modules/detect-newline/index.js b/deps/npm/node_modules/detect-newline/index.js
new file mode 100644
index 0000000000..940329e5ac
--- /dev/null
+++ b/deps/npm/node_modules/detect-newline/index.js
@@ -0,0 +1,24 @@
+'use strict';
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ var newlines = (str.match(/(?:\r?\n)/g) || []);
+
+ if (newlines.length === 0) {
+ return null;
+ }
+
+ var crlf = newlines.filter(function (el) {
+ return el === '\r\n';
+ }).length;
+
+ var lf = newlines.length - crlf;
+
+ return crlf > lf ? '\r\n' : '\n';
+};
+
+module.exports.graceful = function (str) {
+ return module.exports(str) || '\n';
+};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license b/deps/npm/node_modules/detect-newline/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/license
+++ b/deps/npm/node_modules/detect-newline/license
diff --git a/deps/npm/node_modules/detect-newline/package.json b/deps/npm/node_modules/detect-newline/package.json
new file mode 100644
index 0000000000..ef3a2e326f
--- /dev/null
+++ b/deps/npm/node_modules/detect-newline/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "detect-newline",
+ "_id": "detect-newline@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=",
+ "_location": "/detect-newline",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "detect-newline",
+ "name": "detect-newline",
+ "escapedName": "detect-newline",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
+ "_shasum": "f41f1c10be4b00e87b5f13da680759f2c5bfd3e2",
+ "_spec": "detect-newline",
+ "_where": "/Users/anh/code/npm",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/detect-newline/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Detect the dominant newline character of a string",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/detect-newline#readme",
+ "keywords": [
+ "newline",
+ "linebreak",
+ "line-break",
+ "line",
+ "lf",
+ "crlf",
+ "eol",
+ "linefeed",
+ "character",
+ "char"
+ ],
+ "license": "MIT",
+ "name": "detect-newline",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/detect-newline.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "2.1.0"
+}
diff --git a/deps/npm/node_modules/detect-newline/readme.md b/deps/npm/node_modules/detect-newline/readme.md
new file mode 100644
index 0000000000..ec5a479e76
--- /dev/null
+++ b/deps/npm/node_modules/detect-newline/readme.md
@@ -0,0 +1,42 @@
+# detect-newline [![Build Status](https://travis-ci.org/sindresorhus/detect-newline.svg?branch=master)](https://travis-ci.org/sindresorhus/detect-newline)
+
+> Detect the dominant newline character of a string
+
+
+## Install
+
+```
+$ npm install --save detect-newline
+```
+
+
+## Usage
+
+```js
+const detectNewline = require('detect-newline');
+
+detectNewline('foo\nbar\nbaz\r\n');
+//=> '\n'
+```
+
+
+## API
+
+### detectNewline(input)
+
+Returns detected newline or `null` when no newline character is found.
+
+### detectNewline.graceful(input)
+
+Returns detected newline or `\n` when no newline character is found.
+
+
+## Related
+
+- [detect-newline-cli](https://github.com/sindresorhus/detect-newline-cli) - CLI for this module
+- [detect-indent](https://github.com/sindresorhus/detect-indent) - Detect the indentation of code
+
+
+## License
+
+MIT Ā© [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/find-npm-prefix/find-prefix.js b/deps/npm/node_modules/find-npm-prefix/find-prefix.js
index 089572ec11..d5e271322b 100644
--- a/deps/npm/node_modules/find-npm-prefix/find-prefix.js
+++ b/deps/npm/node_modules/find-npm-prefix/find-prefix.js
@@ -5,11 +5,9 @@ module.exports = findPrefix
const fs = require('fs')
const path = require('path')
-const Bluebird = require('bluebird')
-const readdir = Bluebird.promisify(fs.readdir)
function findPrefix (dir) {
- return Bluebird.try(() => {
+ return new Promise((resolve, reject) => {
dir = path.resolve(dir)
// this is a weird special case where an infinite recurse of
@@ -20,9 +18,11 @@ function findPrefix (dir) {
dir = path.dirname(dir)
walkedUp = true
}
- if (walkedUp) return dir
-
- return findPrefix_(dir)
+ if (walkedUp) {
+ resolve(dir)
+ } else {
+ resolve(findPrefix_(dir))
+ }
})
}
@@ -32,23 +32,25 @@ function findPrefix_ (dir, original) {
const parent = path.dirname(dir)
// this is a platform independent way of checking if we're in the root
// directory
- if (parent === dir) return original
-
- return readdir(dir).then(files => {
- if (files.indexOf('node_modules') !== -1 ||
- files.indexOf('package.json') !== -1) {
- return dir
- }
-
- return findPrefix_(parent, original)
- }, er => {
- // an error right away is a bad sign.
- // unless the prefix was simply a non
- // existent directory.
- if (er && dir === original && er.code !== 'ENOENT') {
- throw er
- } else {
- return original
- }
+ if (parent === dir) return Promise.resolve(original)
+
+ return new Promise((resolve, reject) => {
+ fs.readdir(dir, (err, files) => {
+ if (err) {
+ // an error right away is a bad sign.
+ // unless the prefix was simply a non
+ // existent directory.
+ if (err && dir === original && err.code !== 'ENOENT') {
+ reject(err)
+ } else {
+ resolve(original)
+ }
+ } else if (files.indexOf('node_modules') !== -1 ||
+ files.indexOf('package.json') !== -1) {
+ resolve(dir)
+ } else {
+ resolve(findPrefix_(parent, original))
+ }
+ })
})
}
diff --git a/deps/npm/node_modules/find-npm-prefix/package.json b/deps/npm/node_modules/find-npm-prefix/package.json
index 4007b90c3c..628eee218b 100644
--- a/deps/npm/node_modules/find-npm-prefix/package.json
+++ b/deps/npm/node_modules/find-npm-prefix/package.json
@@ -1,27 +1,27 @@
{
- "_from": "find-npm-prefix@latest",
- "_id": "find-npm-prefix@1.0.1",
+ "_from": "find-npm-prefix@1.0.2",
+ "_id": "find-npm-prefix@1.0.2",
"_inBundle": false,
- "_integrity": "sha512-I9R7ZnsjlKRvXBJjA1PE4wAkSc24YChoomWdEPTZgeB4DHxf87OutNGV5McFj6WwPghH97nZRejH58XvY6ga6Q==",
+ "_integrity": "sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA==",
"_location": "/find-npm-prefix",
"_phantomChildren": {},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "find-npm-prefix@latest",
+ "raw": "find-npm-prefix@1.0.2",
"name": "find-npm-prefix",
"escapedName": "find-npm-prefix",
- "rawSpec": "latest",
+ "rawSpec": "1.0.2",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "1.0.2"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.1.tgz",
- "_shasum": "af0faa74e19294b3c8634bae0e91017bb5adfac2",
- "_spec": "find-npm-prefix@latest",
+ "_resolved": "https://registry.npmjs.org/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz",
+ "_shasum": "8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf",
+ "_spec": "find-npm-prefix@1.0.2",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
@@ -55,5 +55,5 @@
"scripts": {
"test": "standard && tap --100 test"
},
- "version": "1.0.1"
+ "version": "1.0.2"
}
diff --git a/deps/npm/node_modules/hosted-git-info/CHANGELOG.md b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md
new file mode 100644
index 0000000000..d450f74a92
--- /dev/null
+++ b/deps/npm/node_modules/hosted-git-info/CHANGELOG.md
@@ -0,0 +1,17 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="2.6.0"></a>
+# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07)
+
+
+### Bug Fixes
+
+* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55))
+* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b))
+
+
+### Features
+
+* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb))
diff --git a/deps/npm/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/hosted-git-info/README.md
index f9db5dd959..7b723f6b9e 100644
--- a/deps/npm/node_modules/hosted-git-info/README.md
+++ b/deps/npm/node_modules/hosted-git-info/README.md
@@ -77,9 +77,11 @@ would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/packa
eg, `github:npm/hosted-git-info`
-* info.browse(opts)
+* info.browse(path, fragment, opts)
-eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`
+eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`,
+`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`,
+`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts`
* info.bugs(opts)
@@ -129,4 +131,3 @@ SSH connect strings will be normalized into `git+ssh` URLs.
Currently this supports Github, Bitbucket and Gitlab. Pull requests for
additional hosts welcome.
-
diff --git a/deps/npm/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/hosted-git-info/git-host-info.js
index 93cf617440..6d6c109de7 100644
--- a/deps/npm/node_modules/hosted-git-info/git-host-info.js
+++ b/deps/npm/node_modules/hosted-git-info/git-host-info.js
@@ -36,11 +36,15 @@ var gitHosts = module.exports = {
'sshtemplate': 'git@{domain}:/{project}.git{#committish}',
'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}',
'browsetemplate': 'https://{domain}/{project}{/committish}',
+ 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}',
'docstemplate': 'https://{domain}/{project}{/committish}',
'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
'shortcuttemplate': '{type}:{project}{#committish}',
'pathtemplate': '{project}{#committish}',
- 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz',
+ 'hashformat': function (fragment) {
+ return 'file-' + formatHashFragment(fragment)
+ }
}
}
@@ -48,12 +52,14 @@ var gitHostDefaults = {
'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}',
'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}',
+ 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}',
'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme',
'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
'shortcuttemplate': '{type}:{user}/{project}{#committish}',
'pathtemplate': '{user}/{project}{#committish}',
- 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/
+ 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,
+ 'hashformat': formatHashFragment
}
Object.keys(gitHosts).forEach(function (name) {
@@ -66,3 +72,7 @@ Object.keys(gitHosts).forEach(function (name) {
return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
}).join('|') + '):$')
})
+
+function formatHashFragment (fragment) {
+ return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
+}
diff --git a/deps/npm/node_modules/hosted-git-info/git-host.js b/deps/npm/node_modules/hosted-git-info/git-host.js
index 4c6641bbf7..6b97531ad6 100644
--- a/deps/npm/node_modules/hosted-git-info/git-host.js
+++ b/deps/npm/node_modules/hosted-git-info/git-host.js
@@ -1,6 +1,5 @@
'use strict'
var gitHosts = require('./git-host-info.js')
-var extend = Object.assign || require('util')._extend
var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
var gitHostInfo = this
@@ -23,18 +22,25 @@ GitHost.prototype.hash = function () {
GitHost.prototype._fill = function (template, opts) {
if (!template) return
- var vars = extend({}, opts)
- opts = extend(extend({}, this.opts), opts)
+ var vars = Object.assign({}, opts)
+ vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : ''
+ opts = Object.assign({}, this.opts, opts)
var self = this
Object.keys(this).forEach(function (key) {
if (self[key] != null && vars[key] == null) vars[key] = self[key]
})
var rawAuth = vars.auth
var rawComittish = vars.committish
+ var rawFragment = vars.fragment
+ var rawPath = vars.path
Object.keys(vars).forEach(function (key) {
vars[key] = encodeURIComponent(vars[key])
})
vars['auth@'] = rawAuth ? rawAuth + '@' : ''
+ vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : ''
+ vars.fragment = vars.fragment ? vars.fragment : ''
+ vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : ''
+ vars['/path'] = vars.path ? '/' + vars.path : ''
if (opts.noCommittish) {
vars['#committish'] = ''
vars['/tree/committish'] = ''
@@ -67,8 +73,19 @@ GitHost.prototype.sshurl = function (opts) {
return this._fill(this.sshurltemplate, opts)
}
-GitHost.prototype.browse = function (opts) {
- return this._fill(this.browsetemplate, opts)
+GitHost.prototype.browse = function (P, F, opts) {
+ if (typeof P === 'string') {
+ if (typeof F !== 'string') {
+ opts = F
+ F = null
+ }
+ return this._fill(this.browsefiletemplate, Object.assign({
+ fragment: F,
+ path: P
+ }, opts))
+ } else {
+ return this._fill(this.browsetemplate, P)
+ }
}
GitHost.prototype.docs = function (opts) {
@@ -100,9 +117,7 @@ GitHost.prototype.tarball = function (opts) {
}
GitHost.prototype.file = function (P, opts) {
- return this._fill(this.filetemplate, extend({
- path: P.replace(/^[/]+/g, '')
- }, opts))
+ return this._fill(this.filetemplate, Object.assign({ path: P }, opts))
}
GitHost.prototype.getDefaultRepresentation = function () {
diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json
index de691a86c0..e991eaa698 100644
--- a/deps/npm/node_modules/hosted-git-info/package.json
+++ b/deps/npm/node_modules/hosted-git-info/package.json
@@ -1,30 +1,32 @@
{
- "_from": "hosted-git-info@2.5.0",
- "_id": "hosted-git-info@2.5.0",
+ "_from": "hosted-git-info@2.6.0",
+ "_id": "hosted-git-info@2.6.0",
"_inBundle": false,
- "_integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==",
+ "_integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
"_location": "/hosted-git-info",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "hosted-git-info@2.5.0",
+ "raw": "hosted-git-info@2.6.0",
"name": "hosted-git-info",
"escapedName": "hosted-git-info",
- "rawSpec": "2.5.0",
+ "rawSpec": "2.6.0",
"saveSpec": null,
- "fetchSpec": "2.5.0"
+ "fetchSpec": "2.6.0"
},
"_requiredBy": [
"#USER",
"/",
+ "/libcipm/lock-verify/npm-package-arg",
+ "/libnpx/npm-package-arg",
"/normalize-package-data",
"/npm-package-arg"
],
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
- "_shasum": "6d60e34b3abbc8313062c3b798ef8d901a07af3c",
- "_spec": "hosted-git-info@2.5.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz",
+ "_shasum": "23235b29ab230c576aab0d4f13fc046b0b038222",
+ "_spec": "hosted-git-info@2.6.0",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -38,8 +40,12 @@
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"devDependencies": {
"standard": "^9.0.2",
+ "standard-version": "^4.3.0",
"tap": "^10.3.0"
},
+ "engines": {
+ "node": ">=4"
+ },
"files": [
"index.js",
"git-host.js",
@@ -60,7 +66,11 @@
"url": "git+https://github.com/npm/hosted-git-info.git"
},
"scripts": {
- "test": "standard && tap -J --coverage test/*.js"
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --nyc-arg=--all --coverage test"
},
- "version": "2.5.0"
+ "version": "2.6.0"
}
diff --git a/deps/npm/node_modules/ini/ini.js b/deps/npm/node_modules/ini/ini.js
index ddf5bd9cc6..590195dd31 100644
--- a/deps/npm/node_modules/ini/ini.js
+++ b/deps/npm/node_modules/ini/ini.js
@@ -1,17 +1,18 @@
-
exports.parse = exports.decode = decode
+
exports.stringify = exports.encode = encode
exports.safe = safe
exports.unsafe = unsafe
-var eol = process.platform === "win32" ? "\r\n" : "\n"
+var eol = typeof process !== 'undefined' &&
+ process.platform === 'win32' ? '\r\n' : '\n'
function encode (obj, opt) {
var children = []
- , out = ""
+ var out = ''
- if (typeof opt === "string") {
+ if (typeof opt === 'string') {
opt = {
section: opt,
whitespace: false
@@ -21,16 +22,15 @@ function encode (obj, opt) {
opt.whitespace = opt.whitespace === true
}
- var separator = opt.whitespace ? " = " : "="
+ var separator = opt.whitespace ? ' = ' : '='
Object.keys(obj).forEach(function (k, _, __) {
var val = obj[k]
if (val && Array.isArray(val)) {
- val.forEach(function(item) {
- out += safe(k + "[]") + separator + safe(item) + "\n"
- })
- }
- else if (val && typeof val === "object") {
+ val.forEach(function (item) {
+ out += safe(k + '[]') + separator + safe(item) + '\n'
+ })
+ } else if (val && typeof val === 'object') {
children.push(k)
} else {
out += safe(k) + separator + safe(val) + eol
@@ -38,12 +38,12 @@ function encode (obj, opt) {
})
if (opt.section && out.length) {
- out = "[" + safe(opt.section) + "]" + eol + out
+ out = '[' + safe(opt.section) + ']' + eol + out
}
children.forEach(function (k, _, __) {
var nk = dotSplit(k).join('\\.')
- var section = (opt.section ? opt.section + "." : "") + nk
+ var section = (opt.section ? opt.section + '.' : '') + nk
var child = encode(obj[k], {
section: section,
whitespace: opt.whitespace
@@ -59,22 +59,20 @@ function encode (obj, opt) {
function dotSplit (str) {
return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
- .replace(/\\\./g, '\u0001')
- .split(/\./).map(function (part) {
- return part.replace(/\1/g, '\\.')
- .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
- })
+ .replace(/\\\./g, '\u0001')
+ .split(/\./).map(function (part) {
+ return part.replace(/\1/g, '\\.')
+ .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
+ })
}
function decode (str) {
var out = {}
- , p = out
- , section = null
- , state = "START"
- // section |key = value
- , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
- , lines = str.split(/[\r\n]+/g)
- , section = null
+ var p = out
+ var section = null
+ // section |key = value
+ var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
+ var lines = str.split(/[\r\n]+/g)
lines.forEach(function (line, _, __) {
if (!line || line.match(/^\s*[;#]/)) return
@@ -86,7 +84,7 @@ function decode (str) {
return
}
var key = unsafe(match[2])
- , value = match[3] ? unsafe((match[4] || "")) : true
+ var value = match[3] ? unsafe(match[4]) : true
switch (value) {
case 'true':
case 'false':
@@ -94,22 +92,20 @@ function decode (str) {
}
// Convert keys with '[]' suffix to an array
- if (key.length > 2 && key.slice(-2) === "[]") {
- key = key.substring(0, key.length - 2)
- if (!p[key]) {
- p[key] = []
- }
- else if (!Array.isArray(p[key])) {
- p[key] = [p[key]]
- }
+ if (key.length > 2 && key.slice(-2) === '[]') {
+ key = key.substring(0, key.length - 2)
+ if (!p[key]) {
+ p[key] = []
+ } else if (!Array.isArray(p[key])) {
+ p[key] = [p[key]]
+ }
}
// safeguard against resetting a previously defined
// array by accidentally forgetting the brackets
if (Array.isArray(p[key])) {
p[key].push(value)
- }
- else {
+ } else {
p[key] = value
}
})
@@ -117,18 +113,24 @@ function decode (str) {
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
// use a filter to return the keys that have to be deleted.
Object.keys(out).filter(function (k, _, __) {
- if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false
+ if (!out[k] ||
+ typeof out[k] !== 'object' ||
+ Array.isArray(out[k])) {
+ return false
+ }
// see if the parent section is also an object.
// if so, add it to that, and mark this one for deletion
var parts = dotSplit(k)
- , p = out
- , l = parts.pop()
- , nl = l.replace(/\\\./g, '.')
+ var p = out
+ var l = parts.pop()
+ var nl = l.replace(/\\\./g, '.')
parts.forEach(function (part, _, __) {
- if (!p[part] || typeof p[part] !== "object") p[part] = {}
+ if (!p[part] || typeof p[part] !== 'object') p[part] = {}
p = p[part]
})
- if (p === out && nl === l) return false
+ if (p === out && nl === l) {
+ return false
+ }
p[nl] = out[k]
return true
}).forEach(function (del, _, __) {
@@ -139,52 +141,54 @@ function decode (str) {
}
function isQuoted (val) {
- return (val.charAt(0) === "\"" && val.slice(-1) === "\"")
- || (val.charAt(0) === "'" && val.slice(-1) === "'")
+ return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
+ (val.charAt(0) === "'" && val.slice(-1) === "'")
}
function safe (val) {
- return ( typeof val !== "string"
- || val.match(/[=\r\n]/)
- || val.match(/^\[/)
- || (val.length > 1
- && isQuoted(val))
- || val !== val.trim() )
- ? JSON.stringify(val)
- : val.replace(/;/g, '\\;').replace(/#/g, "\\#")
+ return (typeof val !== 'string' ||
+ val.match(/[=\r\n]/) ||
+ val.match(/^\[/) ||
+ (val.length > 1 &&
+ isQuoted(val)) ||
+ val !== val.trim())
+ ? JSON.stringify(val)
+ : val.replace(/;/g, '\\;').replace(/#/g, '\\#')
}
function unsafe (val, doUnesc) {
- val = (val || "").trim()
+ val = (val || '').trim()
if (isQuoted(val)) {
// remove the single quotes before calling JSON.parse
if (val.charAt(0) === "'") {
- val = val.substr(1, val.length - 2);
+ val = val.substr(1, val.length - 2)
}
try { val = JSON.parse(val) } catch (_) {}
} else {
// walk the val to find the first not-escaped ; character
var esc = false
- var unesc = "";
+ var unesc = ''
for (var i = 0, l = val.length; i < l; i++) {
var c = val.charAt(i)
if (esc) {
- if ("\\;#".indexOf(c) !== -1)
+ if ('\\;#'.indexOf(c) !== -1) {
unesc += c
- else
- unesc += "\\" + c
+ } else {
+ unesc += '\\' + c
+ }
esc = false
- } else if (";#".indexOf(c) !== -1) {
+ } else if (';#'.indexOf(c) !== -1) {
break
- } else if (c === "\\") {
+ } else if (c === '\\') {
esc = true
} else {
unesc += c
}
}
- if (esc)
- unesc += "\\"
- return unesc
+ if (esc) {
+ unesc += '\\'
+ }
+ return unesc.trim()
}
return val
}
diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json
index 8e13a10d4f..1bce638696 100644
--- a/deps/npm/node_modules/ini/package.json
+++ b/deps/npm/node_modules/ini/package.json
@@ -1,36 +1,37 @@
{
- "_from": "ini@~1.3.4",
- "_id": "ini@1.3.4",
- "_integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
+ "_from": "ini@1.3.5",
+ "_id": "ini@1.3.5",
+ "_inBundle": false,
+ "_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"_location": "/ini",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "ini@~1.3.4",
+ "raw": "ini@1.3.5",
"name": "ini",
"escapedName": "ini",
- "rawSpec": "~1.3.4",
+ "rawSpec": "1.3.5",
"saveSpec": null,
- "fetchSpec": "~1.3.4"
+ "fetchSpec": "1.3.5"
},
"_requiredBy": [
+ "#USER",
"/",
"/config-chain",
+ "/update-notifier/is-installed-globally/global-dirs",
"/update-notifier/latest-version/package-json/registry-auth-token/rc",
"/update-notifier/latest-version/package-json/registry-url/rc"
],
- "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
- "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e",
- "_shrinkwrap": null,
- "_spec": "ini@~1.3.4",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+ "_shasum": "eee25f56db1c9ec6085e0c22778083f596abf927",
+ "_spec": "ini@1.3.5",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "bin": null,
"bugs": {
"url": "https://github.com/isaacs/ini/issues"
},
@@ -39,7 +40,8 @@
"deprecated": false,
"description": "An ini encoder/decoder for node",
"devDependencies": {
- "tap": "^1.2.0"
+ "standard": "^10.0.3",
+ "tap": "^10.7.3 || 11"
},
"engines": {
"node": "*"
@@ -51,14 +53,16 @@
"license": "ISC",
"main": "ini.js",
"name": "ini",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"scripts": {
- "test": "tap test/*.js"
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "pretest": "standard ini.js",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100 -J"
},
- "version": "1.3.4"
+ "version": "1.3.5"
}
diff --git a/deps/npm/node_modules/init-package-json/CHANGELOG.md b/deps/npm/node_modules/init-package-json/CHANGELOG.md
new file mode 100644
index 0000000000..35096f4abb
--- /dev/null
+++ b/deps/npm/node_modules/init-package-json/CHANGELOG.md
@@ -0,0 +1,17 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.10.3"></a>
+## [1.10.3](https://github.com/npm/init-package-json/compare/v1.10.2...v1.10.3) (2018-03-07)
+
+
+
+<a name="1.10.2"></a>
+## [1.10.2](https://github.com/npm/init-package-json/compare/v1.10.1...v1.10.2) (2018-03-07)
+
+
+### Bug Fixes
+
+* **default-input:** Catch errors from npa ([#71](https://github.com/npm/init-package-json/issues/71)) ([11aee1e](https://github.com/npm/init-package-json/commit/11aee1e))
+* **grammar:** Fix minor style issue in final prompt ([#76](https://github.com/npm/init-package-json/issues/76)) ([ba259ce](https://github.com/npm/init-package-json/commit/ba259ce))
diff --git a/deps/npm/node_modules/init-package-json/default-input.js b/deps/npm/node_modules/init-package-json/default-input.js
index 06a3de477e..7d859a0d9b 100644
--- a/deps/npm/node_modules/init-package-json/default-input.js
+++ b/deps/npm/node_modules/init-package-json/default-input.js
@@ -12,7 +12,7 @@ function isTestPkg (p) {
}
function niceName (n) {
- return n.replace(/^node-|[.-]js$/g, '').toLowerCase()
+ return n.replace(/^node-|[.-]js$/g, '').replace(' ', '-').toLowerCase()
}
function readDeps (test, excluded) { return function (cb) {
@@ -46,7 +46,12 @@ function readDeps (test, excluded) { return function (cb) {
}}
var name = package.name || basename
-var spec = npa(name)
+var spec
+try {
+ spec = npa(name)
+} catch (e) {
+ spec = {}
+}
var scope = config.get('scope')
if (scope) {
if (scope.charAt(0) !== '@') scope = '@' + scope
diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js
index 31758281d6..5b2889e55d 100644
--- a/deps/npm/node_modules/init-package-json/init-package-json.js
+++ b/deps/npm/node_modules/init-package-json/init-package-json.js
@@ -116,7 +116,7 @@ function init (dir, input, config, cb) {
return write(true)
}
console.log('About to write to %s:\n\n%s\n', packageFile, d)
- read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) {
+ read({prompt:'Is this OK? ', default: 'yes'}, function (er, ok) {
if (er) {
return cb(er)
}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json
deleted file mode 100644
index 61a2c444aa..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "_from": "npm-package-arg@^4.0.0 || ^5.0.0",
- "_id": "npm-package-arg@5.1.2",
- "_inBundle": false,
- "_integrity": "sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA==",
- "_location": "/init-package-json/npm-package-arg",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "npm-package-arg@^4.0.0 || ^5.0.0",
- "name": "npm-package-arg",
- "escapedName": "npm-package-arg",
- "rawSpec": "^4.0.0 || ^5.0.0",
- "saveSpec": null,
- "fetchSpec": "^4.0.0 || ^5.0.0"
- },
- "_requiredBy": [
- "/init-package-json"
- ],
- "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.2.tgz",
- "_shasum": "fb18d17bb61e60900d6312619919bd753755ab37",
- "_spec": "npm-package-arg@^4.0.0 || ^5.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/init-package-json",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/npm-package-arg/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "hosted-git-info": "^2.4.2",
- "osenv": "^0.1.4",
- "semver": "^5.1.0",
- "validate-npm-package-name": "^3.0.0"
- },
- "deprecated": false,
- "description": "Parse the things that can be arguments to `npm install`",
- "devDependencies": {
- "standard": "9.0.2",
- "tap": "^10.3.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "npa.js"
- ],
- "homepage": "https://github.com/npm/npm-package-arg",
- "license": "ISC",
- "main": "npa.js",
- "name": "npm-package-arg",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/npm-package-arg.git"
- },
- "scripts": {
- "test": "standard && tap -J --coverage test/*.js"
- },
- "version": "5.1.2"
-}
diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json
index 7a6373a695..40532ce1ae 100644
--- a/deps/npm/node_modules/init-package-json/package.json
+++ b/deps/npm/node_modules/init-package-json/package.json
@@ -1,42 +1,42 @@
{
- "_from": "init-package-json@~1.10.1",
- "_id": "init-package-json@1.10.1",
- "_integrity": "sha1-zYc6FneWvvuZYSsodioLY5P9j2o=",
+ "_from": "init-package-json@1.10.3",
+ "_id": "init-package-json@1.10.3",
+ "_inBundle": false,
+ "_integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==",
"_location": "/init-package-json",
"_phantomChildren": {
"read": "1.0.7"
},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "init-package-json@~1.10.1",
+ "raw": "init-package-json@1.10.3",
"name": "init-package-json",
"escapedName": "init-package-json",
- "rawSpec": "~1.10.1",
+ "rawSpec": "1.10.3",
"saveSpec": null,
- "fetchSpec": "~1.10.1"
+ "fetchSpec": "1.10.3"
},
"_requiredBy": [
+ "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.1.tgz",
- "_shasum": "cd873a167796befb99612b28762a0b6393fd8f6a",
- "_shrinkwrap": null,
- "_spec": "init-package-json@~1.10.1",
+ "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz",
+ "_shasum": "45ffe2f610a8ca134f2bd1db5637b235070f6cbe",
+ "_spec": "init-package-json@1.10.3",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "bin": null,
"bugs": {
"url": "https://github.com/npm/init-package-json/issues"
},
"bundleDependencies": false,
"dependencies": {
"glob": "^7.1.1",
- "npm-package-arg": "^4.0.0 || ^5.0.0",
+ "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0",
"promzard": "^0.3.0",
"read": "~1.0.1",
"read-package-json": "1 || 2",
@@ -48,9 +48,10 @@
"description": "A node module to get your node module started",
"devDependencies": {
"mkdirp": "^0.5.1",
- "npm": "^4.3.0",
+ "npm": "^5.7.1",
"rimraf": "^2.1.4",
- "tap": "^10.3.0"
+ "standard-version": "^4.3.0",
+ "tap": "^11.1.2"
},
"files": [
"default-input.js",
@@ -70,14 +71,15 @@
"license": "ISC",
"main": "init-package-json.js",
"name": "init-package-json",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/npm/init-package-json.git"
},
"scripts": {
- "test": "tap test/*.js"
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "release": "standard-version -s",
+ "test": "tap --nyc-arg=--all --coverage test"
},
- "version": "1.10.1"
+ "version": "1.10.3"
}
diff --git a/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md b/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md
new file mode 100644
index 0000000000..843a0bcb94
--- /dev/null
+++ b/deps/npm/node_modules/json-parse-better-errors/CHANGELOG.md
@@ -0,0 +1,36 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.0.1"></a>
+## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16)
+
+
+### Bug Fixes
+
+* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958))
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2017-08-15)
+
+
+### Features
+
+* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977))
+
+
+### BREAKING CHANGES
+
+* **init:** This is the first commit!
+
+
+
+<a name="0.1.0"></a>
+# 0.1.0 (2017-08-15)
+
+
+### Features
+
+* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19))
diff --git a/deps/npm/node_modules/json-parse-better-errors/LICENSE.md b/deps/npm/node_modules/json-parse-better-errors/LICENSE.md
new file mode 100644
index 0000000000..c51842cc4a
--- /dev/null
+++ b/deps/npm/node_modules/json-parse-better-errors/LICENSE.md
@@ -0,0 +1,7 @@
+Copyright 2017 Kat MarchƔn
+
+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/json-parse-better-errors/README.md b/deps/npm/node_modules/json-parse-better-errors/README.md
new file mode 100644
index 0000000000..667323c775
--- /dev/null
+++ b/deps/npm/node_modules/json-parse-better-errors/README.md
@@ -0,0 +1,53 @@
+# json-parse-better-errors [![npm version](https://img.shields.io/npm/v/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![license](https://img.shields.io/npm/l/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![Travis](https://img.shields.io/travis/zkat/json-parse-better-errors.svg)](https://travis-ci.org/zkat/json-parse-better-errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/json-parse-better-errors?svg=true)](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [![Coverage Status](https://coveralls.io/repos/github/zkat/json-parse-better-errors/badge.svg?branch=latest)](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest)
+
+[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for managing
+local key and content address caches. It's really fast, really good at
+concurrency, and it will never give you corrupted data, even if cache files
+get corrupted or manipulated.
+
+It was originally written to be used as [npm](https://npm.im)'s local cache, but
+can just as easily be used on its own
+
+_Translations: [espaƱol](README.es.md)_
+
+## Install
+
+`$ npm install --save json-parse-better-errors`
+
+## Table of Contents
+
+* [Example](#example)
+* [Features](#features)
+* [Contributing](#contributing)
+* [API](#api)
+ * [`parse`](#parse)
+
+### Example
+
+```javascript
+const parseJson = require('json-parse-better-errors')
+
+parseJson('"foo"')
+parseJson('garbage') // more useful error message
+```
+
+### Features
+
+* Like JSON.parse, but the errors are better.
+
+### Contributing
+
+The json-parse-better-errors team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
+
+All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
+
+Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
+
+Happy hacking!
+
+### API
+
+#### <a name="parse"></a> `> parse(txt, ?reviver, ?context=20)`
+
+Works just like `JSON.parse`, but will include a bit more information when an
+error happens.
diff --git a/deps/npm/node_modules/json-parse-better-errors/index.js b/deps/npm/node_modules/json-parse-better-errors/index.js
new file mode 100644
index 0000000000..32c3635866
--- /dev/null
+++ b/deps/npm/node_modules/json-parse-better-errors/index.js
@@ -0,0 +1,32 @@
+'use strict'
+
+module.exports = parseJson
+function parseJson (txt, reviver, context) {
+ context = context || 20
+ try {
+ return JSON.parse(txt, reviver)
+ } catch (e) {
+ const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i)
+ const errIdx = syntaxErr
+ ? +syntaxErr[1]
+ : e.message.match(/^Unexpected end of JSON.*/i)
+ ? txt.length - 1
+ : null
+ if (errIdx != null) {
+ const start = errIdx <= context
+ ? 0
+ : errIdx - context
+ const end = errIdx + context >= txt.length
+ ? txt.length
+ : errIdx + context
+ e.message += ` while parsing near '${
+ start === 0 ? '' : '...'
+ }${txt.slice(start, end)}${
+ end === txt.length ? '' : '...'
+ }'`
+ } else {
+ e.message += ` while parsing '${txt.slice(0, context * 2)}'`
+ }
+ throw e
+ }
+}
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/package.json b/deps/npm/node_modules/json-parse-better-errors/package.json
index 15b3b5648a..dba5f58bf1 100644
--- a/deps/npm/node_modules/cacache/node_modules/ssri/package.json
+++ b/deps/npm/node_modules/json-parse-better-errors/package.json
@@ -1,33 +1,34 @@
{
- "_from": "ssri@^5.0.0",
- "_id": "ssri@5.0.0",
+ "_from": "json-parse-better-errors",
+ "_id": "json-parse-better-errors@1.0.1",
"_inBundle": false,
- "_integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==",
- "_location": "/cacache/ssri",
+ "_integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==",
+ "_location": "/json-parse-better-errors",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "tag",
"registry": true,
- "raw": "ssri@^5.0.0",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^5.0.0",
+ "raw": "json-parse-better-errors",
+ "name": "json-parse-better-errors",
+ "escapedName": "json-parse-better-errors",
+ "rawSpec": "",
"saveSpec": null,
- "fetchSpec": "^5.0.0"
+ "fetchSpec": "latest"
},
"_requiredBy": [
- "/cacache"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz",
- "_shasum": "13c19390b606c821f2a10d02b351c1729b94d8cf",
- "_spec": "ssri@^5.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/cacache",
+ "_resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz",
+ "_shasum": "50183cd1b2d25275de069e9e71b467ac9eab973a",
+ "_spec": "json-parse-better-errors",
+ "_where": "C:\\Code\\npm",
"author": {
"name": "Kat MarchƔn",
"email": "kzm@sykosomatic.org"
},
"bugs": {
- "url": "https://github.com/zkat/ssri/issues"
+ "url": "https://github.com/zkat/json-parse-better-errors/issues"
},
"bundleDependencies": false,
"config": {
@@ -38,11 +39,8 @@
]
}
},
- "dependencies": {
- "safe-buffer": "^5.1.0"
- },
"deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
+ "description": "JSON.parse with context information on error",
"devDependencies": {
"nyc": "^10.3.2",
"standard": "^9.0.2",
@@ -54,27 +52,17 @@
"files": [
"*.js"
],
- "homepage": "https://github.com/zkat/ssri#readme",
+ "homepage": "https://github.com/zkat/json-parse-better-errors#readme",
"keywords": [
- "w3c",
- "web",
- "security",
- "integrity",
- "checksum",
- "hashing",
- "subresource integrity",
- "sri",
- "sri hash",
- "sri string",
- "sri generator",
- "html"
+ "JSON",
+ "parser"
],
- "license": "ISC",
+ "license": "MIT",
"main": "index.js",
- "name": "ssri",
+ "name": "json-parse-better-errors",
"repository": {
"type": "git",
- "url": "git+https://github.com/zkat/ssri.git"
+ "url": "git+https://github.com/zkat/json-parse-better-errors.git"
},
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
@@ -85,5 +73,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "5.0.0"
+ "version": "1.0.1"
}
diff --git a/deps/npm/node_modules/libcipm/CHANGELOG.md b/deps/npm/node_modules/libcipm/CHANGELOG.md
new file mode 100644
index 0000000000..65a699f406
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/CHANGELOG.md
@@ -0,0 +1,339 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.6.0"></a>
+# [1.6.0](https://github.com/zkat/cipm/compare/v1.5.1...v1.6.0) (2018-03-01)
+
+
+### Bug Fixes
+
+* **bin:** cli.js was being excluded ([d62668e](https://github.com/zkat/cipm/commit/d62668e))
+
+
+### Features
+
+* **libcipm:** working standalone cipm release! ([a3383fd](https://github.com/zkat/cipm/commit/a3383fd))
+
+
+
+<a name="1.5.1"></a>
+## [1.5.1](https://github.com/zkat/cipm/compare/v1.5.0...v1.5.1) (2018-03-01)
+
+
+### Bug Fixes
+
+* **_from:** do not add _from to directory deps ([7405360](https://github.com/zkat/cipm/commit/7405360))
+
+
+
+<a name="1.5.0"></a>
+# [1.5.0](https://github.com/zkat/cipm/compare/v1.4.1...v1.5.0) (2018-03-01)
+
+
+### Bug Fixes
+
+* **errors:** handle aggregate errors better ([6239499](https://github.com/zkat/cipm/commit/6239499))
+
+
+### Features
+
+* **logger:** rudimentary progress bar update ([c5d9dc7](https://github.com/zkat/cipm/commit/c5d9dc7))
+
+
+
+<a name="1.4.1"></a>
+## [1.4.1](https://github.com/zkat/cipm/compare/v1.4.0...v1.4.1) (2018-02-27)
+
+
+### Bug Fixes
+
+* **buildTree:** linking in parallel causes hoist-clobbering ([5ffbc0e](https://github.com/zkat/cipm/commit/5ffbc0e)), closes [#39](https://github.com/zkat/cipm/issues/39)
+* **buildTree:** use checkDepEnv here too ([41a4634](https://github.com/zkat/cipm/commit/41a4634))
+* **perf:** split up updateJson and buildTree ([df5aba0](https://github.com/zkat/cipm/commit/df5aba0))
+* **perf:** stop using the readPackageJson version to update packages ([8da3d5a](https://github.com/zkat/cipm/commit/8da3d5a))
+
+
+
+<a name="1.4.0"></a>
+# [1.4.0](https://github.com/zkat/cipm/compare/v1.3.3...v1.4.0) (2018-02-21)
+
+
+### Features
+
+* **extract:** add support for --only and --also ([ad143ae](https://github.com/zkat/cipm/commit/ad143ae))
+
+
+
+<a name="1.3.3"></a>
+## [1.3.3](https://github.com/zkat/cipm/compare/v1.3.2...v1.3.3) (2018-02-21)
+
+
+### Bug Fixes
+
+* **extract:** stop extracting deps before parent :\ ([c6847dc](https://github.com/zkat/cipm/commit/c6847dc))
+
+
+
+<a name="1.3.2"></a>
+## [1.3.2](https://github.com/zkat/cipm/compare/v1.3.1...v1.3.2) (2018-02-15)
+
+
+
+<a name="1.3.1"></a>
+## [1.3.1](https://github.com/zkat/cipm/compare/v1.3.0...v1.3.1) (2018-02-15)
+
+
+
+<a name="1.3.0"></a>
+# [1.3.0](https://github.com/zkat/cipm/compare/v1.2.0...v1.3.0) (2018-02-13)
+
+
+### Features
+
+* **extract:** link directory deps and install missing bundle deps ([8334e9e](https://github.com/zkat/cipm/commit/8334e9e))
+
+
+
+<a name="1.2.0"></a>
+# [1.2.0](https://github.com/zkat/cipm/compare/v1.1.2...v1.2.0) (2018-02-07)
+
+
+### Features
+
+* **metadata:** add _resolved, _integrity, and _from on install ([36642dc](https://github.com/zkat/cipm/commit/36642dc))
+
+
+
+<a name="1.1.2"></a>
+## [1.1.2](https://github.com/zkat/cipm/compare/v1.1.1...v1.1.2) (2018-01-19)
+
+
+
+<a name="1.1.1"></a>
+## [1.1.1](https://github.com/zkat/cipm/compare/v1.1.0...v1.1.1) (2018-01-19)
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/zkat/cipm/compare/v1.0.1...v1.1.0) (2018-01-07)
+
+
+### Features
+
+* **log:** add some helpful log output ([f443f03](https://github.com/zkat/cipm/commit/f443f03))
+
+
+
+<a name="1.0.1"></a>
+## [1.0.1](https://github.com/zkat/cipm/compare/v1.0.0...v1.0.1) (2018-01-07)
+
+
+### Bug Fixes
+
+* **deps:** added protoduck to pkgjson ([ecbe719](https://github.com/zkat/cipm/commit/ecbe719))
+
+
+
+<a name="1.0.0"></a>
+# [1.0.0](https://github.com/zkat/cipm/compare/v0.9.1...v1.0.0) (2018-01-07)
+
+
+### Features
+
+* **cli:** splitting off CLI into a separate tool ([cff65c1](https://github.com/zkat/cipm/commit/cff65c1))
+
+
+### BREAKING CHANGES
+
+* **cli:** libcipm is its own library now,
+
+
+
+<a name="0.9.1"></a>
+## [0.9.1](https://github.com/zkat/cipm/compare/v0.9.0...v0.9.1) (2018-01-07)
+
+
+### Bug Fixes
+
+* **prefix:** oops @ prefix ([cc5adac](https://github.com/zkat/cipm/commit/cc5adac))
+
+
+
+<a name="0.9.0"></a>
+# [0.9.0](https://github.com/zkat/cipm/compare/v0.8.0...v0.9.0) (2018-01-07)
+
+
+### Bug Fixes
+
+* **package:** add pacote to bundleDependencies ([#36](https://github.com/zkat/cipm/issues/36)) ([a69742e](https://github.com/zkat/cipm/commit/a69742e))
+
+
+### Features
+
+* **config:** allow injection of npm configs ([#35](https://github.com/zkat/cipm/issues/35)) ([1f5694b](https://github.com/zkat/cipm/commit/1f5694b))
+
+
+
+<a name="0.8.0"></a>
+# [0.8.0](https://github.com/zkat/cipm/compare/v0.7.2...v0.8.0) (2017-11-28)
+
+
+### Features
+
+* **gyp:** new npm-lifecycle[@2](https://github.com/2) with included node-gyp ([a4ed938](https://github.com/zkat/cipm/commit/a4ed938))
+
+
+
+<a name="0.7.2"></a>
+## [0.7.2](https://github.com/zkat/cipm/compare/v0.7.1...v0.7.2) (2017-10-13)
+
+
+### Bug Fixes
+
+* **extract:** idk why this was breaking. Seriously. ([433a2be](https://github.com/zkat/cipm/commit/433a2be))
+* **tree:** pass through a custom Promise to logiTree ([2d29efb](https://github.com/zkat/cipm/commit/2d29efb))
+
+
+### Performance Improvements
+
+* zoomzoom. Even more concurrency! ([db9c2e0](https://github.com/zkat/cipm/commit/db9c2e0))
+
+
+
+<a name="0.7.1"></a>
+## [0.7.1](https://github.com/zkat/cipm/compare/v0.7.0...v0.7.1) (2017-10-13)
+
+
+### Bug Fixes
+
+* **scripts:** separate extract and build and fix ordering ([eb072a5](https://github.com/zkat/cipm/commit/eb072a5))
+
+
+
+<a name="0.7.0"></a>
+# [0.7.0](https://github.com/zkat/cipm/compare/v0.6.0...v0.7.0) (2017-10-12)
+
+
+### Bug Fixes
+
+* **lockfile:** npm-shrinkwrap takes precedence over package-lock (#28) ([3b98fb3](https://github.com/zkat/cipm/commit/3b98fb3))
+
+
+### Features
+
+* **optional:** ignore failed optional deps (#27) ([a654629](https://github.com/zkat/cipm/commit/a654629))
+
+
+
+<a name="0.6.0"></a>
+# [0.6.0](https://github.com/zkat/cipm/compare/v0.5.1...v0.6.0) (2017-10-09)
+
+
+### Features
+
+* **scripts:** run prepare and prepublish scripts in the root (#26) ([e0e35a3](https://github.com/zkat/cipm/commit/e0e35a3))
+
+
+
+<a name="0.5.1"></a>
+## [0.5.1](https://github.com/zkat/cipm/compare/v0.5.0...v0.5.1) (2017-10-09)
+
+
+
+<a name="0.5.0"></a>
+# [0.5.0](https://github.com/zkat/cipm/compare/v0.4.0...v0.5.0) (2017-10-09)
+
+
+### Bug Fixes
+
+* **output:** npm does not punctuate this ([e7ba976](https://github.com/zkat/cipm/commit/e7ba976))
+* **shutdown:** make sure workers close ([7ab57d0](https://github.com/zkat/cipm/commit/7ab57d0))
+
+
+### Features
+
+* **bin:** link bins and run scripts (#25) ([fab74bf](https://github.com/zkat/cipm/commit/fab74bf))
+* **lifecycle:** run scripts in dep order (#23) ([68ecfac](https://github.com/zkat/cipm/commit/68ecfac))
+
+
+
+<a name="0.4.0"></a>
+# [0.4.0](https://github.com/zkat/cipm/compare/v0.3.2...v0.4.0) (2017-10-04)
+
+
+### Features
+
+* **opts:** support full range of relevant CLI opts (#19) ([6f2bd51](https://github.com/zkat/cipm/commit/6f2bd51))
+
+
+
+<a name="0.3.2"></a>
+## [0.3.2](https://github.com/zkat/cipm/compare/v0.3.1...v0.3.2) (2017-09-06)
+
+
+### Bug Fixes
+
+* **bin:** make cli executable by default (#13) ([14a9a5f](https://github.com/zkat/cipm/commit/14a9a5f))
+* **config:** use npm.cmd on win32 and fix tests (#12) ([d912d16](https://github.com/zkat/cipm/commit/d912d16)), closes [#12](https://github.com/zkat/cipm/issues/12)
+* **json:** strip BOM when reading JSON files (#8) ([2529149](https://github.com/zkat/cipm/commit/2529149))
+
+
+
+<a name="0.3.1"></a>
+## [0.3.1](https://github.com/zkat/cipm/compare/v0.3.0...v0.3.1) (2017-09-05)
+
+
+
+<a name="0.3.0"></a>
+# [0.3.0](https://github.com/zkat/cipm/compare/v0.2.0...v0.3.0) (2017-09-05)
+
+
+### Features
+
+* **lockfile:** verify that lockfile matches package.json (#5) ([f631203](https://github.com/zkat/cipm/commit/f631203))
+* **scripts:** support --ignore-scripts option (#9) ([213ca02](https://github.com/zkat/cipm/commit/213ca02))
+
+
+
+<a name="0.2.0"></a>
+# [0.2.0](https://github.com/zkat/cipm/compare/v0.1.1...v0.2.0) (2017-09-01)
+
+
+### Bug Fixes
+
+* **main:** default --prefix ([ff06a31](https://github.com/zkat/cipm/commit/ff06a31))
+
+
+### Features
+
+* **lifecycle:** actually run lifecycle scripts correctly ([7f8933e](https://github.com/zkat/cipm/commit/7f8933e))
+
+
+
+<a name="0.1.1"></a>
+## [0.1.1](https://github.com/zkat/cipm/compare/v0.1.0...v0.1.1) (2017-08-30)
+
+
+### Bug Fixes
+
+* **files:** oops. forgot to include new files in tarball ([1ee85c9](https://github.com/zkat/cipm/commit/1ee85c9))
+
+
+
+<a name="0.1.0"></a>
+# 0.1.0 (2017-08-30)
+
+
+### Bug Fixes
+
+* **config:** pipe stdout ([08e6af8](https://github.com/zkat/cipm/commit/08e6af8))
+* **extract:** make sure to extract properly ([9643583](https://github.com/zkat/cipm/commit/9643583))
+* **license:** switch to MIT ([0d10d0d](https://github.com/zkat/cipm/commit/0d10d0d))
+
+
+### Features
+
+* **impl:** rough prototype ([2970e43](https://github.com/zkat/cipm/commit/2970e43))
+* **lifecycle:** Run lifecycle events, implement prefix option, add unit tests (#1) ([d6629be](https://github.com/zkat/cipm/commit/d6629be)), closes [#1](https://github.com/zkat/cipm/issues/1)
+* **opts:** add usage string and --help ([efcc48d](https://github.com/zkat/cipm/commit/efcc48d))
diff --git a/deps/npm/node_modules/libcipm/LICENSE.md b/deps/npm/node_modules/libcipm/LICENSE.md
new file mode 100644
index 0000000000..409d7d5a9c
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/LICENSE.md
@@ -0,0 +1,7 @@
+Copyright 2017 Kat MarchƔn and 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/libcipm/README.md b/deps/npm/node_modules/libcipm/README.md
new file mode 100644
index 0000000000..00f9b81619
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/README.md
@@ -0,0 +1,37 @@
+[![npm](https://img.shields.io/npm/v/libcipm.svg)](https://npm.im/libcipm) [![license](https://img.shields.io/npm/l/libcipm.svg)](https://npm.im/libcipm) [![Travis](https://img.shields.io/travis/zkat/cipm.svg)](https://travis-ci.org/zkat/cipm) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cipm?svg=true)](https://ci.appveyor.com/project/zkat/cipm) [![Coverage Status](https://coveralls.io/repos/github/zkat/cipm/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cipm?branch=latest)
+
+[`libcipm`](https://github.com/zkat/cipm) installs npm projects in a way that's
+optimized for continuous integration/deployment/etc scenarios. It gives up
+the ability to build its own trees or install packages individually, as well
+as other user-oriented features, in exchange for speed, and being more strict
+about project state.
+
+For documentation about the associated command-line tool, see
+[`cipm`](https://npm.im/cipm).
+
+## Install
+
+`$ npm install libcipm`
+
+## Table of Contents
+
+* [Features](#features)
+* [Contributing](#contributing)
+* [API](#api)
+
+### Features
+
+* npm-compatible project installation
+* lifecycle script support
+* blazing fast
+* npm-compatible caching
+* errors if `package.json` and `package-lock.json` are out of sync, instead of fixing it like npm does. Essentially provides a `--frozen` install.
+
+### Contributing
+
+The libcipm team enthusiastically welcomes contributions and project
+participation! There's a bunch of things you can do if you want to contribute!
+The [Contributor Guide](CONTRIBUTING.md) has all the information you need for
+everything from reporting bugs to contributing entire new features. Please don't
+hesitate to jump in if you'd like to, or even ask us questions if something
+isn't clear.
diff --git a/deps/npm/node_modules/libcipm/index.js b/deps/npm/node_modules/libcipm/index.js
new file mode 100644
index 0000000000..23d060c219
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/index.js
@@ -0,0 +1,386 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const binLink = require('bin-links')
+const buildLogicalTree = require('npm-logical-tree')
+const extract = require('./lib/extract.js')
+const fs = require('graceful-fs')
+const getPrefix = require('find-npm-prefix')
+const lifecycle = require('npm-lifecycle')
+const lockVerify = require('lock-verify')
+const mkdirp = BB.promisify(require('mkdirp'))
+const npa = require('npm-package-arg')
+const path = require('path')
+const readPkgJson = BB.promisify(require('read-package-json'))
+const rimraf = BB.promisify(require('rimraf'))
+
+const readFileAsync = BB.promisify(fs.readFile)
+const statAsync = BB.promisify(fs.stat)
+const symlinkAsync = BB.promisify(fs.symlink)
+const writeFileAsync = BB.promisify(fs.writeFile)
+
+class Installer {
+ constructor (opts) {
+ this.opts = opts
+ this.config = opts.config
+
+ // Stats
+ this.startTime = Date.now()
+ this.runTime = 0
+ this.timings = { scripts: 0 }
+ this.pkgCount = 0
+
+ // Misc
+ this.log = this.opts.log || require('./lib/silentlog.js')
+ this.pkg = null
+ this.tree = null
+ this.failedDeps = new Set()
+ }
+
+ timedStage (name) {
+ const start = Date.now()
+ return BB.resolve(this[name].apply(this, [].slice.call(arguments, 1)))
+ .tap(() => {
+ this.timings[name] = Date.now() - start
+ this.log.info(name, `Done in ${this.timings[name] / 1000}s`)
+ })
+ }
+
+ run () {
+ const prefix = this.prefix
+ return this.timedStage('prepare')
+ .then(() => this.timedStage('extractTree', this.tree))
+ .then(() => this.timedStage('updateJson', this.tree))
+ .then(pkgJsons => this.timedStage('buildTree', this.tree, pkgJsons))
+ .then(() => this.timedStage('garbageCollect', this.tree))
+ .then(() => this.timedStage('runScript', 'prepublish', this.pkg, prefix))
+ .then(() => this.timedStage('runScript', 'prepare', this.pkg, prefix))
+ .then(() => this.timedStage('teardown'))
+ .then(() => {
+ this.runTime = Date.now() - this.startTime
+ this.log.info(
+ 'run-scripts',
+ `total script time: ${this.timings.scripts / 1000}s`
+ )
+ this.log.info(
+ 'run-time',
+ `total run time: ${this.runTime / 1000}s`
+ )
+ })
+ .catch(err => {
+ this.timedStage('teardown')
+ if (err.message.match(/aggregate error/)) {
+ throw err[0]
+ } else {
+ throw err
+ }
+ })
+ .then(() => this)
+ }
+
+ prepare () {
+ this.log.info('prepare', 'initializing installer')
+ this.log.level = this.config.get('loglevel')
+ this.log.verbose('prepare', 'starting workers')
+ extract.startWorkers()
+
+ return (
+ this.config.get('prefix') && this.config.get('global')
+ ? BB.resolve(this.config.get('prefix'))
+ // There's some Specialā„¢ logic around the `--prefix` config when it
+ // comes from a config file or env vs when it comes from the CLI
+ : process.argv.some(arg => arg.match(/^\s*--prefix\s*/i))
+ ? this.config.get('prefix')
+ : getPrefix(process.cwd())
+ )
+ .then(prefix => {
+ this.prefix = prefix
+ this.log.verbose('prepare', 'installation prefix: ' + prefix)
+ return BB.join(
+ readJson(prefix, 'package.json'),
+ readJson(prefix, 'package-lock.json', true),
+ readJson(prefix, 'npm-shrinkwrap.json', true),
+ (pkg, lock, shrink) => {
+ if (shrink) {
+ this.log.verbose('prepare', 'using npm-shrinkwrap.json')
+ } else if (lock) {
+ this.log.verbose('prepare', 'using package-lock.json')
+ }
+ pkg._shrinkwrap = shrink || lock
+ this.pkg = pkg
+ }
+ )
+ })
+ .then(() => statAsync(
+ path.join(this.prefix, 'node_modules')
+ ).catch(err => { if (err.code !== 'ENOENT') { throw err } }))
+ .then(stat => {
+ stat && this.log.warn(
+ 'prepare', 'removing existing node_modules/ before installation'
+ )
+ return BB.join(
+ this.checkLock(),
+ stat && rimraf(path.join(this.prefix, 'node_modules'))
+ )
+ }).then(() => {
+ // This needs to happen -after- we've done checkLock()
+ this.tree = buildLogicalTree(this.pkg, this.pkg._shrinkwrap)
+ this.log.silly('tree', this.tree)
+ this.expectedTotal = 0
+ this.tree.forEach((dep, next) => {
+ this.expectedTotal++
+ next()
+ })
+ })
+ }
+
+ teardown () {
+ this.log.verbose('teardown', 'shutting down workers.')
+ return extract.stopWorkers()
+ }
+
+ checkLock () {
+ this.log.verbose('checkLock', 'verifying package-lock data')
+ const pkg = this.pkg
+ const prefix = this.prefix
+ if (!pkg._shrinkwrap || !pkg._shrinkwrap.lockfileVersion) {
+ return BB.reject(
+ new Error(`cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.`)
+ )
+ }
+ return lockVerify(prefix).then(result => {
+ if (result.status) {
+ result.warnings.forEach(w => this.log.warn('lockfile', w))
+ } else {
+ throw new Error(
+ 'cipm can only install packages when your package.json and package-lock.json or ' +
+ 'npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` ' +
+ 'before continuing.\n\n' +
+ result.warnings.map(w => 'Warning: ' + w).join('\n') + '\n' +
+ result.errors.join('\n') + '\n'
+ )
+ }
+ }).catch(err => {
+ throw err
+ })
+ }
+
+ extractTree (tree) {
+ this.log.verbose('extractTree', 'extracting dependencies to node_modules/')
+ const cg = this.log.newItem('extractTree', this.expectedTotal)
+ return tree.forEachAsync((dep, next) => {
+ if (!this.checkDepEnv(dep)) { return }
+ const depPath = dep.path(this.prefix)
+ const spec = npa.resolve(dep.name, dep.version, this.prefix)
+ if (dep.isRoot) {
+ return next()
+ } else if (spec.type === 'directory') {
+ const relative = path.relative(path.dirname(depPath), spec.fetchSpec)
+ this.log.silly('extractTree', `${dep.name}@${spec.fetchSpec} -> ${depPath} (symlink)`)
+ return mkdirp(path.dirname(depPath))
+ .then(() => symlinkAsync(relative, depPath, 'junction'))
+ .catch(
+ () => rimraf(depPath)
+ .then(() => symlinkAsync(relative, depPath, 'junction'))
+ ).then(() => next())
+ .then(() => {
+ this.pkgCount++
+ cg.completeWork(1)
+ })
+ } else {
+ this.log.silly('extractTree', `${dep.name}@${dep.version} -> ${depPath}`)
+ return (
+ dep.bundled
+ ? statAsync(path.join(depPath, 'package.json')).catch(err => {
+ if (err.code !== 'ENOENT') { throw err }
+ })
+ : BB.resolve(false)
+ )
+ .then(wasBundled => {
+ // Don't extract if a bundled dep is actually present
+ if (wasBundled) {
+ cg.completeWork(1)
+ return next()
+ } else {
+ return BB.resolve(extract.child(
+ dep.name, dep, depPath, this.config, this.opts
+ ))
+ .then(() => cg.completeWork(1))
+ .then(() => { this.pkgCount++ })
+ .then(next)
+ }
+ })
+ }
+ }, {concurrency: 50, Promise: BB})
+ .then(() => cg.finish())
+ }
+
+ checkDepEnv (dep) {
+ const includeDev = (
+ // Covers --dev and --development (from npm config itself)
+ this.config.get('dev') ||
+ (
+ !/^prod(uction)?$/.test(this.config.get('only')) &&
+ !this.config.get('production')
+ ) ||
+ /^dev(elopment)?$/.test(this.config.get('only')) ||
+ /^dev(elopment)?$/.test(this.config.get('also'))
+ )
+ const includeProd = !/^dev(elopment)?$/.test(this.config.get('only'))
+ return (dep.dev && includeDev) || (!dep.dev && includeProd)
+ }
+
+ updateJson (tree) {
+ this.log.verbose('updateJson', 'updating json deps to include _from')
+ const pkgJsons = new Map()
+ return tree.forEachAsync((dep, next) => {
+ if (!this.checkDepEnv(dep)) { return }
+ const spec = npa.resolve(dep.name, dep.version)
+ const depPath = dep.path(this.prefix)
+ return next()
+ .then(() => readJson(depPath, 'package.json'))
+ .then(pkg => (spec.registry || spec.type === 'directory')
+ ? pkg
+ : this.updateFromField(dep, pkg).then(() => pkg)
+ )
+ .tap(pkg => { pkgJsons.set(dep, pkg) })
+ }, {concurrency: 100, Promise: BB})
+ .then(() => pkgJsons)
+ }
+
+ buildTree (tree, pkgJsons) {
+ this.log.verbose('buildTree', 'finalizing tree and running scripts')
+ return tree.forEachAsync((dep, next) => {
+ if (!this.checkDepEnv(dep)) { return }
+ const spec = npa.resolve(dep.name, dep.version)
+ const depPath = dep.path(this.prefix)
+ const pkg = pkgJsons.get(dep)
+ this.log.silly('buildTree', `linking ${spec}`)
+ return this.runScript('preinstall', pkg, depPath)
+ .then(next) // build children between preinstall and binLink
+ // Don't link root bins
+ .then(() => {
+ if (
+ dep.isRoot ||
+ !(pkg.bin || pkg.man || (pkg.directories && pkg.directories.bin))
+ ) {
+ // We skip the relatively expensive readPkgJson if there's no way
+ // we'll actually be linking any bins or mans
+ return
+ }
+ return readPkgJson(path.join(depPath, 'package.json'))
+ .then(pkg => binLink(pkg, depPath, false, {
+ force: this.config.get('force'),
+ ignoreScripts: this.config.get('ignore-scripts'),
+ log: Object.assign({}, this.log, { info: () => {} }),
+ name: pkg.name,
+ pkgId: pkg.name + '@' + pkg.version,
+ prefix: this.prefix,
+ prefixes: [this.prefix],
+ umask: this.config.get('umask')
+ }), e => {
+ this.log.verbose('buildTree', `error linking ${spec}: ${e.message} ${e.stack}`)
+ })
+ })
+ .then(() => this.runScript('install', pkg, depPath))
+ .then(() => this.runScript('postinstall', pkg, depPath))
+ .then(() => this)
+ .catch(e => {
+ if (dep.optional) {
+ this.failedDeps.add(dep)
+ } else {
+ throw e
+ }
+ })
+ }, {concurrency: 1, Promise: BB})
+ }
+
+ updateFromField (dep, pkg) {
+ const depPath = dep.path(this.prefix)
+ const depPkgPath = path.join(depPath, 'package.json')
+ const parent = dep.requiredBy.values().next().value
+ return readJson(parent.path(this.prefix), 'package.json')
+ .then(ppkg =>
+ (ppkg.dependencies && ppkg.dependencies[dep.name]) ||
+ (ppkg.devDependencies && ppkg.devDependencies[dep.name]) ||
+ (ppkg.optionalDependencies && ppkg.optionalDependencies[dep.name])
+ )
+ .then(from => npa.resolve(dep.name, from))
+ .then(from => { pkg._from = from.toString() })
+ .then(() => writeFileAsync(depPkgPath, JSON.stringify(pkg, null, 2)))
+ .then(pkg)
+ }
+
+ // A cute little mark-and-sweep collector!
+ garbageCollect (tree) {
+ if (!this.failedDeps.size) { return }
+ return sweep(
+ tree,
+ this.prefix,
+ mark(tree, this.failedDeps)
+ )
+ .then(purged => {
+ this.purgedDeps = purged
+ this.pkgCount -= purged.size
+ })
+ }
+
+ runScript (stage, pkg, pkgPath) {
+ const start = Date.now()
+ if (
+ !this.config.get('ignore-scripts') && pkg.scripts && pkg.scripts[stage]
+ ) {
+ // TODO(mikesherov): remove pkg._id when npm-lifecycle no longer relies on it
+ pkg._id = pkg.name + '@' + pkg.version
+ const opts = this.config.toLifecycle()
+ return BB.resolve(lifecycle(pkg, stage, pkgPath, opts))
+ .tap(() => { this.timings.scripts += Date.now() - start })
+ }
+ return BB.resolve()
+ }
+}
+module.exports = Installer
+module.exports.CipmConfig = require('./lib/config/npm-config.js').CipmConfig
+
+function mark (tree, failed) {
+ const liveDeps = new Set()
+ tree.forEach((dep, next) => {
+ if (!failed.has(dep)) {
+ liveDeps.add(dep)
+ next()
+ }
+ })
+ return liveDeps
+}
+
+function sweep (tree, prefix, liveDeps) {
+ const purged = new Set()
+ return tree.forEachAsync((dep, next) => {
+ return next().then(() => {
+ if (
+ !dep.isRoot && // never purge root! šŸ™ˆ
+ !liveDeps.has(dep) &&
+ !purged.has(dep)
+ ) {
+ purged.add(dep)
+ return rimraf(dep.path(prefix))
+ }
+ })
+ }, {concurrency: 50, Promise: BB}).then(() => purged)
+}
+
+function stripBOM (str) {
+ return str.replace(/^\uFEFF/, '')
+}
+
+module.exports._readJson = readJson
+function readJson (jsonPath, name, ignoreMissing) {
+ return readFileAsync(path.join(jsonPath, name), 'utf8')
+ .then(str => JSON.parse(stripBOM(str)))
+ .catch({code: 'ENOENT'}, err => {
+ if (!ignoreMissing) {
+ throw err
+ }
+ })
+}
diff --git a/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
new file mode 100644
index 0000000000..7d57459779
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
@@ -0,0 +1,29 @@
+'use strict'
+
+const log = require('npmlog')
+
+module.exports = lifecycleOpts
+function lifecycleOpts (opts) {
+ const objConfig = {}
+ for (const key of opts.keys()) {
+ const val = opts.get(key)
+ if (val != null) {
+ objConfig[key] = val
+ }
+ }
+ return {
+ config: objConfig,
+ scriptShell: opts.get('script-shell'),
+ force: opts.get('force'),
+ user: opts.get('user'),
+ group: opts.get('group'),
+ ignoreScripts: opts.get('ignore-scripts'),
+ ignorePrepublish: opts.get('ignore-prepublish'),
+ scriptsPrependNodePath: opts.get('scripts-prepend-node-path'),
+ unsafePerm: opts.get('unsafe-perm'),
+ log,
+ dir: opts.get('prefix'),
+ failOk: false,
+ production: opts.get('production')
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/lib/config/npm-config.js b/deps/npm/node_modules/libcipm/lib/config/npm-config.js
new file mode 100644
index 0000000000..76b4054eef
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/config/npm-config.js
@@ -0,0 +1,72 @@
+'use strict'
+
+const BB = require('bluebird')
+const lifecycleOpts = require('./lifecycle-opts.js')
+const pacoteOpts = require('./pacote-opts.js')
+const protoduck = require('protoduck')
+const spawn = require('child_process').spawn
+
+class NpmConfig extends Map {}
+
+const CipmConfig = protoduck.define({
+ get: [],
+ set: [],
+ toPacote: [],
+ toLifecycle: []
+}, {
+ name: 'CipmConfig'
+})
+module.exports.CipmConfig = CipmConfig
+
+CipmConfig.impl(NpmConfig, {
+ get: Map.prototype.get,
+ set: Map.prototype.set,
+ toPacote (opts) {
+ return pacoteOpts(this, opts)
+ },
+ toLifecycle () {
+ return lifecycleOpts(this)
+ }
+})
+
+module.exports.fromObject = fromObj
+function fromObj (obj) {
+ const map = new NpmConfig()
+ Object.keys(obj).forEach(k => map.set(k, obj[k]))
+ return map
+}
+
+module.exports.fromNpm = getNpmConfig
+function getNpmConfig (argv) {
+ return new BB((resolve, reject) => {
+ const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm'
+ const child = spawn(npmBin, [
+ 'config', 'ls', '--json', '-l'
+ // We add argv here to get npm to parse those options for us :D
+ ].concat(argv || []), {
+ env: process.env,
+ cwd: process.cwd(),
+ stdio: [0, 'pipe', 2]
+ })
+
+ let stdout = ''
+ if (child.stdout) {
+ child.stdout.on('data', (chunk) => {
+ stdout += chunk
+ })
+ }
+
+ child.on('error', reject)
+ child.on('close', (code) => {
+ if (code === 127) {
+ reject(new Error('`npm` command not found. Please ensure you have npm@5.4.0 or later installed.'))
+ } else {
+ try {
+ resolve(fromObj(JSON.parse(stdout)))
+ } catch (e) {
+ reject(new Error('`npm config ls --json` failed to output json. Please ensure you have npm@5.4.0 or later installed.'))
+ }
+ }
+ })
+ })
+}
diff --git a/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js b/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js
new file mode 100644
index 0000000000..234ed1352a
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/config/pacote-opts.js
@@ -0,0 +1,135 @@
+'use strict'
+
+const Buffer = require('safe-buffer').Buffer
+
+const crypto = require('crypto')
+const path = require('path')
+
+let effectiveOwner
+
+const npmSession = crypto.randomBytes(8).toString('hex')
+
+module.exports = pacoteOpts
+function pacoteOpts (npmOpts, moreOpts) {
+ const ownerStats = calculateOwner()
+ const opts = {
+ cache: path.join(npmOpts.get('cache'), '_cacache'),
+ ca: npmOpts.get('ca'),
+ cert: npmOpts.get('cert'),
+ git: npmOpts.get('git'),
+ key: npmOpts.get('key'),
+ localAddress: npmOpts.get('local-address'),
+ loglevel: npmOpts.get('loglevel'),
+ maxSockets: +(npmOpts.get('maxsockets') || 15),
+ npmSession: npmSession,
+ offline: npmOpts.get('offline'),
+ projectScope: moreOpts.rootPkg && getProjectScope(moreOpts.rootPkg.name),
+ proxy: npmOpts.get('https-proxy') || npmOpts.get('proxy'),
+ refer: 'cipm',
+ registry: npmOpts.get('registry'),
+ retry: {
+ retries: npmOpts.get('fetch-retries'),
+ factor: npmOpts.get('fetch-retry-factor'),
+ minTimeout: npmOpts.get('fetch-retry-mintimeout'),
+ maxTimeout: npmOpts.get('fetch-retry-maxtimeout')
+ },
+ strictSSL: npmOpts.get('strict-ssl'),
+ userAgent: npmOpts.get('user-agent'),
+
+ dmode: parseInt('0777', 8) & (~npmOpts.get('umask')),
+ fmode: parseInt('0666', 8) & (~npmOpts.get('umask')),
+ umask: npmOpts.get('umask')
+ }
+
+ if (ownerStats.uid != null || ownerStats.gid != null) {
+ Object.assign(opts, ownerStats)
+ }
+
+ (npmOpts.forEach ? Array.from(npmOpts.keys()) : npmOpts.keys).forEach(k => {
+ const authMatchGlobal = k.match(
+ /^(_authToken|username|_password|password|email|always-auth|_auth)$/
+ )
+ const authMatchScoped = k[0] === '/' && k.match(
+ /(.*):(_authToken|username|_password|password|email|always-auth|_auth)$/
+ )
+
+ // if it matches scoped it will also match global
+ if (authMatchGlobal || authMatchScoped) {
+ let nerfDart = null
+ let key = null
+ let val = null
+
+ if (!opts.auth) { opts.auth = {} }
+
+ if (authMatchScoped) {
+ nerfDart = authMatchScoped[1]
+ key = authMatchScoped[2]
+ val = npmOpts.get(k)
+ if (!opts.auth[nerfDart]) {
+ opts.auth[nerfDart] = {
+ alwaysAuth: !!npmOpts.get('always-auth')
+ }
+ }
+ } else {
+ key = authMatchGlobal[1]
+ val = npmOpts.get(k)
+ opts.auth.alwaysAuth = !!npmOpts.get('always-auth')
+ }
+
+ const auth = authMatchScoped ? opts.auth[nerfDart] : opts.auth
+ if (key === '_authToken') {
+ auth.token = val
+ } else if (key.match(/password$/i)) {
+ auth.password =
+ // the config file stores password auth already-encoded. pacote expects
+ // the actual username/password pair.
+ Buffer.from(val, 'base64').toString('utf8')
+ } else if (key === 'always-auth') {
+ auth.alwaysAuth = val === 'false' ? false : !!val
+ } else {
+ auth[key] = val
+ }
+ }
+
+ if (k[0] === '@') {
+ if (!opts.scopeTargets) { opts.scopeTargets = {} }
+ opts.scopeTargets[k.replace(/:registry$/, '')] = npmOpts.get(k)
+ }
+ })
+
+ Object.keys(moreOpts || {}).forEach((k) => {
+ opts[k] = moreOpts[k]
+ })
+
+ return opts
+}
+
+function calculateOwner () {
+ if (!effectiveOwner) {
+ effectiveOwner = { uid: 0, gid: 0 }
+
+ // Pretty much only on windows
+ if (!process.getuid) {
+ return effectiveOwner
+ }
+
+ effectiveOwner.uid = +process.getuid()
+ effectiveOwner.gid = +process.getgid()
+
+ if (effectiveOwner.uid === 0) {
+ if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID
+ if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID
+ }
+ }
+
+ return effectiveOwner
+}
+
+function getProjectScope (pkgName) {
+ const sep = pkgName.indexOf('/')
+ if (sep === -1) {
+ return ''
+ } else {
+ return pkgName.slice(0, sep)
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/lib/extract.js b/deps/npm/node_modules/libcipm/lib/extract.js
new file mode 100644
index 0000000000..1967308112
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/extract.js
@@ -0,0 +1,53 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const npa = require('npm-package-arg')
+const workerFarm = require('worker-farm')
+
+const extractionWorker = require('./worker.js')
+const WORKER_PATH = require.resolve('./worker.js')
+
+module.exports = {
+ startWorkers () {
+ this._workers = workerFarm({
+ maxConcurrentCallsPerWorker: 20,
+ maxRetries: 1
+ }, WORKER_PATH)
+ },
+
+ stopWorkers () {
+ workerFarm.end(this._workers)
+ },
+
+ child (name, child, childPath, config, opts) {
+ const spec = npa.resolve(name, child.version)
+ const childOpts = config.toPacote(Object.assign({
+ integrity: child.integrity,
+ resolved: child.resolved
+ }, {
+ dirPacker: opts.dirPacker
+ }))
+ const args = [spec, childPath, childOpts]
+ return BB.fromNode((cb) => {
+ let launcher = extractionWorker
+ let msg = args
+ const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0]
+ childOpts.loglevel = opts.log.level
+ if (spec.registry || spec.type === 'remote') {
+ // We can't serialize these options
+ childOpts.config = null
+ childOpts.log = null
+ childOpts.dirPacker = null
+ // workers will run things in parallel!
+ launcher = this._workers
+ try {
+ msg = JSON.stringify(msg)
+ } catch (e) {
+ return cb(e)
+ }
+ }
+ launcher(msg, cb)
+ })
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/lib/silentlog.js b/deps/npm/node_modules/libcipm/lib/silentlog.js
new file mode 100644
index 0000000000..4c9d6c57e8
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/silentlog.js
@@ -0,0 +1,13 @@
+'use strict'
+
+const noop = Function.prototype
+module.exports = {
+ error: noop,
+ warn: noop,
+ info: noop,
+ verbose: noop,
+ silly: noop,
+ http: noop,
+ pause: noop,
+ resume: noop
+}
diff --git a/deps/npm/node_modules/libcipm/lib/worker.js b/deps/npm/node_modules/libcipm/lib/worker.js
new file mode 100644
index 0000000000..ac61b06236
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/lib/worker.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const log = require('npmlog')
+const pacote = require('pacote')
+
+module.exports = (args, cb) => {
+ const parsed = typeof args === 'string' ? JSON.parse(args) : args
+ const spec = parsed[0]
+ const extractTo = parsed[1]
+ const opts = parsed[2]
+ opts.log = log
+ log.level = opts.loglevel
+ return BB.resolve(pacote.extract(spec, extractTo, opts)).nodeify(cb)
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/LICENSE b/deps/npm/node_modules/libcipm/node_modules/lock-verify/LICENSE
index 05eeeb88c2..e0040f6659 100644
--- a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/LICENSE
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/LICENSE
@@ -1,6 +1,4 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
+Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -11,5 +9,5 @@ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libcipm/node_modules/lock-verify/README.md b/deps/npm/node_modules/libcipm/node_modules/lock-verify/README.md
new file mode 100644
index 0000000000..e9466f0a64
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/README.md
@@ -0,0 +1,44 @@
+# lock-verify
+
+Report if your package.json is out of sync with your package-lock.json.
+
+## USAGE
+
+Call it with no arguments to verify the current project's lock file. Errors
+are printed out to stdout and the status code set to 1.
+
+```
+$ npx lock-verify
+Invalid: lock file's example@2.1.0 does not satisfy example@^1.1.0
+Errors found
+$
+```
+
+
+Call it with a path to a project to verify that project's lock file. If there
+are no errors, it prints nothing and the status code is 0.
+
+
+```
+$ npx lock-verify /path/to/my/project
+$
+```
+
+## OR AS A LIBRARY
+
+```
+const lockVerify = require('lock-verify')
+lockVerify(moduleDir).then(result => {
+ result.warnings.forEach(w => console.error('Warning:', w))
+ if (!result.status) {
+ result.errors.forEach(e => console.error(e))
+ process.exit(1)
+ }
+})
+```
+
+As a library it's a function that takes the path to a module and returns a
+promise that resolves to an object with `.status`, `.warnings` and `.errors`
+properties. The first will be true if everything was ok (though warnings
+may exist). If there's no `package.json` or no lockfile in `moduleDir` or they're
+unreadable then the promise will be rejected.
diff --git a/deps/npm/node_modules/libcipm/node_modules/lock-verify/index.js b/deps/npm/node_modules/libcipm/node_modules/lock-verify/index.js
new file mode 100644
index 0000000000..2272132913
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/index.js
@@ -0,0 +1,73 @@
+'use strict'
+module.exports = lockVerify
+
+const fs = require('fs')
+const path = require('path')
+const npa = require('npm-package-arg')
+const semver = require('semver')
+
+function lockVerify(check) {
+ if (!check) check = '.'
+
+ const pjson = readJson(`${check}/package.json`)
+ let plock = readJson(`${check}/npm-shrinkwrap.json`)
+ .catch(() => readJson(`${check}/package-lock.json`))
+
+ return Promise.all([pjson, plock]).then(result => {
+ const pjson = result[0]
+ const plock = result[1]
+ let warnings = []
+ let errors = []
+ for (let type of [['dependencies'], ['devDependencies'], ['optionalDependencies', true]]) {
+ const deps = pjson[type[0]]
+ if (!deps) continue
+ const isOptional = type[1]
+ Object.keys(deps).forEach(name => {
+ const spec = npa.resolve(name, deps[name])
+ const lock = plock.dependencies[name]
+ if (!lock) {
+ if (isOptional) {
+ warnings.push('Optional missing: ' + name + '@' + deps[name])
+ } else {
+ errors.push('Missing: ' + name + '@' + deps[name])
+ }
+ return
+ }
+ if (spec.registry) {
+ // Can't match tags to package-lock w/o network
+ if (spec.type === 'tag') return
+ if (!semver.satisfies(lock.version, spec.fetchSpec)) {
+ errors.push("Invalid: lock file's " + name + '@' + lock.version + ' does not satisfy ' + name + '@' + spec.fetchSpec)
+ return
+ }
+ } else if (spec.type === 'git') {
+ // can't verify git w/o network
+ return
+ } else if (spec.type === 'remote') {
+ if (lock.version !== spec.fetchSpec) {
+ errors.push("Invalid: lock file's " + name + '@' + lock.version + ' does not satisfy ' + name + '@' + spec.fetchSpec)
+ return
+ }
+ } else if (spec.type === 'file' || spec.type === 'directory') {
+ const lockSpec = npa.resolve(name, lock.version)
+ if (spec.fetchSpec !== lockSpec.fetchSpec) {
+ errors.push("Invalid: lock file's " + name + '@' + lock.version + ' does not satisfy ' + name + '@' + deps[name])
+ return
+ }
+ } else {
+ console.log(spec)
+ }
+ })
+ }
+ return Promise.resolve({status: errors.length === 0, warnings: warnings, errors: errors})
+ })
+}
+
+function readJson (file) {
+ return new Promise((resolve, reject) => {
+ fs.readFile(file, (err, content) => {
+ if (err) return reject(err)
+ return resolve(JSON.parse(content))
+ })
+ })
+}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/LICENSE
index 05eeeb88c2..05eeeb88c2 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/LICENSE
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/LICENSE
diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/README.md
index d45032dc74..d45032dc74 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/README.md
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/README.md
diff --git a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/npa.js
index a61c057429..a61c057429 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/npm-package-arg/npa.js
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/npa.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/package.json
index 550a575a9f..8e046f0813 100644
--- a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/package.json
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/node_modules/npm-package-arg/package.json
@@ -3,7 +3,7 @@
"_id": "npm-package-arg@5.1.2",
"_inBundle": false,
"_integrity": "sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA==",
- "_location": "/libnpx/npm-package-arg",
+ "_location": "/libcipm/lock-verify/npm-package-arg",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "^5.1.2"
},
"_requiredBy": [
- "/libnpx"
+ "/libcipm/lock-verify"
],
"_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.2.tgz",
"_shasum": "fb18d17bb61e60900d6312619919bd753755ab37",
"_spec": "npm-package-arg@^5.1.2",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm/node_modules/lock-verify",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/deps/npm/node_modules/libcipm/node_modules/lock-verify/package.json b/deps/npm/node_modules/libcipm/node_modules/lock-verify/package.json
new file mode 100644
index 0000000000..ee25a30710
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/lock-verify/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "lock-verify@^2.0.0",
+ "_id": "lock-verify@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-ZK+fx1rQBBvyRp12tPgKaMrKlxv+72hO+QCAvdW8BGwKx/Jn3wVD7GooG2ftF80W29hfj+R1o0tTI8m6/pl1Mw==",
+ "_location": "/libcipm/lock-verify",
+ "_phantomChildren": {
+ "hosted-git-info": "2.5.0",
+ "osenv": "0.1.4",
+ "semver": "5.4.1",
+ "validate-npm-package-name": "3.0.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lock-verify@^2.0.0",
+ "name": "lock-verify",
+ "escapedName": "lock-verify",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/libcipm"
+ ],
+ "_resolved": "https://registry.npmjs.org/lock-verify/-/lock-verify-2.0.0.tgz",
+ "_shasum": "0c957bd542aeae19272408b066b0cad819410452",
+ "_spec": "lock-verify@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm",
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org",
+ "url": "http://re-becca.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/iarna/lock-verify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "npm-package-arg": "^5.1.2",
+ "semver": "^5.4.1"
+ },
+ "deprecated": false,
+ "description": "Report if your package.json is out of sync with your package-lock.json.",
+ "devDependencies": {
+ "@iarna/cli": "^1.2.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/iarna/lock-verify#readme",
+ "keywords": [],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "lock-verify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/iarna/lock-verify.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.0.0"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/CHANGELOG.md b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/CHANGELOG.md
new file mode 100644
index 0000000000..1a9b371161
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/CHANGELOG.md
@@ -0,0 +1,46 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="1.2.1"></a>
+## [1.2.1](https://github.com/npm/logical-tree/compare/v1.2.0...v1.2.1) (2018-01-19)
+
+
+### Bug Fixes
+
+* **requires:** stop requiring version match -- only what require would pick up ([6388fbd](https://github.com/npm/logical-tree/commit/6388fbd))
+
+
+
+<a name="1.2.0"></a>
+# [1.2.0](https://github.com/npm/logical-tree/compare/v1.1.0...v1.2.0) (2017-10-13)
+
+
+### Bug Fixes
+
+* **json:** fix repository url ([e51448a](https://github.com/npm/logical-tree/commit/e51448a))
+
+
+### Features
+
+* **api:** additional utility functions for dealing with trees ([23f6e69](https://github.com/npm/logical-tree/commit/23f6e69))
+
+
+
+<a name="1.1.0"></a>
+# [1.1.0](https://github.com/npm/npm-logical-tree/compare/v1.0.0...v1.1.0) (2017-10-11)
+
+
+### Features
+
+* **requiredBy:** add requiredBy field to nodes ([c4056fb](https://github.com/npm/npm-logical-tree/commit/c4056fb))
+
+
+
+<a name="1.0.0"></a>
+# 1.0.0 (2017-10-07)
+
+
+### Features
+
+* **api:** Initial Commitā„¢ ([1025259](https://github.com/npm/npm-logical-tree/commit/1025259))
diff --git a/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/LICENSE.md
index 8d28acf866..8d28acf866 100644
--- a/deps/npm/node_modules/cacache/node_modules/ssri/LICENSE.md
+++ b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/LICENSE.md
diff --git a/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/README.md b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/README.md
new file mode 100644
index 0000000000..33260d9f2a
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/README.md
@@ -0,0 +1,147 @@
+# npm-logical-tree [![npm version](https://img.shields.io/npm/v/npm-logical-tree.svg)](https://npm.im/npm-logical-tree) [![license](https://img.shields.io/npm/l/npm-logical-tree.svg)](https://npm.im/npm-logical-tree) [![Travis](https://img.shields.io/travis/npm/logical-tree.svg)](https://travis-ci.org/npm/logical-tree) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/logical-tree?svg=true)](https://ci.appveyor.com/project/npm/logical-tree) [![Coverage Status](https://coveralls.io/repos/github/npm/logical-tree/badge.svg?branch=latest)](https://coveralls.io/github/npm/logical-tree?branch=latest)
+
+[`npm-logical-tree`](https://github.com/npm/npm-logical-tree) is a Node.js
+library that takes the contents of a `package.json` and `package-lock.json` (or
+`npm-shrinkwrap.json`) and returns a nested tree data structure representing the
+logical relationships between the different dependencies.
+
+## Install
+
+`$ npm install npm-logical-tree`
+
+## Table of Contents
+
+* [Example](#example)
+* [Contributing](#contributing)
+* [API](#api)
+ * [`logicalTree`](#logical-tree)
+ * [`logicalTree.node`](#make-node)
+ * [`tree.isRoot`](#is-root)
+ * [`tree.addDep`](#add-dep)
+ * [`tree.delDep`](#del-dep)
+ * [`tree.getDep`](#get-dep)
+ * [`tree.path`](#path)
+ * [`tree.hasCycle`](#has-cycle)
+ * [`tree.forEach`](#for-each)
+ * [`tree.forEachAsync`](#for-each-async)
+
+### Example
+
+```javascript
+const fs = require('fs')
+const logicalTree = require('npm-logical-tree')
+
+const pkg = require('./package.json')
+const pkgLock = require('./package-lock.json')
+
+logicalTree(pkg, pkgLock)
+// returns:
+LogicalTree {
+ name: 'npm-logical-tree',
+ version: '1.0.0',
+ address: null,
+ optional: false,
+ dev: false,
+ bundled: false,
+ resolved: undefined,
+ integrity: undefined,
+ requiredBy: Set { },
+ dependencies:
+ Map {
+ 'foo' => LogicalTree {
+ name: 'foo',
+ version: '1.2.3',
+ address: 'foo',
+ optional: false,
+ dev: true,
+ bundled: false,
+ resolved: 'https://registry.npmjs.org/foo/-/foo-1.2.3.tgz',
+ integrity: 'sha1-rYUK/p261/SXByi0suR/7Rw4chw=',
+ dependencies: Map { ... },
+ requiredBy: Set { ... },
+ },
+ ...
+ }
+}
+```
+
+### Contributing
+
+The npm team enthusiastically welcomes contributions and project participation!
+There's a bunch of things you can do if you want to contribute! The [Contributor
+Guide](CONTRIBUTING.md) has all the information you need for everything from
+reporting bugs to contributing entire new features. Please don't hesitate to
+jump in if you'd like to, or even ask us questions if something isn't clear.
+
+All participants and maintainers in this project are expected to follow [Code of
+Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
+
+Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
+
+Happy hacking!
+
+### API
+
+#### <a name="logical-tree"></a> `> logicalTree(pkg, lock) -> LogicalTree`
+
+Calculates a logical tree based on a matching `package.json` and
+`package-lock.json` pair. A "logical tree" is a fully-nested dependency graph
+for an npm package, as opposed to a physical tree which might be flattened.
+
+`logical-tree` will represent deduplicated/flattened nodes using the same object
+throughout the tree, so duplication can be checked by object identity.
+
+##### Example
+
+```javascript
+const pkg = require('./package.json')
+const pkgLock = require('./package-lock.json')
+
+logicalTree(pkg, pkgLock)
+// returns:
+LogicalTree {
+ name: 'npm-logical-tree',
+ version: '1.0.0',
+ address: null,
+ optional: false,
+ dev: false,
+ bundled: false,
+ resolved: undefined,
+ integrity: undefined,
+ requiredBy: Set { },
+ dependencies:
+ Map {
+ 'foo' => LogicalTree {
+ name: 'foo',
+ version: '1.2.3',
+ address: 'foo',
+ optional: false,
+ dev: true,
+ bundled: false,
+ resolved: 'https://registry.npmjs.org/foo/-/foo-1.2.3.tgz',
+ integrity: 'sha1-rYUK/p261/SXByi0suR/7Rw4chw=',
+ requiredBy: Set { ... },
+ dependencies: Map { ... }
+ },
+ ...
+ }
+}
+```
+
+#### <a name="make-node"></a> `> logicalTree.node(name, [address, [opts]]) -> LogicalTree`
+
+Manually creates a new LogicalTree node.
+
+##### Options
+
+* `opts.version` - version of the node.
+* `opts.optional` - is this node an optionalDep?
+* `opts.dev` - is this node a devDep?
+* `opts.bundled` - is this bundled?
+* `opts.resolved` - resolved address.
+* `opts.integrity` - SRI string.
+
+##### Example
+```javascript
+logicalTree.node('hello', 'subpath:to:@foo/bar', {dev: true})
+```
diff --git a/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/index.js b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/index.js
new file mode 100644
index 0000000000..10ab7599f6
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/index.js
@@ -0,0 +1,192 @@
+'use strict'
+
+let path
+
+class LogicalTree {
+ constructor (name, address, opts) {
+ this.name = name
+ this.version = opts.version
+ this.address = address || ''
+ this.optional = !!opts.optional
+ this.dev = !!opts.dev
+ this.bundled = !!opts.bundled
+ this.resolved = opts.resolved
+ this.integrity = opts.integrity
+ this.dependencies = new Map()
+ this.requiredBy = new Set()
+ }
+
+ get isRoot () { return !this.requiredBy.size }
+
+ addDep (dep) {
+ this.dependencies.set(dep.name, dep)
+ dep.requiredBy.add(this)
+ return this
+ }
+
+ delDep (dep) {
+ this.dependencies.delete(dep.name)
+ dep.requiredBy.delete(this)
+ return this
+ }
+
+ getDep (name) {
+ return this.dependencies.get(name)
+ }
+
+ path (prefix) {
+ if (this.isRoot) {
+ // The address of the root is the prefix itself.
+ return prefix || ''
+ } else {
+ if (!path) { path = require('path') }
+ return path.join(
+ prefix || '',
+ 'node_modules',
+ this.address.replace(/:/g, '/node_modules/')
+ )
+ }
+ }
+
+ // This finds cycles _from_ a given node: if some deeper dep has
+ // its own cycle, but that cycle does not refer to this node,
+ // it will return false.
+ hasCycle (_seen, _from) {
+ if (!_seen) { _seen = new Set() }
+ if (!_from) { _from = this }
+ for (let dep of this.dependencies.values()) {
+ if (_seen.has(dep)) { continue }
+ _seen.add(dep)
+ if (dep === _from || dep.hasCycle(_seen, _from)) {
+ return true
+ }
+ }
+ return false
+ }
+
+ forEachAsync (fn, opts, _pending) {
+ if (!opts) { opts = _pending || {} }
+ if (!_pending) { _pending = new Map() }
+ const P = opts.Promise || Promise
+ if (_pending.has(this)) {
+ return P.resolve(this.hasCycle() || _pending.get(this))
+ }
+ const pending = P.resolve().then(() => {
+ return fn(this, () => {
+ return promiseMap(
+ this.dependencies.values(),
+ dep => dep.forEachAsync(fn, opts, _pending),
+ opts
+ )
+ })
+ })
+ _pending.set(this, pending)
+ return pending
+ }
+
+ forEach (fn, _seen) {
+ if (!_seen) { _seen = new Set() }
+ if (_seen.has(this)) { return }
+ _seen.add(this)
+ fn(this, () => {
+ for (let dep of this.dependencies.values()) {
+ dep.forEach(fn, _seen)
+ }
+ })
+ }
+}
+
+module.exports = lockTree
+function lockTree (pkg, pkgLock, opts) {
+ const tree = makeNode(pkg.name, null, pkg)
+ const allDeps = new Map()
+ Array.from(
+ new Set(Object.keys(pkg.devDependencies || {})
+ .concat(Object.keys(pkg.optionalDependencies || {}))
+ .concat(Object.keys(pkg.dependencies || {})))
+ ).forEach(name => {
+ let dep = allDeps.get(name)
+ if (!dep) {
+ const depNode = (pkgLock.dependencies || {})[name]
+ dep = makeNode(name, name, depNode)
+ }
+ addChild(dep, tree, allDeps, pkgLock)
+ })
+ return tree
+}
+
+module.exports.node = makeNode
+function makeNode (name, address, opts) {
+ return new LogicalTree(name, address, opts || {})
+}
+
+function addChild (dep, tree, allDeps, pkgLock) {
+ tree.addDep(dep)
+ allDeps.set(dep.address, dep)
+ const addr = dep.address
+ const lockNode = atAddr(pkgLock, addr)
+ Object.keys(lockNode.requires || {}).forEach(name => {
+ const tdepAddr = reqAddr(pkgLock, name, addr)
+ let tdep = allDeps.get(tdepAddr)
+ if (!tdep) {
+ tdep = makeNode(name, tdepAddr, atAddr(pkgLock, tdepAddr))
+ addChild(tdep, dep, allDeps, pkgLock)
+ } else {
+ dep.addDep(tdep)
+ }
+ })
+}
+
+module.exports._reqAddr = reqAddr
+function reqAddr (pkgLock, name, fromAddr) {
+ const lockNode = atAddr(pkgLock, fromAddr)
+ const child = (lockNode.dependencies || {})[name]
+ if (child) {
+ return `${fromAddr}:${name}`
+ } else {
+ const parts = fromAddr.split(':')
+ while (parts.length) {
+ parts.pop()
+ const joined = parts.join(':')
+ const parent = atAddr(pkgLock, joined)
+ if (parent) {
+ const child = (parent.dependencies || {})[name]
+ if (child) {
+ return `${joined}${parts.length ? ':' : ''}${name}`
+ }
+ }
+ }
+ const err = new Error(`${name} not accessible from ${fromAddr}`)
+ err.pkgLock = pkgLock
+ err.target = name
+ err.from = fromAddr
+ throw err
+ }
+}
+
+module.exports._atAddr = atAddr
+function atAddr (pkgLock, addr) {
+ if (!addr.length) { return pkgLock }
+ const parts = addr.split(':')
+ return parts.reduce((acc, next) => {
+ return acc && (acc.dependencies || {})[next]
+ }, pkgLock)
+}
+
+function promiseMap (arr, fn, opts, _index) {
+ _index = _index || 0
+ const P = (opts && opts.Promise) || Promise
+ if (P.map) {
+ return P.map(arr, fn, opts)
+ } else {
+ if (!(arr instanceof Array)) {
+ arr = Array.from(arr)
+ }
+ if (_index >= arr.length) {
+ return P.resolve()
+ } else {
+ return P.resolve(fn(arr[_index], _index, arr))
+ .then(() => promiseMap(arr, fn, opts, _index + 1))
+ }
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/package.json b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/package.json
new file mode 100644
index 0000000000..b423a762c4
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/npm-logical-tree/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "npm-logical-tree@^1.2.1",
+ "_id": "npm-logical-tree@1.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==",
+ "_location": "/libcipm/npm-logical-tree",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "npm-logical-tree@^1.2.1",
+ "name": "npm-logical-tree",
+ "escapedName": "npm-logical-tree",
+ "rawSpec": "^1.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.1"
+ },
+ "_requiredBy": [
+ "/libcipm"
+ ],
+ "_resolved": "https://registry.npmjs.org/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz",
+ "_shasum": "44610141ca24664cad35d1e607176193fd8f5b88",
+ "_spec": "npm-logical-tree@^1.2.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm",
+ "author": {
+ "name": "Kat MarchƔn",
+ "email": "kzm@sykosomatic.org"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/logical-tree/issues"
+ },
+ "bundleDependencies": false,
+ "config": {
+ "nyc": {
+ "exclude": [
+ "node_modules/**",
+ "test/**"
+ ]
+ }
+ },
+ "contributors": [
+ {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "deprecated": false,
+ "description": "Calculate 'logical' trees from a package.json + package-lock",
+ "devDependencies": {
+ "bluebird": "^3.5.1",
+ "nyc": "^11.1.0",
+ "standard": "^10.0.2",
+ "standard-version": "^4.2.0",
+ "tap": "^10.7.0",
+ "weallbehave": "^1.2.0",
+ "weallcontribute": "^1.0.8"
+ },
+ "files": [
+ "*.js"
+ ],
+ "homepage": "https://github.com/npm/logical-tree#readme",
+ "keywords": [
+ "npm",
+ "package manager"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "npm-logical-tree",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/logical-tree.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard lib test *.js",
+ "release": "standard-version -s",
+ "test": "nyc --all -- tap -J test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.2.1"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/CHANGELOG.md b/deps/npm/node_modules/libcipm/node_modules/protoduck/CHANGELOG.md
new file mode 100644
index 0000000000..dd7669aa13
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/CHANGELOG.md
@@ -0,0 +1,55 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="5.0.0"></a>
+# [5.0.0](https://github.com/zkat/protoduck/compare/v4.0.0...v5.0.0) (2017-12-12)
+
+
+### Bug Fixes
+
+* **license:** relicense to MIT ([55cdd89](https://github.com/zkat/protoduck/commit/55cdd89))
+* **platforms:** drop support for node 4 and 7 ([07a19b1](https://github.com/zkat/protoduck/commit/07a19b1))
+
+
+### BREAKING CHANGES
+
+* **platforms:** node 4 and node 7 are no longer officially supported
+* **license:** license changed from CC0-1.0 to MIT
+
+
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/zkat/protoduck/compare/v3.3.2...v4.0.0) (2017-04-17)
+
+
+### Bug Fixes
+
+* **test:** .name is inconsistently available ([3483f4a](https://github.com/zkat/protoduck/commit/3483f4a))
+
+
+### Features
+
+* **api:** Fresh New APIā„¢ ([#2](https://github.com/zkat/protoduck/issues/2)) ([534e5cf](https://github.com/zkat/protoduck/commit/534e5cf))
+* **constraints:** added optional where-constraints ([16ad124](https://github.com/zkat/protoduck/commit/16ad124))
+* **defaults:** allow default impls without arrays in defs ([6cf7d84](https://github.com/zkat/protoduck/commit/6cf7d84))
+* **deps:** use genfun[@4](https://github.com/4) ([f6810a7](https://github.com/zkat/protoduck/commit/f6810a7))
+* **meta:** bringing project stuff up to date ([61791da](https://github.com/zkat/protoduck/commit/61791da))
+
+
+### BREAKING CHANGES
+
+* **api:** The API was significantly overhauled.
+
+* New protocol creating is now through protoduck.define() instead of protoduck()
+* Implementations are through Duck#impl instead of Duck(...)
+* The `private` option was removed
+* Static protocols were removed -- only method-style protocols are available now.
+* As part of that: the target argument to impl can no longer be omitted
+* The main export object is now the metaobject. protoduck.impl can be used to extend to MOP
+* .isDerivable is now a property on Duck instances, not a static method
+* .hasImpl is now a method on Duck instances, not a static method
+* Protoduck will now genfunnify existing functions as default methods for genfuns declared in a protocol when implementing
+* Error messages have been overhauled to be more helpful
+* **deps:** nextMethod is now an extra argument to methods
+* **meta:** node@<4 is no longer supported
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/LICENSE b/deps/npm/node_modules/libcipm/node_modules/protoduck/LICENSE
new file mode 100644
index 0000000000..1e0a1d6f8d
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+Copyright (c) 2017 Kat MarchƔn
+
+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/libcipm/node_modules/protoduck/README.md b/deps/npm/node_modules/libcipm/node_modules/protoduck/README.md
new file mode 100644
index 0000000000..2dc70a3071
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/README.md
@@ -0,0 +1,346 @@
+# protoduck [![npm version](https://img.shields.io/npm/v/protoduck.svg)](https://npm.im/protoduck) [![license](https://img.shields.io/npm/l/protoduck.svg)](https://npm.im/protoduck) [![Travis](https://img.shields.io/travis/zkat/protoduck.svg)](https://travis-ci.org/zkat/protoduck) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/protoduck?svg=true)](https://ci.appveyor.com/project/zkat/protoduck) [![Coverage Status](https://coveralls.io/repos/github/zkat/protoduck/badge.svg?branch=latest)](https://coveralls.io/github/zkat/protoduck?branch=latest)
+
+[`protoduck`](https://github.com/zkat/protoduck) is a JavaScript library is a
+library for making groups of methods, called "protocols".
+
+If you're familiar with the concept of ["duck
+typing"](https://en.wikipedia.org/wiki/Duck_typing), then it might make sense to
+think of protocols as things that explicitly define what methods you need in
+order to "clearly be a duck".
+
+## Install
+
+`$ npm install -S protoduck`
+
+## Table of Contents
+
+* [Example](#example)
+* [Features](#features)
+* [Guide](#guide)
+ * [Introduction](#introduction)
+ * [Defining protocols](#defining-protocols)
+ * [Implementations](#protocol-impls)
+ * [Multiple dispatch](#multiple-dispatch)
+ * [Constraints](#constraints)
+* [API](#api)
+ * [`define()`](#define)
+ * [`proto.impl()`](#impl)
+
+### Example
+
+```javascript
+const protoduck = require('protoduck')
+
+// Quackable is a protocol that defines three methods
+const Quackable = protoduck.define({
+ walk: [],
+ talk: [],
+ isADuck: [() => true] // default implementation -- it's optional!
+})
+
+// `duck` must implement `Quackable` for this function to work. It doesn't
+// matter what type or class duck is, as long as it implements Quackable.
+function doStuffToDucks (duck) {
+ if (!duck.isADuck()) {
+ throw new Error('I want a duck!')
+ } else {
+ console.log(duck.walk())
+ console.log(duck.talk())
+ }
+}
+
+// ...In a different package:
+const ducks = require('./ducks')
+
+class Duck () {}
+
+// Implement the protocol on the Duck class.
+ducks.Quackable.impl(Duck, {
+ walk () { return "*hobble hobble*" }
+ talk () { return "QUACK QUACK" }
+})
+
+// main.js
+ducks.doStuffToDucks(new Duck()) // works!
+```
+
+### Features
+
+* Verifies implementations in case methods are missing or wrong ones added
+* Helpful, informative error messages
+* Optional default method implementations
+* Fresh JavaScript Feelā„¢ -- methods work just like native methods when called
+* Methods can dispatch on arguments, not just `this` ([multimethods](https://npm.im/genfun))
+* Type constraints
+
+### Guide
+
+#### Introduction
+
+Like most Object-oriented languages, JavaScript comes with its own way of
+defining methods: You simply add regular `function`s as properties to regular
+objects, and when you do `obj.method()`, it calls the right code! ES6/ES2015
+further extended this by adding a `class` syntax that allowed this same system
+to work with more familiar syntax sugar: `class Foo { method() { ... } }`.
+
+The point of "protocols" is to have a more explicit definitions of what methods
+"go together". That is, a protocol is a description of a type of object your
+code interacts with. If someone passes an object into your library, and it fits
+your defined protocol, the assumption is that the object will work just as well.
+
+Duck typing is a common term for this sort of thing: If it walks like a duck,
+and it talks like a duck, then it may as well be a duck, as far as any of our
+code is concerned.
+
+Many other languages have similar or identical concepts under different names:
+Java's interfaces, Haskell's typeclasses, Rust's traits. Elixir and Clojure both
+call them "protocols" as well.
+
+One big advantage to using these protocols is that they let users define their
+own versions of some abstraction, without requiring the type to inherit from
+another -- protocols are independent of inheritance, even though they're able to
+work together with it. If you've ever found yourself in some sort of inheritance
+mess, this is exactly the sort of thing you use to escape it.
+
+#### Defining Protocols
+
+The first step to using `protoduck` is to define a protocol. Protocol
+definitions look like this:
+
+```javascript
+// import the library first!
+const protoduck = require('protoduck')
+
+// `Ducklike` is the name of our protocol. It defines what it means for
+// something to be "like a duck", as far as our code is concerned.
+const Ducklike = protoduck.define([], {
+ walk: [], // This says that the protocol requires a "walk" method.
+ talk: [] // and ducks also need to talk
+ peck: [] // and they can even be pretty scary
+})
+```
+
+Protocols by themselves don't really *do* anything, they simply define what
+methods are included in the protocol, and thus what will need to be implemented.
+
+#### Protocol Impls
+
+The simplest type of definitions for protocols are as regular methods. In this
+style, protocols end up working exactly like normal JavaScript methods: they're
+added as properties of the target type/object, and we call them using the
+`foo.method()` syntax. `this` is accessible inside the methods, as usual.
+
+Implementation syntax is very similar to protocol definitions, using `.impl`:
+
+```javascript
+class Dog {}
+
+// Implementing `Ducklike` for `Dog`s
+Ducklike.impl(Dog, [], {
+ walk () { return '*pads on all fours*' }
+ talk () { return 'woof woof. I mean "quack" >_>' }
+ peck (victim) { return 'Can I just bite ' + victim + ' instead?...' }
+})
+```
+
+So now, our `Dog` class has two extra methods: `walk`, and `talk`, and we can
+just call them:
+
+```javascript
+const pupper = new Dog()
+
+pupper.walk() // *pads on all fours*
+pupper.talk() // woof woof. I mean "quack" >_>
+pupper.peck('this string') // Can I just bite this string instead?...
+```
+
+#### Multiple Dispatch
+
+You may have noticed before that we have these `[]` in various places that don't
+seem to have any obvious purpose.
+
+These arrays allow protocols to be implemented not just for a single value of
+`this`, but across *all arguments*. That is, you can have methods in these
+protocols that use both `this`, and the first argument (or any other arguments)
+in order to determine what code to actually execute.
+
+This type of method is called a multimethod, and is one of the differences
+between protoduck and the default `class` syntax.
+
+To use it: in the protocol *definitions*, you put matching
+strings in different spots where those empty arrays were, and when you
+*implement* the protocol, you give the definition the actual types/objects you
+want to implement it on, and it takes care of mapping types to the strings you
+defined, and making sure the right code is run:
+
+```javascript
+const Playful = protoduck.define(['friend'], {// <---\
+ playWith: ['friend'] // <------------ these correspond to each other
+})
+
+class Cat {}
+class Human {}
+class Dog {}
+
+// The first protocol is for Cat/Human combination
+Playful.impl(Cat, [Human], {
+ playWith (human) {
+ return '*headbutt* *purr* *cuddle* omg ilu, ' + human.name
+ }
+})
+
+// And we define it *again* for a different combination
+Playful.impl(Cat, [Dog], {
+ playWith (dog) {
+ return '*scratches* *hisses* omg i h8 u, ' + dog.name
+ }
+})
+
+// depending on what you call it with, it runs different methods:
+const cat = new Cat()
+const human = new Human()
+const dog = new Dog()
+
+cat.playWith(human) // *headbutt* *purr* *cuddle* omg ilu, Sam
+cat.playWith(dog) // *scratches* *hisses* omg i h8 u, Pupper
+```
+
+#### Constraints
+
+Sometimes, you want to have all the functionality of a certain protocol, but you
+want to add a few requirements or other bits an pieces. Usually, you would have
+to define the entire functionality of the "parent" protocol in your own protocol
+in order to pull this off. This isn't very DRY and thus prone to errors, missing
+or out-of-sync functionality, or other issues. You could also just tell users
+"hey, if you implement this, make sure to implement that", but there's no
+guarantee they'll know about it, or know which arguments map to what.
+
+This is where constraints come in: You can define a protocol that expects
+anything that implements it to *also* implement one or more "parent" protocols.
+
+```javascript
+const Show = proto.define({
+ // This syntax allows default impls without using arrays.
+ toString () {
+ return Object.prototype.toString.call(this)
+ },
+ toJSON () {
+ return JSON.stringify(this)
+ }
+})
+
+const Log = proto.define({
+ log () { console.log(this.toString()) }
+}, {
+ where: Show()
+ // Also valid:
+ // [Show('this'), Show('a')]
+ // [Show('this', ['a', 'b'])]
+})
+
+// This fails with an error: must implement Show:
+Log.impl(MyThing)
+
+// So derive Show first...
+Show.impl(MyThing)
+// And now it's ok!
+Log.impl(MyThing)
+```
+
+### API
+
+#### <a name="define"></a> `define(<types>?, <spec>, <opts>)`
+
+Defines a new protocol on across arguments of types defined by `<types>`, which
+will expect implementations for the functions specified in `<spec>`.
+
+If `<types>` is missing, it will be treated the same as if it were an empty
+array.
+
+The types in `<spec>` entries must map, by string name, to the type names
+specified in `<types>`, or be an empty array if `<types>` is omitted. The types
+in `<spec>` will then be used to map between method implementations for the
+individual functions, and the provided types in the impl.
+
+Protocols can include an `opts` object as the last argument, with the following
+available options:
+
+* `opts.name` `{String}` - The name to use when referring to the protocol.
+
+* `opts.where` `{Array[Constraint]|Constraint}` - Protocol constraints to use.
+
+* `opts.metaobject` - Accepts an object implementing the
+ `Protoduck` protocol, which can be used to alter protocol definition
+ mechanisms in `protoduck`.
+
+##### Example
+
+```javascript
+const Eq = protoduck.define(['a'], {
+ eq: ['a']
+})
+```
+
+#### <a name="impl"></a> `proto.impl(<target>, <types>?, <implementations>?)`
+
+Adds a new implementation to the given protocol across `<types>`.
+
+`<implementations>` must be an object with functions matching the protocol's
+API. If given, the types in `<types>` will be mapped to their corresponding
+method arguments according to the original protocol definition.
+
+If a protocol is derivable -- that is, all its functions have default impls,
+then the `<implementations>` object can be omitted entirely, and the protocol
+will be automatically derived for the given `<types>`
+
+##### Example
+
+```javascript
+import protoduck from 'protoduck'
+
+// Singly-dispatched protocols
+const Show = protoduck.define({
+ show: []
+})
+
+class Foo {
+ constructor (name) {
+ this.name = name
+ }
+}
+
+Show.impl(Foo, {
+ show () { return `[object Foo(${this.name})]` }
+})
+
+const f = new Foo('alex')
+f.show() === '[object Foo(alex)]'
+```
+
+```javascript
+import protoduck from 'protoduck'
+
+// Multi-dispatched protocols
+const Comparable = protoduck.define(['target'], {
+ compare: ['target'],
+})
+
+class Foo {}
+class Bar {}
+class Baz {}
+
+Comparable.impl(Foo, [Bar], {
+ compare (bar) { return 'bars are ok' }
+})
+
+Comparable.impl(Foo, [Baz], {
+ compare (baz) { return 'but bazzes are better' }
+})
+
+const foo = new Foo()
+const bar = new Bar()
+const baz = new Baz()
+
+foo.compare(bar) // 'bars are ok'
+foo.compare(baz) // 'but bazzes are better'
+```
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/index.js b/deps/npm/node_modules/libcipm/node_modules/protoduck/index.js
new file mode 100644
index 0000000000..3596bb3299
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/index.js
@@ -0,0 +1,349 @@
+'use strict'
+
+const genfun = require('genfun')
+
+class Duck extends Function {
+ // Duck.impl(Foo, [String, Array], { frob (str, arr) { ... }})
+ impl (target, types, impls) {
+ if (!impls && !isArray(types)) {
+ impls = types
+ types = []
+ }
+ if (!impls && this.isDerivable) {
+ impls = this._defaultImpls
+ }
+ if (!impls) {
+ impls = {}
+ }
+ if (typeof target === 'function' && !target.isGenfun) {
+ target = target.prototype
+ }
+ checkImpls(this, target, impls)
+ checkArgTypes(this, types)
+ this._constraints.forEach(c => {
+ if (!c.verify(target, types)) {
+ throw new Error(`Implementations of ${
+ this.name || 'this protocol'
+ } must first implement ${
+ c.parent.name || 'its constraint protocols defined in opts.where.'
+ }`)
+ }
+ })
+ this._methodNames.forEach(name => {
+ defineMethod(this, name, target, types, impls)
+ })
+ }
+
+ hasImpl (arg, args) {
+ args = args || []
+ const fns = this._methodNames
+ var gf
+ if (typeof arg === 'function' && !arg.isGenfun) {
+ arg = arg.prototype
+ }
+ args = args.map(arg => {
+ if (typeof arg === 'function' && !arg.isGenfun) {
+ return arg.prototype
+ } else {
+ return arg
+ }
+ })
+ for (var i = 0; i < fns.length; i++) {
+ gf = arg[fns[i]]
+ if (!gf ||
+ (gf.hasMethod
+ ? !gf.hasMethod.apply(gf, args)
+ : typeof gf === 'function')) {
+ return false
+ }
+ }
+ return true
+ }
+
+ // MyDuck.matches('a', ['this', 'c'])
+ matches (thisType, argTypes) {
+ if (!argTypes && isArray(thisType)) {
+ argTypes = thisType
+ thisType = 'this'
+ }
+ if (!thisType) {
+ thisType = 'this'
+ }
+ if (!argTypes) {
+ argTypes = []
+ }
+ return new Constraint(this, thisType, argTypes)
+ }
+}
+Duck.prototype.isDuck = true
+Duck.prototype.isProtocol = true
+
+const Protoduck = module.exports = define(['duck'], {
+ createGenfun: ['duck', _metaCreateGenfun],
+ addMethod: ['duck', _metaAddMethod]
+}, {name: 'Protoduck'})
+
+const noImplFound = module.exports.noImplFound = genfun.noApplicableMethod
+
+module.exports.define = define
+function define (types, spec, opts) {
+ if (!isArray(types)) {
+ // protocol(spec, opts?) syntax for method-based protocols
+ opts = spec
+ spec = types
+ types = []
+ }
+ const duck = function (thisType, argTypes) {
+ return duck.matches(thisType, argTypes)
+ }
+ Object.setPrototypeOf(duck, Duck.prototype)
+ duck.isDerivable = true
+ Object.defineProperty(duck, 'name', {
+ value: (opts && opts.name) || 'Protocol'
+ })
+ if (opts && opts.where) {
+ let where = opts.where
+ if (!isArray(opts.where)) { where = [opts.where] }
+ duck._constraints = where.map(w => w.isProtocol // `where: [Foo]`
+ ? w.matches()
+ : w
+ )
+ } else {
+ duck._constraints = []
+ }
+ duck.isProtocol = true
+ duck._metaobject = opts && opts.metaobject
+ duck._types = types
+ duck._defaultImpls = {}
+ duck._gfTypes = {}
+ duck._methodNames = Object.keys(spec)
+ duck._methodNames.forEach(name => {
+ checkMethodSpec(duck, name, spec)
+ })
+ duck._constraints.forEach(c => c.attach(duck))
+ return duck
+}
+
+function checkMethodSpec (duck, name, spec) {
+ let gfTypes = spec[name]
+ if (typeof gfTypes === 'function') {
+ duck._defaultImpls[name] = gfTypes
+ gfTypes = [gfTypes]
+ } if (typeof gfTypes[gfTypes.length - 1] === 'function') {
+ duck._defaultImpls[name] = gfTypes.pop()
+ } else {
+ duck.isDerivable = false
+ }
+ duck._gfTypes[name] = gfTypes.map(typeId => {
+ const idx = duck._types.indexOf(typeId)
+ if (idx === -1) {
+ throw new Error(
+ `type '${
+ typeId
+ }' for function '${
+ name
+ }' does not match any protocol types (${
+ duck._types.join(', ')
+ }).`
+ )
+ } else {
+ return idx
+ }
+ })
+}
+
+function defineMethod (duck, name, target, types, impls) {
+ const methodTypes = duck._gfTypes[name].map(function (typeIdx) {
+ return types[typeIdx]
+ })
+ for (let i = methodTypes.length - 1; i >= 0; i--) {
+ if (methodTypes[i] === undefined) {
+ methodTypes.pop()
+ } else {
+ break
+ }
+ }
+ const useMetaobject = duck._metaobject && duck._metaobject !== Protoduck
+ // `target` does not necessarily inherit from `Object`
+ if (!Object.prototype.hasOwnProperty.call(target, name)) {
+ // Make a genfun if there's nothing there
+ const gf = useMetaobject
+ ? duck._metaobject.createGenfun(duck, target, name, null)
+ : _metaCreateGenfun(duck, target, name, null)
+ target[name] = gf
+ } else if (typeof target[name] === 'function' && !target[name].isGenfun) {
+ // Turn non-gf functions into genfuns
+ const gf = useMetaobject
+ ? duck._metaobject.createGenfun(duck, target, name, target[name])
+ : _metaCreateGenfun(duck, target, name, target[name])
+ target[name] = gf
+ }
+
+ const fn = impls[name] || duck._defaultImpls[name]
+ if (fn) { // checkImpls made sure this is safe
+ useMetaobject
+ ? duck._metaobject.addMethod(duck, target, name, methodTypes, fn)
+ : _metaAddMethod(duck, target, name, methodTypes, fn)
+ }
+}
+
+function checkImpls (duck, target, impls) {
+ duck._methodNames.forEach(function (name) {
+ if (
+ !impls[name] &&
+ !duck._defaultImpls[name] &&
+ // Existing methods on the target are acceptable defaults.
+ typeof target[name] !== 'function'
+ ) {
+ throw new Error(`Missing implementation for ${
+ formatMethod(duck, name, duck.name)
+ }. Make sure the method is present in your ${
+ duck.name || 'protocol'
+ } definition. Required methods: ${
+ duck._methodNames.filter(m => {
+ return !duck._defaultImpls[m]
+ }).map(m => formatMethod(duck, m)).join(', ')
+ }.`)
+ }
+ })
+ Object.keys(impls).forEach(function (name) {
+ if (duck._methodNames.indexOf(name) === -1) {
+ throw new Error(
+ `${name}() was included in the impl, but is not part of ${
+ duck.name || 'the protocol'
+ }. Allowed methods: ${
+ duck._methodNames.map(m => formatMethod(duck, m)).join(', ')
+ }.`
+ )
+ }
+ })
+}
+
+function formatMethod (duck, name, withDuckName) {
+ return `${
+ withDuckName && duck.name ? `${duck.name}#` : ''
+ }${name}(${duck._gfTypes[name].map(n => duck._types[n]).join(', ')})`
+}
+
+function checkArgTypes (duck, types) {
+ var requiredTypes = duck._types
+ if (types.length > requiredTypes.length) {
+ throw new Error(
+ `${
+ duck.name || 'Protocol'
+ } expects to be defined across ${
+ requiredTypes.length
+ } type${requiredTypes.length > 1 ? 's' : ''}, but ${
+ types.length
+ } ${types.length > 1 ? 'were' : 'was'} specified.`
+ )
+ }
+}
+
+function typeName (obj) {
+ return (/\[object ([a-zA-Z0-9]+)\]/).exec(({}).toString.call(obj))[1]
+}
+
+function installMethodErrorMessage (proto, gf, target, name) {
+ noImplFound.add([gf], function (gf, thisArg, args) {
+ let parent = Object.getPrototypeOf(thisArg)
+ while (parent && parent[name] === gf) {
+ parent = Object.getPrototypeOf(parent)
+ }
+ if (parent && parent[name] && typeof parent[name] === 'function') {
+ }
+ var msg = `No ${typeName(thisArg)} impl for ${
+ proto.name ? `${proto.name}#` : ''
+ }${name}(${[].map.call(args, typeName).join(', ')}). You must implement ${
+ proto.name
+ ? formatMethod(proto, name, true)
+ : `the protocol ${formatMethod(proto, name)} belongs to`
+ } in order to call ${typeName(thisArg)}#${name}(${
+ [].map.call(args, typeName).join(', ')
+ }).`
+ const err = new Error(msg)
+ err.protocol = proto
+ err.function = gf
+ err.thisArg = thisArg
+ err.args = args
+ err.code = 'ENOIMPL'
+ throw err
+ })
+}
+
+function isArray (x) {
+ return Object.prototype.toString.call(x) === '[object Array]'
+}
+
+// Metaobject Protocol
+Protoduck.impl(Protoduck) // defaults configured by definition
+
+function _metaCreateGenfun (proto, target, name, deflt) {
+ var gf = genfun({
+ default: deflt,
+ name: `${proto.name ? `${proto.name}#` : ''}${name}`
+ })
+ installMethodErrorMessage(proto, gf, target, name)
+ gf.duck = proto
+ return gf
+}
+
+function _metaAddMethod (duck, target, name, methodTypes, fn) {
+ return target[name].add(methodTypes, fn)
+}
+
+// Constraints
+class Constraint {
+ constructor (parent, thisType, argTypes) {
+ this.parent = parent
+ this.target = thisType
+ this.types = argTypes
+ }
+
+ attach (obj) {
+ this.child = obj
+ if (this.target === 'this') {
+ this.thisIdx = 'this'
+ } else {
+ const idx = this.child._types.indexOf(this.target)
+ if (idx === -1) {
+ this.thisIdx = null
+ } else {
+ this.thisIdx = idx
+ }
+ }
+ this.indices = this.types.map(typeId => {
+ if (typeId === 'this') {
+ return 'this'
+ } else {
+ const idx = this.child._types.indexOf(typeId)
+ if (idx === -1) {
+ return null
+ } else {
+ return idx
+ }
+ }
+ })
+ }
+
+ verify (target, types) {
+ const thisType = (
+ this.thisIdx === 'this' || this.thisIdx == null
+ )
+ ? target
+ : types[this.thisIdx]
+ const parentTypes = this.indices.map(idx => {
+ if (idx === 'this') {
+ return target
+ } else if (idx === 'this') {
+ return types[this.thisIdx]
+ } else if (idx === null) {
+ return Object
+ } else {
+ return types[idx] || Object.prototype
+ }
+ })
+ return this.parent.hasImpl(thisType, parentTypes)
+ }
+}
+Constraint.prototype.isConstraint = true
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/CHANGELOG.md b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/CHANGELOG.md
new file mode 100644
index 0000000000..c72d719ea3
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/CHANGELOG.md
@@ -0,0 +1,36 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="4.0.1"></a>
+## [4.0.1](https://github.com/zkat/genfun/compare/v4.0.0...v4.0.1) (2017-04-16)
+
+
+### Bug Fixes
+
+* **cache:** stop side-effecting cached applicableMethods ([09cee84](https://github.com/zkat/genfun/commit/09cee84))
+
+
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/zkat/genfun/compare/v3.2.1...v4.0.0) (2017-04-16)
+
+
+### Bug Fixes
+
+* **genfun:** make internal properties private ([e855c72](https://github.com/zkat/genfun/commit/e855c72))
+* **perf:** short-circuit default methods ([7a9b06b](https://github.com/zkat/genfun/commit/7a9b06b))
+
+
+### Features
+
+* **addMethod:** default-method shortcut syntax for gf.add ([40a3ebb](https://github.com/zkat/genfun/commit/40a3ebb))
+* **genfun:** default method and name opts + default shortcut ([0a40939](https://github.com/zkat/genfun/commit/0a40939))
+* **genfun:** now with inheritance! ([74abcc2](https://github.com/zkat/genfun/commit/74abcc2))
+* **nextMethod:** arg-based nextMethod calls ([17a0b35](https://github.com/zkat/genfun/commit/17a0b35))
+* **noNext:** allow users to disable nextMethod functionality ([cc00d95](https://github.com/zkat/genfun/commit/cc00d95))
+
+
+### BREAKING CHANGES
+
+* **nextMethod:** next methods are now passed in as arguments. context/callNextMethod/etc are all gone.
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/README.md b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/README.md
new file mode 100644
index 0000000000..01417ff879
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/README.md
@@ -0,0 +1,223 @@
+# Genfun [![Travis](https://img.shields.io/travis/zkat/genfun.svg)](https://travis-ci.org/zkat/genfun) [![npm](https://img.shields.io/npm/v/genfun.svg)](https://npm.im/genfun) [![npm](https://img.shields.io/npm/l/genfun.svg)](https://npm.im/genfun)
+
+[`genfun`](https://github.com/zkat/genfun) is a Javascript library that lets you
+define generic functions: regular-seeming functions that can be invoked just
+like any other function, but that automatically dispatch methods based on the
+combination of arguments passed to it when it's called, also known as multiple
+dispatch.
+
+It was inspired by [Slate](http://slatelanguage.org/),
+[CLOS](http://en.wikipedia.org/wiki/CLOS) and
+[Sheeple](http://github.com/zkat/sheeple).
+
+## Install
+
+`$ npm install genfun`
+
+## Table of Contents
+
+* [Example](#example)
+* [API](#api)
+ * [`Genfun()`](#genfun)
+ * [`gf.add()`](#addMethod)
+ * [`Genfun.callNextMethod()`](#callNextMethod)
+ * [`Genfun.noApplicableMethod()`](#noApplicableMethod)
+* [Performance](#performance)
+
+### Example
+
+Various examples are available to look at in the examples/ folder included in
+this project. Most examples are also runnable by just invoking them with node.
+
+```javascript
+import Genfun from "genfun"
+
+class Person {}
+class Dog {}
+
+const frobnicate = Genfun()
+
+frobnicate.add([Person], (person) => {
+ console.log('Got a person!')
+})
+
+frobnicate.add([Dog], (dog) => {
+ console.log('Got a dog!')
+})
+
+frobnicate.add([String, Person, Dog], (greeting, person, dog) => {
+ console.log(person, ' greets ', dog, ', \'' + greeting + '\'')
+})
+
+const person = new Person()
+const dog = new Dog()
+
+frobnicate(person) // Got a person!
+frobnicate(dog) // Got a dog!
+frobnicate('Hi, dog!', person, dog); // {} greets {}, 'Hi, dog!'
+```
+
+### API
+
+The basic API for `Genfun` is fairly simple: You create a new `genfun` by
+calling `Genfun()`, and add methods to them. Then you call the `genfun` object
+like a regular function, and it takes care of dispatching the appropriate
+methods!
+
+#### `Genfun()`
+
+Takes no arguments. Simply creates a new `genfun`. A `genfun` is a regular
+function object with overriden function call/dispatch behavior.
+
+When called, it will look at its arguments and determine if a matching method
+has been defined that applies to **all** arguments passed in, considered
+together.
+
+New methods may be added to the `genfun` object with [`gf.add()`](#addMethod).
+
+If no method is found, or none has been defined, it will invoke
+[`Genfun.noApplicableMethod`](#noApplicableMethod) with the appropriate
+arguments.
+
+Genfuns preserve the value of `this` if invoked using `.call` or `.apply`.
+
+##### Example
+
+```javascript
+var gf = Genfun()
+
+//... add some methods ..
+
+// These calls are all identical.
+gf(1, 2, 3)
+gf.call(null, 1, 2, 3)
+gf.apply(null, [1, 2, 3])
+```
+
+#### <a name="addMethod"></a> `gf.add(<selector>, <body>)`
+
+Adds a new method to `gf` and returns `gf` to allow chaining multiple `add`s.
+
+`<selector>` must be an array of objects that will receive new `Role`s (dispatch
+positions) for the method. If an object in the selector is a function, its
+`.prototype` field will receive the new `Role`. The array must not contain any
+frozen objects.
+
+When a `genfun` is called (like a function), it will look at its set of added
+methods and, based on the `Role`s assigned, and corresponding prototype chains,
+will determine which method, if any, will be invoked. On invocation, a method's
+`<body>` argument will be the called with the arguments passed to the `genfun`,
+including its `this` and `arguments` values`.
+
+Within the `<body>`, [`Genfun.callNextMethod`](#callNextMethod) may be called.
+
+##### Example
+
+```javascript
+
+var numStr = Genfun()
+
+numStr.add([String, Number], function (str, num) {
+ console.log('got a str:', str, 'and a num: ', num)
+})
+
+numStr.add([Number, String], function (num, str) {
+ console.log('got a num:', num, 'and a str:', str)
+})
+
+```
+
+#### <a name="callNextMethod"></a> `Genfun.callNextMethod([...<arguments>])`
+
+**NOTE**: This function can only be called synchronously. To call it
+asynchronously (for example, in a `Promise` or in a callback), use
+[`getContext`](#getContext)
+
+Calls the "next" applicable method in the method chain. Can only be called
+within the body of a method.
+
+If no arguments are given, `callNextMethod` will pass the current method's
+original arguments to the next method.
+
+If arguments are passed to `callNextMethod`, it will invoke the next applicable
+method (based on the **original** method list calculation), with **the given
+arguments**, even if they would otherwise not have triggered that method.
+
+Returns whatever value the next method returns.
+
+There **must** be a next method available when invoked. This function **will
+not** call `noApplicableMethod` when it runs out of methods to call. It will
+instead throw an error.
+
+##### Example
+
+```javascript
+class Foo {}
+class Bar extends Foo {}
+
+var cnm = Genfun()
+
+cnm.add([Foo], function (foo) {
+ console.log('calling the method on Foo with', foo)
+ return foo
+})
+
+cnm.add([Bar], function (bar) {
+ console.log('calling the method on Bar with', bar)
+ return Genfun.callNextMethod('some other value!')
+})
+
+cnm(new Bar())
+// calling the method on Bar with {}
+// calling the method on Foo with "some other value!"
+// => 'some other value!'
+```
+
+#### <a name="getContext"></a> `Genfun.getContext()`
+
+The `context` returned by this function will have a `callNextMethod` method
+which can be used to invoke the correct next method even during asynchronous
+calls (for example, when used in a callback or a `Promise`).
+
+This function must be called synchronously within the body of the method before
+any asynchronous calls, and will error if invoked outside the context of a
+method call.
+
+##### Example
+
+```javascript
+someGenfun.add([MyThing], function (thing) {
+ const ctx = Genfun.getContext()
+ return somePromisedCall(thing).then(res => ctx.callNextMethod(res))
+})
+```
+
+#### <a name="noApplicableMethod"></a> `Genfun.noApplicableMethod(<gf>, <this>, <args>)`
+
+`Genfun.noApplicableMethod` is a `genfun` itself, which is called whenever **any `genfun`** fails to find a matching method for its given arguments.
+
+It will be called with the `genfun` as its first argument, then the `this`
+value, and then the arguments it was called with.
+
+By default, this will simply throw a NoApplicableMethod error.
+
+Users may override this behavior for particular `genfun` and `this`
+combinations, although `args` will always be an `Array`. The value returned from
+the dispatched `noApplicableMethod` method will be returned by `genfun` as if it
+had been its original method. Comparable to [Ruby's
+`method_missing`](http://ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing).
+
+### Performance
+
+`Genfun` pulls a few caching tricks to make sure dispatch, specially for common
+cases, is as fast as possible.
+
+How fast? Well, not much slower than native methods:
+
+```
+Regular function: 30.402ms
+Native method: 28.109ms
+Singly-dispatched genfun: 64.467ms
+Double-dispatched genfun: 70.052ms
+Double-dispatched genfun with string primitive: 76.742ms
+```
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/genfun.js b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/genfun.js
new file mode 100644
index 0000000000..c6ba01ca54
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/genfun.js
@@ -0,0 +1,296 @@
+'use strict'
+
+const Method = require('./method')
+const Role = require('./role')
+const util = require('./util')
+
+const kCache = Symbol('cache')
+const kDefaultMethod = Symbol('defaultMethod')
+const kMethods = Symbol('methods')
+const kNoNext = Symbol('noNext')
+
+module.exports = function genfun (opts) {
+ function gf () {
+ if (!gf[kMethods].length && gf[kDefaultMethod]) {
+ return gf[kDefaultMethod].func.apply(this, arguments)
+ } else {
+ return gf.applyGenfun(this, arguments)
+ }
+ }
+ Object.setPrototypeOf(gf, Genfun.prototype)
+ gf[kMethods] = []
+ gf[kCache] = {key: [], methods: [], state: STATES.UNINITIALIZED}
+ if (opts && typeof opts === 'function') {
+ gf.add(opts)
+ } else if (opts && opts.default) {
+ gf.add(opts.default)
+ }
+ if (opts && opts.name) {
+ Object.defineProperty(gf, 'name', {
+ value: opts.name
+ })
+ }
+ if (opts && opts.noNextMethod) {
+ gf[kNoNext] = true
+ }
+ return gf
+}
+
+class Genfun extends Function {}
+Genfun.prototype.isGenfun = true
+
+const STATES = {
+ UNINITIALIZED: 0,
+ MONOMORPHIC: 1,
+ POLYMORPHIC: 2,
+ MEGAMORPHIC: 3
+}
+
+const MAX_CACHE_SIZE = 32
+
+/**
+ * Defines a method on a generic function.
+ *
+ * @function
+ * @param {Array-like} selector - Selector array for dispatching the method.
+ * @param {Function} methodFunction - Function to execute when the method
+ * successfully dispatches.
+ */
+Genfun.prototype.add = function addMethod (selector, func) {
+ if (!func && typeof selector === 'function') {
+ func = selector
+ selector = []
+ }
+ selector = [].slice.call(selector)
+ for (var i = 0; i < selector.length; i++) {
+ if (!selector.hasOwnProperty(i)) {
+ selector[i] = Object.prototype
+ }
+ }
+ this[kCache] = {key: [], methods: [], state: STATES.UNINITIALIZED}
+ let method = new Method(this, selector, func)
+ if (selector.length) {
+ this[kMethods].push(method)
+ } else {
+ this[kDefaultMethod] = method
+ }
+ return this
+}
+
+/**
+ * Removes a previously-defined method on `genfun` that matches
+ * `selector` exactly.
+ *
+ * @function
+ * @param {Genfun} genfun - Genfun to remove a method from.
+ * @param {Array-like} selector - Objects to match on when finding a
+ * method to remove.
+ */
+Genfun.prototype.rm = function removeMethod () {
+ throw new Error('not yet implemented')
+}
+
+/**
+ * Returns true if there are methods that apply to the given arguments on
+ * `genfun`. Additionally, makes sure the cache is warmed up for the given
+ * arguments.
+ *
+ */
+Genfun.prototype.hasMethod = function hasMethod () {
+ const methods = this.getApplicableMethods(arguments)
+ return !!(methods && methods.length)
+}
+
+/**
+ * This generic function is called when `genfun` has been called and no
+ * applicable method was found. The default method throws an `Error`.
+ *
+ * @function
+ * @param {Genfun} genfun - Generic function instance that was called.
+ * @param {*} newthis - value of `this` the genfun was called with.
+ * @param {Array} callArgs - Arguments the genfun was called with.
+ */
+module.exports.noApplicableMethod = module.exports()
+module.exports.noApplicableMethod.add([], (gf, thisArg, args) => {
+ let msg =
+ 'No applicable method found when called with arguments of types: (' +
+ [].map.call(args, (arg) => {
+ return (/\[object ([a-zA-Z0-9]+)\]/)
+ .exec(({}).toString.call(arg))[1]
+ }).join(', ') + ')'
+ let err = new Error(msg)
+ err.genfun = gf
+ err.thisArg = thisArg
+ err.args = args
+ throw err
+})
+
+/*
+ * Internal
+ */
+Genfun.prototype.applyGenfun = function applyGenfun (newThis, args) {
+ let applicableMethods = this.getApplicableMethods(args)
+ if (applicableMethods.length === 1 || this[kNoNext]) {
+ return applicableMethods[0].func.apply(newThis, args)
+ } else if (applicableMethods.length > 1) {
+ let idx = 0
+ const nextMethod = function nextMethod () {
+ if (arguments.length) {
+ // Replace args if passed in explicitly
+ args = arguments
+ Array.prototype.push.call(args, nextMethod)
+ }
+ const next = applicableMethods[idx++]
+ if (idx >= applicableMethods.length) {
+ Array.prototype.pop.call(args)
+ }
+ return next.func.apply(newThis, args)
+ }
+ Array.prototype.push.call(args, nextMethod)
+ return nextMethod()
+ } else {
+ return module.exports.noApplicableMethod(this, newThis, args)
+ }
+}
+
+Genfun.prototype.getApplicableMethods = function getApplicableMethods (args) {
+ if (!args.length || !this[kMethods].length) {
+ return this[kDefaultMethod] ? [this[kDefaultMethod]] : []
+ }
+ let applicableMethods
+ let maybeMethods = cachedMethods(this, args)
+ if (maybeMethods) {
+ applicableMethods = maybeMethods
+ } else {
+ applicableMethods = computeApplicableMethods(this, args)
+ cacheArgs(this, args, applicableMethods)
+ }
+ return applicableMethods
+}
+
+function cacheArgs (genfun, args, methods) {
+ if (genfun[kCache].state === STATES.MEGAMORPHIC) { return }
+ var key = []
+ var proto
+ for (var i = 0; i < args.length; i++) {
+ proto = cacheableProto(genfun, args[i])
+ if (proto) {
+ key[i] = proto
+ } else {
+ return null
+ }
+ }
+ genfun[kCache].key.unshift(key)
+ genfun[kCache].methods.unshift(methods)
+ if (genfun[kCache].key.length === 1) {
+ genfun[kCache].state = STATES.MONOMORPHIC
+ } else if (genfun[kCache].key.length < MAX_CACHE_SIZE) {
+ genfun[kCache].state = STATES.POLYMORPHIC
+ } else {
+ genfun[kCache].state = STATES.MEGAMORPHIC
+ }
+}
+
+function cacheableProto (genfun, arg) {
+ var dispatchable = util.dispatchableObject(arg)
+ if (Object.hasOwnProperty.call(dispatchable, Role.roleKeyName)) {
+ for (var j = 0; j < dispatchable[Role.roleKeyName].length; j++) {
+ var role = dispatchable[Role.roleKeyName][j]
+ if (role.method.genfun === genfun) {
+ return null
+ }
+ }
+ }
+ return Object.getPrototypeOf(dispatchable)
+}
+
+function cachedMethods (genfun, args) {
+ if (genfun[kCache].state === STATES.UNINITIALIZED ||
+ genfun[kCache].state === STATES.MEGAMORPHIC) {
+ return null
+ }
+ var protos = []
+ var proto
+ for (var i = 0; i < args.length; i++) {
+ proto = cacheableProto(genfun, args[i])
+ if (proto) {
+ protos[i] = proto
+ } else {
+ return
+ }
+ }
+ for (i = 0; i < genfun[kCache].key.length; i++) {
+ if (matchCachedMethods(genfun[kCache].key[i], protos)) {
+ return genfun[kCache].methods[i]
+ }
+ }
+}
+
+function matchCachedMethods (key, protos) {
+ if (key.length !== protos.length) { return false }
+ for (var i = 0; i < key.length; i++) {
+ if (key[i] !== protos[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+function computeApplicableMethods (genfun, args) {
+ args = [].slice.call(args)
+ let discoveredMethods = []
+ function findAndRankRoles (object, hierarchyPosition, index) {
+ var roles = Object.hasOwnProperty.call(object, Role.roleKeyName)
+ ? object[Role.roleKeyName]
+ : []
+ roles.forEach(role => {
+ if (role.method.genfun === genfun && index === role.position) {
+ if (discoveredMethods.indexOf(role.method) < 0) {
+ Method.clearRank(role.method)
+ discoveredMethods.push(role.method)
+ }
+ Method.setRankHierarchyPosition(role.method, index, hierarchyPosition)
+ }
+ })
+ // When a discovered method would receive more arguments than
+ // were specialized, we pretend all extra arguments have a role
+ // on Object.prototype.
+ if (util.isObjectProto(object)) {
+ discoveredMethods.forEach(method => {
+ if (method.minimalSelector <= index) {
+ Method.setRankHierarchyPosition(method, index, hierarchyPosition)
+ }
+ })
+ }
+ }
+ args.forEach((arg, index) => {
+ getPrecedenceList(util.dispatchableObject(arg))
+ .forEach((obj, hierarchyPosition) => {
+ findAndRankRoles(obj, hierarchyPosition, index)
+ })
+ })
+ let applicableMethods = discoveredMethods.filter(method => {
+ return (args.length === method._rank.length &&
+ Method.isFullySpecified(method))
+ })
+ applicableMethods.sort((a, b) => Method.score(a) - Method.score(b))
+ if (genfun[kDefaultMethod]) {
+ applicableMethods.push(genfun[kDefaultMethod])
+ }
+ return applicableMethods
+}
+
+/*
+ * Helper function for getting an array representing the entire
+ * inheritance/precedence chain for an object by navigating its
+ * prototype pointers.
+ */
+function getPrecedenceList (obj) {
+ var precedenceList = []
+ var nextObj = obj
+ while (nextObj) {
+ precedenceList.push(nextObj)
+ nextObj = Object.getPrototypeOf(nextObj)
+ }
+ return precedenceList
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/method.js b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/method.js
new file mode 100644
index 0000000000..5a9d9f788e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/method.js
@@ -0,0 +1,86 @@
+'use strict'
+
+/*
+ * Method
+ *
+ * Methods are added, conceptually, to Genfuns, not to objects
+ * themselves, although the Genfun object does not have any pointers to
+ * method objects.
+ *
+ * The _rank vector is an internal datastructure used during dispatch
+ * to figure out whether a method is applicable, and if so, how to
+ * order multiple discovered methods.
+ *
+ * Right now, the score method on Method does not take into account any
+ * ordering, and all arguments to a method are ranked equally for the
+ * sake of ordering.
+ *
+ */
+const Role = require('./role')
+const util = require('./util')
+
+module.exports = Method
+function Method (genfun, selector, func) {
+ var method = this
+ method.genfun = genfun
+ method.func = func
+ method._rank = []
+ method.minimalSelector = 0
+
+ const tmpSelector = selector.length ? selector : [Object.prototype]
+ for (var object, i = tmpSelector.length - 1; i >= 0; i--) {
+ object = Object.hasOwnProperty.call(tmpSelector, i)
+ ? tmpSelector[i]
+ : Object.prototype
+ object = util.dispatchableObject(object)
+ if (
+ typeof object === 'function' &&
+ !object.isGenfun
+ ) {
+ object = object.prototype
+ }
+ if (i > 0 &&
+ !method.minimalSelector &&
+ util.isObjectProto(object)) {
+ continue
+ } else {
+ method.minimalSelector++
+ if (!Object.hasOwnProperty.call(object, Role.roleKeyName)) {
+ if (Object.defineProperty) {
+ // Object.defineProperty is JS 1.8.0+
+ Object.defineProperty(
+ object, Role.roleKeyName, {value: [], enumerable: false})
+ } else {
+ object[Role.roleKeyName] = []
+ }
+ }
+ // XXX HACK - no method replacement now, so we just shove
+ // it in a place where it'll always show up first. This
+ // would probably seriously break method combination if we
+ // had it.
+ object[Role.roleKeyName].unshift(new Role(method, i))
+ }
+ }
+}
+
+Method.setRankHierarchyPosition = (method, index, hierarchyPosition) => {
+ method._rank[index] = hierarchyPosition
+}
+
+Method.clearRank = method => {
+ method._rank = []
+}
+
+Method.isFullySpecified = method => {
+ for (var i = 0; i < method.minimalSelector; i++) {
+ if (!method._rank.hasOwnProperty(i)) {
+ return false
+ }
+ }
+ return true
+}
+
+Method.score = method => {
+ // TODO - this makes all items in the list equal
+ return method._rank.reduce((a, b) => a + b, 0)
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/role.js b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/role.js
new file mode 100644
index 0000000000..69e35c2e58
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/role.js
@@ -0,0 +1,17 @@
+'use strict'
+
+/*
+ * Role
+ *
+ * A Role encapsulates a particular object's 'role' in a method's
+ * dispatch. They are added directly to the selector for a method, and thus
+ * do not prevent the objects a method was defined on from being garbage
+ * collected.
+ */
+module.exports = Role
+function Role (method, position) {
+ this.method = method
+ this.position = position
+}
+
+Role.roleKeyName = Symbol('roles')
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/util.js b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/util.js
new file mode 100644
index 0000000000..23770629d3
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/lib/util.js
@@ -0,0 +1,37 @@
+'use strict'
+
+module.exports.isObjectProto = isObjectProto
+function isObjectProto (obj) {
+ return obj === Object.prototype
+}
+
+const _null = {}
+const _undefined = {}
+const Bool = Boolean
+const Num = Number
+const Str = String
+const boolCache = {
+ true: new Bool(true),
+ false: new Bool(false)
+}
+const numCache = {}
+const strCache = {}
+
+/*
+ * Returns a useful dispatch object for value using a process similar to
+ * the ToObject operation specified in http://es5.github.com/#x9.9
+ */
+module.exports.dispatchableObject = dispatchableObject
+function dispatchableObject (value) {
+ // To shut up jshint, which doesn't let me turn off this warning.
+ const Obj = Object
+ if (value === null) { return _null }
+ if (value === undefined) { return _undefined }
+ switch (typeof value) {
+ case 'object': return value
+ case 'boolean': return boolCache[value]
+ case 'number': return numCache[value] || (numCache[value] = new Num(value))
+ case 'string': return strCache[value] || (strCache[value] = new Str(value))
+ default: return new Obj(value)
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/package.json b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/package.json
new file mode 100644
index 0000000000..e404938743
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/node_modules/genfun/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "genfun@^4.0.1",
+ "_id": "genfun@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=",
+ "_location": "/libcipm/protoduck/genfun",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "genfun@^4.0.1",
+ "name": "genfun",
+ "escapedName": "genfun",
+ "rawSpec": "^4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.1"
+ },
+ "_requiredBy": [
+ "/libcipm/protoduck"
+ ],
+ "_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz",
+ "_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1",
+ "_spec": "genfun@^4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm/node_modules/protoduck",
+ "author": {
+ "name": "Kat MarchƔn",
+ "email": "kzm@sykosomatic.org"
+ },
+ "bugs": {
+ "url": "https://github.com/zkat/genfun/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Fast, prototype-friendly multimethods.",
+ "devDependencies": {
+ "mocha": "^3.2.0",
+ "nyc": "^10.2.0",
+ "standard": "^10.0.2",
+ "standard-version": "^4.0.0",
+ "weallbehave": "^1.0.3",
+ "weallcontribute": "^1.0.8"
+ },
+ "files": [
+ "lib/*.js"
+ ],
+ "homepage": "http://github.com/zkat/genfun",
+ "keywords": [
+ "clos",
+ "functional",
+ "oop",
+ "util",
+ "object oriented",
+ "prototypes",
+ "multimethod",
+ "generic functions",
+ "multiple dispatch",
+ "polymorphism",
+ "polymorphic",
+ "protocols"
+ ],
+ "license": "CC0-1.0",
+ "main": "lib/genfun.js",
+ "name": "genfun",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/zkat/genfun.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard lib",
+ "release": "standard-version -s",
+ "test": "nyc -- mocha --reporter spec",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/protoduck/package.json b/deps/npm/node_modules/libcipm/node_modules/protoduck/package.json
new file mode 100644
index 0000000000..28959e813c
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/protoduck/package.json
@@ -0,0 +1,88 @@
+{
+ "_from": "protoduck@^5.0.0",
+ "_id": "protoduck@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==",
+ "_location": "/libcipm/protoduck",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "protoduck@^5.0.0",
+ "name": "protoduck",
+ "escapedName": "protoduck",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/libcipm"
+ ],
+ "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz",
+ "_shasum": "752145e6be0ad834cb25716f670a713c860dce70",
+ "_spec": "protoduck@^5.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm",
+ "author": {
+ "name": "Kat MarchƔn",
+ "email": "kzm@sykosomatic.org"
+ },
+ "bugs": {
+ "url": "https://github.com/zkat/protoduck/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "genfun": "^4.0.1"
+ },
+ "deprecated": false,
+ "description": "Fancy duck typing for the most serious of ducks.",
+ "devDependencies": {
+ "mocha": "^3.2.0",
+ "nyc": "^10.2.0",
+ "standard": "^10.0.2",
+ "standard-version": "^4.0.0",
+ "tap": "^10.3.2",
+ "weallbehave": "^1.0.3",
+ "weallcontribute": "^1.0.8"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zkat/protoduck#readme",
+ "keywords": [
+ "oop",
+ "util",
+ "object oriented",
+ "duck type",
+ "ducktype",
+ "ducktyping",
+ "protocols",
+ "multimethod",
+ "clojure",
+ "haskell",
+ "rust",
+ "generic",
+ "functions",
+ "clos",
+ "polymorphism",
+ "impl",
+ "typeclass",
+ "traits"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "protoduck",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zkat/protoduck.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --coverage test/*.js",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "5.0.0"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/.travis.yml b/deps/npm/node_modules/libcipm/node_modules/worker-farm/.travis.yml
new file mode 100644
index 0000000000..1c9e2b559d
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - 4
+ - 6
+ - 8
+ - 9
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/LICENSE.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/LICENSE.md
new file mode 100644
index 0000000000..274c9b4607
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/LICENSE.md
@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2014 LevelUP contributors
+---------------------------------------
+
+*LevelUP contributors listed at <https://github.com/rvagg/node-levelup#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/libcipm/node_modules/worker-farm/README.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/README.md
new file mode 100644
index 0000000000..87ee4b61b5
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/README.md
@@ -0,0 +1,144 @@
+# Worker Farm [![Build Status](https://secure.travis-ci.org/rvagg/node-worker-farm.png)](http://travis-ci.org/rvagg/node-worker-farm)
+
+[![NPM](https://nodei.co/npm/worker-farm.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/worker-farm/) [![NPM](https://nodei.co/npm-dl/worker-farm.png?months=6&height=3)](https://nodei.co/npm/worker-farm/)
+
+
+Distribute processing tasks to child processes with an Ć¼ber-simple API and baked-in durability & custom concurrency options. *Available in npm as <strong>worker-farm</strong>*.
+
+## Example
+
+Given a file, *child.js*:
+
+```js
+module.exports = function (inp, callback) {
+ callback(null, inp + ' BAR (' + process.pid + ')')
+}
+```
+
+And a main file:
+
+```js
+var workerFarm = require('worker-farm')
+ , workers = workerFarm(require.resolve('./child'))
+ , ret = 0
+
+for (var i = 0; i < 10; i++) {
+ workers('#' + i + ' FOO', function (err, outp) {
+ console.log(outp)
+ if (++ret == 10)
+ workerFarm.end(workers)
+ })
+}
+```
+
+We'll get an output something like the following:
+
+```
+#1 FOO BAR (8546)
+#0 FOO BAR (8545)
+#8 FOO BAR (8545)
+#9 FOO BAR (8546)
+#2 FOO BAR (8548)
+#4 FOO BAR (8551)
+#3 FOO BAR (8549)
+#6 FOO BAR (8555)
+#5 FOO BAR (8553)
+#7 FOO BAR (8557)
+```
+
+This example is contained in the *[examples/basic](https://github.com/rvagg/node-worker-farm/tree/master/examples/basic/)* directory.
+
+### Example #1: Estimating Ļ€ using child workers
+
+You will also find a more complex example in *[examples/pi](https://github.com/rvagg/node-worker-farm/tree/master/examples/pi/)* that estimates the value of **Ļ€** by using a Monte Carlo *area-under-the-curve* method and compares the speed of doing it all in-process vs using child workers to complete separate portions.
+
+Running `node examples/pi` will give you something like:
+
+```
+Doing it the slow (single-process) way...
+Ļ€ ā‰ˆ 3.1416269360000006 (0.0000342824102075312 away from actual!)
+took 8341 milliseconds
+Doing it the fast (multi-process) way...
+Ļ€ ā‰ˆ 3.1416233600000036 (0.00003070641021052367 away from actual!)
+took 1985 milliseconds
+```
+
+## Durability
+
+An important feature of Worker Farm is **call durability**. If a child process dies for any reason during the execution of call(s), those calls will be re-queued and taken care of by other child processes. In this way, when you ask for something to be done, unless there is something *seriously* wrong with what you're doing, you should get a result on your callback function.
+
+## My use-case
+
+There are other libraries for managing worker processes available but my use-case was fairly specific: I need to make heavy use of the [node-java](https://github.com/nearinfinity/node-java) library to interact with JVM code. Unfortunately, because the JVM garbage collector is so difficult to interact with, it's prone to killing your Node process when the GC kicks under heavy load. For safety I needed a durable way to make calls so that (1) it wouldn't kill my main process and (2) any calls that weren't successful would be resubmitted for processing.
+
+Worker Farm allows me to spin up multiple JVMs to be controlled by Node, and have a single, uncomplicated API that acts the same way as an in-process API and the calls will be taken care of by a child process even if an error kills a child process while it is working as the call will simply be passed to a new child process.
+
+**But**, don't think that Worker Farm is specific to that use-case, it's designed to be very generic and simple to adapt to anything requiring the use of child Node processes.
+
+## API
+
+Worker Farm exports a main function and an `end()` method. The main function sets up a "farm" of coordinated child-process workers and it can be used to instantiate multiple farms, all operating independently.
+
+### workerFarm([options, ]pathToModule[, exportedMethods])
+
+In its most basic form, you call `workerFarm()` with the path to a module file to be invoked by the child process. You should use an **absolute path** to the module file, the best way to obtain the path is with `require.resolve('./path/to/module')`, this function can be used in exactly the same way as `require('./path/to/module')` but it returns an absolute path.
+
+#### `exportedMethods`
+
+If your module exports a single function on `module.exports` then you should omit the final parameter. However, if you are exporting multiple functions on `module.exports` then you should list them in an Array of Strings:
+
+```js
+var workers = workerFarm(require.resolve('./mod'), [ 'doSomething', 'doSomethingElse' ])
+workers.doSomething(function () {})
+workers.doSomethingElse(function () {})
+```
+
+Listing the available methods will instruct Worker Farm what API to provide you with on the returned object. If you don't list a `exportedMethods` Array then you'll get a single callable function to use; but if you list the available methods then you'll get an object with callable functions by those names.
+
+**It is assumed that each function you call on your child module will take a `callback` function as the last argument.**
+
+#### `options`
+
+If you don't provide an `options` object then the following defaults will be used:
+
+```js
+{
+ maxCallsPerWorker : Infinity
+ , maxConcurrentWorkers : require('os').cpus().length
+ , maxConcurrentCallsPerWorker : 10
+ , maxConcurrentCalls : Infinity
+ , maxCallTime : Infinity
+ , maxRetries : Infinity
+ , autoStart : false
+}
+```
+
+ * **<code>maxCallsPerWorker</code>** allows you to control the lifespan of your child processes. A positive number will indicate that you only want each child to accept that many calls before it is terminated. This may be useful if you need to control memory leaks or similar in child processes.
+
+ * **<code>maxConcurrentWorkers</code>** will set the number of child processes to maintain concurrently. By default it is set to the number of CPUs available on the current system, but it can be any reasonable number, including `1`.
+
+ * **<code>maxConcurrentCallsPerWorker</code>** allows you to control the *concurrency* of individual child processes. Calls are placed into a queue and farmed out to child processes according to the number of calls they are allowed to handle concurrently. It is arbitrarily set to 10 by default so that calls are shared relatively evenly across workers, however if your calls predictably take a similar amount of time then you could set it to `Infinity` and Worker Farm won't queue any calls but spread them evenly across child processes and let them go at it. If your calls aren't I/O bound then it won't matter what value you use here as the individual workers won't be able to execute more than a single call at a time.
+
+ * **<code>maxConcurrentCalls</code>** allows you to control the maximum number of calls in the queue&mdash;either actively being processed or waiting for a worker to be processed. `Infinity` indicates no limit but if you have conditions that may endlessly queue jobs and you need to set a limit then provide a `>0` value and any calls that push the limit will return on their callback with a `MaxConcurrentCallsError` error (check `err.type == 'MaxConcurrentCallsError'`).
+
+ * **<code>maxCallTime</code>** *(use with caution, understand what this does before you use it!)* when `!== Infinity`, will cap a time, in milliseconds, that *any single call* can take to execute in a worker. If this time limit is exceeded by just a single call then the worker running that call will be killed and any calls running on that worker will have their callbacks returned with a `TimeoutError` (check `err.type == 'TimeoutError'`). If you are running with `maxConcurrentCallsPerWorker` value greater than `1` then **all calls currently executing** will fail and will be automatically resubmitted uless you've changed the `maxRetries` option. Use this if you have jobs that may potentially end in infinite loops that you can't programatically end with your child code. Preferably run this with a `maxConcurrentCallsPerWorker` so you don't interrupt other calls when you have a timeout. This timeout operates on a per-call basis but will interrupt a whole worker.
+
+ * **<code>maxRetries</code>** allows you to control the max number of call requeues after worker termination (unexpected or timeout). By default this option is set to `Infinity` which means that each call of each terminated worker will always be auto requeued. When the number of retries exceeds `maxRetries` value, the job callback will be executed with a `ProcessTerminatedError`. Note that if you are running with finite `maxCallTime` and `maxConcurrentCallsPerWorkers` greater than `1` then any `TimeoutError` will increase the retries counter *for each* concurrent call of the terminated worker.
+
+ * **<code>autoStart</code>** when set to `true` will start the workers as early as possible. Use this when your workers have to do expensive initialization. That way they'll be ready when the first request comes through.
+
+### workerFarm.end(farm)
+
+Child processes stay alive waiting for jobs indefinitely and your farm manager will stay alive managing its workers, so if you need it to stop then you have to do so explicitly. If you send your farm API to `workerFarm.end()` then it'll cleanly end your worker processes. Note though that it's a *soft* ending so it'll wait for child processes to finish what they are working on before asking them to die.
+
+Any calls that are queued and not yet being handled by a child process will be discarded. `end()` only waits for those currently in progress.
+
+Once you end a farm, it won't handle any more calls, so don't even try!
+
+## Related
+
+* [farm-cli](https://github.com/Kikobeats/farm-cli) ā€“ Launch a farm of workers from CLI.
+
+## License
+
+Worker Farm is Copyright (c) 2014 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/child.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/child.js
new file mode 100644
index 0000000000..41e124b06e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/child.js
@@ -0,0 +1,5 @@
+'use strict'
+
+module.exports = function (inp, callback) {
+ callback(null, inp + ' BAR (' + process.pid + ')')
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/index.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/index.js
new file mode 100644
index 0000000000..3c9a1086e9
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/basic/index.js
@@ -0,0 +1,13 @@
+'use strict'
+
+let workerFarm = require('../../')
+ , workers = workerFarm(require.resolve('./child'))
+ , ret = 0
+
+for (let i = 0; i < 10; i++) {
+ workers('#' + i + ' FOO', function (err, outp) {
+ console.log(outp)
+ if (++ret == 10)
+ workerFarm.end(workers)
+ })
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/calc.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/calc.js
new file mode 100644
index 0000000000..42c77c2bd2
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/calc.js
@@ -0,0 +1,22 @@
+'use strict'
+
+/* A simple Ļ€ estimation function using a Monte Carlo method
+ * For 0 to `points`, take 2 random numbers < 1, square and add them to
+ * find the area under that point in a 1x1 square. If that area is <= 1
+ * then it's *within* a quarter-circle, otherwise it's outside.
+ * Take the number of points <= 1 and multiply it by 4 and you have an
+ * estimate!
+ * Do this across multiple processes and average the results to
+ * increase accuracy.
+ */
+
+module.exports = function (points, callback) {
+ let inside = 0
+ , i = points
+
+ while (i--)
+ if (Math.pow(Math.random(), 2) + Math.pow(Math.random(), 2) <= 1)
+ inside++
+
+ callback(null, (inside / points) * 4)
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/index.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/index.js
new file mode 100644
index 0000000000..b7b26839ed
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/examples/pi/index.js
@@ -0,0 +1,41 @@
+'use strict'
+
+const CHILDREN = 500
+ , POINTS_PER_CHILD = 1000000
+ , FARM_OPTIONS = {
+ maxConcurrentWorkers : require('os').cpus().length
+ , maxCallsPerWorker : Infinity
+ , maxConcurrentCallsPerWorker : 1
+ }
+
+let workerFarm = require('../../')
+ , calcDirect = require('./calc')
+ , calcWorker = workerFarm(FARM_OPTIONS, require.resolve('./calc'))
+
+ , ret
+ , start
+
+ , tally = function (finish, err, avg) {
+ ret.push(avg)
+ if (ret.length == CHILDREN) {
+ let pi = ret.reduce(function (a, b) { return a + b }) / ret.length
+ , end = +new Date()
+ console.log('Ļ€ ā‰ˆ', pi, '\t(' + Math.abs(pi - Math.PI), 'away from actual!)')
+ console.log('took', end - start, 'milliseconds')
+ if (finish)
+ finish()
+ }
+ }
+
+ , calc = function (method, callback) {
+ ret = []
+ start = +new Date()
+ for (let i = 0; i < CHILDREN; i++)
+ method(POINTS_PER_CHILD, tally.bind(null, callback))
+ }
+
+console.log('Doing it the slow (single-process) way...')
+calc(calcDirect, function () {
+ console.log('Doing it the fast (multi-process) way...')
+ calc(calcWorker, process.exit)
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/index.d.ts b/deps/npm/node_modules/libcipm/node_modules/worker-farm/index.d.ts
new file mode 100644
index 0000000000..682c21f410
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/index.d.ts
@@ -0,0 +1,44 @@
+interface Workers {
+ (callback: WorkerCallback): void;
+ (arg1: any, callback: WorkerCallback): void;
+ (arg1: any, arg2: any, callback: WorkerCallback): void;
+ (arg1: any, arg2: any, arg3: any, callback: WorkerCallback): void;
+ (arg1: any, arg2: any, arg3: any, arg4: any, callback: WorkerCallback): void;
+}
+
+type WorkerCallback =
+ | WorkerCallback0
+ | WorkerCallback1
+ | WorkerCallback2
+ | WorkerCallback3
+ | WorkerCallback4;
+
+type WorkerCallback0 = () => void;
+type WorkerCallback1 = (arg1: any) => void;
+type WorkerCallback2 = (arg1: any, arg2: any) => void;
+type WorkerCallback3 = (arg1: any, arg2: any, arg3: any) => void;
+type WorkerCallback4 = (arg1: any, arg2: any, arg3: any, arg4: any) => void;
+
+interface FarmOptions {
+ maxCallsPerWorker?: number
+ maxConcurrentWorkers?: number
+ maxConcurrentCallsPerWorker?: number
+ maxConcurrentCalls?: number
+ maxCallTime?: number
+ maxRetries?: number
+ autoStart?: boolean
+}
+
+interface WorkerFarm {
+ (name: string): Workers;
+ (name: string, exportedMethods: string[]): Workers;
+ (options: FarmOptions, name: string): Workers;
+ (options: FarmOptions, name: string, exportedMethods: string[]): Workers;
+
+ end: (workers: Workers) => void;
+}
+
+declare module "worker-farm" {
+ const workerFarm: WorkerFarm;
+ export = workerFarm;
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/child/index.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/child/index.js
new file mode 100644
index 0000000000..f91e08433a
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/child/index.js
@@ -0,0 +1,52 @@
+'use strict'
+
+let $module
+
+/*
+ let contextProto = this.context;
+ while (contextProto = Object.getPrototypeOf(contextProto)) {
+ completionGroups.push(Object.getOwnPropertyNames(contextProto));
+ }
+*/
+
+
+function handle (data) {
+ let idx = data.idx
+ , child = data.child
+ , method = data.method
+ , args = data.args
+ , callback = function () {
+ let _args = Array.prototype.slice.call(arguments)
+ if (_args[0] instanceof Error) {
+ let e = _args[0]
+ _args[0] = {
+ '$error' : '$error'
+ , 'type' : e.constructor.name
+ , 'message' : e.message
+ , 'stack' : e.stack
+ }
+ Object.keys(e).forEach(function(key) {
+ _args[0][key] = e[key]
+ })
+ }
+ process.send({ idx: idx, child: child, args: _args })
+ }
+ , exec
+
+ if (method == null && typeof $module == 'function')
+ exec = $module
+ else if (typeof $module[method] == 'function')
+ exec = $module[method]
+
+ if (!exec)
+ return console.error('NO SUCH METHOD:', method)
+
+ exec.apply(null, args.concat([ callback ]))
+}
+
+
+process.on('message', function (data) {
+ if (!$module) return $module = require(data.module)
+ if (data == 'die') return process.exit(0)
+ handle(data)
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/farm.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/farm.js
new file mode 100644
index 0000000000..c77c95d2c7
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/farm.js
@@ -0,0 +1,339 @@
+'use strict'
+
+const DEFAULT_OPTIONS = {
+ maxCallsPerWorker : Infinity
+ , maxConcurrentWorkers : (require('os').cpus() || { length: 1 }).length
+ , maxConcurrentCallsPerWorker : 10
+ , maxConcurrentCalls : Infinity
+ , maxCallTime : Infinity // exceed this and the whole worker is terminated
+ , maxRetries : Infinity
+ , forcedKillTime : 100
+ , autoStart : false
+ }
+
+const extend = require('xtend')
+ , fork = require('./fork')
+ , TimeoutError = require('errno').create('TimeoutError')
+ , ProcessTerminatedError = require('errno').create('ProcessTerminatedError')
+ , MaxConcurrentCallsError = require('errno').create('MaxConcurrentCallsError')
+
+
+function Farm (options, path) {
+ this.options = extend(DEFAULT_OPTIONS, options)
+ this.path = path
+ this.activeCalls = 0
+}
+
+
+// make a handle to pass back in the form of an external API
+Farm.prototype.mkhandle = function (method) {
+ return function () {
+ let args = Array.prototype.slice.call(arguments)
+ if (this.activeCalls >= this.options.maxConcurrentCalls) {
+ let err = new MaxConcurrentCallsError('Too many concurrent calls (' + this.activeCalls + ')')
+ if (typeof args[args.length - 1] == 'function')
+ return process.nextTick(args[args.length - 1].bind(null, err))
+ throw err
+ }
+ this.addCall({
+ method : method
+ , callback : args.pop()
+ , args : args
+ , retries : 0
+ })
+ }.bind(this)
+}
+
+
+// a constructor of sorts
+Farm.prototype.setup = function (methods) {
+ let iface
+ if (!methods) { // single-function export
+ iface = this.mkhandle()
+ } else { // multiple functions on the export
+ iface = {}
+ methods.forEach(function (m) {
+ iface[m] = this.mkhandle(m)
+ }.bind(this))
+ }
+
+ this.searchStart = -1
+ this.childId = -1
+ this.children = {}
+ this.activeChildren = 0
+ this.callQueue = []
+
+ if (this.options.autoStart) {
+ while (this.activeChildren < this.options.maxConcurrentWorkers)
+ this.startChild()
+ }
+
+ return iface
+}
+
+
+// when a child exits, check if there are any outstanding jobs and requeue them
+Farm.prototype.onExit = function (childId) {
+ // delay this to give any sends a chance to finish
+ setTimeout(function () {
+ let doQueue = false
+ if (this.children[childId] && this.children[childId].activeCalls) {
+ this.children[childId].calls.forEach(function (call, i) {
+ if (!call) return
+ else if (call.retries >= this.options.maxRetries) {
+ this.receive({
+ idx : i
+ , child : childId
+ , args : [ new ProcessTerminatedError('cancel after ' + call.retries + ' retries!') ]
+ })
+ } else {
+ call.retries++
+ this.callQueue.unshift(call)
+ doQueue = true
+ }
+ }.bind(this))
+ }
+ this.stopChild(childId)
+ doQueue && this.processQueue()
+ }.bind(this), 10)
+}
+
+
+// start a new worker
+Farm.prototype.startChild = function () {
+ this.childId++
+
+ let forked = fork(this.path)
+ , id = this.childId
+ , c = {
+ send : forked.send
+ , child : forked.child
+ , calls : []
+ , activeCalls : 0
+ , exitCode : null
+ }
+
+ forked.child.on('message', this.receive.bind(this))
+ forked.child.once('exit', function (code) {
+ c.exitCode = code
+ this.onExit(id)
+ }.bind(this))
+
+ this.activeChildren++
+ this.children[id] = c
+}
+
+
+// stop a worker, identified by id
+Farm.prototype.stopChild = function (childId) {
+ let child = this.children[childId]
+ if (child) {
+ child.send('die')
+ setTimeout(function () {
+ if (child.exitCode === null)
+ child.child.kill('SIGKILL')
+ }, this.options.forcedKillTime).unref()
+ ;delete this.children[childId]
+ this.activeChildren--
+ }
+}
+
+
+// called from a child process, the data contains information needed to
+// look up the child and the original call so we can invoke the callback
+Farm.prototype.receive = function (data) {
+ let idx = data.idx
+ , childId = data.child
+ , args = data.args
+ , child = this.children[childId]
+ , call
+
+ if (!child) {
+ return console.error(
+ 'Worker Farm: Received message for unknown child. '
+ + 'This is likely as a result of premature child death, '
+ + 'the operation will have been re-queued.'
+ )
+ }
+
+ call = child.calls[idx]
+ if (!call) {
+ return console.error(
+ 'Worker Farm: Received message for unknown index for existing child. '
+ + 'This should not happen!'
+ )
+ }
+
+ if (this.options.maxCallTime !== Infinity)
+ clearTimeout(call.timer)
+
+ if (args[0] && args[0].$error == '$error') {
+ let e = args[0]
+ switch (e.type) {
+ case 'TypeError': args[0] = new TypeError(e.message); break
+ case 'RangeError': args[0] = new RangeError(e.message); break
+ case 'EvalError': args[0] = new EvalError(e.message); break
+ case 'ReferenceError': args[0] = new ReferenceError(e.message); break
+ case 'SyntaxError': args[0] = new SyntaxError(e.message); break
+ case 'URIError': args[0] = new URIError(e.message); break
+ default: args[0] = new Error(e.message)
+ }
+ args[0].type = e.type
+ args[0].stack = e.stack
+
+ // Copy any custom properties to pass it on.
+ Object.keys(e).forEach(function(key) {
+ args[0][key] = e[key];
+ });
+ }
+
+ process.nextTick(function () {
+ call.callback.apply(null, args)
+ })
+
+ ;delete child.calls[idx]
+ child.activeCalls--
+ this.activeCalls--
+
+ if (child.calls.length >= this.options.maxCallsPerWorker
+ && !Object.keys(child.calls).length) {
+ // this child has finished its run, kill it
+ this.stopChild(childId)
+ }
+
+ // allow any outstanding calls to be processed
+ this.processQueue()
+}
+
+
+Farm.prototype.childTimeout = function (childId) {
+ let child = this.children[childId]
+ , i
+
+ if (!child)
+ return
+
+ for (i in child.calls) {
+ this.receive({
+ idx : i
+ , child : childId
+ , args : [ new TimeoutError('worker call timed out!') ]
+ })
+ }
+ this.stopChild(childId)
+}
+
+
+// send a call to a worker, identified by id
+Farm.prototype.send = function (childId, call) {
+ let child = this.children[childId]
+ , idx = child.calls.length
+
+ child.calls.push(call)
+ child.activeCalls++
+ this.activeCalls++
+
+ child.send({
+ idx : idx
+ , child : childId
+ , method : call.method
+ , args : call.args
+ })
+
+ if (this.options.maxCallTime !== Infinity) {
+ call.timer =
+ setTimeout(this.childTimeout.bind(this, childId), this.options.maxCallTime)
+ }
+}
+
+
+// a list of active worker ids, in order, but the starting offset is
+// shifted each time this method is called, so we work our way through
+// all workers when handing out jobs
+Farm.prototype.childKeys = function () {
+ let cka = Object.keys(this.children)
+ , cks
+
+ if (this.searchStart >= cka.length - 1)
+ this.searchStart = 0
+ else
+ this.searchStart++
+
+ cks = cka.splice(0, this.searchStart)
+
+ return cka.concat(cks)
+}
+
+
+// Calls are added to a queue, this processes the queue and is called
+// whenever there might be a chance to send more calls to the workers.
+// The various options all impact on when we're able to send calls,
+// they may need to be kept in a queue until a worker is ready.
+Farm.prototype.processQueue = function () {
+ let cka, i = 0, childId
+
+ if (!this.callQueue.length)
+ return this.ending && this.end()
+
+ if (this.activeChildren < this.options.maxConcurrentWorkers)
+ this.startChild()
+
+ for (cka = this.childKeys(); i < cka.length; i++) {
+ childId = +cka[i]
+ if (this.children[childId].activeCalls < this.options.maxConcurrentCallsPerWorker
+ && this.children[childId].calls.length < this.options.maxCallsPerWorker) {
+
+ this.send(childId, this.callQueue.shift())
+ if (!this.callQueue.length)
+ return this.ending && this.end()
+ } /*else {
+ console.log(
+ , this.children[childId].activeCalls < this.options.maxConcurrentCallsPerWorker
+ , this.children[childId].calls.length < this.options.maxCallsPerWorker
+ , this.children[childId].calls.length , this.options.maxCallsPerWorker)
+ }*/
+ }
+
+ if (this.ending)
+ this.end()
+}
+
+
+// add a new call to the call queue, then trigger a process of the queue
+Farm.prototype.addCall = function (call) {
+ if (this.ending)
+ return this.end() // don't add anything new to the queue
+ this.callQueue.push(call)
+ this.processQueue()
+}
+
+
+// kills child workers when they're all done
+Farm.prototype.end = function (callback) {
+ let complete = true
+ if (this.ending === false)
+ return
+ if (callback)
+ this.ending = callback
+ else if (this.ending == null)
+ this.ending = true
+ Object.keys(this.children).forEach(function (child) {
+ if (!this.children[child])
+ return
+ if (!this.children[child].activeCalls)
+ this.stopChild(child)
+ else
+ complete = false
+ }.bind(this))
+
+ if (complete && typeof this.ending == 'function') {
+ process.nextTick(function () {
+ this.ending()
+ this.ending = false
+ }.bind(this))
+ }
+}
+
+
+module.exports = Farm
+module.exports.TimeoutError = TimeoutError
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/fork.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/fork.js
new file mode 100644
index 0000000000..46cf79b73e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/fork.js
@@ -0,0 +1,32 @@
+'use strict'
+
+const childProcess = require('child_process')
+ , childModule = require.resolve('./child/index')
+
+
+function fork (forkModule) {
+ // suppress --debug / --inspect flags while preserving others (like --harmony)
+ let filteredArgs = process.execArgv.filter(function (v) {
+ return !(/^--(debug|inspect)/).test(v)
+ })
+ , child = childProcess.fork(childModule, process.argv, {
+ execArgv: filteredArgs
+ , env: process.env
+ , cwd: process.cwd()
+ })
+
+ child.on('error', function() {
+ // this *should* be picked up by onExit and the operation requeued
+ })
+
+ child.send({ module: forkModule })
+
+ // return a send() function for this child
+ return {
+ send : child.send.bind(child)
+ , child : child
+ }
+}
+
+
+module.exports = fork
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/index.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/index.js
new file mode 100644
index 0000000000..4df0902f84
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/lib/index.js
@@ -0,0 +1,34 @@
+'use strict'
+
+const Farm = require('./farm')
+
+let farms = [] // keep record of farms so we can end() them if required
+
+
+function farm (options, path, methods) {
+ if (typeof options == 'string') {
+ methods = path
+ path = options
+ options = {}
+ }
+
+ let f = new Farm(options, path)
+ , api = f.setup(methods)
+
+ farms.push({ farm: f, api: api })
+
+ // return the public API
+ return api
+}
+
+
+function end (api, callback) {
+ for (let i = 0; i < farms.length; i++)
+ if (farms[i] && farms[i].api === api)
+ return farms[i].farm.end(callback)
+ process.nextTick(callback.bind(null, 'Worker farm not found!'))
+}
+
+
+module.exports = farm
+module.exports.end = end \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/.travis.yml b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/.travis.yml
new file mode 100644
index 0000000000..f996821c51
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/.travis.yml
@@ -0,0 +1,11 @@
+sudo: false
+
+language: node_js
+
+node_js:
+ - 9
+ - 8
+ - 7
+ - 6
+ - 5
+ - 4
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/README.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/README.md
new file mode 100644
index 0000000000..a4d0fb542d
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/README.md
@@ -0,0 +1,145 @@
+# node-errno
+
+> Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*.
+
+[![npm](https://img.shields.io/npm/v/errno.svg)](https://www.npmjs.com/package/errno)
+[![Build Status](https://secure.travis-ci.org/rvagg/node-errno.png)](http://travis-ci.org/rvagg/node-errno)
+[![npm](https://img.shields.io/npm/dm/errno.svg)](https://www.npmjs.com/package/errno)
+
+* [errno exposed](#errnoexposed)
+* [Custom errors](#customerrors)
+
+<a name="errnoexposed"></a>
+## errno exposed
+
+Ever find yourself needing more details about Node.js errors? Me too, so *node-errno* contains the errno mappings direct from libuv so you can use them in your code.
+
+**By errno:**
+
+```js
+require('errno').errno[3]
+// ā†’ {
+// "errno": 3,
+// "code": "EACCES",
+// "description": "permission denied"
+// }
+```
+
+**By code:**
+
+```js
+require('errno').code.ENOTEMPTY
+// ā†’ {
+// "errno": 53,
+// "code": "ENOTEMPTY",
+// "description": "directory not empty"
+// }
+```
+
+**Make your errors more descriptive:**
+
+```js
+var errno = require('errno')
+
+function errmsg(err) {
+ var str = 'Error: '
+ // if it's a libuv error then get the description from errno
+ if (errno.errno[err.errno])
+ str += errno.errno[err.errno].description
+ else
+ str += err.message
+
+ // if it's a `fs` error then it'll have a 'path' property
+ if (err.path)
+ str += ' [' + err.path + ']'
+
+ return str
+}
+
+var fs = require('fs')
+
+fs.readFile('thisisnotarealfile.txt', function (err, data) {
+ if (err)
+ console.log(errmsg(err))
+})
+```
+
+**Use as a command line tool:**
+
+```
+~ $ errno 53
+{
+ "errno": 53,
+ "code": "ENOTEMPTY",
+ "description": "directory not empty"
+}
+~ $ errno EROFS
+{
+ "errno": 56,
+ "code": "EROFS",
+ "description": "read-only file system"
+}
+~ $ errno foo
+No such errno/code: "foo"
+```
+
+Supply no arguments for the full list. Error codes are processed case-insensitive.
+
+You will need to install with `npm install errno -g` if you want the `errno` command to be available without supplying a full path to the node_modules installation.
+
+<a name="customerrors"></a>
+## Custom errors
+
+Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error hierarchies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor.
+
+```js
+var create = require('errno').custom.createError
+var MyError = create('MyError') // inherits from Error
+var SpecificError = create('SpecificError', MyError) // inherits from MyError
+var OtherError = create('OtherError', MyError)
+
+// use them!
+if (condition) throw new SpecificError('Eeek! Something bad happened')
+
+if (err) return callback(new OtherError(err))
+```
+
+Also available is a `errno.custom.FilesystemError` with in-built access to errno properties:
+
+```js
+fs.readFile('foo', function (err, data) {
+ if (err) return callback(new errno.custom.FilesystemError(err))
+ // do something else
+})
+```
+
+The resulting error object passed through the callback will have the following properties: `code`, `errno`, `path` and `message` will contain a descriptive human-readable message.
+
+## Contributors
+
+* [bahamas10](https://github.com/bahamas10) (Dave Eddy) - Added CLI
+* [ralphtheninja](https://github.com/ralphtheninja) (Lars-Magnus Skog)
+
+## Copyright & Licence
+
+*Copyright (c) 2012-2015 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))*
+
+Made available under the MIT licence:
+
+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/libcipm/node_modules/worker-farm/node_modules/errno/build.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/build.js
new file mode 100755
index 0000000000..fce89260c1
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/build.js
@@ -0,0 +1,43 @@
+#!/usr/bin/env node
+
+var request = require('request')
+ , fs = require('fs')
+
+ , uvheadloc = 'https://raw.github.com/joyent/libuv/master/include/uv.h'
+ , defreg = /^\s*XX\(\s*([\-\d]+),\s*([A-Z]+),\s*"([^"]*)"\s*\)\s*\\?$/
+
+
+request(uvheadloc, function (err, response) {
+ if (err)
+ throw err
+
+ var data, out
+
+ data = response.body
+ .split('\n')
+ .map(function (line) { return line.match(defreg) })
+ .filter(function (match) { return match })
+ .map(function (match) { return {
+ errno: parseInt(match[1], 10)
+ , code: match[2]
+ , description: match[3]
+ }})
+
+ out = 'var all = module.exports.all = ' + JSON.stringify(data, 0, 1) + '\n\n'
+
+ out += '\nmodule.exports.errno = {\n '
+ + data.map(function (e, i) {
+ return '\'' + e.errno + '\': all[' + i + ']'
+ }).join('\n , ')
+ + '\n}\n\n'
+
+ out += '\nmodule.exports.code = {\n '
+ + data.map(function (e, i) {
+ return '\'' + e.code + '\': all[' + i + ']'
+ }).join('\n , ')
+ + '\n}\n\n'
+
+ out += '\nmodule.exports.custom = require("./custom")(module.exports)\n'
+
+ fs.writeFile('errno.js', out)
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/cli.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/cli.js
new file mode 100755
index 0000000000..61d179bbe6
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/cli.js
@@ -0,0 +1,22 @@
+#!/usr/bin/env node
+
+var errno = require('./')
+ , arg = process.argv[2]
+ , data, code
+
+if (arg === undefined) {
+ console.log(JSON.stringify(errno.code, null, 2))
+ process.exit(0)
+}
+
+if ((code = +arg) == arg)
+ data = errno.errno[code]
+else
+ data = errno.code[arg] || errno.code[arg.toUpperCase()]
+
+if (data)
+ console.log(JSON.stringify(data, null, 2))
+else {
+ console.error('No such errno/code: "' + arg + '"')
+ process.exit(1)
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/custom.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/custom.js
new file mode 100644
index 0000000000..ca8c1d8dcd
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/custom.js
@@ -0,0 +1,57 @@
+var prr = require('prr')
+
+function init (type, message, cause) {
+ if (!!message && typeof message != 'string') {
+ message = message.message || message.name
+ }
+ prr(this, {
+ type : type
+ , name : type
+ // can be passed just a 'cause'
+ , cause : typeof message != 'string' ? message : cause
+ , message : message
+ }, 'ewr')
+}
+
+// generic prototype, not intended to be actually used - helpful for `instanceof`
+function CustomError (message, cause) {
+ Error.call(this)
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, this.constructor)
+ init.call(this, 'CustomError', message, cause)
+}
+
+CustomError.prototype = new Error()
+
+function createError (errno, type, proto) {
+ var err = function (message, cause) {
+ init.call(this, type, message, cause)
+ //TODO: the specificity here is stupid, errno should be available everywhere
+ if (type == 'FilesystemError') {
+ this.code = this.cause.code
+ this.path = this.cause.path
+ this.errno = this.cause.errno
+ this.message =
+ (errno.errno[this.cause.errno]
+ ? errno.errno[this.cause.errno].description
+ : this.cause.message)
+ + (this.cause.path ? ' [' + this.cause.path + ']' : '')
+ }
+ Error.call(this)
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, err)
+ }
+ err.prototype = !!proto ? new proto() : new CustomError()
+ return err
+}
+
+module.exports = function (errno) {
+ var ce = function (type, proto) {
+ return createError(errno, type, proto)
+ }
+ return {
+ CustomError : CustomError
+ , FilesystemError : ce('FilesystemError')
+ , createError : ce
+ }
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/errno.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/errno.js
new file mode 100644
index 0000000000..efb79d41b1
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/errno.js
@@ -0,0 +1,313 @@
+var all = module.exports.all = [
+ {
+ errno: -2,
+ code: 'ENOENT',
+ description: 'no such file or directory'
+ },
+ {
+ errno: -1,
+ code: 'UNKNOWN',
+ description: 'unknown error'
+ },
+ {
+ errno: 0,
+ code: 'OK',
+ description: 'success'
+ },
+ {
+ errno: 1,
+ code: 'EOF',
+ description: 'end of file'
+ },
+ {
+ errno: 2,
+ code: 'EADDRINFO',
+ description: 'getaddrinfo error'
+ },
+ {
+ errno: 3,
+ code: 'EACCES',
+ description: 'permission denied'
+ },
+ {
+ errno: 4,
+ code: 'EAGAIN',
+ description: 'resource temporarily unavailable'
+ },
+ {
+ errno: 5,
+ code: 'EADDRINUSE',
+ description: 'address already in use'
+ },
+ {
+ errno: 6,
+ code: 'EADDRNOTAVAIL',
+ description: 'address not available'
+ },
+ {
+ errno: 7,
+ code: 'EAFNOSUPPORT',
+ description: 'address family not supported'
+ },
+ {
+ errno: 8,
+ code: 'EALREADY',
+ description: 'connection already in progress'
+ },
+ {
+ errno: 9,
+ code: 'EBADF',
+ description: 'bad file descriptor'
+ },
+ {
+ errno: 10,
+ code: 'EBUSY',
+ description: 'resource busy or locked'
+ },
+ {
+ errno: 11,
+ code: 'ECONNABORTED',
+ description: 'software caused connection abort'
+ },
+ {
+ errno: 12,
+ code: 'ECONNREFUSED',
+ description: 'connection refused'
+ },
+ {
+ errno: 13,
+ code: 'ECONNRESET',
+ description: 'connection reset by peer'
+ },
+ {
+ errno: 14,
+ code: 'EDESTADDRREQ',
+ description: 'destination address required'
+ },
+ {
+ errno: 15,
+ code: 'EFAULT',
+ description: 'bad address in system call argument'
+ },
+ {
+ errno: 16,
+ code: 'EHOSTUNREACH',
+ description: 'host is unreachable'
+ },
+ {
+ errno: 17,
+ code: 'EINTR',
+ description: 'interrupted system call'
+ },
+ {
+ errno: 18,
+ code: 'EINVAL',
+ description: 'invalid argument'
+ },
+ {
+ errno: 19,
+ code: 'EISCONN',
+ description: 'socket is already connected'
+ },
+ {
+ errno: 20,
+ code: 'EMFILE',
+ description: 'too many open files'
+ },
+ {
+ errno: 21,
+ code: 'EMSGSIZE',
+ description: 'message too long'
+ },
+ {
+ errno: 22,
+ code: 'ENETDOWN',
+ description: 'network is down'
+ },
+ {
+ errno: 23,
+ code: 'ENETUNREACH',
+ description: 'network is unreachable'
+ },
+ {
+ errno: 24,
+ code: 'ENFILE',
+ description: 'file table overflow'
+ },
+ {
+ errno: 25,
+ code: 'ENOBUFS',
+ description: 'no buffer space available'
+ },
+ {
+ errno: 26,
+ code: 'ENOMEM',
+ description: 'not enough memory'
+ },
+ {
+ errno: 27,
+ code: 'ENOTDIR',
+ description: 'not a directory'
+ },
+ {
+ errno: 28,
+ code: 'EISDIR',
+ description: 'illegal operation on a directory'
+ },
+ {
+ errno: 29,
+ code: 'ENONET',
+ description: 'machine is not on the network'
+ },
+ {
+ errno: 31,
+ code: 'ENOTCONN',
+ description: 'socket is not connected'
+ },
+ {
+ errno: 32,
+ code: 'ENOTSOCK',
+ description: 'socket operation on non-socket'
+ },
+ {
+ errno: 33,
+ code: 'ENOTSUP',
+ description: 'operation not supported on socket'
+ },
+ {
+ errno: 34,
+ code: 'ENOENT',
+ description: 'no such file or directory'
+ },
+ {
+ errno: 35,
+ code: 'ENOSYS',
+ description: 'function not implemented'
+ },
+ {
+ errno: 36,
+ code: 'EPIPE',
+ description: 'broken pipe'
+ },
+ {
+ errno: 37,
+ code: 'EPROTO',
+ description: 'protocol error'
+ },
+ {
+ errno: 38,
+ code: 'EPROTONOSUPPORT',
+ description: 'protocol not supported'
+ },
+ {
+ errno: 39,
+ code: 'EPROTOTYPE',
+ description: 'protocol wrong type for socket'
+ },
+ {
+ errno: 40,
+ code: 'ETIMEDOUT',
+ description: 'connection timed out'
+ },
+ {
+ errno: 41,
+ code: 'ECHARSET',
+ description: 'invalid Unicode character'
+ },
+ {
+ errno: 42,
+ code: 'EAIFAMNOSUPPORT',
+ description: 'address family for hostname not supported'
+ },
+ {
+ errno: 44,
+ code: 'EAISERVICE',
+ description: 'servname not supported for ai_socktype'
+ },
+ {
+ errno: 45,
+ code: 'EAISOCKTYPE',
+ description: 'ai_socktype not supported'
+ },
+ {
+ errno: 46,
+ code: 'ESHUTDOWN',
+ description: 'cannot send after transport endpoint shutdown'
+ },
+ {
+ errno: 47,
+ code: 'EEXIST',
+ description: 'file already exists'
+ },
+ {
+ errno: 48,
+ code: 'ESRCH',
+ description: 'no such process'
+ },
+ {
+ errno: 49,
+ code: 'ENAMETOOLONG',
+ description: 'name too long'
+ },
+ {
+ errno: 50,
+ code: 'EPERM',
+ description: 'operation not permitted'
+ },
+ {
+ errno: 51,
+ code: 'ELOOP',
+ description: 'too many symbolic links encountered'
+ },
+ {
+ errno: 52,
+ code: 'EXDEV',
+ description: 'cross-device link not permitted'
+ },
+ {
+ errno: 53,
+ code: 'ENOTEMPTY',
+ description: 'directory not empty'
+ },
+ {
+ errno: 54,
+ code: 'ENOSPC',
+ description: 'no space left on device'
+ },
+ {
+ errno: 55,
+ code: 'EIO',
+ description: 'i/o error'
+ },
+ {
+ errno: 56,
+ code: 'EROFS',
+ description: 'read-only file system'
+ },
+ {
+ errno: 57,
+ code: 'ENODEV',
+ description: 'no such device'
+ },
+ {
+ errno: 58,
+ code: 'ESPIPE',
+ description: 'invalid seek'
+ },
+ {
+ errno: 59,
+ code: 'ECANCELED',
+ description: 'operation canceled'
+ }
+]
+
+module.exports.errno = {}
+module.exports.code = {}
+
+all.forEach(function (error) {
+ module.exports.errno[error.errno] = error
+ module.exports.code[error.code] = error
+})
+
+module.exports.custom = require('./custom')(module.exports)
+module.exports.create = module.exports.custom.createError
diff --git a/deps/npm/node_modules/mississippi/.npmignore b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.npmignore
index b512c09d47..b512c09d47 100644
--- a/deps/npm/node_modules/mississippi/.npmignore
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.npmignore
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
new file mode 100644
index 0000000000..33dcbc3a86
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+node_js:
+ - 0.8
+ - "0.10"
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
new file mode 100644
index 0000000000..29b95e39a5
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
@@ -0,0 +1,11 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2014 Rod Vagg
+---------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
new file mode 100644
index 0000000000..b934048235
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
@@ -0,0 +1,47 @@
+# prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr)
+
+An sensible alternative to `Object.defineProperty()`. Available in npm and Ender as **prr**.
+
+## Usage
+
+Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (`'enumerable'`, `'configurable'` and `'writable'` are all `false`):
+
+```js
+prr(obj, 'foo', 'bar')
+```
+
+Adjust the default options:
+
+```js
+prr(obj, 'foo', 'bar', { enumerable: true, writable: true })
+```
+
+Do the same operation for multiple properties:
+
+```js
+prr(obj, { one: 'one', two: 'two' })
+// or with options:
+prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true })
+```
+
+### Simplify!
+
+But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can simplify.
+
+As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`:
+
+```js
+prr(obj, 'foo', 'bar', 'ew') // enumerable and writable but not configurable
+// muliple properties:
+prr(obj, { one: 'one', two: 'two' }, 'ewc') // configurable too
+```
+
+## Where can I use it?
+
+Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[property] = value` so you can get close to what you want.
+
+*prr* is Ender-compatible so you can include it in your Ender build and `$.prr(...)` or `var prr = require('prr'); prr(...)`.
+
+## Licence
+
+prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
new file mode 100644
index 0000000000..ea188043a6
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
@@ -0,0 +1,58 @@
+{
+ "_from": "prr@~1.0.1",
+ "_id": "prr@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+ "_location": "/libcipm/worker-farm/errno/prr",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "prr@~1.0.1",
+ "name": "prr",
+ "escapedName": "prr",
+ "rawSpec": "~1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~1.0.1"
+ },
+ "_requiredBy": [
+ "/libcipm/worker-farm/errno"
+ ],
+ "_resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "_shasum": "d3fc114ba06995a45ec6893f484ceb1d78f5f476",
+ "_spec": "prr@~1.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "rod@vagg.org",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/prr/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "A better Object.defineProperty()",
+ "devDependencies": {
+ "tap": "*"
+ },
+ "homepage": "https://github.com/rvagg/prr",
+ "keywords": [
+ "property",
+ "properties",
+ "defineProperty",
+ "ender"
+ ],
+ "license": "MIT",
+ "main": "./prr.js",
+ "name": "prr",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/prr.git"
+ },
+ "scripts": {
+ "test": "node ./test.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/prr.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/prr.js
new file mode 100644
index 0000000000..94f58628be
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/prr.js
@@ -0,0 +1,63 @@
+/*!
+ * prr
+ * (c) 2013 Rod Vagg <rod@vagg.org>
+ * https://github.com/rvagg/prr
+ * License: MIT
+ */
+
+(function (name, context, definition) {
+ if (typeof module != 'undefined' && module.exports)
+ module.exports = definition()
+ else
+ context[name] = definition()
+})('prr', this, function() {
+
+ var setProperty = typeof Object.defineProperty == 'function'
+ ? function (obj, key, options) {
+ Object.defineProperty(obj, key, options)
+ return obj
+ }
+ : function (obj, key, options) { // < es5
+ obj[key] = options.value
+ return obj
+ }
+
+ , makeOptions = function (value, options) {
+ var oo = typeof options == 'object'
+ , os = !oo && typeof options == 'string'
+ , op = function (p) {
+ return oo
+ ? !!options[p]
+ : os
+ ? options.indexOf(p[0]) > -1
+ : false
+ }
+
+ return {
+ enumerable : op('enumerable')
+ , configurable : op('configurable')
+ , writable : op('writable')
+ , value : value
+ }
+ }
+
+ , prr = function (obj, key, value, options) {
+ var k
+
+ options = makeOptions(value, options)
+
+ if (typeof key == 'object') {
+ for (k in key) {
+ if (Object.hasOwnProperty.call(key, k)) {
+ options.value = key[k]
+ setProperty(obj, k, options)
+ }
+ }
+ return obj
+ }
+
+ return setProperty(obj, key, options)
+ }
+
+ return prr
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/test.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/test.js
new file mode 100644
index 0000000000..5222e3073c
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/node_modules/prr/test.js
@@ -0,0 +1,169 @@
+const test = require('tap').test
+ , prr = require('./')
+
+test('test prr(o, key, value) form', function (t) {
+ t.plan(2)
+
+ var o = {}
+ prr(o, 'foo', 'bar')
+ t.equal(o.foo, 'bar', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo')
+ , {
+ enumerable : false
+ , configurable : false
+ , writable : false
+ , value : 'bar'
+ }
+ , 'correct property descriptor'
+ )
+ t.end()
+})
+
+test('test prr(o, { key: value }) form', function (t) {
+ t.plan(2)
+
+ var o = {}
+ prr(o, { foo: 'bar' })
+
+ t.equal(o.foo, 'bar', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo')
+ , {
+ enumerable : false
+ , configurable : false
+ , writable : false
+ , value : 'bar'
+ }
+ , 'correct property descriptor'
+ )
+ t.end()
+})
+
+test('test multiple key:value pairs', function (t) {
+ var o = { foo: 'bar' }
+
+ prr(o, { one: 'ONE', two: 'TWO', obj: { o: 'o' }})
+
+ t.deepEqual(o, { foo: 'bar' }, 'properties are not enumerable')
+ t.equal(o.one, 'ONE', 'correctly set property')
+ t.equal(o.two, 'TWO', 'correctly set property')
+ t.deepEqual(o.obj, { o: 'o' }, 'correctly set property')
+
+ ;[ 'one', 'two', 'obj' ].forEach(function (p) {
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, p)
+ , {
+ enumerable : false
+ , configurable : false
+ , writable : false
+ , value : p == 'obj' ? { o: 'o' } : p.toUpperCase()
+ }
+ , 'correct property descriptor'
+ )
+ })
+
+ t.end()
+})
+
+test('test descriptor options', function (t) {
+ var o = {}
+
+ prr(o, 'foo', 'bar', {
+ enumerable : true
+ , configurable : false
+ })
+ t.equal(o.foo, 'bar', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo')
+ , {
+ enumerable : true
+ , configurable : false
+ , writable : false
+ , value : 'bar'
+ }
+ , 'correct property descriptor'
+ )
+
+ prr(o, 'foo2', 'bar2', {
+ enumerable : true
+ , configurable : true
+ , writable : false
+ })
+ t.equal(o.foo2, 'bar2', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo2')
+ , {
+ enumerable : true
+ , configurable : true
+ , writable : false
+ , value : 'bar2'
+ }
+ , 'correct property descriptor'
+ )
+
+ prr(o, 'foo3', 'bar3', {
+ enumerable : true
+ , configurable : true
+ , writable : true
+ })
+ t.equal(o.foo3, 'bar3', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo3')
+ , {
+ enumerable : true
+ , configurable : true
+ , writable : true
+ , value : 'bar3'
+ }
+ , 'correct property descriptor'
+ )
+
+ t.end()
+})
+
+
+test('test descriptor options, string form', function (t) {
+ var o = {}
+
+ prr(o, 'foo', 'bar', 'e')
+ t.equal(o.foo, 'bar', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo')
+ , {
+ enumerable : true
+ , configurable : false
+ , writable : false
+ , value : 'bar'
+ }
+ , 'correct property descriptor'
+ )
+
+ prr(o, 'foo2', 'bar2', 'ec')
+ t.equal(o.foo2, 'bar2', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo2')
+ , {
+ enumerable : true
+ , configurable : true
+ , writable : false
+ , value : 'bar2'
+ }
+ , 'correct property descriptor'
+ )
+
+ prr(o, 'foo3', 'bar3', 'ecw')
+ t.equal(o.foo3, 'bar3', 'correct value')
+ t.deepEqual(
+ Object.getOwnPropertyDescriptor(o, 'foo3')
+ , {
+ enumerable : true
+ , configurable : true
+ , writable : true
+ , value : 'bar3'
+ }
+ , 'correct property descriptor'
+ )
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/package.json b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/package.json
new file mode 100644
index 0000000000..cdccb63884
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/package.json
@@ -0,0 +1,62 @@
+{
+ "_from": "errno@~0.1.7",
+ "_id": "errno@0.1.7",
+ "_inBundle": false,
+ "_integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "_location": "/libcipm/worker-farm/errno",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "errno@~0.1.7",
+ "name": "errno",
+ "escapedName": "errno",
+ "rawSpec": "~0.1.7",
+ "saveSpec": null,
+ "fetchSpec": "~0.1.7"
+ },
+ "_requiredBy": [
+ "/libcipm/worker-farm"
+ ],
+ "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+ "_shasum": "4684d71779ad39af177e3f007996f7c67c852618",
+ "_spec": "errno@~0.1.7",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm/node_modules/worker-farm",
+ "authors": [
+ "Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)"
+ ],
+ "bin": {
+ "errno": "./cli.js"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/node-errno/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "prr": "~1.0.1"
+ },
+ "deprecated": false,
+ "description": "libuv errno details exposed",
+ "devDependencies": {
+ "error-stack-parser": "^2.0.1",
+ "inherits": "^2.0.3",
+ "tape": "~4.8.0"
+ },
+ "homepage": "https://github.com/rvagg/node-errno#readme",
+ "keywords": [
+ "errors",
+ "errno",
+ "libuv"
+ ],
+ "license": "MIT",
+ "main": "errno.js",
+ "name": "errno",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/node-errno.git"
+ },
+ "scripts": {
+ "test": "node --use_strict test.js"
+ },
+ "version": "0.1.7"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/test.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/test.js
new file mode 100644
index 0000000000..1c046357bc
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/errno/test.js
@@ -0,0 +1,88 @@
+var test = require('tape')
+ , inherits = require('inherits')
+ , ErrorStackParser = require('error-stack-parser')
+ , errno = require('./')
+
+test('sanity checks', function (t) {
+ t.ok(errno.all, 'errno.all not found')
+ t.ok(errno.errno, 'errno.errno not found')
+ t.ok(errno.code, 'errno.code not found')
+
+ t.equal(errno.all.length, 60, 'found ' + errno.all.length + ', expected 60')
+ t.equal(errno.errno['-1'], errno.all[1], 'errno -1 not second element')
+
+ t.equal(errno.code['UNKNOWN'], errno.all[1], 'code UNKNOWN not second element')
+
+ t.equal(errno.errno[1], errno.all[3], 'errno 1 not fourth element')
+
+ t.equal(errno.code['EOF'], errno.all[3], 'code EOF not fourth element')
+ t.end()
+})
+
+test('custom errors', function (t) {
+ const Cust = errno.create('FooNotBarError')
+ const cust = new Cust('foo is not bar')
+
+ t.equal(cust.name, 'FooNotBarError', 'correct custom name')
+ t.equal(cust.type, 'FooNotBarError', 'correct custom type')
+ t.equal(cust.message, 'foo is not bar', 'correct custom message')
+ t.notOk(cust.cause, 'no cause')
+ t.end()
+})
+
+test('callstack', function (t) {
+ const MyError = errno.create('MyError')
+
+ function lastFunction (ErrorType, cb) {
+ process.nextTick(cb, new ErrorType('oh noes!'))
+ }
+
+ function secondLastFunction (ErrorType, cb) {
+ lastFunction(ErrorType, cb)
+ }
+
+ function testFrames (t) {
+ return function (err) {
+ const stack = ErrorStackParser.parse(err)
+ t.same(stack[0].functionName, 'lastFunction', 'last stack frame ok')
+ t.same(stack[1].functionName, 'secondLastFunction', 'second last stack frame ok')
+ t.end()
+ }
+ }
+
+ t.test('custom error, default prototype', function (t) {
+ secondLastFunction(MyError, testFrames(t))
+ })
+
+ t.test('custom error, custom prototype', function (t) {
+ const MyError2 = errno.create('MyError2', MyError)
+ secondLastFunction(MyError2, testFrames(t))
+ })
+
+ t.test('custom error, using inheritance', function (t) {
+ const CustomError = errno.custom.CustomError
+
+ function MyError3 (message, cause) {
+ CustomError.call(this, message, cause)
+ }
+
+ inherits(MyError3, CustomError)
+
+ secondLastFunction(MyError3, testFrames(t))
+ })
+})
+
+test('error without message', function (t) {
+ const Cust = errno.create('WriteError')
+ const cust = new Cust({
+ code: 22,
+ message: '',
+ name: 'QuotaExceededError'
+ })
+
+ t.equal(cust.name, 'WriteError', 'correct custom name')
+ t.equal(cust.type, 'WriteError', 'correct custom type')
+ t.equal(cust.message, 'QuotaExceededError', 'message is the name')
+ t.notOk(cust.cause, 'no cause')
+ t.end()
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/.npmignore b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/LICENCE b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/Makefile b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/README.md b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/immutable.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/mutable.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/package.json b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/package.json
new file mode 100644
index 0000000000..71b59f039e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "xtend@~4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/libcipm/worker-farm/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@~4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "~4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~4.0.1"
+ },
+ "_requiredBy": [
+ "/libcipm/worker-farm"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@~4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm/node_modules/worker-farm",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/test.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/test.js
new file mode 100644
index 0000000000..093a2b061e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/node_modules/xtend/test.js
@@ -0,0 +1,83 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
+
+test("null prototype", function(assert) {
+ var a = { a: "foo" }
+ var b = Object.create(null)
+ b.b = "bar";
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("null prototype mutable", function (assert) {
+ var a = { foo: "bar" }
+ var b = Object.create(null)
+ b.bar = "baz";
+
+ mutableExtend(a, b)
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/package.json b/deps/npm/node_modules/libcipm/node_modules/worker-farm/package.json
new file mode 100644
index 0000000000..1bbd3d0044
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "worker-farm@^1.5.4",
+ "_id": "worker-farm@1.5.4",
+ "_inBundle": false,
+ "_integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==",
+ "_location": "/libcipm/worker-farm",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "worker-farm@^1.5.4",
+ "name": "worker-farm",
+ "escapedName": "worker-farm",
+ "rawSpec": "^1.5.4",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.4"
+ },
+ "_requiredBy": [
+ "/libcipm"
+ ],
+ "_resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz",
+ "_shasum": "4debbe46b40edefcc717ebde74a90b1ae1e909a1",
+ "_spec": "worker-farm@^1.5.4",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libcipm",
+ "authors": [
+ "Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)"
+ ],
+ "bugs": {
+ "url": "https://github.com/rvagg/node-worker-farm/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "errno": "~0.1.7",
+ "xtend": "~4.0.1"
+ },
+ "deprecated": false,
+ "description": "Distribute processing tasks to child processes with an Ć¼ber-simple API and baked-in durability & custom concurrency options.",
+ "devDependencies": {
+ "tape": "~4.9.0"
+ },
+ "homepage": "https://github.com/rvagg/node-worker-farm",
+ "keywords": [
+ "worker",
+ "child",
+ "processing",
+ "farm"
+ ],
+ "license": "MIT",
+ "main": "./lib/index.js",
+ "name": "worker-farm",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/node-worker-farm.git"
+ },
+ "scripts": {
+ "test": "node ./tests/"
+ },
+ "types": "./index.d.ts",
+ "version": "1.5.4"
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/child.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/child.js
new file mode 100644
index 0000000000..85e8f5789e
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/child.js
@@ -0,0 +1,85 @@
+'use strict'
+
+const fs = require('fs')
+const started = Date.now()
+
+
+module.exports = function (timeout, callback) {
+ callback = callback.bind(null, null, process.pid, Math.random(), timeout)
+ if (timeout)
+ return setTimeout(callback, timeout)
+ callback()
+}
+
+
+module.exports.args = function (callback) {
+ console.log(process.argv)
+ console.log(process.execArgv)
+ callback()
+}
+
+
+module.exports.run0 = function (callback) {
+ module.exports(0, callback)
+}
+
+
+module.exports.killable = function (id, callback) {
+ if (Math.random() < 0.5)
+ return process.exit(-1)
+ callback(null, id, process.pid)
+}
+
+
+module.exports.err = function (type, message, data, callback) {
+ if (typeof data == 'function') {
+ callback = data
+ data = null
+ } else {
+ let err = new Error(message)
+ Object.keys(data).forEach(function(key) {
+ err[key] = data[key]
+ })
+ callback(err)
+ return
+ }
+
+ if (type == 'TypeError')
+ return callback(new TypeError(message))
+ callback(new Error(message))
+}
+
+
+module.exports.block = function () {
+ while (true);
+}
+
+
+// use provided file path to save retries count among terminated workers
+module.exports.stubborn = function (path, callback) {
+ function isOutdated(path) {
+ return ((new Date).getTime() - fs.statSync(path).mtime.getTime()) > 2000
+ }
+
+ // file may not be properly deleted, check if modified no earler than two seconds ago
+ if (!fs.existsSync(path) || isOutdated(path)) {
+ fs.writeFileSync(path, '1')
+ process.exit(-1)
+ }
+
+ let retry = parseInt(fs.readFileSync(path, 'utf8'))
+ if (Number.isNaN(retry))
+ return callback(new Error('file contents is not a number'))
+
+ if (retry > 4) {
+ callback(null, 12)
+ } else {
+ fs.writeFileSync(path, String(retry + 1))
+ process.exit(-1)
+ }
+}
+
+
+module.exports.uptime = function (callback) {
+ callback(null, Date.now() - started)
+}
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/debug.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/debug.js
new file mode 100644
index 0000000000..6ffd446489
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/debug.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const workerFarm = require('../')
+ , workers = workerFarm(require.resolve('./child'), ['args'])
+
+
+workers.args(function() {
+ workerFarm.end(workers)
+ console.log('FINISHED')
+ process.exit(0)
+})
diff --git a/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/index.js b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/index.js
new file mode 100644
index 0000000000..32d200ff7b
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/node_modules/worker-farm/tests/index.js
@@ -0,0 +1,541 @@
+'use strict'
+
+const tape = require('tape')
+ , child_process = require('child_process')
+ , workerFarm = require('../')
+ , childPath = require.resolve('./child')
+ , fs = require('fs')
+
+function uniq (ar) {
+ let a = [], i, j
+ o: for (i = 0; i < ar.length; ++i) {
+ for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o
+ a[a.length] = ar[i]
+ }
+ return a
+}
+
+
+// a child where module.exports = function ...
+tape('simple, exports=function test', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath)
+ child(0, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense')
+ t.ok(pid < process.pid + 500, 'pid makes sense')
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// a child where we have module.exports.fn = function ...
+tape('simple, exports.fn test', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath, [ 'run0' ])
+ child.run0(function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense')
+ t.ok(pid < process.pid + 500, 'pid makes sense')
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using a single child process
+// when maxConcurrentWorkers = 1
+tape('single worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 1 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(1, uniq(pids).length, 'only a single process (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using two child processes
+// when maxConcurrentWorkers = 2
+tape('two workers', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 2 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(2, uniq(pids).length, 'only two child processes (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using a child process per
+// call when maxConcurrentWorkers = 10
+tape('many workers', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 10 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(1, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(10, uniq(pids).length, 'pids are all the same (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('auto start workers', function (t) {
+ let child = workerFarm({ maxConcurrentWorkers: 3, autoStart: true }, childPath, ['uptime'])
+ , pids = []
+ , count = 5
+ , i = count
+ , delay = 250
+
+ t.plan(count + 1)
+
+ setTimeout(function() {
+ while (i--)
+ child.uptime(function (err, uptime) {
+ t.ok(uptime > 10, 'child has been up before the request (' + uptime + 'ms)')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ }, delay)
+})
+
+
+// use the returned pids to check that we're using a child process per
+// call when we set maxCallsPerWorker = 1 even when we have maxConcurrentWorkers = 1
+tape('single call per worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: 1
+ , autoStart: true
+ }, childPath)
+ , pids = []
+ , count = 25
+ , i = count
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == count) {
+ t.equal(count, uniq(pids).length, 'one process for each call (by pid)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (pids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// use the returned pids to check that we're using a child process per
+// two-calls when we set maxCallsPerWorker = 2 even when we have maxConcurrentWorkers = 1
+tape('two calls per worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: 2
+ , autoStart: true
+ }, childPath)
+ , pids = []
+ , count = 20
+ , i = count
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == count) {
+ t.equal(count / 2, uniq(pids).length, 'one process for each call (by pid)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (pids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// use timing to confirm that one worker will process calls sequentially
+tape('many concurrent calls', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 200
+ , count = 200
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // upper-limit not tied to `count` at all
+ t.ok(time > defer && time < (defer * 2.5), 'processed tasks concurrently (' + time + 'ms)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// use timing to confirm that one child processes calls sequentially with
+// maxConcurrentCallsPerWorker = 1
+tape('single concurrent call', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: 1
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 20
+ , count = 100
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // upper-limit tied closely to `count`, 1.3 is generous but accounts for all the timers
+ // coming back at the same time and the IPC overhead
+ t.ok(time > (defer * count) && time < (defer * count * 1.3), 'processed tasks sequentially (' + time + ')')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// use timing to confirm that one child processes *only* 5 calls concurrently
+tape('multiple concurrent calls', function (t) {
+ t.plan(2)
+
+ let callsPerWorker = 5
+ , child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: callsPerWorker
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 100
+ , count = 100
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // (defer * (count / callsPerWorker + 1)) - if precise it'd be count/callsPerWorker
+ // but accounting for IPC and other overhead, we need to give it a bit of extra time,
+ // hence the +1
+ t.ok(time > (defer * 1.5) && time < (defer * (count / callsPerWorker + 1)), 'processed tasks concurrently (' + time + 'ms)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// call a method that will die with a probability of 0.5 but expect that
+// we'll get results for each of our calls anyway
+tape('durability', function (t) {
+ t.plan(3)
+
+ let child = workerFarm({ maxConcurrentWorkers: 2 }, childPath, [ 'killable' ])
+ , ids = []
+ , pids = []
+ , count = 20
+ , i = count
+
+ while (i--) {
+ child.killable(i, function (err, id, pid) {
+ ids.push(id)
+ pids.push(pid)
+ if (ids.length == count) {
+ t.ok(uniq(pids).length > 2, 'processed by many (' + uniq(pids).length + ') workers, but got there in the end!')
+ t.ok(uniq(ids).length == count, 'received a single result for each unique call')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (ids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// a callback provided to .end() can and will be called (uses "simple, exports=function test" to create a child)
+tape('simple, end callback', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath)
+ child(0, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function() {
+ t.pass('an .end() callback was successfully called')
+ })
+})
+
+
+tape('call timeout test', function (t) {
+ t.plan(3 + 3 + 4 + 4 + 4 + 3 + 1)
+
+ let child = workerFarm({ maxCallTime: 250, maxConcurrentWorkers: 1 }, childPath)
+
+ // should come back ok
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+
+ // should come back ok
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+
+ // should die
+ child(500, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+
+ // should die
+ child(1000, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+
+ // should die even though it is only a 100ms task, it'll get caught up
+ // in a dying worker
+ setTimeout(function () {
+ child(100, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+ }, 200)
+
+ // should be ok, new worker
+ setTimeout(function () {
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ }, 400)
+})
+
+
+tape('test error passing', function (t) {
+ t.plan(10)
+
+ let child = workerFarm(childPath, [ 'err' ])
+ child.err('Error', 'this is an Error', function (err) {
+ t.ok(err instanceof Error, 'is an Error object')
+ t.equal('Error', err.type, 'correct type')
+ t.equal('this is an Error', err.message, 'correct message')
+ })
+ child.err('TypeError', 'this is a TypeError', function (err) {
+ t.ok(err instanceof Error, 'is a TypeError object')
+ t.equal('TypeError', err.type, 'correct type')
+ t.equal('this is a TypeError', err.message, 'correct message')
+ })
+ child.err('Error', 'this is an Error with custom props', {foo: 'bar', 'baz': 1}, function (err) {
+ t.ok(err instanceof Error, 'is an Error object')
+ t.equal(err.foo, 'bar', 'passes data')
+ t.equal(err.baz, 1, 'passes data')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('test maxConcurrentCalls', function (t) {
+ t.plan(10)
+
+ let child = workerFarm({ maxConcurrentCalls: 5 }, childPath)
+
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) {
+ t.ok(err)
+ t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type')
+ })
+ child(50, function (err) {
+ t.ok(err)
+ t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// this test should not keep the process running! if the test process
+// doesn't die then the problem is here
+tape('test timeout kill', function (t) {
+ t.plan(3)
+
+ let child = workerFarm({ maxCallTime: 250, maxConcurrentWorkers: 1 }, childPath, [ 'block' ])
+ child.block(function (err) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('test max retries after process terminate', function (t) {
+ t.plan(7)
+
+ // temporary file is used to store the number of retries among terminating workers
+ let filepath1 = '.retries1'
+ let child1 = workerFarm({ maxConcurrentWorkers: 1, maxRetries: 5}, childPath, [ 'stubborn' ])
+ child1.stubborn(filepath1, function (err, result) {
+ t.notOk(err, 'no error')
+ t.equal(result, 12, 'correct result')
+ })
+
+ workerFarm.end(child1, function () {
+ fs.unlinkSync(filepath1)
+ t.ok(true, 'workerFarm ended')
+ })
+
+ let filepath2 = '.retries2'
+ let child2 = workerFarm({ maxConcurrentWorkers: 1, maxRetries: 3}, childPath, [ 'stubborn' ])
+ child2.stubborn(filepath2, function (err, result) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'ProcessTerminatedError', 'correct error type')
+ t.equal(err.message, 'cancel after 3 retries!', 'correct message and number of retries')
+ })
+
+ workerFarm.end(child2, function () {
+ fs.unlinkSync(filepath2)
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('ensure --debug/--inspect not propagated to children', function (t) {
+ t.plan(3)
+
+ let script = __dirname + '/debug.js'
+ , debugArg = process.version.replace(/^v(\d+)\..*$/, '$1') >= 8 ? '--inspect' : '--debug=8881'
+ , child = child_process.spawn(process.execPath, [ debugArg, script ])
+ , stdout = ''
+
+ child.stdout.on('data', function (data) {
+ stdout += data.toString()
+ })
+
+ child.on('close', function (code) {
+ t.equal(code, 0, 'exited without error (' + code + ')')
+ t.ok(stdout.indexOf('FINISHED') > -1, 'process finished')
+ t.ok(stdout.indexOf('--debug') === -1, 'child does not receive debug flag')
+ })
+})
diff --git a/deps/npm/node_modules/libcipm/package.json b/deps/npm/node_modules/libcipm/package.json
new file mode 100644
index 0000000000..e6ef0aaf89
--- /dev/null
+++ b/deps/npm/node_modules/libcipm/package.json
@@ -0,0 +1,104 @@
+{
+ "_from": "libcipm@latest",
+ "_id": "libcipm@1.6.0",
+ "_inBundle": false,
+ "_integrity": "sha512-HpV3ibmHSAOiDVYIDOM2uDlfkkmglivsavGn6RwJDne+PjXeNQyHAwXddikfsPqxc0OP6GsHJwrwaxhCHZs8Dg==",
+ "_location": "/libcipm",
+ "_phantomChildren": {
+ "hosted-git-info": "2.5.0",
+ "osenv": "0.1.5",
+ "semver": "5.5.0",
+ "validate-npm-package-name": "3.0.0"
+ },
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "libcipm@latest",
+ "name": "libcipm",
+ "escapedName": "libcipm",
+ "rawSpec": "latest",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-1.6.0.tgz",
+ "_shasum": "3ca7cff31f148615a6aac2b14759de14a5688134",
+ "_spec": "libcipm@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
+ "author": {
+ "name": "Kat MarchƔn",
+ "email": "kzm@sykosomatic.org"
+ },
+ "bugs": {
+ "url": "https://github.com/zkat/cipm/issues"
+ },
+ "bundleDependencies": false,
+ "config": {
+ "nyc": {
+ "exclude": [
+ "node_modules/**",
+ "test/**"
+ ]
+ }
+ },
+ "dependencies": {
+ "bin-links": "^1.1.0",
+ "bluebird": "^3.5.1",
+ "find-npm-prefix": "^1.0.2",
+ "graceful-fs": "^4.1.11",
+ "lock-verify": "^2.0.0",
+ "npm-lifecycle": "^2.0.0",
+ "npm-logical-tree": "^1.2.1",
+ "npm-package-arg": "^6.0.0",
+ "pacote": "^7.5.1",
+ "protoduck": "^5.0.0",
+ "read-package-json": "^2.0.12",
+ "rimraf": "^2.6.2",
+ "worker-farm": "^1.5.4"
+ },
+ "deprecated": false,
+ "description": "programmatic API for cipm: a ci-oriented package installer for npm",
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "npmlog": "^4.1.2",
+ "nyc": "^11.4.1",
+ "require-inject": "^1.4.2",
+ "standard": "^11.0.0",
+ "standard-version": "^4.3.0",
+ "tacks": "^1.2.6",
+ "tap": "^11.1.1",
+ "weallbehave": "^1.2.0",
+ "weallcontribute": "^1.0.8"
+ },
+ "files": [
+ "*.js",
+ "lib"
+ ],
+ "homepage": "https://github.com/zkat/cipm#readme",
+ "keywords": [
+ "npm",
+ "package manager",
+ "caching",
+ "downloader"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "libcipm",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zkat/cipm.git"
+ },
+ "scripts": {
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap -J --nyc-arg=--all --coverage test/specs",
+ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
+ "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ },
+ "version": "1.6.0"
+}
diff --git a/deps/npm/node_modules/libnpx/CHANGELOG.md b/deps/npm/node_modules/libnpx/CHANGELOG.md
index 802f840689..baa5d37a47 100644
--- a/deps/npm/node_modules/libnpx/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpx/CHANGELOG.md
@@ -2,6 +2,37 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="10.0.1"></a>
+## [10.0.1](https://github.com/zkat/npx/compare/v10.0.0...v10.0.1) (2018-03-08)
+
+
+### Bug Fixes
+
+* **i18n:** Improve French localization ([#158](https://github.com/zkat/npx/issues/158)) ([c88823e](https://github.com/zkat/npx/commit/c88823e))
+* **windows:** on Windows, throw useful error when package contains no binaries([#142](https://github.com/zkat/npx/issues/142)) ([a69276e](https://github.com/zkat/npx/commit/a69276e)), closes [#137](https://github.com/zkat/npx/issues/137)
+
+
+
+<a name="10.0.0"></a>
+# [10.0.0](https://github.com/zkat/npx/compare/v9.7.1...v10.0.0) (2018-03-08)
+
+
+### Bug Fixes
+
+* **i18n:** Fix Korean locale ([#130](https://github.com/zkat/npx/issues/130)) ([752db48](https://github.com/zkat/npx/commit/752db48))
+* **index:** remove extraneous logging on Windows ([#136](https://github.com/zkat/npx/issues/136)) ([357e6ab](https://github.com/zkat/npx/commit/357e6ab)), closes [#131](https://github.com/zkat/npx/issues/131)
+* **license:** change npx license to ISC ([a617d7b](https://github.com/zkat/npx/commit/a617d7b))
+* **parse-args:** fix version thing for yargs ([30677ed](https://github.com/zkat/npx/commit/30677ed))
+* **prefix:** Handle node_modules without package.json ([#128](https://github.com/zkat/npx/issues/128)) ([f64ae43](https://github.com/zkat/npx/commit/f64ae43)), closes [/github.com/babel/babel/issues/4066#issuecomment-336705199](https://github.com//github.com/babel/babel/issues/4066/issues/issuecomment-336705199)
+* **standard:** get things in line with standard 11 ([6cf8e88](https://github.com/zkat/npx/commit/6cf8e88))
+
+
+### BREAKING CHANGES
+
+* **license:** This moves the code over from CC0-1.0 to the ISC license.
+
+
+
<a name="9.7.1"></a>
## [9.7.1](https://github.com/zkat/npx/compare/v9.7.0...v9.7.1) (2017-10-19)
diff --git a/deps/npm/node_modules/libnpx/LICENSE.md b/deps/npm/node_modules/libnpx/LICENSE.md
index c05cb09586..8d28acf866 100644
--- a/deps/npm/node_modules/libnpx/LICENSE.md
+++ b/deps/npm/node_modules/libnpx/LICENSE.md
@@ -1,3 +1,16 @@
-To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project.
+ISC License
-For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/
+Copyright (c) npm, Inc.
+
+Permission to use, copy, modify, and/or distribute this software for
+any purpose with or without fee is hereby granted, provided that the
+above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
+ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/README.md b/deps/npm/node_modules/libnpx/README.md
index 436bdd0240..130f1bc3fd 100644
--- a/deps/npm/node_modules/libnpx/README.md
+++ b/deps/npm/node_modules/libnpx/README.md
@@ -98,6 +98,12 @@ $ npx --node-arg=--inspect cowsay
Debugger listening on ws://127.0.0.1:9229/....
```
+### Specify a node version to run npm scripts (or anything else!)
+
+```
+npx -p node@8 npm run build
+```
+
## SHELL AUTO FALLBACK
You can configure `npx` to run as your default fallback command when you type something in the command line with an `@` but the command is not found. This includes installing packages that were not found in the local prefix either.
diff --git a/deps/npm/node_modules/libnpx/child.js b/deps/npm/node_modules/libnpx/child.js
index 1b7c4c6215..cabc715d5b 100644
--- a/deps/npm/node_modules/libnpx/child.js
+++ b/deps/npm/node_modules/libnpx/child.js
@@ -74,13 +74,13 @@ function exec (cmd, args, opts) {
module.exports.escapeArg = escapeArg
function escapeArg (str, asPath) {
return process.platform === 'win32' && asPath
- ? path.normalize(str)
- .split(/\\/)
- .map(s => s.match(/\s+/) ? `"${s}"` : s)
- .join('\\')
- : process.platform === 'win32'
- ? `"${str}"`
- : str.match(/[^-_.~/\w]/)
- ? `'${str.replace(/'/g, "'\"'\"'")}'`
- : str
+ ? path.normalize(str)
+ .split(/\\/)
+ .map(s => s.match(/\s+/) ? `"${s}"` : s)
+ .join('\\')
+ : process.platform === 'win32'
+ ? `"${str}"`
+ : str.match(/[^-_.~/\w]/)
+ ? `'${str.replace(/'/g, "'\"'\"'")}'`
+ : str
}
diff --git a/deps/npm/node_modules/libnpx/get-prefix.js b/deps/npm/node_modules/libnpx/get-prefix.js
index 71bedffc58..3fef7f7eb9 100644
--- a/deps/npm/node_modules/libnpx/get-prefix.js
+++ b/deps/npm/node_modules/libnpx/get-prefix.js
@@ -6,21 +6,22 @@ const path = require('path')
const statAsync = promisify(require('fs').stat)
module.exports = getPrefix
-function getPrefix (current, root) {
- if (!root) {
- const original = root = path.resolve(current)
- while (path.basename(root) === 'node_modules') {
- root = path.dirname(root)
- }
- if (original !== root) {
- return Promise.resolve(root)
- } else {
- return getPrefix(root, root)
- }
+function getPrefix (root) {
+ const original = root = path.resolve(root)
+ while (path.basename(root) === 'node_modules') {
+ root = path.dirname(root)
}
- if (isRootPath(current, process.platform)) {
+ if (original !== root) {
return Promise.resolve(root)
} else {
+ return Promise.resolve(getPrefixFromTree(root))
+ }
+}
+
+function getPrefixFromTree (current) {
+ if (isRootPath(current, process.platform)) {
+ return false
+ } else {
return Promise.all([
fileExists(path.join(current, 'package.json')),
fileExists(path.join(current, 'node_modules'))
@@ -30,8 +31,7 @@ function getPrefix (current, root) {
if (hasPkg || hasModules) {
return current
} else {
- const parent = path.dirname(current)
- return getPrefix(parent, root)
+ return getPrefixFromTree(path.dirname(current))
}
})
}
@@ -49,6 +49,6 @@ function fileExists (f) {
module.exports._isRootPath = isRootPath
function isRootPath (p, platform) {
return platform === 'win32'
- ? p.match(/^[a-z]+:[/\\]?$/i)
- : p === '/'
+ ? p.match(/^[a-z]+:[/\\]?$/i)
+ : p === '/'
}
diff --git a/deps/npm/node_modules/libnpx/index.js b/deps/npm/node_modules/libnpx/index.js
index 3033e9cd06..e65cd7207b 100644
--- a/deps/npm/node_modules/libnpx/index.js
+++ b/deps/npm/node_modules/libnpx/index.js
@@ -86,6 +86,9 @@ function npx (argv) {
if (process.platform === 'win32') {
bins = bins.filter(b => b !== 'etc' && b !== 'node_modules')
}
+ if (bins.length < 1) {
+ throw new Error(Y()`command not found: ${argv.command}`)
+ }
const cmd = new RegExp(`^${argv.command}(?:\\.cmd)?$`, 'i')
const matching = bins.find(b => b.match(cmd))
return path.resolve(results.bin, bins[matching] || bins[0])
@@ -116,11 +119,7 @@ function npx (argv) {
module.exports._localBinPath = localBinPath
function localBinPath (cwd) {
return require('./get-prefix.js')(cwd).then(prefix => {
- const pkgjson = path.join(prefix, 'package.json')
- return promisify(fs.stat)(pkgjson).then(
- () => path.join(prefix, 'node_modules', '.bin'),
- err => { if (err.code !== 'ENOENT') throw err }
- )
+ return prefix && path.join(prefix, 'node_modules', '.bin')
})
}
@@ -146,8 +145,8 @@ function ensurePackages (specs, opts) {
).then(cache => {
const prefix = path.join(cache, '_npx', process.pid.toString())
const bins = process.platform === 'win32'
- ? prefix
- : path.join(prefix, 'bin')
+ ? prefix
+ : path.join(prefix, 'bin')
const rimraf = require('rimraf')
process.on('exit', () => rimraf.sync(prefix))
return promisify(rimraf)(bins).then(() => {
@@ -224,8 +223,8 @@ function installPackages (specs, prefix, opts) {
if (npmPath) {
args.unshift(
process.platform === 'win32'
- ? child.escapeArg(opts.npm)
- : opts.npm
+ ? child.escapeArg(opts.npm)
+ : opts.npm
)
return process.argv[0]
} else {
@@ -355,7 +354,7 @@ function findNodeScript (existing, opts) {
return str.match(cmd) || str.match(mingw)
}).then(match => {
return match && path.join(path.dirname(existing), match[1])
- }).then(x => console.log(x) || x)
+ })
}
})
}
diff --git a/deps/npm/node_modules/libnpx/libnpx.1 b/deps/npm/node_modules/libnpx/libnpx.1
index e8049194bc..755b9ee459 100644
--- a/deps/npm/node_modules/libnpx/libnpx.1
+++ b/deps/npm/node_modules/libnpx/libnpx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "October 2017" "libnpx@9.7.0" "User Commands"
+.TH "NPX" "1" "March 2018" "libnpx@10.0.0" "User Commands"
.SH "NAME"
\fBnpx\fR \- execute npm package binaries
.SH SYNOPSIS
@@ -101,6 +101,13 @@ $ npx \-\-node\-arg=\-\-inspect cowsay
Debugger listening on ws://127\.0\.0\.1:9229/\.\.\.\.
.fi
.RE
+.SS Specify a node version to run npm scripts (or anything else!)
+.P
+.RS 2
+.nf
+npx \-p node@8 npm run build
+.fi
+.RE
.SH SHELL AUTO FALLBACK
.P
You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\.
diff --git a/deps/npm/node_modules/libnpx/locales/ar.json b/deps/npm/node_modules/libnpx/locales/ar.json
deleted file mode 100644
index 8ca0fcc66e..0000000000
--- a/deps/npm/node_modules/libnpx/locales/ar.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "Execute binaries from npm packages.\n%s": ".npm Ų§Ł„Ų«Ł†Ų§Ų¦ŁŠŲ© Ł…Ł† Ų­Ų²Ł… node ŲŖŁ†ŁŁŠŲ° Ł…Ł„ŁŲ§ŲŖ \n %s ",
- "Package to be installed.": ".Ų§Ł„Ų­Ų²Ł…Ų© Ų§Ł„ŲŖŁŠ Ų³ŁŠŲŖŁ… ŲŖŲ«ŲØŁŠŲŖŁ‡Ų§",
- "Location of the npm cache.": ".npm Ł…ŁˆŁ‚Ų¹ Ų§Ł„Ų°Ų§ŁƒŲ±Ų© Ų§Ł„Ł…Ų®ŲØŲ£Ų© Ł„",
- "Skip installation if a package is missing.": "ŲŖŲ®Ų·ŁŠ Ų§Ł„ŲŖŲ«ŲØŁŠŲŖ ŁŁŠ Ų­Ų§Ł„ ŁˆŲ¬ŁˆŲÆ Ų­Ų²Ł…Ų© Ł…ŁŁ‚ŁˆŲÆŲ©.",
- "Path to user npmrc.": "Ł…Ų³Ų§Ų± Ų§Ł„Ł…Ų³ŲŖŲ®ŲÆŁ… Ų„Ł„Ł‰ npmrc.",
- "Execute string as if inside `npm run-script`.": ".`npm run-script` Ł†Ųµ Ų§Ł„Ų§Ł…Ų± Ų§Ł„ŲŖŁ†ŁŁŠŲ°ŁŠ ŁƒŁ…Ų§ ŁŁŠ",
- "Shell to execute the command with, if any.": "ŁˆŲ§Ų¬Ł‡Ų© ŲŖŁ†ŁŁŠŲ° Ų§Ł„Ų£ŁˆŲ§Ł…Ų± Ų§Ł„Ł…Ų±ŲŗŁˆŲØ Ų§Ų³ŲŖŲ®ŲÆŲ§Ł…Ł‡Ų§ ŁŁŠ Ų­Ų§Ł„ ŁˆŲ¬ŁˆŲÆŁ‡Ų§.",
- "Generate shell code to use npx as the \"command not found\" fallback.": ".npx Ų§Ł„Ų§Ł…Ų±Ų§Ł„Ł…ŲŖŁˆŁ„ŲÆ Ł„Ų§Ų³ŲŖŲÆŲ¹Ų§Ų” ŁƒŲ­Ł„ ŲØŲÆŁŠŁ„ ŁŁŠ Ų­Ų§Ł„Ų© \"Ł„Ł… ŁŠŲŖŁ… Ų§Ł„Ų¹Ų«ŁˆŲ± Ų¹Ł„Ł‰ Ų§Ł„Ų§Ł…Ų±\" Ł…Ł† Ł‚ŲØŁ„ ",
- "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": " .npx Ų³ŁŠŲŖŁ… Ł‚Ų³Ų±ŁŠŲ§Ł‹ Ų§Ł„ŲŖŲ«ŲØŁŠŲŖ ŲØŲ“ŁƒŁ„ Ł…Ų¤Ł‚ŲŖ Ł„Ł„Ų§ŲµŲÆŲ§Ų± Ų§Ł„Ų§Ų­ŲÆŲ« Ł…Ł† Ł‚ŲØŁ„ .$PATH ŲŖŲ¬Ų§Ł‡Ł„ Ų§Ł„Ł…Ł„ŁŲ§ŲŖ Ų§Ł„ŲŖŁ†ŁŁŠŲ°ŁŠŲ© Ų§Ł„Ų«Ł†Ų§Ų¦ŁŠŲ© Ų§Ł„Ų­Ų§Ł„ŁŠŲ© ŁŁŠ Ų§Ł„Ł…Ų³Ų§Ų± ",
- "npm binary to use for internal operations.": ".Ų§Ł„ŲŖŁ†ŁŁŠŲ°ŁŠ Ų§Ł„Ų«Ł†Ų§Ų¦ŁŠ Ų§Ł„Ų°ŁŠ Ų³ŁŠŲŖŁ… Ų§Ų³ŲŖŲ¹Ł…Ų§Ł„Ł‡ Ł„Ł„Ų¹Ł…Ł„ŁŠŲ§ŲŖ Ų§Ł„ŲÆŲ§Ų®Ł„ŁŠŲ© npm Ł…Ł„Ł",
- "For the full documentation, see the manual page for npx(1).": ".npx(1) Ł„Ł„ŁˆŲµŁˆŁ„ Ł„Ł„Ł…Ų³ŲŖŁ†ŲÆŲ§ŲŖ Ų§Ł„Ł…Ų³Ų§Ų¹ŲÆŲ© Ų§Ł„ŁƒŲ§Ł…Ł„Ų©, Ų§ŲØŲ­Ų« ŁŁŠ ŲµŁŲ­Ų© Ų§Ł„ŲÆŁ„ŁŠŁ„ Ų¹Ł†",
- "Unable to guess a binary name from %s. Please use --package.": ". --package Ų§Ł„Ų±Ų¬Ų§Ų” Ų§Ų³ŲŖŲ¹Ł…Ų§Ł„ .%s Ł„Ł… ŁŠŲŖŁ…ŁƒŁ† ŲŖŲ®Ł…ŁŠŁ† Ų§Ų³Ł… Ų§Ł„ŲŖŲ·ŲØŁŠŁ‚ Ų§Ł„Ų«Ł†Ų§Ų¦ŁŠ Ł…Ł† ",
- "\nERROR: You must supply a command.\n": "\n.Ų®Ų·Ų£ : ŁŠŲŖŁˆŲ¬ŲØ Ų¹Ł„Ł‰ Ų§Ł„Ł…Ų³ŲŖŲ®ŲÆŁ… Ų§ŲÆŲ®Ų§Ł„ Ų§Ł…Ų±\n",
- "Command failed: %s %s": "%s %s :ŁŲ“Ł„ Ų§Ł„Ų§Ł…Ų± ",
- "Install for %s failed with code %s": "%s ŲØŲ§Ł„ŁƒŁˆŲÆ %s ŲŖŁ… ŁŲ“Ł„ ŲŖŲ«ŲØŁŠŲŖ",
- "%s not found. Trying with npx...": "...npx Ų³ŁŠŲŖŁ… Ų§Ų¹Ų§ŲÆŲ© Ų§Ł„Ł…Ų­Ų§ŁˆŁ„Ų© ŲØŲ§Ų³ŲŖŲ¹Ł…Ų§Ł„ .%s Ł„Ł… ŁŠŲŖŁ… Ų§Ł„Ų¹Ų«ŁˆŲ± Ų¹Ł„Ł‰",
- "command not found: %s": "%s :Ł„Ł… ŁŠŲŖŁ… Ų§Ł„Ų¹Ų«ŁˆŲ± Ų¹Ł„Ł‰ Ų§Ł„Ų£Ł…Ų±",
- "options": "Ų®ŁŠŲ§Ų±Ų§ŲŖ",
- "command": "Ų£Ł…Ų±",
- "version": "Ų§Ł„Ų„ŲµŲÆŲ§Ų±",
- "command-arg": "ŲØŲ§Ų±Ų§Ł…ŲŖŲ± Ų§Ł„Ų£Ł…Ų±",
- "command-string": "Ł†Ųµ Ų§Ł„Ų£Ł…Ų±",
- "shell": "ŁˆŲ§Ų¬Ł‡Ų© ŲŖŁ†ŁŁŠŲ° Ų§Ł„Ų£ŁˆŲ§Ł…Ų±",
- "package": "Ų§Ł„Ų­Ų²Ł…Ų©",
- "npx: installed %s in %ss": "%ss ŁŁŠ %s ŲŖŁ… ŲŖŲ«ŲØŁŠŲŖ ",
- "Suppress output from npx itself. Subcommands will not be affected.": "Ų§Ł„Ų§ŁˆŲ§Ł…Ų± Ų§Ł„ŁŲ±Ų¹ŁŠŲ© Ł„Ł† ŲŖŲŖŲ§Ų«Ų± ŲØŲ§Ł„ŲŖŲ¹ŲÆŁŠŁ„.npx Ų„Ų®ŁŲ§Ų”Ų§Ł„Ų®Ų±Ų¬ Ł…Ł†",
- "Extra node argument when calling a node binary.": ".node Ų§Ł„ŲØŲ§Ų±Ų§Ł…ŲŖŲ± Ų§Ł„Ų§Ų¶Ų§ŁŁŠ Ų¹Ł†ŲÆ Ų§Ų³ŲŖŲÆŲ¹Ų§Ų”"
-}
diff --git a/deps/npm/node_modules/libnpx/locales/fr.json b/deps/npm/node_modules/libnpx/locales/fr.json
index a6ddf60e6f..949ba9bb8e 100644
--- a/deps/npm/node_modules/libnpx/locales/fr.json
+++ b/deps/npm/node_modules/libnpx/locales/fr.json
@@ -1,28 +1,28 @@
{
- "Execute binaries from npm packages.\n%s": "ExƩcutez des binaires Ơ partir de paquets de npm.\n%s",
+ "Execute binaries from npm packages.\n%s": "ExƩcutez des binaires Ơ partir de paquets npm.\n%s",
"Package to be installed.": "Paquet Ć  installer.",
- "Location of the npm cache.": "Endroit oĆ¹ est situĆ© le cache de npm.",
- "Skip installation if a package is missing.": "Sauter l'installation si un paquet est manquant.",
- "Path to user npmrc.": "Chemin du npmrc de l'utilisateur(-trice).",
+ "Location of the npm cache.": "Chemin oĆ¹ est situĆ© le cache de npm.",
+ "Skip installation if a package is missing.": "Passer l'installation si un paquet est manquant.",
+ "Path to user npmrc.": "Chemin du fichier npmrc de l'utilisateur(-trice).",
"Execute string as if inside `npm run-script`.": "ExĆ©cuter la chaine de caractĆØre comme avec `npm run-script`.",
- "Shell to execute the command with, if any.": "Shell a utiliser pour exƩcuter la commande, s'il y en a un.",
- "Generate shell code to use npx as the \"command not found\" fallback.": "GƩnƩrer le code du shell pour utiliser npx comme solution de rechange Ơ \"command not found\"",
- "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm Ć  faire une installation temporaire et utiliser la derniĆØre version.",
+ "Shell to execute the command with, if any.": "Shell Ơ utiliser pour exƩcuter la commande, s'il y en a un.",
+ "Generate shell code to use npx as the \"command not found\" fallback.": "GƩnƩrer le code du shell pour utiliser npx comme solution de rechange Ơ \"command not found\".",
+ "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm Ć  rĆ©aliser une installation temporaire et Ć  utiliser la derniĆØre version.",
"npm binary to use for internal operations.": "Binaire de npm Ơ utiliser pour les opƩrations internes.",
- "For the full documentation, see the manual page for npx(1).": "Pour la documentation complĆØte, regarder la page du manuel pour npx(1).",
+ "For the full documentation, see the manual page for npx(1).": "Pour la documentation complĆØte, consultez la page du manuel pour npx(1).",
"Unable to guess a binary name from %s. Please use --package.": "Impossible de deviner le nom du binaire de %s, utilisez --package s'il vous plaƮt.",
- "\nERROR: You must supply a command.\n": "\nERROR: Vous devez fournir une commande.\n",
- "Command failed: %s %s": "La commande a ƩchouƩ: %s %s",
+ "\nERROR: You must supply a command.\n": "\nERREUR : Vous devez fournir une commande.\n",
+ "Command failed: %s %s": "La commande a ƩchouƩ : %s %s",
"Install for %s failed with code %s": "L'installation de %s a ƩchouƩ avec le code %s",
"%s not found. Trying with npx...": "%s n'a pas ƩtƩ trouvƩ. Essai avec npx...",
- "command not found: %s": "Commande non trouvƩe: %s",
+ "command not found: %s": "Commande non trouvƩe : %s",
"options": "options",
"command": "commande",
"version": "version",
"command-arg": "arguments-de-la-commande",
- "command-string": "chaine-de-caractĆØres-de-la-commande",
+ "command-string": "chaĆ®ne-de-caractĆØres-de-la-commande",
"shell": "shell",
"package": "paquet",
- "npx: installed %s in %ss": "npx: %s installƩ(s) en %ss",
- "Suppress output from npx itself. Subcommands will not be affected.": "Supprimer les sorties gƩnƩrƩes par npx. Les sous-commandes ne seront pas affectƩes."
+ "npx: installed %s in %ss": "npx : %s installƩ(s) en %ss",
+ "Suppress output from npx itself. Subcommands will not be affected.": "Supprimer la sortie gƩnƩrƩe par npx. Les sous-commandes ne seront pas affectƩes."
}
diff --git a/deps/npm/node_modules/libnpx/locales/ko.json b/deps/npm/node_modules/libnpx/locales/ko.json
index 790537a29a..bd8fe1420f 100644
--- a/deps/npm/node_modules/libnpx/locales/ko.json
+++ b/deps/npm/node_modules/libnpx/locales/ko.json
@@ -1,6 +1,6 @@
{
"Execute binaries from npm packages.\n%s": "npm ķŒØķ‚¤ģ§€ģ—ģ„œ ė°”ģ“ė„ˆė¦¬ė„¼ ģ‹¤ķ–‰ķ•©ė‹ˆė‹¤.\n%s",
- "Package to be installed.": "ķŒØķ‚¤ģ§€ź°€ ģ„¤ģ¹˜ė˜ģ—ˆģŠµė‹ˆė‹¤.",
+ "Package to be installed.": "ģ„¤ģ¹˜ķ•  ķŒØķ‚¤ģ§€.",
"Location of the npm cache.": "npm ģŗģ‹œģ˜ ģœ„ģ¹˜.",
"Skip installation if a package is missing.": "ķŒØķ‚¤ģ§€ź°€ ģ—†ģœ¼ė©“ ģ„¤ģ¹˜ė„¼ ź±“ė„ˆėœė‹ˆė‹¤.",
"Path to user npmrc.": "ģ‚¬ģš©ģž npmrcģ˜ ź²½ė”œ.",
@@ -14,7 +14,7 @@
"\nERROR: You must supply a command.\n": "\nERROR: ėŖ…ė ¹ģ„ ģ œź³µķ•“ģ•¼ ķ•©ė‹ˆė‹¤.\n",
"Command failed: %s %s": "ėŖ…ė ¹ģ“ ģ‹¤ķŒØķ–ˆģŠµė‹ˆė‹¤: %s %s",
"Install for %s failed with code %s": "%s ģ„¤ģ¹˜ź°€ %s ģ½”ė“œė”œ ģ‹¤ķŒØķ–ˆģŠµė‹ˆė‹¤",
- "%s not found. Trying with npx...": "%s ģ„ ģ°¾ģ„ ģˆ˜ ģ—†ģŠµė‹ˆė‹¤. npxė”œ ģ‹œė„ķ•“ ė³“ģ„øģš”...",
+ "%s not found. Trying with npx...": "%s ģ„ ģ°¾ģ„ ģˆ˜ ģ—†ģŠµė‹ˆė‹¤. npxė”œ ģ‹œė„ķ•©ė‹ˆė‹¤...",
"command not found: %s": "ėŖ…ė ¹ģ„ ģ°¾ģ„ ģˆ˜ ģ—†ģŠµė‹ˆė‹¤: %s",
"options": "ģ˜µģ…˜",
"command": "ėŖ…ė ¹",
@@ -23,7 +23,7 @@
"command-string": "ėŖ…ė ¹-ė¬øģžģ—“",
"shell": "ģ‰˜",
"package": "ķŒØķ‚¤ģ§€",
- "npx: installed %s in %ss": "%ss ģ— %s ė„¼ ģ„¤ģ¹˜ķ–ˆģŠµė‹ˆė‹¤",
+ "npx: installed %s in %ss": "npx: %sź°œģ˜ ķŒØķ‚¤ģ§€ė„¼ %sģ“ˆė§Œģ— ģ„¤ģ¹˜ķ–ˆģŠµė‹ˆė‹¤.",
"Suppress output from npx itself. Subcommands will not be affected.": "npxģ˜ ģ¶œė „ģ„ ź°ģ¶„ė‹ˆė‹¤. ķ•˜ģœ„ ėŖ…ė ¹ģ€ ģ˜ķ–„ģ„ ė°›ģ§€ ģ•ŠģŠµė‹ˆė‹¤.",
- "Extra node argument when calling a node binary.": "node ė°”ģ“ė„ˆė¦¬ė„¼ ķ˜øģ¶œķ•  ė•Œ ģ‚¬ģš©ķ•˜ėŠ” ģ¶”ź°€ node ģøģž"
+ "Extra node argument when calling a node binary.": "node ė°”ģ“ė„ˆė¦¬ė„¼ ķ˜øģ¶œķ•  ė•Œ ģ‚¬ģš©ķ•˜ėŠ” ģ¶”ź°€ node ģøģž."
}
diff --git a/deps/npm/node_modules/libnpx/locales/pt_BR.json b/deps/npm/node_modules/libnpx/locales/pt_BR.json
index d61f8f58f8..b44f4e0260 100644
--- a/deps/npm/node_modules/libnpx/locales/pt_BR.json
+++ b/deps/npm/node_modules/libnpx/locales/pt_BR.json
@@ -1,28 +1,28 @@
{
- "Execute binaries from npm packages.\n%s": "Execute binƔrios de pacotes npm.\n%s",
- "Package to be installed.": "Pacote a ser instalado.",
- "Location of the npm cache.": "LocalizaĆ§Ć£o da cache do npm.",
- "Skip installation if a package is missing.": "Pule a instalaĆ§Ć£o se estiver faltando um pacote.",
- "Path to user npmrc.": "Caminho para o npmrc do usuƔrio.",
- "Execute string as if inside `npm run-script`.": "Execute a string como se estivesse dentro de `npm run-script`.",
- "Shell to execute the command with, if any.": "Terminal para executar o comando, se houver.",
- "Generate shell code to use npx as the \"command not found\" fallback.": "Gere cĆ³digo de terminal para usar o npx quando o comando nĆ£o existir (\"command not found\").",
- "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora binĆ”rios existentes no $PATH ou no projeto atual. Isso obriga o npx a fazer uma instalaĆ§Ć£o temporĆ”ria e usar a Ćŗltima versĆ£o.",
- "npm binary to use for internal operations.": "BinƔrio npm usado para operaƧƵes internas.",
- "For the full documentation, see the manual page for npx(1).": "Para a documentaĆ§Ć£o completa, veja a pĆ”gina do manual do npx(1).",
- "Unable to guess a binary name from %s. Please use --package.": "NĆ£o foi possĆ­vel encontrar um binĆ”rio a partir de %s. Por favor, use --package.",
- "\nERROR: You must supply a command.\n": "\nERRO: VocĆŖ deve fornecer um comando.\n",
- "Command failed: %s %s": "Comando falhou: %s %s",
+ "Execute binaries from npm packages.\n%s": "Executa comandos de mĆ³dulos npm.\n%s",
+ "Package to be installed.": "Pacote para ser instalado.",
+ "Location of the npm cache.": "LocalizaĆ§Ć£o da cache npm.",
+ "Skip installation if a package is missing.": "Pular instalaĆ§Ć£o se um pacote estĆ” faltando.",
+ "Path to user npmrc.": "LocalizaĆ§Ć£o do npmrc do usuĆ”rio.",
+ "Execute string as if inside `npm run-script`.": "Executa string como se estivesse dentro de `npm run-script`.",
+ "Shell to execute the command with, if any.": "Terminal para executar o comando, se tiver.",
+ "Generate shell code to use npx as the \"command not found\" fallback.": "Gera cĆ³digo de terminal para usar npx no lugar quando comando nĆ£o existir (\"command not found\").",
+ "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "Ignora comandos no $PATH ou no projeto atual. Isto obriga npx a fazer uma instalaĆ§Ć£o temporĆ”ria e usar a Ćŗltima versĆ£o.",
+ "npm binary to use for internal operations.": "Comando npm usado para operaƧƵes internas.",
+ "For the full documentation, see the manual page for npx(1).": "Para documentaĆ§Ć£o completa, veja a pĆ”gina do manual npx(1).",
+ "Unable to guess a binary name from %s. Please use --package.": "NĆ£o foi possĆ­vel advinhar o nome do comando usando %s. Por favor, use --package.",
+ "\nERROR: You must supply a command.\n": "\nERRO: VocĆŖ deve suprir um comando.\n",
+ "Command failed: %s %s": "Comando fracassou: %s %s",
"Install for %s failed with code %s": "InstalaĆ§Ć£o de %s falhou com cĆ³digo %s",
- "%s not found. Trying with npx...": "%s nĆ£o encontrado. Tentando com npx...",
- "command not found: %s": "comando nĆ£o encontrado: %s",
+ "%s not found. Trying with npx...": "%s nĆ£o existe. Tentando com npx...",
+ "command not found: %s": "comando nĆ£o existe: %s",
"options": "opƧƵes",
"command": "comando",
"version": "versĆ£o",
- "command-arg": "argumento-do-comando",
+ "command-arg": "argumento-de-comando",
"command-string": "string-de-comando",
"shell": "terminal",
"package": "pacote",
- "npx: installed %s in %ss": "npx: %s instalado em %ss",
- "Suppress output from npx itself. Subcommands will not be affected.": "Suprimir resultados de npx. Sub-comandos nĆ£o serĆ£o afetados."
+ "npx: installed %s in %ss": "npx: instalou %s em %ss",
+ "Suppress output from npx itself. Subcommands will not be affected.": "Omitir resultado de npx. Sub-comandos nĆ£o serĆ£o afetados."
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md
index 2fcf56b902..1cfa04fa4f 100644
--- a/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/CHANGELOG.md
@@ -4,6 +4,25 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+## [5.0.0] - 2018-01-29
+
+### Added
+
+- Testing against Node v8 and v9
+- Documentation on trim behavior of values
+- Documentation on how to use with `import`
+
+### Changed
+
+- *Breaking*: default `path` is now `path.resolve(process.cwd(), '.env')`
+- *Breaking*: does not write over keys already in `process.env` if the key has a falsy value
+- using `const` and `let` instead of `var`
+
+### Removed
+
+- Testing aginst Node v7
+
+
## [4.0.0] - 2016-12-23
### Changed
@@ -67,7 +86,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Removed
- support for multiple `.env` files. should always use one `.env` file for the current environment
-[Unreleased]: https://github.com/motdotla/dotenv/compare/v4.0.0...HEAD
+[Unreleased]: https://github.com/motdotla/dotenv/compare/v5.0.0...HEAD
+[5.0.0]: https://github.com/motdotla/dotenv/compare/v4.0.0...v5.0.0
[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0
[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0
diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md b/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md
index 90836a34b7..4665fd3962 100644
--- a/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/README.md
@@ -5,6 +5,7 @@
Dotenv is a zero-dependency module that loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). Storing configuration in the environment separate from code is based on [The Twelve-Factor App](http://12factor.net/config) methodology.
[![BuildStatus](https://img.shields.io/travis/motdotla/dotenv/master.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv)
+[![Build status](https://ci.appveyor.com/api/projects/status/rnba2pyi87hgc8xw/branch/master?svg=true)](https://ci.appveyor.com/project/maxbeatty/dotenv/branch/master)
[![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![Coverage Status](https://img.shields.io/coveralls/motdotla/dotenv/master.svg?style=flat-square)](https://coveralls.io/github/motdotla/dotenv?branch=coverall-intergration)
@@ -27,7 +28,7 @@ Create a `.env` file in the root directory of your project. Add
environment-specific variables on new lines in the form of `NAME=VALUE`.
For example:
-```
+```dosini
DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3
@@ -38,7 +39,7 @@ That's it.
`process.env` now has the keys and values you defined in your `.env` file.
```javascript
-var db = require('db')
+const db = require('db')
db.connect({
host: process.env.DB_HOST,
username: process.env.DB_USER,
@@ -48,8 +49,7 @@ db.connect({
### Preload
-If you are using iojs-v1.6.0 or later, you can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code.
-
+You can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. This is the preferred approach when using `import` instead of `require`.
```bash
$ node -r dotenv/config your_script.js
@@ -67,20 +67,31 @@ _Alias: `load`_
`config` will read your .env file, parse the contents, assign it to
[`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env),
-and return an Object with a _parsed_ key containing the loaded content or an _error_ key if it failed.
+and return an Object with a `parsed` key containing the loaded content or an `error` key if it failed.
+
+```js
+const result = dotenv.config()
+
+if (result.error) {
+ throw result.error
+}
+
+console.log(result.parsed)
+```
+
You can additionally, pass options to `config`.
### Options
#### Path
-Default: `.env`
+Default: `path.resolve(process.cwd(), '.env')`
You can specify a custom path if your file containing environment variables is
named or located differently.
```js
-require('dotenv').config({path: '/custom/path/to/your/env/vars'})
+require('dotenv').config({path: '/full/custom/path/to/your/env/vars'})
```
#### Encoding
@@ -101,9 +112,9 @@ variables is available to use. It accepts a String or Buffer and will return
an Object with the parsed keys and values.
```js
-var dotenv = require('dotenv')
-var buf = new Buffer('BASIC=basic')
-var config = dotenv.parse(buf) // will return an object
+const dotenv = require('dotenv')
+const buf = new Buffer('BASIC=basic')
+const config = dotenv.parse(buf) // will return an object
console.log(typeof config, config) // object { BASIC : 'basic' }
```
@@ -123,6 +134,7 @@ The parsing engine currently supports the following rules:
line'}
```
- inner quotes are maintained (think JSON) (`JSON={"foo": "bar"}` becomes `{JSON:"{\"foo\": \"bar\"}"`)
+- whitespace is removed from both ends of the value (see more on [`trim`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)) (`FOO=" some value "` becomes `{FOO: 'some value'}`)
## FAQ
@@ -175,6 +187,40 @@ For `dotenv@2.x.x`: Use [dotenv-expand](https://github.com/motdotla/dotenv-expan
For `dotenv@1.x.x`: We haven't been presented with a compelling use case for expanding variables and believe it leads to env vars that are not "fully orthogonal" as [The Twelve-Factor App](http://12factor.net/config) outlines.<sup>[[1](https://github.com/motdotla/dotenv/issues/39)][[2](https://github.com/motdotla/dotenv/pull/97)]</sup> Please open an issue if you have a compelling use case.
+### How do I use dotenv with `import`?
+
+ES2015 and beyond offers modules that allow you to `export` any top-level `function`, `class`, `var`, `let`, or `const`.
+
+> When you run a module containing an `import` declaration, the modules it imports are loaded first, then each module body is executed in a depth-first traversal of the dependency graph, avoiding cycles by skipping anything already executed.
+>
+> ā€“ [ES6 In Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/)
+
+You must run `dotenv.config()` before referencing any environment variables. Here's an example of problematic code:
+
+`errorReporter.js`:
+
+```js
+import { Client } from 'best-error-reporting-service'
+
+export const client = new Client(process.env.BEST_API_KEY)
+```
+
+`index.js`:
+
+```js
+import dotenv from 'dotenv'
+dotenv.config()
+
+import errorReporter from './errorReporter'
+errorReporter.client.report(new Error('faq example'))
+```
+
+`client` will not be configured correctly because it was constructed before `dotenv.config()` was executed. There are (at least) 3 ways to make this work.
+
+1. Preload dotenv: `node --require dotenv/config index.js` (_Note: you do not need to `import` dotenv with this approach_)
+2. Import `dotenv/config` instead of `dotenv` (_Note: you do not need to call `dotenv.config()` and must pass options via the command line with this approach_)
+3. Create a separate file that will execute `config` first as outlined in [this comment on #133](https://github.com/motdotla/dotenv/issues/133#issuecomment-255298822)
+
## Contributing Guide
See [CONTRIBUTING.md](CONTRIBUTING.md)
@@ -206,3 +252,6 @@ Here's some projects that expand on dotenv. Check them out.
* [require-environment-variables](https://github.com/bjoshuanoah/require-environment-variables)
* [dotenv-safe](https://github.com/rolodato/dotenv-safe)
* [envalid](https://github.com/af/envalid)
+* [lookenv](https://github.com/RodrigoEspinosa/lookenv)
+* [run.env](https://www.npmjs.com/package/run.env)
+* [dotenv-webpack](https://github.com/mrsteele/dotenv-webpack)
diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/appveyor.yml b/deps/npm/node_modules/libnpx/node_modules/dotenv/appveyor.yml
new file mode 100644
index 0000000000..f55b8a4b6e
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/appveyor.yml
@@ -0,0 +1,13 @@
+version: "{build}"
+build: off
+environment:
+ matrix:
+ - nodejs_version: "4"
+ - nodejs_version: "6"
+ - nodejs_version: "8"
+ - nodejs_version: "9"
+install:
+ - ps: Install-Product node $env:nodejs_version
+ - npm install
+test_script:
+ - npm test
diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/lib/main.js b/deps/npm/node_modules/libnpx/node_modules/dotenv/lib/main.js
index eb96e7fd56..1f0df92719 100644
--- a/deps/npm/node_modules/libnpx/node_modules/dotenv/lib/main.js
+++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/lib/main.js
@@ -1,28 +1,29 @@
'use strict'
-var fs = require('fs')
+const fs = require('fs')
+const path = require('path')
/*
* Parses a string or buffer into an object
- * @param {String|Buffer} src - source to be parsed
- * @returns {Object}
+ * @param {(string|Buffer)} src - source to be parsed
+ * @returns {Object} keys and values from src
*/
function parse (src) {
- var obj = {}
+ const obj = {}
// convert Buffers before splitting into lines and processing
src.toString().split('\n').forEach(function (line) {
// matching "KEY' and 'VAL' in 'KEY=VAL'
- var keyValueArr = line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/)
+ const keyValueArr = line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/)
// matched?
if (keyValueArr != null) {
- var key = keyValueArr[1]
+ const key = keyValueArr[1]
// default undefined or missing values to empty string
- var value = keyValueArr[2] ? keyValueArr[2] : ''
+ let value = keyValueArr[2] || ''
// expand newlines in quoted values
- var len = value ? value.length : 0
+ const len = value ? value.length : 0
if (len > 0 && value.charAt(0) === '"' && value.charAt(len - 1) === '"') {
value = value.replace(/\\n/gm, '\n')
}
@@ -39,16 +40,18 @@ function parse (src) {
/*
* Main entry point into dotenv. Allows configuration before loading .env
- * @param {Object} options - valid options: path ('.env'), encoding ('utf8')
- * @returns {Boolean}
+ * @param {Object} options - options for parsing .env file
+ * @param {string} [options.path=.env] - path to .env file
+ * @param {string} [options.encoding=utf8] - encoding of .env file
+ * @returns {Object} parsed object or error
*/
function config (options) {
- var path = '.env'
- var encoding = 'utf8'
+ let dotenvPath = path.resolve(process.cwd(), '.env')
+ let encoding = 'utf8'
if (options) {
if (options.path) {
- path = options.path
+ dotenvPath = options.path
}
if (options.encoding) {
encoding = options.encoding
@@ -57,13 +60,15 @@ function config (options) {
try {
// specifying an encoding returns a string instead of a buffer
- var parsedObj = parse(fs.readFileSync(path, { encoding: encoding }))
+ const parsed = parse(fs.readFileSync(dotenvPath, { encoding }))
- Object.keys(parsedObj).forEach(function (key) {
- process.env[key] = process.env[key] || parsedObj[key]
+ Object.keys(parsed).forEach(function (key) {
+ if (!process.env.hasOwnProperty(key)) {
+ process.env[key] = parsed[key]
+ }
})
- return { parsed: parsedObj }
+ return { parsed }
} catch (e) {
return { error: e }
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/dotenv/package.json b/deps/npm/node_modules/libnpx/node_modules/dotenv/package.json
index 19c25a8886..f1d99fc5fc 100644
--- a/deps/npm/node_modules/libnpx/node_modules/dotenv/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/dotenv/package.json
@@ -1,45 +1,41 @@
{
- "_args": [
- [
- "dotenv@4.0.0",
- "/Users/zkat/Documents/code/npx"
- ]
- ],
- "_from": "dotenv@4.0.0",
- "_id": "dotenv@4.0.0",
- "_inBundle": true,
- "_integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=",
+ "_from": "dotenv@^5.0.1",
+ "_id": "dotenv@5.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==",
"_location": "/libnpx/dotenv",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "dotenv@4.0.0",
+ "raw": "dotenv@^5.0.1",
"name": "dotenv",
"escapedName": "dotenv",
- "rawSpec": "4.0.0",
+ "rawSpec": "^5.0.1",
"saveSpec": null,
- "fetchSpec": "4.0.0"
+ "fetchSpec": "^5.0.1"
},
"_requiredBy": [
"/libnpx"
],
- "_resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz",
- "_spec": "4.0.0",
- "_where": "/Users/zkat/Documents/code/npx",
+ "_resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
+ "_shasum": "a5317459bd3d79ab88cff6e44057a6a3fbb1fcef",
+ "_spec": "dotenv@^5.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx",
"author": {
"name": "scottmotte"
},
"bugs": {
"url": "https://github.com/motdotla/dotenv/issues"
},
+ "bundleDependencies": false,
"dependencies": {},
+ "deprecated": false,
"description": "Loads environment variables from .env file",
"devDependencies": {
"babel": "5.8.23",
"coveralls": "^2.11.9",
- "lab": "11.1.0",
- "semver": "5.3.0",
+ "lab": "^14.3.2",
"should": "11.1.1",
"sinon": "1.17.6",
"standard": "8.4.0",
@@ -66,11 +62,12 @@
"url": "git://github.com/motdotla/dotenv.git"
},
"scripts": {
+ "ci:coverage": "lab test/* -r lcov | coveralls",
"lint": "standard",
"lint-md": "standard-markdown",
"postlint": "npm run lint-md",
"pretest": "npm run lint",
- "test": "lab test/* -r lcov | coveralls"
+ "test": "lab"
},
- "version": "4.0.0"
+ "version": "5.0.1"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/README.md
deleted file mode 100644
index d45032dc74..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# npm-package-arg
-
-Parses package name and specifier passed to commands like `npm install` or
-`npm cache add`, or as found in `package.json` dependency sections.
-
-## EXAMPLES
-
-```javascript
-var assert = require("assert")
-var npa = require("npm-package-arg")
-
-// Pass in the descriptor, and it'll return an object
-try {
- var parsed = npa("@bar/foo@1.2")
-} catch (ex) {
- ā€¦
-}
-```
-
-## USING
-
-`var npa = require('npm-package-arg')`
-
-### var result = npa(*arg*[, *where*])
-
-* *arg* - a string that you might pass to `npm install`, like:
-`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,
-`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`,
-`../foo/bar/` or `bar`. If the *arg* you provide doesn't have a specifier
-part, eg `foo` then the specifier will default to `latest`.
-* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`
-
-**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.
-
-### var result = npa.resolve(*name*, *spec*[, *where*])
-
-* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`.
-* *spec* - The specifier indicating where and how you can get this module. Something like:
-`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`,
-`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`. If not
-included then the default is `latest`.
-* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`
-
-**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.
-
-## RESULT OBJECT
-
-The objects that are returned by npm-package-arg contain the following
-keys:
-
-* `type` - One of the following strings:
- * `git` - A git repo
- * `tag` - A tagged version, like `"foo@latest"`
- * `version` - A specific version number, like `"foo@1.2.3"`
- * `range` - A version range, like `"foo@2.x"`
- * `file` - A local `.tar.gz`, `.tar` or `.tgz` file.
- * `directory` - A local directory.
- * `remote` - An http url (presumably to a tgz)
-* `registry` - If true this specifier refers to a resource hosted on a
- registry. This is true for `tag`, `version` and `range` types.
-* `name` - If known, the `name` field expected in the resulting pkg.
-* `scope` - If a name is something like `@org/module` then the `scope`
- field will be set to `@org`. If it doesn't have a scoped name, then
- scope is `null`.
-* `escapedName` - A version of `name` escaped to match the npm scoped packages
- specification. Mostly used when making requests against a registry. When
- `name` is `null`, `escapedName` will also be `null`.
-* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`,
- or the value of `spec` in calls to `npa.resolve(name, spec).
-* `saveSpec` - The normalized specifier, for saving to package.json files.
- `null` for registry dependencies.
-* `fetchSpec` - The version of the specifier to be used to fetch this
- resource. `null` for shortcuts to hosted git dependencies as there isn't
- just one URL to try with them.
-* `gitRange` - If set, this is a semver specifier to match against git tags with
-* `gitCommittish` - If set, this is the specific committish to use with a git dependency.
-* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info`
- object. This property is not included when serializing the object as
- JSON.
-* `raw` - The original un-modified string that was provided. If called as
- `npa.resolve(name, spec)` then this will be `name + '@' + spec`.
diff --git a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/npa.js
deleted file mode 100644
index a61c057429..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/npm-package-arg/npa.js
+++ /dev/null
@@ -1,270 +0,0 @@
-'use strict'
-module.exports = npa
-module.exports.resolve = resolve
-module.exports.Result = Result
-
-let url
-let HostedGit
-let semver
-let path
-let validatePackageName
-let osenv
-
-const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS
-const hasSlashes = isWindows ? /\\|[/]/ : /[/]/
-const isURL = /^(?:git[+])?[a-z]+:/i
-const isFilename = /[.](?:tgz|tar.gz|tar)$/i
-
-function npa (arg, where) {
- let name
- let spec
- const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@')
- const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg
- if (isURL.test(arg)) {
- spec = arg
- } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) {
- spec = arg
- } else if (nameEndsAt > 0) {
- name = namePart
- spec = arg.slice(nameEndsAt + 1)
- } else {
- if (!validatePackageName) validatePackageName = require('validate-npm-package-name')
- const valid = validatePackageName(arg)
- if (valid.validForOldPackages) {
- name = arg
- } else {
- spec = arg
- }
- }
- return resolve(name, spec, where, arg)
-}
-
-const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/
-
-function resolve (name, spec, where, arg) {
- const res = new Result({
- raw: arg,
- name: name,
- rawSpec: spec,
- fromArgument: arg != null
- })
-
- if (name) res.setName(name)
-
- if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) {
- return fromFile(res, where)
- }
- if (!HostedGit) HostedGit = require('hosted-git-info')
- const hosted = HostedGit.fromUrl(spec, {noGitPlus: true, noCommittish: true})
- if (hosted) {
- return fromHostedGit(res, hosted)
- } else if (spec && isURL.test(spec)) {
- return fromURL(res)
- } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) {
- return fromFile(res, where)
- } else {
- return fromRegistry(res)
- }
-}
-
-function invalidPackageName (name, valid) {
- const err = new Error(`Invalid package name "${name}": ${valid.errors.join('; ')}`)
- err.code = 'EINVALIDPACKAGENAME'
- return err
-}
-function invalidTagName (name) {
- const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`)
- err.code = 'EINVALIDTAGNAME'
- return err
-}
-
-function Result (opts) {
- this.type = opts.type
- this.registry = opts.registry
- this.where = opts.where
- if (opts.raw == null) {
- this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec
- } else {
- this.raw = opts.raw
- }
- this.name = undefined
- this.escapedName = undefined
- this.scope = undefined
- this.rawSpec = opts.rawSpec == null ? '' : opts.rawSpec
- this.saveSpec = opts.saveSpec
- this.fetchSpec = opts.fetchSpec
- if (opts.name) this.setName(opts.name)
- this.gitRange = opts.gitRange
- this.gitCommittish = opts.gitCommittish
- this.hosted = opts.hosted
-}
-Result.prototype = {}
-
-Result.prototype.setName = function (name) {
- if (!validatePackageName) validatePackageName = require('validate-npm-package-name')
- const valid = validatePackageName(name)
- if (!valid.validForOldPackages) {
- throw invalidPackageName(name, valid)
- }
- this.name = name
- this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined
- // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar
- this.escapedName = name.replace('/', '%2f')
- return this
-}
-
-Result.prototype.toString = function () {
- const full = []
- if (this.name != null && this.name !== '') full.push(this.name)
- const spec = this.saveSpec || this.fetchSpec || this.rawSpec
- if (spec != null && spec !== '') full.push(spec)
- return full.length ? full.join('@') : this.raw
-}
-
-Result.prototype.toJSON = function () {
- const result = Object.assign({}, this)
- delete result.hosted
- return result
-}
-
-function setGitCommittish (res, committish) {
- if (committish != null && committish.length >= 7 && committish.slice(0, 7) === 'semver:') {
- res.gitRange = decodeURIComponent(committish.slice(7))
- res.gitCommittish = null
- } else if (committish == null || committish === '') {
- res.gitCommittish = 'master'
- } else {
- res.gitCommittish = committish
- }
- return res
-}
-
-const isAbsolutePath = /^[/]|^[A-Za-z]:/
-
-function resolvePath (where, spec) {
- if (isAbsolutePath.test(spec)) return spec
- if (!path) path = require('path')
- return path.resolve(where, spec)
-}
-
-function isAbsolute (dir) {
- if (dir[0] === '/') return true
- if (/^[A-Za-z]:/.test(dir)) return true
- return false
-}
-
-function fromFile (res, where) {
- if (!where) where = process.cwd()
- res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory'
- res.where = where
-
- const spec = res.rawSpec.replace(/\\/g, '/')
- .replace(/^file:[/]*([A-Za-z]:)/, '$1') // drive name paths on windows
- .replace(/^file:(?:[/]*([~./]))?/, '$1')
- if (/^~[/]/.test(spec)) {
- // this is needed for windows and for file:~/foo/bar
- if (!osenv) osenv = require('osenv')
- res.fetchSpec = resolvePath(osenv.home(), spec.slice(2))
- res.saveSpec = 'file:' + spec
- } else {
- res.fetchSpec = resolvePath(where, spec)
- if (isAbsolute(spec)) {
- res.saveSpec = 'file:' + spec
- } else {
- if (!path) path = require('path')
- res.saveSpec = 'file:' + path.relative(where, res.fetchSpec)
- }
- }
- return res
-}
-
-function fromHostedGit (res, hosted) {
- res.type = 'git'
- res.hosted = hosted
- res.saveSpec = hosted.toString({noGitPlus: false, noCommittish: false})
- res.fetchSpec = hosted.getDefaultRepresentation() === 'shortcut' ? null : hosted.toString()
- return setGitCommittish(res, hosted.committish)
-}
-
-function unsupportedURLType (protocol, spec) {
- const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`)
- err.code = 'EUNSUPPORTEDPROTOCOL'
- return err
-}
-
-function matchGitScp (spec) {
- // git ssh specifiers are overloaded to also use scp-style git
- // specifiers, so we have to parse those out and treat them special.
- // They are NOT true URIs, so we can't hand them to `url.parse`.
- //
- // This regex looks for things that look like:
- // git+ssh://git@my.custom.git.com:username/project.git#deadbeef
- //
- // ...and various combinations. The username in the beginning is *required*.
- const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i)
- return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && {
- fetchSpec: matched[1],
- gitCommittish: matched[2] || 'master'
- }
-}
-
-function fromURL (res) {
- if (!url) url = require('url')
- const urlparse = url.parse(res.rawSpec)
- res.saveSpec = res.rawSpec
- // check the protocol, and then see if it's git or not
- switch (urlparse.protocol) {
- case 'git:':
- case 'git+http:':
- case 'git+https:':
- case 'git+rsync:':
- case 'git+ftp:':
- case 'git+file:':
- case 'git+ssh:':
- res.type = 'git'
- const match = urlparse.protocol === 'git+ssh:' && matchGitScp(res.rawSpec)
- if (match) {
- res.fetchSpec = match.fetchSpec
- res.gitCommittish = match.gitCommittish
- } else {
- setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '')
- urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '')
- delete urlparse.hash
- res.fetchSpec = url.format(urlparse)
- }
- break
- case 'http:':
- case 'https:':
- res.type = 'remote'
- res.fetchSpec = res.saveSpec
- break
-
- default:
- throw unsupportedURLType(urlparse.protocol, res.rawSpec)
- }
-
- return res
-}
-
-function fromRegistry (res) {
- res.registry = true
- const spec = res.rawSpec === '' ? 'latest' : res.rawSpec
- // no save spec for registry components as we save based on the fetched
- // version, not on the argument so this can't compute that.
- res.saveSpec = null
- res.fetchSpec = spec
- if (!semver) semver = require('semver')
- const version = semver.valid(spec, true)
- const range = semver.validRange(spec, true)
- if (version) {
- res.type = 'version'
- } else if (range) {
- res.type = 'range'
- } else {
- if (encodeURIComponent(spec) !== spec) {
- throw invalidTagName(spec)
- }
- res.type = 'tag'
- }
- return res
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/y18n/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/y18n/CHANGELOG.md
new file mode 100644
index 0000000000..c259076ad6
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/y18n/CHANGELOG.md
@@ -0,0 +1,21 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10)
+
+
+### Bug Fixes
+
+* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123))
+
+
+### Features
+
+* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf))
+
+
+### BREAKING CHANGES
+
+* **__:** dropping Node 0.10/Node 0.12 support
diff --git a/deps/npm/node_modules/libnpx/node_modules/y18n/README.md b/deps/npm/node_modules/libnpx/node_modules/y18n/README.md
index 9859458f20..826474f209 100644
--- a/deps/npm/node_modules/libnpx/node_modules/y18n/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/y18n/README.md
@@ -4,6 +4,7 @@
[![Coverage Status][coveralls-image]][coveralls-url]
[![NPM version][npm-image]][npm-url]
[![js-standard-style][standard-image]][standard-url]
+[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
The bare-bones internationalization library used by yargs.
@@ -23,6 +24,19 @@ output:
`my awesome string foo`
+_using tagged template literals_
+
+```js
+var __ = require('y18n').__
+var str = 'foo'
+
+console.log(__`my awesome string ${str}`)
+```
+
+output:
+
+`my awesome string foo`
+
_pluralization support:_
```js
@@ -60,6 +74,10 @@ Create an instance of y18n with the config provided, options include:
Print a localized string, `%s` will be replaced with `arg`s.
+This function can also be used as a tag for a template literal. You can use it
+like this: <code>__&#96;hello ${'world'}&#96;</code>. This will be equivalent to
+`__('hello %s', 'world')`.
+
### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg)
Print a localized string with appropriate pluralization. If `%d` is provided
diff --git a/deps/npm/node_modules/libnpx/node_modules/y18n/index.js b/deps/npm/node_modules/libnpx/node_modules/y18n/index.js
index 91b159e342..d720681628 100644
--- a/deps/npm/node_modules/libnpx/node_modules/y18n/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/y18n/index.js
@@ -16,6 +16,9 @@ function Y18N (opts) {
}
Y18N.prototype.__ = function () {
+ if (typeof arguments[0] !== 'string') {
+ return this._taggedLiteral.apply(this, arguments)
+ }
var args = Array.prototype.slice.call(arguments)
var str = args.shift()
var cb = function () {} // start with noop.
@@ -40,6 +43,19 @@ Y18N.prototype.__ = function () {
return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args))
}
+Y18N.prototype._taggedLiteral = function (parts) {
+ var args = arguments
+ var str = ''
+ parts.forEach(function (part, i) {
+ var arg = args[i + 1]
+ str += part
+ if (typeof arg !== 'undefined') {
+ str += '%s'
+ }
+ })
+ return this.__.apply(null, [str].concat([].slice.call(arguments, 1)))
+}
+
Y18N.prototype._enqueueWrite = function (work) {
this.writeQueue.push(work)
if (this.writeQueue.length === 1) this._processWriteQueue()
diff --git a/deps/npm/node_modules/libnpx/node_modules/y18n/package.json b/deps/npm/node_modules/libnpx/node_modules/y18n/package.json
index 78945dc782..e60020d7f5 100644
--- a/deps/npm/node_modules/libnpx/node_modules/y18n/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/y18n/package.json
@@ -1,33 +1,27 @@
{
- "_args": [
- [
- "y18n@3.2.1",
- "/Users/zkat/Documents/code/npx"
- ]
- ],
- "_from": "y18n@3.2.1",
- "_id": "y18n@3.2.1",
- "_inBundle": true,
- "_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "_from": "y18n@^4.0.0",
+ "_id": "y18n@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"_location": "/libnpx/y18n",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "y18n@3.2.1",
+ "raw": "y18n@^4.0.0",
"name": "y18n",
"escapedName": "y18n",
- "rawSpec": "3.2.1",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "3.2.1"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
- "/libnpx",
- "/libnpx/yargs"
+ "/libnpx"
],
- "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "_spec": "3.2.1",
- "_where": "/Users/zkat/Documents/code/npx",
+ "_resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+ "_shasum": "95ef94f85ecc81d007c264e190a120f0a3c8566b",
+ "_spec": "y18n@^4.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
@@ -35,14 +29,17 @@
"bugs": {
"url": "https://github.com/yargs/y18n/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "the bare-bones internationalization library used by yargs",
"devDependencies": {
- "chai": "^3.4.1",
- "coveralls": "^2.11.6",
- "mocha": "^2.3.4",
- "nyc": "^6.1.1",
+ "chai": "^4.0.1",
+ "coveralls": "^3.0.0",
+ "mocha": "^4.0.1",
+ "nyc": "^11.0.1",
"rimraf": "^2.5.0",
- "standard": "^5.4.1"
+ "standard": "^10.0.0-beta.0",
+ "standard-version": "^4.2.0"
},
"files": [
"index.js"
@@ -63,7 +60,8 @@
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
+ "release": "standard-version",
"test": "nyc mocha"
},
- "version": "3.2.1"
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/yargs/CHANGELOG.md
index 95f4141253..0eaf2f33ed 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/CHANGELOG.md
@@ -2,6 +2,176 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="11.0.0"></a>
+# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22)
+
+
+### Bug Fixes
+
+* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812))
+
+
+### Features
+
+* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc))
+
+
+### BREAKING CHANGES
+
+* requiresArg now has significantly different error output, matching nargs.
+
+
+
+<a name="10.1.2"></a>
+## [10.1.2](https://github.com/yargs/yargs/compare/v10.1.1...v10.1.2) (2018-01-17)
+
+
+### Bug Fixes
+
+* requiresArg should only be enforced if argument exists ([#1043](https://github.com/yargs/yargs/issues/1043)) ([fbf41ae](https://github.com/yargs/yargs/commit/fbf41ae))
+
+
+
+<a name="10.1.1"></a>
+## [10.1.1](https://github.com/yargs/yargs/compare/v10.1.0...v10.1.1) (2018-01-09)
+
+
+### Bug Fixes
+
+* Add `dirname` sanity check on `findUp` ([#1036](https://github.com/yargs/yargs/issues/1036)) ([331d103](https://github.com/yargs/yargs/commit/331d103))
+
+
+
+<a name="10.1.0"></a>
+# [10.1.0](https://github.com/yargs/yargs/compare/v10.0.3...v10.1.0) (2018-01-01)
+
+
+### Bug Fixes
+
+* 'undefined' should be taken to mean no argument was provided ([#1015](https://github.com/yargs/yargs/issues/1015)) ([c679e90](https://github.com/yargs/yargs/commit/c679e90))
+
+
+### Features
+
+* add missing simple chinese locale strings ([#1004](https://github.com/yargs/yargs/issues/1004)) ([3cc24ec](https://github.com/yargs/yargs/commit/3cc24ec))
+* add Norwegian Nynorsk translations ([#1028](https://github.com/yargs/yargs/issues/1028)) ([a5ac213](https://github.com/yargs/yargs/commit/a5ac213))
+* async command handlers ([#1001](https://github.com/yargs/yargs/issues/1001)) ([241124b](https://github.com/yargs/yargs/commit/241124b))
+* middleware ([#881](https://github.com/yargs/yargs/issues/881)) ([77b8dbc](https://github.com/yargs/yargs/commit/77b8dbc))
+
+
+
+<a name="10.0.3"></a>
+## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21)
+
+
+### Bug Fixes
+
+* parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685))
+
+
+
+<a name="10.0.2"></a>
+## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21)
+
+
+### Bug Fixes
+
+* fix tiny spacing issue with usage ([#992](https://github.com/yargs/yargs/issues/992)) ([7871327](https://github.com/yargs/yargs/commit/7871327))
+
+
+
+<a name="10.0.1"></a>
+## [10.0.1](https://github.com/yargs/yargs/compare/v10.0.0...v10.0.1) (2017-10-19)
+
+
+### Bug Fixes
+
+* help strings for nested commands were missing parent commands ([#990](https://github.com/yargs/yargs/issues/990)) ([cd1ca15](https://github.com/yargs/yargs/commit/cd1ca15))
+* use correct completion command in generated completion script ([#988](https://github.com/yargs/yargs/issues/988)) ([3c8ac1d](https://github.com/yargs/yargs/commit/3c8ac1d))
+
+
+
+<a name="10.0.0"></a>
+# [10.0.0](https://github.com/yargs/yargs/compare/v9.1.0...v10.0.0) (2017-10-18)
+
+
+### Bug Fixes
+
+* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771))
+* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf))
+* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453))
+
+
+### Features
+
+* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531))
+* hidden options are now explicitly indicated using "hidden" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6))
+* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460))
+* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b))
+
+
+### BREAKING CHANGES
+
+* .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command.
+* previously hidden options were simply implied using a falsy description
+* help command now only executes if it's the last positional in argv._
+
+
+
+<a name="9.1.0"></a>
+# [9.1.0](https://github.com/yargs/yargs/compare/v9.0.1...v9.1.0) (2017-09-25)
+
+
+### Bug Fixes
+
+* **command:** Run default cmd even if the only cmd ([#950](https://github.com/yargs/yargs/issues/950)) ([7b22203](https://github.com/yargs/yargs/commit/7b22203))
+
+
+### Features
+
+* multiple usage calls are now collected, not replaced ([#958](https://github.com/yargs/yargs/issues/958)) ([74a38b2](https://github.com/yargs/yargs/commit/74a38b2))
+
+
+
+<a name="9.0.1"></a>
+## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17)
+
+
+### Bug Fixes
+
+* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b))
+
+
+
+<a name="9.0.0"></a>
+# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03)
+
+
+### Bug Fixes
+
+* 'undefined' default value for choices resulted in validation failing ([782b896](https://github.com/yargs/yargs/commit/782b896))
+* address bug with handling of arrays of implications ([c240661](https://github.com/yargs/yargs/commit/c240661))
+* defaulting keys to 'undefined' interfered with conflicting key logic ([a8e0cff](https://github.com/yargs/yargs/commit/a8e0cff))
+* don't bother calling JSON.stringify() on string default values ([#891](https://github.com/yargs/yargs/issues/891)) ([628be21](https://github.com/yargs/yargs/commit/628be21))
+* exclude positional arguments from completion output ([#927](https://github.com/yargs/yargs/issues/927)) ([71c7ec7](https://github.com/yargs/yargs/commit/71c7ec7))
+* strict mode should not fail for hidden options ([#949](https://github.com/yargs/yargs/issues/949)) ([0e0c58d](https://github.com/yargs/yargs/commit/0e0c58d))
+
+
+### Features
+
+* allow implies and conflicts to accept array values ([#922](https://github.com/yargs/yargs/issues/922)) ([abdc7da](https://github.com/yargs/yargs/commit/abdc7da))
+* allow parse with no arguments as alias for yargs.argv ([#944](https://github.com/yargs/yargs/issues/944)) ([a9f03e7](https://github.com/yargs/yargs/commit/a9f03e7))
+* enable .help() and .version() by default ([#912](https://github.com/yargs/yargs/issues/912)) ([1ef44e0](https://github.com/yargs/yargs/commit/1ef44e0))
+* to allow both undefined and nulls, for benefit of TypeScript ([#945](https://github.com/yargs/yargs/issues/945)) ([792564d](https://github.com/yargs/yargs/commit/792564d))
+
+
+### BREAKING CHANGES
+
+* version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled).
+* parse() now behaves as an alias for .argv, unless a parseCallback is provided.
+
+
+
<a name="8.0.2"></a>
## [8.0.2](https://github.com/yargs/yargs/compare/v8.0.1...v8.0.2) (2017-06-12)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/README.md
index 20a18da2ca..d16b82d177 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/README.md
@@ -6,7 +6,9 @@
[![Windows Tests][windows-image]][windows-url]
[![js-standard-style][standard-image]][standard-url]
[![Conventional Commits][conventional-commits-image]][conventional-commits-url]
-[![Gitter][gitter-image]][gitter-url]
+[![Slack][slack-image]][slack-url]
+
+_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_.
> Yargs be a node.js library fer hearties tryin' ter parse optstrings.
@@ -53,12 +55,13 @@ Retreat from the xupptumblers!
```js
#!/usr/bin/env node
-const yargs = require('yargs') // eslint-disable-line
- .command('serve', 'start the server', (yargs) => {
- yargs.option('port', {
- describe: 'port to bind on',
- default: 5000
- })
+require('yargs') // eslint-disable-line
+ .command('serve [port]', 'start the server', (yargs) => {
+ yargs
+ .positional('port', {
+ describe: 'port to bind on',
+ default: 5000
+ })
}, (argv) => {
if (argv.verbose) console.info(`start server on :${argv.port}`)
serve(argv.port)
@@ -67,10 +70,11 @@ const yargs = require('yargs') // eslint-disable-line
alias: 'v',
default: false
})
- .help()
.argv
```
+Run the example above with `--help` to see the help for the application.
+
## Table of Contents
* [Yargs' API](/docs/api.md)
@@ -99,5 +103,5 @@ const yargs = require('yargs') // eslint-disable-line
[standard-url]: http://standardjs.com/
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
[conventional-commits-url]: https://conventionalcommits.org/
-[gitter-image]: https://img.shields.io/gitter/room/nwjs/nw.js.svg?maxAge=2592000
-[gitter-url]: https://gitter.im/yargs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link
+[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg
+[slack-url]: http://devtoolscommunity.herokuapp.com
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/completion.sh.hbs b/deps/npm/node_modules/libnpx/node_modules/yargs/completion.sh.hbs
index 14445b834e..819c8ae83a 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/completion.sh.hbs
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/completion.sh.hbs
@@ -2,8 +2,8 @@
#
# yargs command completion script
#
-# Installation: {{app_path}} completion >> ~/.bashrc
-# or {{app_path}} completion >> ~/.bash_profile on OSX.
+# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
+# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
#
_yargs_completions()
{
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/index.js
index 37450cf7a6..dfed54bc51 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/index.js
@@ -1,3 +1,4 @@
+'use strict'
// classic singleton yargs API, to use yargs
// without running as a singleton do:
// require('yargs/yargs')(process.argv.slice(2))
@@ -21,7 +22,7 @@ function Argv (processArgs, cwd) {
to get a parsed version of process.argv.
*/
function singletonify (inst) {
- Object.keys(inst).forEach(function (key) {
+ Object.keys(inst).forEach((key) => {
if (key === 'argv') {
Argv.__defineGetter__(key, inst.__lookupGetter__(key))
} else {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/apply-extends.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/apply-extends.js
index 5fc69fab16..3005848e3c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/apply-extends.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/apply-extends.js
@@ -1,13 +1,14 @@
-var fs = require('fs')
-var path = require('path')
-var assign = require('./assign')
-var YError = require('./yerror')
-var previouslyVisitedConfigs = []
+'use strict'
+const fs = require('fs')
+const path = require('path')
+const YError = require('./yerror')
+
+let previouslyVisitedConfigs = []
function checkForCircularExtends (path) {
if (previouslyVisitedConfigs.indexOf(path) > -1) {
- throw new YError("Circular extended configurations: '" + path + "'.")
+ throw new YError(`Circular extended configurations: '${path}'.`)
}
}
@@ -16,12 +17,12 @@ function getPathToDefaultConfig (cwd, pathToExtend) {
}
function applyExtends (config, cwd) {
- var defaultConfig = {}
+ let defaultConfig = {}
if (config.hasOwnProperty('extends')) {
if (typeof config.extends !== 'string') return defaultConfig
- var isPath = /\.json$/.test(config.extends)
- var pathToDefault = null
+ const isPath = /\.json$/.test(config.extends)
+ let pathToDefault = null
if (!isPath) {
try {
pathToDefault = require.resolve(config.extends)
@@ -46,7 +47,7 @@ function applyExtends (config, cwd) {
previouslyVisitedConfigs = []
- return assign(defaultConfig, config)
+ return Object.assign({}, defaultConfig, config)
}
module.exports = applyExtends
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/argsert.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/argsert.js
index d3e72fce57..ed1d598713 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/argsert.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/argsert.js
@@ -1,20 +1,21 @@
+'use strict'
const command = require('./command')()
const YError = require('./yerror')
const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']
-module.exports = function (expected, callerArguments, length) {
+module.exports = function argsert (expected, callerArguments, length) {
// TODO: should this eventually raise an exception.
try {
// preface the argument description with "cmd", so
// that we can run it through yargs' command parser.
- var position = 0
- var parsed = {demanded: [], optional: []}
+ let position = 0
+ let parsed = {demanded: [], optional: []}
if (typeof expected === 'object') {
length = callerArguments
callerArguments = expected
} else {
- parsed = command.parseCommand('cmd ' + expected)
+ parsed = command.parseCommand(`cmd ${expected}`)
}
const args = [].slice.call(callerArguments)
@@ -22,33 +23,27 @@ module.exports = function (expected, callerArguments, length) {
length = length || args.length
if (length < parsed.demanded.length) {
- throw new YError('Not enough arguments provided. Expected ' + parsed.demanded.length +
- ' but received ' + args.length + '.')
+ throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`)
}
const totalCommands = parsed.demanded.length + parsed.optional.length
if (length > totalCommands) {
- throw new YError('Too many arguments provided. Expected max ' + totalCommands +
- ' but received ' + length + '.')
+ throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`)
}
- parsed.demanded.forEach(function (demanded) {
+ parsed.demanded.forEach((demanded) => {
const arg = args.shift()
const observedType = guessType(arg)
- const matchingTypes = demanded.cmd.filter(function (type) {
- return type === observedType || type === '*'
- })
+ const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*')
if (matchingTypes.length === 0) argumentTypeError(observedType, demanded.cmd, position, false)
position += 1
})
- parsed.optional.forEach(function (optional) {
+ parsed.optional.forEach((optional) => {
if (args.length === 0) return
const arg = args.shift()
const observedType = guessType(arg)
- const matchingTypes = optional.cmd.filter(function (type) {
- return type === observedType || type === '*'
- })
+ const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*')
if (matchingTypes.length === 0) argumentTypeError(observedType, optional.cmd, position, true)
position += 1
})
@@ -67,6 +62,5 @@ function guessType (arg) {
}
function argumentTypeError (observedType, allowedTypes, position, optional) {
- throw new YError('Invalid ' + (positionName[position] || 'manyith') + ' argument.' +
- ' Expected ' + allowedTypes.join(' or ') + ' but received ' + observedType + '.')
+ throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`)
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/assign.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/assign.js
deleted file mode 100644
index 7d5a3cef24..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/assign.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// lazy Object.assign logic that only works for merging
-// two objects; eventually we should replace this with Object.assign.
-module.exports = function assign (defaults, configuration) {
- var o = {}
- configuration = configuration || {}
-
- Object.keys(defaults).forEach(function (k) {
- o[k] = defaults[k]
- })
- Object.keys(configuration).forEach(function (k) {
- o[k] = configuration[k]
- })
-
- return o
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/command.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/command.js
index 3567cf9532..65322dbbdb 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/command.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/command.js
@@ -1,67 +1,57 @@
-const path = require('path')
+'use strict'
+
const inspect = require('util').inspect
-const camelCase = require('camelcase')
+const path = require('path')
+const Parser = require('yargs-parser')
-const DEFAULT_MARKER = '*'
+const DEFAULT_MARKER = /(^\*)|(^\$0)/
// handles parsing positional arguments,
// and populating argv with said positional
// arguments.
-module.exports = function (yargs, usage, validation) {
+module.exports = function command (yargs, usage, validation) {
const self = {}
-
- var handlers = {}
- var aliasMap = {}
- var defaultCommand
- self.addHandler = function (cmd, description, builder, handler) {
- var aliases = []
- handler = handler || function () {}
-
+ let handlers = {}
+ let aliasMap = {}
+ let defaultCommand
+ self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) {
+ let aliases = []
+ handler = handler || (() => {})
+ middlewares = middlewares || []
if (Array.isArray(cmd)) {
aliases = cmd.slice(1)
cmd = cmd[0]
} else if (typeof cmd === 'object') {
- var command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd)
+ let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd)
if (cmd.aliases) command = [].concat(command).concat(cmd.aliases)
- self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler)
+ self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares)
return
}
// allow a module to be provided instead of separate builder and handler
if (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') {
- self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler)
+ self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares)
return
}
// parse positionals out of cmd string
- var parsedCommand = self.parseCommand(cmd)
+ const parsedCommand = self.parseCommand(cmd)
// remove positional args from aliases only
- aliases = aliases.map(function (alias) {
- return self.parseCommand(alias).cmd
- })
+ aliases = aliases.map(alias => self.parseCommand(alias).cmd)
// check for default and filter out '*''
- var isDefault = false
- var parsedAliases = [parsedCommand.cmd].concat(aliases).filter(function (c) {
- if (c === DEFAULT_MARKER) {
+ let isDefault = false
+ const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => {
+ if (DEFAULT_MARKER.test(c)) {
isDefault = true
return false
}
return true
})
- // short-circuit if default with no aliases
- if (isDefault && parsedAliases.length === 0) {
- defaultCommand = {
- original: cmd.replace(DEFAULT_MARKER, '').trim(),
- handler: handler,
- builder: builder || {},
- demanded: parsedCommand.demanded,
- optional: parsedCommand.optional
- }
- return
- }
+ // standardize on $0 for default command.
+ if (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0')
// shift cmd and aliases after filtering out '*'
if (isDefault) {
@@ -71,7 +61,7 @@ module.exports = function (yargs, usage, validation) {
}
// populate aliasMap
- aliases.forEach(function (alias) {
+ aliases.forEach((alias) => {
aliasMap[alias] = parsedCommand.cmd
})
@@ -81,8 +71,10 @@ module.exports = function (yargs, usage, validation) {
handlers[parsedCommand.cmd] = {
original: cmd,
- handler: handler,
+ description: description,
+ handler,
builder: builder || {},
+ middlewares: middlewares || [],
demanded: parsedCommand.demanded,
optional: parsedCommand.optional
}
@@ -90,16 +82,16 @@ module.exports = function (yargs, usage, validation) {
if (isDefault) defaultCommand = handlers[parsedCommand.cmd]
}
- self.addDirectory = function (dir, context, req, callerFile, opts) {
+ self.addDirectory = function addDirectory (dir, context, req, callerFile, opts) {
opts = opts || {}
// disable recursion to support nested directories of subcommands
if (typeof opts.recurse !== 'boolean') opts.recurse = false
// exclude 'json', 'coffee' from require-directory defaults
if (!Array.isArray(opts.extensions)) opts.extensions = ['js']
// allow consumer to define their own visitor function
- const parentVisit = typeof opts.visit === 'function' ? opts.visit : function (o) { return o }
+ const parentVisit = typeof opts.visit === 'function' ? opts.visit : o => o
// call addHandler via visitor function
- opts.visit = function (obj, joined, filename) {
+ opts.visit = function visit (obj, joined, filename) {
const visited = parentVisit(obj, joined, filename)
// allow consumer to skip modules with their own visitor
if (visited) {
@@ -119,7 +111,7 @@ module.exports = function (yargs, usage, validation) {
// if module was not require()d and no name given, throw error
function moduleName (obj) {
const mod = require('which-module')(obj)
- if (!mod) throw new Error('No command name given for module: ' + inspect(obj))
+ if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`)
return commandFromFilename(mod.filename)
}
@@ -129,66 +121,62 @@ module.exports = function (yargs, usage, validation) {
}
function extractDesc (obj) {
- for (var keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) {
+ for (let keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) {
test = obj[keys[i]]
if (typeof test === 'string' || typeof test === 'boolean') return test
}
return false
}
- self.parseCommand = function (cmd) {
- var extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ')
- var splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/)
- var bregex = /\.*[\][<>]/g
- var parsedCommand = {
+ self.parseCommand = function parseCommand (cmd) {
+ const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ')
+ const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/)
+ const bregex = /\.*[\][<>]/g
+ const parsedCommand = {
cmd: (splitCommand.shift()).replace(bregex, ''),
demanded: [],
optional: []
}
- splitCommand.forEach(function (cmd, i) {
- var variadic = false
+ splitCommand.forEach((cmd, i) => {
+ let variadic = false
cmd = cmd.replace(/\s/g, '')
if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) variadic = true
if (/^\[/.test(cmd)) {
parsedCommand.optional.push({
cmd: cmd.replace(bregex, '').split('|'),
- variadic: variadic
+ variadic
})
} else {
parsedCommand.demanded.push({
cmd: cmd.replace(bregex, '').split('|'),
- variadic: variadic
+ variadic
})
}
})
return parsedCommand
}
- self.getCommands = function () {
- return Object.keys(handlers).concat(Object.keys(aliasMap))
- }
+ self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap))
- self.getCommandHandlers = function () {
- return handlers
- }
+ self.getCommandHandlers = () => handlers
- self.hasDefaultCommand = function () {
- return !!defaultCommand
- }
+ self.hasDefaultCommand = () => !!defaultCommand
- self.runCommand = function (command, yargs, parsed, commandIndex) {
- var aliases = parsed.aliases
- var commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand
- var currentContext = yargs.getContext()
- var numFiles = currentContext.files.length
- var parentCommands = currentContext.commands.slice()
+ self.runCommand = function runCommand (command, yargs, parsed, commandIndex) {
+ let aliases = parsed.aliases
+ const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand
+ const currentContext = yargs.getContext()
+ let numFiles = currentContext.files.length
+ const parentCommands = currentContext.commands.slice()
// what does yargs look like after the buidler is run?
- var innerArgv = parsed.argv
- var innerYargs = null
- var positionalMap = {}
-
- if (command) currentContext.commands.push(command)
+ let innerArgv = parsed.argv
+ let innerYargs = null
+ let positionalMap = {}
+ if (command) {
+ currentContext.commands.push(command)
+ currentContext.fullCommands.push(commandHandler.original)
+ }
if (typeof commandHandler.builder === 'function') {
// a function can be provided, which builds
// up a yargs chain and possibly returns it.
@@ -198,8 +186,11 @@ module.exports = function (yargs, usage, validation) {
// original command string as usage() for consistent behavior with
// options object below.
if (yargs.parsed === false) {
- if (typeof yargs.getUsageInstance().getUsage() === 'undefined') {
- yargs.usage('$0 ' + (parentCommands.length ? parentCommands.join(' ') + ' ' : '') + commandHandler.original)
+ if (shouldUpdateUsage(yargs)) {
+ yargs.getUsageInstance().usage(
+ usageFromParentCommandsCommandHandler(parentCommands, commandHandler),
+ commandHandler.description
+ )
}
innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex)
} else {
@@ -212,8 +203,13 @@ module.exports = function (yargs, usage, validation) {
// as a short hand, an object can instead be provided, specifying
// the options that a command takes.
innerYargs = yargs.reset(parsed.aliases)
- innerYargs.usage('$0 ' + (parentCommands.length ? parentCommands.join(' ') + ' ' : '') + commandHandler.original)
- Object.keys(commandHandler.builder).forEach(function (key) {
+ if (shouldUpdateUsage(innerYargs)) {
+ innerYargs.getUsageInstance().usage(
+ usageFromParentCommandsCommandHandler(parentCommands, commandHandler),
+ commandHandler.description
+ )
+ }
+ Object.keys(commandHandler.builder).forEach((key) => {
innerYargs.option(key, commandHandler.builder[key])
})
innerArgv = innerYargs._parseArgs(null, null, true, commandIndex)
@@ -230,84 +226,178 @@ module.exports = function (yargs, usage, validation) {
if (commandHandler.handler && !yargs._hasOutput()) {
yargs._setHasOutput()
- commandHandler.handler(innerArgv)
+ if (commandHandler.middlewares.length > 0) {
+ const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) {
+ return Object.assign(initialObj, middleware(innerArgv))
+ }, {})
+ Object.assign(innerArgv, middlewareArgs)
+ }
+ const handlerResult = commandHandler.handler(innerArgv)
+ if (handlerResult && typeof handlerResult.then === 'function') {
+ handlerResult.then(
+ null,
+ (error) => yargs.getUsageInstance().fail(null, error)
+ )
+ }
}
- if (command) currentContext.commands.pop()
+ if (command) {
+ currentContext.commands.pop()
+ currentContext.fullCommands.pop()
+ }
numFiles = currentContext.files.length - numFiles
if (numFiles > 0) currentContext.files.splice(numFiles * -1, numFiles)
return innerArgv
}
+ function shouldUpdateUsage (yargs) {
+ return !yargs.getUsageInstance().getUsageDisabled() &&
+ yargs.getUsageInstance().getUsage().length === 0
+ }
+
+ function usageFromParentCommandsCommandHandler (parentCommands, commandHandler) {
+ const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original
+ const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c) })
+ pc.push(c)
+ return `$0 ${pc.join(' ')}`
+ }
+
+ self.runDefaultBuilderOn = function (yargs) {
+ if (shouldUpdateUsage(yargs)) {
+ // build the root-level command string from the default string.
+ const commandString = DEFAULT_MARKER.test(defaultCommand.original)
+ ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ')
+ yargs.getUsageInstance().usage(
+ commandString,
+ defaultCommand.description
+ )
+ }
+ const builder = defaultCommand.builder
+ if (typeof builder === 'function') {
+ builder(yargs)
+ } else {
+ Object.keys(builder).forEach((key) => {
+ yargs.option(key, builder[key])
+ })
+ }
+ }
+
// transcribe all positional arguments "command <foo> <bar> [apple]"
// onto argv.
function populatePositionals (commandHandler, argv, context, yargs) {
argv._ = argv._.slice(context.commands.length) // nuke the current commands
- var demanded = commandHandler.demanded.slice(0)
- var optional = commandHandler.optional.slice(0)
- var positionalMap = {}
+ const demanded = commandHandler.demanded.slice(0)
+ const optional = commandHandler.optional.slice(0)
+ const positionalMap = {}
validation.positionalCount(demanded.length, argv._.length)
while (demanded.length) {
- var demand = demanded.shift()
- populatePositional(demand, argv, yargs, positionalMap)
+ const demand = demanded.shift()
+ populatePositional(demand, argv, positionalMap)
}
while (optional.length) {
- var maybe = optional.shift()
- populatePositional(maybe, argv, yargs, positionalMap)
+ const maybe = optional.shift()
+ populatePositional(maybe, argv, positionalMap)
}
argv._ = context.commands.concat(argv._)
+
+ postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original))
+
return positionalMap
}
- // populate a single positional argument and its
- // aliases onto argv.
- function populatePositional (positional, argv, yargs, positionalMap) {
- // "positional" consists of the positional.cmd, an array representing
- // the positional's name and aliases, and positional.variadic
- // indicating whether or not it is a variadic array.
- var variadics = null
- var value = null
- for (var i = 0, cmd; (cmd = positional.cmd[i]) !== undefined; i++) {
- if (positional.variadic) {
- if (variadics) argv[cmd] = variadics.slice(0)
- else argv[cmd] = variadics = argv._.splice(0)
- } else {
- if (!value && !argv._.length) continue
- if (value) argv[cmd] = value
- else argv[cmd] = value = argv._.shift()
- }
- positionalMap[cmd] = true
- postProcessPositional(yargs, argv, cmd)
- addCamelCaseExpansions(argv, cmd)
+ function populatePositional (positional, argv, positionalMap, parseOptions) {
+ const cmd = positional.cmd[0]
+ if (positional.variadic) {
+ positionalMap[cmd] = argv._.splice(0).map(String)
+ } else {
+ if (argv._.length) positionalMap[cmd] = [String(argv._.shift())]
}
}
- // TODO move positional arg logic to yargs-parser and remove this duplication
- function postProcessPositional (yargs, argv, key) {
- var coerce = yargs.getOptions().coerce[key]
- if (typeof coerce === 'function') {
- try {
- argv[key] = coerce(argv[key])
- } catch (err) {
- yargs.getUsageInstance().fail(err.message, err)
- }
+ // we run yargs-parser against the positional arguments
+ // applying the same parsing logic used for flags.
+ function postProcessPositionals (argv, positionalMap, parseOptions) {
+ // combine the parsing hints we've inferred from the command
+ // string with explicitly configured parsing hints.
+ const options = Object.assign({}, yargs.getOptions())
+ options.default = Object.assign(parseOptions.default, options.default)
+ options.alias = Object.assign(parseOptions.alias, options.alias)
+ options.array = options.array.concat(parseOptions.array)
+
+ const unparsed = []
+ Object.keys(positionalMap).forEach((key) => {
+ positionalMap[key].map((value) => {
+ unparsed.push(`--${key}`)
+ unparsed.push(value)
+ })
+ })
+
+ // short-circuit parse.
+ if (!unparsed.length) return
+
+ const parsed = Parser.detailed(unparsed, options)
+
+ if (parsed.error) {
+ yargs.getUsageInstance().fail(parsed.error.message, parsed.error)
+ } else {
+ // only copy over positional keys (don't overwrite
+ // flag arguments that were already parsed).
+ const positionalKeys = Object.keys(positionalMap)
+ Object.keys(positionalMap).forEach((key) => {
+ [].push.apply(positionalKeys, parsed.aliases[key])
+ })
+
+ Object.keys(parsed.argv).forEach((key) => {
+ if (positionalKeys.indexOf(key) !== -1) {
+ argv[key] = parsed.argv[key]
+ }
+ })
}
}
- function addCamelCaseExpansions (argv, option) {
- if (/-/.test(option)) {
- const cc = camelCase(option)
- if (typeof argv[option] === 'object') argv[cc] = argv[option].slice(0)
- else argv[cc] = argv[option]
+ self.cmdToParseOptions = function (cmdString) {
+ const parseOptions = {
+ array: [],
+ default: {},
+ alias: {},
+ demand: {}
}
+
+ const parsed = self.parseCommand(cmdString)
+ parsed.demanded.forEach((d) => {
+ const cmds = d.cmd.slice(0)
+ const cmd = cmds.shift()
+ if (d.variadic) {
+ parseOptions.array.push(cmd)
+ parseOptions.default[cmd] = []
+ }
+ cmds.forEach((c) => {
+ parseOptions.alias[cmd] = c
+ })
+ parseOptions.demand[cmd] = true
+ })
+
+ parsed.optional.forEach((o) => {
+ const cmds = o.cmd.slice(0)
+ const cmd = cmds.shift()
+ if (o.variadic) {
+ parseOptions.array.push(cmd)
+ parseOptions.default[cmd] = []
+ }
+ cmds.forEach((c) => {
+ parseOptions.alias[cmd] = c
+ })
+ })
+
+ return parseOptions
}
- self.reset = function () {
+ self.reset = () => {
handlers = {}
aliasMap = {}
defaultCommand = undefined
@@ -318,14 +408,14 @@ module.exports = function (yargs, usage, validation) {
// the state of commands such that
// we can apply .parse() multiple times
// with the same yargs instance.
- var frozen
- self.freeze = function () {
+ let frozen
+ self.freeze = () => {
frozen = {}
frozen.handlers = handlers
frozen.aliasMap = aliasMap
frozen.defaultCommand = defaultCommand
}
- self.unfreeze = function () {
+ self.unfreeze = () => {
handlers = frozen.handlers
aliasMap = frozen.aliasMap
defaultCommand = frozen.defaultCommand
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/completion.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/completion.js
index 5cd9a18a03..ad6969a2d9 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/completion.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/completion.js
@@ -1,16 +1,17 @@
+'use strict'
const fs = require('fs')
const path = require('path')
// add bash completions to your
// yargs-powered applications.
-module.exports = function (yargs, usage, command) {
+module.exports = function completion (yargs, usage, command) {
const self = {
completionKey: 'get-yargs-completions'
}
// get a list of completion commands.
// 'args' is the array of strings from the line to be completed
- self.getCompletion = function (args, done) {
+ self.getCompletion = function getCompletion (args, done) {
const completions = []
const current = args.length ? args[args.length - 1] : ''
const argv = yargs.parse(args, true)
@@ -20,14 +21,14 @@ module.exports = function (yargs, usage, command) {
// to completion().
if (completionFunction) {
if (completionFunction.length < 3) {
- var result = completionFunction(current, argv)
+ const result = completionFunction(current, argv)
// promise based completion function.
if (typeof result.then === 'function') {
- return result.then(function (list) {
- process.nextTick(function () { done(list) })
- }).catch(function (err) {
- process.nextTick(function () { throw err })
+ return result.then((list) => {
+ process.nextTick(() => { done(list) })
+ }).catch((err) => {
+ process.nextTick(() => { throw err })
})
}
@@ -35,14 +36,14 @@ module.exports = function (yargs, usage, command) {
return done(result)
} else {
// asynchronous completion function
- return completionFunction(current, argv, function (completions) {
+ return completionFunction(current, argv, (completions) => {
done(completions)
})
}
}
- var handlers = command.getCommandHandlers()
- for (var i = 0, ii = args.length; i < ii; ++i) {
+ const handlers = command.getCommandHandlers()
+ for (let i = 0, ii = args.length; i < ii; ++i) {
if (handlers[args[i]] && handlers[args[i]].builder) {
const builder = handlers[args[i]].builder
if (typeof builder === 'function') {
@@ -54,22 +55,21 @@ module.exports = function (yargs, usage, command) {
}
if (!current.match(/^-/)) {
- usage.getCommands().forEach(function (command) {
- if (args.indexOf(command[0]) === -1) {
- completions.push(command[0])
+ usage.getCommands().forEach((usageCommand) => {
+ const commandName = command.parseCommand(usageCommand[0]).cmd
+ if (args.indexOf(commandName) === -1) {
+ completions.push(commandName)
}
})
}
if (current.match(/^-/)) {
- Object.keys(yargs.getOptions().key).forEach(function (key) {
+ Object.keys(yargs.getOptions().key).forEach((key) => {
// If the key and its aliases aren't in 'args', add the key to 'completions'
- var keyAndAliases = [key].concat(aliases[key] || [])
- var notInArgs = keyAndAliases.every(function (val) {
- return args.indexOf('--' + val) === -1
- })
+ const keyAndAliases = [key].concat(aliases[key] || [])
+ const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1)
if (notInArgs) {
- completions.push('--' + key)
+ completions.push(`--${key}`)
}
})
}
@@ -78,25 +78,26 @@ module.exports = function (yargs, usage, command) {
}
// generate the completion script to add to your .bashrc.
- self.generateCompletionScript = function ($0) {
- var script = fs.readFileSync(
+ self.generateCompletionScript = function generateCompletionScript ($0, cmd) {
+ let script = fs.readFileSync(
path.resolve(__dirname, '../completion.sh.hbs'),
'utf-8'
)
- var name = path.basename($0)
+ const name = path.basename($0)
// add ./to applications not yet installed as bin.
- if ($0.match(/\.js$/)) $0 = './' + $0
+ if ($0.match(/\.js$/)) $0 = `./${$0}`
script = script.replace(/{{app_name}}/g, name)
+ script = script.replace(/{{completion_command}}/g, cmd)
return script.replace(/{{app_path}}/g, $0)
}
// register a function to perform your own custom
// completions., this function can be either
// synchrnous or asynchronous.
- var completionFunction = null
- self.registerFunction = function (fn) {
+ let completionFunction = null
+ self.registerFunction = (fn) => {
completionFunction = fn
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/levenshtein.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/levenshtein.js
index 6ec216f59d..f32b0c2771 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/levenshtein.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/levenshtein.js
@@ -10,22 +10,22 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed.
// gist, which can be found here: https://gist.github.com/andrei-m/982927
-
+'use strict'
// Compute the edit distance between the two given strings
-module.exports = function (a, b) {
+module.exports = function levenshtein (a, b) {
if (a.length === 0) return b.length
if (b.length === 0) return a.length
- var matrix = []
+ const matrix = []
// increment along the first column of each row
- var i
+ let i
for (i = 0; i <= b.length; i++) {
matrix[i] = [i]
}
// increment each column in the first row
- var j
+ let j
for (j = 0; j <= a.length; j++) {
matrix[0][j] = j
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/obj-filter.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/obj-filter.js
index 42cb9961ee..c344ac58ca 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/obj-filter.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/obj-filter.js
@@ -1,7 +1,8 @@
-module.exports = function (original, filter) {
+'use strict'
+module.exports = function objFilter (original, filter) {
const obj = {}
- filter = filter || function (k, v) { return true }
- Object.keys(original || {}).forEach(function (key) {
+ filter = filter || ((k, v) => true)
+ Object.keys(original || {}).forEach((key) => {
if (filter(key, original[key])) {
obj[key] = original[key]
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/usage.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/usage.js
index 43f71225c3..bd0906a89d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/usage.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/usage.js
@@ -1,23 +1,25 @@
+'use strict'
// this file handles outputting usage instructions,
// failures, etc. keeps logging in one place.
const stringWidth = require('string-width')
const objFilter = require('./obj-filter')
+const path = require('path')
const setBlocking = require('set-blocking')
const YError = require('./yerror')
-module.exports = function (yargs, y18n) {
+module.exports = function usage (yargs, y18n) {
const __ = y18n.__
const self = {}
// methods for ouputting/building failure message.
- var fails = []
- self.failFn = function (f) {
+ const fails = []
+ self.failFn = function failFn (f) {
fails.push(f)
}
- var failMessage = null
- var showHelpOnFail = true
- self.showHelpOnFail = function (enabled, message) {
+ let failMessage = null
+ let showHelpOnFail = true
+ self.showHelpOnFail = function showHelpOnFailFn (enabled, message) {
if (typeof enabled === 'string') {
message = enabled
enabled = true
@@ -29,12 +31,12 @@ module.exports = function (yargs, y18n) {
return self
}
- var failureOutput = false
- self.fail = function (msg, err) {
+ let failureOutput = false
+ self.fail = function fail (msg, err) {
const logger = yargs._getLoggerInstance()
if (fails.length) {
- for (var i = fails.length - 1; i >= 0; --i) {
+ for (let i = fails.length - 1; i >= 0; --i) {
fails[i](msg, err, self)
}
} else {
@@ -44,9 +46,9 @@ module.exports = function (yargs, y18n) {
if (!failureOutput) {
failureOutput = true
if (showHelpOnFail) yargs.showHelp('error')
- if (msg) logger.error(msg)
+ if (msg || err) logger.error(msg || err)
if (failMessage) {
- if (msg) logger.error('')
+ if (msg || err) logger.error('')
logger.error(failMessage)
}
}
@@ -63,56 +65,67 @@ module.exports = function (yargs, y18n) {
}
// methods for ouputting/building help (usage) message.
- var usage
- self.usage = function (msg) {
- usage = msg
+ let usages = []
+ let usageDisabled = false
+ self.usage = (msg, description) => {
+ if (msg === null) {
+ usageDisabled = true
+ usages = []
+ return
+ }
+ usageDisabled = false
+ usages.push([msg, description || ''])
+ return self
+ }
+ self.getUsage = () => {
+ return usages
}
- self.getUsage = function () {
- return usage
+ self.getUsageDisabled = () => {
+ return usageDisabled
+ }
+
+ self.getPositionalGroupName = () => {
+ return __('Positionals:')
}
- var examples = []
- self.example = function (cmd, description) {
+ let examples = []
+ self.example = (cmd, description) => {
examples.push([cmd, description || ''])
}
- var commands = []
- self.command = function (cmd, description, isDefault, aliases) {
+ let commands = []
+ self.command = function command (cmd, description, isDefault, aliases) {
// the last default wins, so cancel out any previously set default
if (isDefault) {
- commands = commands.map(function (cmdArray) {
+ commands = commands.map((cmdArray) => {
cmdArray[2] = false
return cmdArray
})
}
commands.push([cmd, description || '', isDefault, aliases])
}
- self.getCommands = function () {
- return commands
- }
+ self.getCommands = () => commands
- var descriptions = {}
- self.describe = function (key, desc) {
+ let descriptions = {}
+ self.describe = function describe (key, desc) {
if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
+ Object.keys(key).forEach((k) => {
self.describe(k, key[k])
})
} else {
descriptions[key] = desc
}
}
- self.getDescriptions = function () {
- return descriptions
- }
+ self.getDescriptions = () => descriptions
- var epilog
- self.epilog = function (msg) {
+ let epilog
+ self.epilog = (msg) => {
epilog = msg
}
- var wrapSet = false
- var wrap
- self.wrap = function (cols) {
+ let wrapSet = false
+ let wrap
+ self.wrap = (cols) => {
wrapSet = true
wrap = cols
}
@@ -126,41 +139,57 @@ module.exports = function (yargs, y18n) {
return wrap
}
- var deferY18nLookupPrefix = '__yargsString__:'
- self.deferY18nLookup = function (str) {
- return deferY18nLookupPrefix + str
- }
+ const deferY18nLookupPrefix = '__yargsString__:'
+ self.deferY18nLookup = str => deferY18nLookupPrefix + str
- var defaultGroup = 'Options:'
- self.help = function () {
+ const defaultGroup = 'Options:'
+ self.help = function help () {
normalizeAliases()
// handle old demanded API
- var demandedOptions = yargs.getDemandedOptions()
- var demandedCommands = yargs.getDemandedCommands()
- var groups = yargs.getGroups()
- var options = yargs.getOptions()
- var keys = Object.keys(
+ const base$0 = path.basename(yargs.$0)
+ const demandedOptions = yargs.getDemandedOptions()
+ const demandedCommands = yargs.getDemandedCommands()
+ const groups = yargs.getGroups()
+ const options = yargs.getOptions()
+ let keys = Object.keys(
Object.keys(descriptions)
.concat(Object.keys(demandedOptions))
.concat(Object.keys(demandedCommands))
.concat(Object.keys(options.default))
- .reduce(function (acc, key) {
+ .reduce((acc, key) => {
if (key !== '_') acc[key] = true
return acc
}, {})
)
- var theWrap = getWrap()
- var ui = require('cliui')({
+ const theWrap = getWrap()
+ const ui = require('cliui')({
width: theWrap,
wrap: !!theWrap
})
// the usage string.
- if (usage) {
- var u = usage.replace(/\$0/g, yargs.$0)
- ui.div(u + '\n')
+ if (!usageDisabled) {
+ if (usages.length) {
+ // user-defined usage.
+ usages.forEach((usage) => {
+ ui.div(`${usage[0].replace(/\$0/g, base$0)}`)
+ if (usage[1]) {
+ ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]})
+ }
+ })
+ ui.div()
+ } else if (commands.length) {
+ let u = null
+ // demonstrate how commands are used.
+ if (demandedCommands._) {
+ u = `${base$0} <${__('command')}>\n`
+ } else {
+ u = `${base$0} [${__('command')}]\n`
+ }
+ ui.div(`${u}`)
+ }
}
// your application's commands, i.e., non-option
@@ -168,15 +197,23 @@ module.exports = function (yargs, y18n) {
if (commands.length) {
ui.div(__('Commands:'))
- commands.forEach(function (command) {
+ const context = yargs.getContext()
+ const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : ''
+
+ commands.forEach((command) => {
+ const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands.
ui.span(
- {text: command[0], padding: [0, 2, 0, 2], width: maxWidth(commands, theWrap) + 4},
+ {
+ text: commandString,
+ padding: [0, 2, 0, 2],
+ width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4
+ },
{text: command[1]}
)
- var hints = []
- if (command[2]) hints.push('[' + __('default:').slice(0, -1) + ']') // TODO hacking around i18n here
+ const hints = []
+ if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here
if (command[3] && command[3].length) {
- hints.push('[' + __('aliases:') + ' ' + command[3].join(', ') + ']')
+ hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`)
}
if (hints.length) {
ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'})
@@ -190,14 +227,10 @@ module.exports = function (yargs, y18n) {
// perform some cleanup on the keys array, making it
// only include top-level keys not their aliases.
- var aliasKeys = (Object.keys(options.alias) || [])
+ const aliasKeys = (Object.keys(options.alias) || [])
.concat(Object.keys(yargs.parsed.newAliases) || [])
- keys = keys.filter(function (key) {
- return !yargs.parsed.newAliases[key] && aliasKeys.every(function (alias) {
- return (options.alias[alias] || []).indexOf(key) === -1
- })
- })
+ keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1))
// populate 'Options:' group with any keys that have not
// explicitly had a group set.
@@ -205,51 +238,54 @@ module.exports = function (yargs, y18n) {
addUngroupedKeys(keys, options.alias, groups)
// display 'Options:' table along with any custom tables:
- Object.keys(groups).forEach(function (groupName) {
+ Object.keys(groups).forEach((groupName) => {
if (!groups[groupName].length) return
ui.div(__(groupName))
// if we've grouped the key 'f', but 'f' aliases 'foobar',
// normalizedKeys should contain only 'foobar'.
- var normalizedKeys = groups[groupName].map(function (key) {
+ const normalizedKeys = groups[groupName].map((key) => {
if (~aliasKeys.indexOf(key)) return key
- for (var i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {
+ for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) {
if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey
}
return key
})
// actually generate the switches string --foo, -f, --bar.
- var switches = normalizedKeys.reduce(function (acc, key) {
+ const switches = normalizedKeys.reduce((acc, key) => {
acc[key] = [ key ].concat(options.alias[key] || [])
- .map(function (sw) {
- return (sw.length > 1 ? '--' : '-') + sw
+ .map(sw => {
+ // for the special positional group don't
+ // add '--' or '-' prefix.
+ if (groupName === self.getPositionalGroupName()) return sw
+ else return (sw.length > 1 ? '--' : '-') + sw
})
.join(', ')
return acc
}, {})
- normalizedKeys.forEach(function (key) {
- var kswitch = switches[key]
- var desc = descriptions[key] || ''
- var type = null
+ normalizedKeys.forEach((key) => {
+ const kswitch = switches[key]
+ let desc = descriptions[key] || ''
+ let type = null
if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length))
- if (~options.boolean.indexOf(key)) type = '[' + __('boolean') + ']'
- if (~options.count.indexOf(key)) type = '[' + __('count') + ']'
- if (~options.string.indexOf(key)) type = '[' + __('string') + ']'
- if (~options.normalize.indexOf(key)) type = '[' + __('string') + ']'
- if (~options.array.indexOf(key)) type = '[' + __('array') + ']'
- if (~options.number.indexOf(key)) type = '[' + __('number') + ']'
+ if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]`
+ if (~options.count.indexOf(key)) type = `[${__('count')}]`
+ if (~options.string.indexOf(key)) type = `[${__('string')}]`
+ if (~options.normalize.indexOf(key)) type = `[${__('string')}]`
+ if (~options.array.indexOf(key)) type = `[${__('array')}]`
+ if (~options.number.indexOf(key)) type = `[${__('number')}]`
- var extra = [
+ const extra = [
type,
- (key in demandedOptions) ? '[' + __('required') + ']' : null,
- options.choices && options.choices[key] ? '[' + __('choices:') + ' ' +
- self.stringifiedValues(options.choices[key]) + ']' : null,
+ (key in demandedOptions) ? `[${__('required')}]` : null,
+ options.choices && options.choices[key] ? `[${__('choices:')} ${
+ self.stringifiedValues(options.choices[key])}]` : null,
defaultString(options.default[key], options.defaultDescription[key])
].filter(Boolean).join(' ')
@@ -269,11 +305,11 @@ module.exports = function (yargs, y18n) {
if (examples.length) {
ui.div(__('Examples:'))
- examples.forEach(function (example) {
- example[0] = example[0].replace(/\$0/g, yargs.$0)
+ examples.forEach((example) => {
+ example[0] = example[0].replace(/\$0/g, base$0)
})
- examples.forEach(function (example) {
+ examples.forEach((example) => {
if (example[1] === '') {
ui.div(
{
@@ -299,8 +335,8 @@ module.exports = function (yargs, y18n) {
// the usage string.
if (epilog) {
- var e = epilog.replace(/\$0/g, yargs.$0)
- ui.div(e + '\n')
+ const e = epilog.replace(/\$0/g, base$0)
+ ui.div(`${e}\n`)
}
return ui.toString()
@@ -308,19 +344,20 @@ module.exports = function (yargs, y18n) {
// return the maximum width of a string
// in the left-hand column of a table.
- function maxWidth (table, theWrap) {
- var width = 0
+ function maxWidth (table, theWrap, modifier) {
+ let width = 0
// table might be of the form [leftColumn],
// or {key: leftColumn}
if (!Array.isArray(table)) {
- table = Object.keys(table).map(function (key) {
- return [table[key]]
- })
+ table = Object.keys(table).map(key => [table[key]])
}
- table.forEach(function (v) {
- width = Math.max(stringWidth(v[0]), width)
+ table.forEach((v) => {
+ width = Math.max(
+ stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]),
+ width
+ )
})
// if we've enabled 'wrap' we should limit
@@ -334,11 +371,11 @@ module.exports = function (yargs, y18n) {
// are copied to the keys being aliased.
function normalizeAliases () {
// handle old demanded API
- var demandedOptions = yargs.getDemandedOptions()
- var options = yargs.getOptions()
+ const demandedOptions = yargs.getDemandedOptions()
+ const options = yargs.getOptions()
- ;(Object.keys(options.alias) || []).forEach(function (key) {
- options.alias[key].forEach(function (alias) {
+ ;(Object.keys(options.alias) || []).forEach((key) => {
+ options.alias[key].forEach((alias) => {
// copy descriptions.
if (descriptions[alias]) self.describe(key, descriptions[alias])
// copy demanded.
@@ -357,43 +394,41 @@ module.exports = function (yargs, y18n) {
// given a set of keys, place any keys that are
// ungrouped under the 'Options:' grouping.
function addUngroupedKeys (keys, aliases, groups) {
- var groupedKeys = []
- var toCheck = null
- Object.keys(groups).forEach(function (group) {
+ let groupedKeys = []
+ let toCheck = null
+ Object.keys(groups).forEach((group) => {
groupedKeys = groupedKeys.concat(groups[group])
})
- keys.forEach(function (key) {
+ keys.forEach((key) => {
toCheck = [key].concat(aliases[key])
- if (!toCheck.some(function (k) {
- return groupedKeys.indexOf(k) !== -1
- })) {
+ if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) {
groups[defaultGroup].push(key)
}
})
return groupedKeys
}
- self.showHelp = function (level) {
+ self.showHelp = (level) => {
const logger = yargs._getLoggerInstance()
if (!level) level = 'error'
- var emit = typeof level === 'function' ? level : logger[level]
+ const emit = typeof level === 'function' ? level : logger[level]
emit(self.help())
}
- self.functionDescription = function (fn) {
- var description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value')
+ self.functionDescription = (fn) => {
+ const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value')
return ['(', description, ')'].join('')
}
- self.stringifiedValues = function (values, separator) {
- var string = ''
- var sep = separator || ', '
- var array = [].concat(values)
+ self.stringifiedValues = function stringifiedValues (values, separator) {
+ let string = ''
+ const sep = separator || ', '
+ const array = [].concat(values)
if (!values || !array.length) return string
- array.forEach(function (value) {
+ array.forEach((value) => {
if (string.length) string += sep
string += JSON.stringify(value)
})
@@ -404,7 +439,7 @@ module.exports = function (yargs, y18n) {
// format the default-value-string displayed in
// the right-hand column.
function defaultString (value, defaultDescription) {
- var string = '[' + __('default:') + ' '
+ let string = `[${__('default:')} `
if (value === undefined && !defaultDescription) return null
@@ -413,7 +448,7 @@ module.exports = function (yargs, y18n) {
} else {
switch (typeof value) {
case 'string':
- string += JSON.stringify(value)
+ string += `"${value}"`
break
case 'object':
string += JSON.stringify(value)
@@ -423,12 +458,12 @@ module.exports = function (yargs, y18n) {
}
}
- return string + ']'
+ return `${string}]`
}
// guess the width of the console window, max-width 80.
function windowWidth () {
- var maxWidth = 80
+ const maxWidth = 80
if (typeof process === 'object' && process.stdout && process.stdout.columns) {
return Math.min(maxWidth, process.stdout.columns)
} else {
@@ -437,47 +472,47 @@ module.exports = function (yargs, y18n) {
}
// logic for displaying application version.
- var version = null
- self.version = function (ver) {
+ let version = null
+ self.version = (ver) => {
version = ver
}
- self.showVersion = function () {
+ self.showVersion = () => {
const logger = yargs._getLoggerInstance()
- if (typeof version === 'function') logger.log(version())
- else logger.log(version)
+ logger.log(version)
}
- self.reset = function (localLookup) {
+ self.reset = function reset (localLookup) {
// do not reset wrap here
// do not reset fails here
failMessage = null
failureOutput = false
- usage = undefined
+ usages = []
+ usageDisabled = false
epilog = undefined
examples = []
commands = []
- descriptions = objFilter(descriptions, function (k, v) {
- return !localLookup[k]
- })
+ descriptions = objFilter(descriptions, (k, v) => !localLookup[k])
return self
}
- var frozen
- self.freeze = function () {
+ let frozen
+ self.freeze = function freeze () {
frozen = {}
frozen.failMessage = failMessage
frozen.failureOutput = failureOutput
- frozen.usage = usage
+ frozen.usages = usages
+ frozen.usageDisabled = usageDisabled
frozen.epilog = epilog
frozen.examples = examples
frozen.commands = commands
frozen.descriptions = descriptions
}
- self.unfreeze = function () {
+ self.unfreeze = function unfreeze () {
failMessage = frozen.failMessage
failureOutput = frozen.failureOutput
- usage = frozen.usage
+ usages = frozen.usages
+ usageDisabled = frozen.usageDisabled
epilog = frozen.epilog
examples = frozen.examples
commands = frozen.commands
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/validation.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/validation.js
index 2f9ff8e6cf..f4655b4fdc 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/validation.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/validation.js
@@ -1,16 +1,18 @@
+'use strict'
+const argsert = require('./argsert')
const objFilter = require('./obj-filter')
const specialKeys = ['$0', '--', '_']
// validation-type-stuff, missing params,
// bad implications, custom checks.
-module.exports = function (yargs, usage, y18n) {
+module.exports = function validation (yargs, usage, y18n) {
const __ = y18n.__
const __n = y18n.__n
const self = {}
// validate appropriate # of non-option
// arguments were provided, i.e., '_'.
- self.nonOptionCount = function (argv) {
+ self.nonOptionCount = function nonOptionCount (argv) {
const demandedCommands = yargs.getDemandedCommands()
// don't count currently executing commands
const _s = argv._.length - yargs.getContext().commands.length
@@ -44,7 +46,7 @@ module.exports = function (yargs, usage, y18n) {
// validate the appropriate # of <required>
// positional arguments were provided:
- self.positionalCount = function (required, observed) {
+ self.positionalCount = function positionalCount (required, observed) {
if (observed < required) {
usage.fail(
__('Not enough non-option arguments: got %s, need at least %s', observed, required)
@@ -52,44 +54,12 @@ module.exports = function (yargs, usage, y18n) {
}
}
- // make sure that any args that require an
- // value (--foo=bar), have a value.
- self.missingArgumentValue = function (argv) {
- const defaultValues = [true, false, '']
- const options = yargs.getOptions()
-
- if (options.requiresArg.length > 0) {
- const missingRequiredArgs = []
-
- options.requiresArg.forEach(function (key) {
- const value = argv[key]
-
- // if a value is explicitly requested,
- // flag argument as missing if it does not
- // look like foo=bar was entered.
- if (~defaultValues.indexOf(value) ||
- (Array.isArray(value) && !value.length)) {
- missingRequiredArgs.push(key)
- }
- })
-
- if (missingRequiredArgs.length > 0) {
- usage.fail(__n(
- 'Missing argument value: %s',
- 'Missing argument values: %s',
- missingRequiredArgs.length,
- missingRequiredArgs.join(', ')
- ))
- }
- }
- }
-
// make sure all the required arguments are present.
- self.requiredArguments = function (argv) {
+ self.requiredArguments = function requiredArguments (argv) {
const demandedOptions = yargs.getDemandedOptions()
- var missing = null
+ let missing = null
- Object.keys(demandedOptions).forEach(function (key) {
+ Object.keys(demandedOptions).forEach((key) => {
if (!argv.hasOwnProperty(key) || typeof argv[key] === 'undefined') {
missing = missing || {}
missing[key] = demandedOptions[key]
@@ -98,14 +68,14 @@ module.exports = function (yargs, usage, y18n) {
if (missing) {
const customMsgs = []
- Object.keys(missing).forEach(function (key) {
+ Object.keys(missing).forEach((key) => {
const msg = missing[key]
if (msg && customMsgs.indexOf(msg) < 0) {
customMsgs.push(msg)
}
})
- const customMsg = customMsgs.length ? '\n' + customMsgs.join('\n') : ''
+ const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''
usage.fail(__n(
'Missing required argument: %s',
@@ -117,33 +87,23 @@ module.exports = function (yargs, usage, y18n) {
}
// check for unknown arguments (strict-mode).
- self.unknownArguments = function (argv, aliases, positionalMap) {
- const aliasLookup = {}
- const descriptions = usage.getDescriptions()
- const demandedOptions = yargs.getDemandedOptions()
+ self.unknownArguments = function unknownArguments (argv, aliases, positionalMap) {
const commandKeys = yargs.getCommandInstance().getCommands()
const unknown = []
const currentContext = yargs.getContext()
- Object.keys(aliases).forEach(function (key) {
- aliases[key].forEach(function (alias) {
- aliasLookup[alias] = key
- })
- })
-
- Object.keys(argv).forEach(function (key) {
+ Object.keys(argv).forEach((key) => {
if (specialKeys.indexOf(key) === -1 &&
- !descriptions.hasOwnProperty(key) &&
- !demandedOptions.hasOwnProperty(key) &&
!positionalMap.hasOwnProperty(key) &&
!yargs._getParseContext().hasOwnProperty(key) &&
- !aliasLookup.hasOwnProperty(key)) {
+ !aliases.hasOwnProperty(key)
+ ) {
unknown.push(key)
}
})
if (commandKeys.length > 0) {
- argv._.slice(currentContext.commands.length).forEach(function (key) {
+ argv._.slice(currentContext.commands.length).forEach((key) => {
if (commandKeys.indexOf(key) === -1) {
unknown.push(key)
}
@@ -161,18 +121,19 @@ module.exports = function (yargs, usage, y18n) {
}
// validate arguments limited to enumerated choices
- self.limitedChoices = function (argv) {
+ self.limitedChoices = function limitedChoices (argv) {
const options = yargs.getOptions()
const invalid = {}
if (!Object.keys(options.choices).length) return
- Object.keys(argv).forEach(function (key) {
+ Object.keys(argv).forEach((key) => {
if (specialKeys.indexOf(key) === -1 &&
options.choices.hasOwnProperty(key)) {
- [].concat(argv[key]).forEach(function (value) {
+ [].concat(argv[key]).forEach((value) => {
// TODO case-insensitive configurability
- if (options.choices[key].indexOf(value) === -1) {
+ if (options.choices[key].indexOf(value) === -1 &&
+ value !== undefined) {
invalid[key] = (invalid[key] || []).concat(value)
}
})
@@ -183,31 +144,31 @@ module.exports = function (yargs, usage, y18n) {
if (!invalidKeys.length) return
- var msg = __('Invalid values:')
- invalidKeys.forEach(function (key) {
- msg += '\n ' + __(
+ let msg = __('Invalid values:')
+ invalidKeys.forEach((key) => {
+ msg += `\n ${__(
'Argument: %s, Given: %s, Choices: %s',
key,
usage.stringifiedValues(invalid[key]),
usage.stringifiedValues(options.choices[key])
- )
+ )}`
})
usage.fail(msg)
}
// custom checks, added using the `check` option on yargs.
- var checks = []
- self.check = function (f, global) {
+ let checks = []
+ self.check = function check (f, global) {
checks.push({
func: f,
- global: global
+ global
})
}
- self.customChecks = function (argv, aliases) {
- for (var i = 0, f; (f = checks[i]) !== undefined; i++) {
- var func = f.func
- var result = null
+ self.customChecks = function customChecks (argv, aliases) {
+ for (let i = 0, f; (f = checks[i]) !== undefined; i++) {
+ const func = f.func
+ let result = null
try {
result = func(argv, aliases)
} catch (err) {
@@ -224,107 +185,129 @@ module.exports = function (yargs, usage, y18n) {
}
// check implications, argument foo implies => argument bar.
- var implied = {}
- self.implies = function (key, value) {
+ let implied = {}
+ self.implies = function implies (key, value) {
+ argsert('<string|object> [array|number|string]', [key, value], arguments.length)
+
if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
+ Object.keys(key).forEach((k) => {
self.implies(k, key[k])
})
} else {
yargs.global(key)
- implied[key] = value
+ if (!implied[key]) {
+ implied[key] = []
+ }
+ if (Array.isArray(value)) {
+ value.forEach((i) => self.implies(key, i))
+ } else {
+ implied[key].push(value)
+ }
}
}
- self.getImplied = function () {
+ self.getImplied = function getImplied () {
return implied
}
- self.implications = function (argv) {
+ self.implications = function implications (argv) {
const implyFail = []
- Object.keys(implied).forEach(function (key) {
- var num
+ Object.keys(implied).forEach((key) => {
const origKey = key
- var value = implied[key]
-
- // convert string '1' to number 1
- num = Number(key)
- key = isNaN(num) ? key : num
-
- if (typeof key === 'number') {
- // check length of argv._
- key = argv._.length >= key
- } else if (key.match(/^--no-.+/)) {
- // check if key doesn't exist
- key = key.match(/^--no-(.+)/)[1]
- key = !argv[key]
- } else {
- // check if key exists
- key = argv[key]
- }
-
- num = Number(value)
- value = isNaN(num) ? value : num
+ ;(implied[key] || []).forEach((value) => {
+ let num
+ let key = origKey
+ const origValue = value
+
+ // convert string '1' to number 1
+ num = Number(key)
+ key = isNaN(num) ? key : num
+
+ if (typeof key === 'number') {
+ // check length of argv._
+ key = argv._.length >= key
+ } else if (key.match(/^--no-.+/)) {
+ // check if key doesn't exist
+ key = key.match(/^--no-(.+)/)[1]
+ key = !argv[key]
+ } else {
+ // check if key exists
+ key = argv[key]
+ }
- if (typeof value === 'number') {
- value = argv._.length >= value
- } else if (value.match(/^--no-.+/)) {
- value = value.match(/^--no-(.+)/)[1]
- value = !argv[value]
- } else {
- value = argv[value]
- }
+ num = Number(value)
+ value = isNaN(num) ? value : num
- if (key && !value) {
- implyFail.push(origKey)
- }
+ if (typeof value === 'number') {
+ value = argv._.length >= value
+ } else if (value.match(/^--no-.+/)) {
+ value = value.match(/^--no-(.+)/)[1]
+ value = !argv[value]
+ } else {
+ value = argv[value]
+ }
+ if (key && !value) {
+ implyFail.push(` ${origKey} -> ${origValue}`)
+ }
+ })
})
if (implyFail.length) {
- var msg = __('Implications failed:') + '\n'
+ let msg = `${__('Implications failed:')}\n`
- implyFail.forEach(function (key) {
- msg += (' ' + key + ' -> ' + implied[key])
+ implyFail.forEach((value) => {
+ msg += (value)
})
usage.fail(msg)
}
}
- var conflicting = {}
- self.conflicts = function (key, value) {
+ let conflicting = {}
+ self.conflicts = function conflicts (key, value) {
+ argsert('<string|object> [array|string]', [key, value], arguments.length)
+
if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
+ Object.keys(key).forEach((k) => {
self.conflicts(k, key[k])
})
} else {
yargs.global(key)
- conflicting[key] = value
+ if (!conflicting[key]) {
+ conflicting[key] = []
+ }
+ if (Array.isArray(value)) {
+ value.forEach((i) => self.conflicts(key, i))
+ } else {
+ conflicting[key].push(value)
+ }
}
}
- self.getConflicting = function () {
- return conflicting
- }
-
- self.conflicting = function (argv) {
- var args = Object.getOwnPropertyNames(argv)
-
- args.forEach(function (arg) {
- if (conflicting[arg] && args.indexOf(conflicting[arg]) !== -1) {
- usage.fail(__('Arguments %s and %s are mutually exclusive', arg, conflicting[arg]))
+ self.getConflicting = () => conflicting
+
+ self.conflicting = function conflictingFn (argv) {
+ Object.keys(argv).forEach((key) => {
+ if (conflicting[key]) {
+ conflicting[key].forEach((value) => {
+ // we default keys to 'undefined' that have been configured, we should not
+ // apply conflicting check unless they are a value other than 'undefined'.
+ if (value && argv[key] !== undefined && argv[value] !== undefined) {
+ usage.fail(__(`Arguments ${key} and ${value} are mutually exclusive`))
+ }
+ })
}
})
}
- self.recommendCommands = function (cmd, potentialCommands) {
+ self.recommendCommands = function recommendCommands (cmd, potentialCommands) {
const distance = require('./levenshtein')
const threshold = 3 // if it takes more than three edits, let's move on.
- potentialCommands = potentialCommands.sort(function (a, b) { return b.length - a.length })
+ potentialCommands = potentialCommands.sort((a, b) => b.length - a.length)
- var recommended = null
- var bestDistance = Infinity
- for (var i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {
- var d = distance(cmd, candidate)
+ let recommended = null
+ let bestDistance = Infinity
+ for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {
+ const d = distance(cmd, candidate)
if (d <= threshold && d < bestDistance) {
bestDistance = d
recommended = candidate
@@ -333,27 +316,21 @@ module.exports = function (yargs, usage, y18n) {
if (recommended) usage.fail(__('Did you mean %s?', recommended))
}
- self.reset = function (localLookup) {
- implied = objFilter(implied, function (k, v) {
- return !localLookup[k]
- })
- conflicting = objFilter(conflicting, function (k, v) {
- return !localLookup[k]
- })
- checks = checks.filter(function (c) {
- return c.global
- })
+ self.reset = function reset (localLookup) {
+ implied = objFilter(implied, (k, v) => !localLookup[k])
+ conflicting = objFilter(conflicting, (k, v) => !localLookup[k])
+ checks = checks.filter(c => c.global)
return self
}
- var frozen
- self.freeze = function () {
+ let frozen
+ self.freeze = function freeze () {
frozen = {}
frozen.implied = implied
frozen.checks = checks
frozen.conflicting = conflicting
}
- self.unfreeze = function () {
+ self.unfreeze = function unfreeze () {
implied = frozen.implied
checks = frozen.checks
conflicting = frozen.conflicting
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/yerror.js b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/yerror.js
index ad96a8776e..53375a0f75 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/lib/yerror.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/lib/yerror.js
@@ -1,3 +1,4 @@
+'use strict'
function YError (msg) {
this.name = 'YError'
this.message = msg || 'yargs error'
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/en.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/en.json
index 4a618e7054..fc65c2a0d8 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/en.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/en.json
@@ -36,5 +36,7 @@
"Show help": "Show help",
"Show version number": "Show version number",
"Did you mean %s?": "Did you mean %s?",
- "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive"
+ "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive",
+ "Positionals:": "Positionals:",
+ "command": "command"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/hi.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/hi.json
index 2a9826d96f..2cd677acb4 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/hi.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/hi.json
@@ -35,5 +35,8 @@
"Path to JSON config file": "JSON config ą¤«ą¤¾ą¤‡ą¤² ą¤•ą¤¾ ą¤Ŗą¤„",
"Show help": "ą¤øą¤¹ą¤¾ą¤Æą¤¤ą¤¾ ą¤¦ą¤æą¤–ą¤¾ą¤ą¤",
"Show version number": "Version ą¤øą¤‚ą¤–ą„ą¤Æą¤¾ ą¤¦ą¤æą¤–ą¤¾ą¤ą¤",
- "Did you mean %s?": "ą¤•ą„ą¤Æą¤¾ ą¤†ą¤Ŗą¤•ą¤¾ ą¤®ą¤¤ą¤²ą¤¬ ą¤¹ą„ˆ %s?"
+ "Did you mean %s?": "ą¤•ą„ą¤Æą¤¾ ą¤†ą¤Ŗą¤•ą¤¾ ą¤®ą¤¤ą¤²ą¤¬ ą¤¹ą„ˆ %s?",
+ "Arguments %s and %s are mutually exclusive" : "ą¤¤ą¤°ą„ą¤• %s ą¤”ą¤° %s ą¤Ŗą¤°ą¤øą„ą¤Ŗą¤° ą¤…ą¤Øą¤Øą„ą¤Æ ą¤¹ą„ˆą¤‚",
+ "Positionals:": "ą¤øą„ą¤„ą¤¾ą¤Øą„€ą¤Æ:",
+ "command": "ą¤†ą¤¦ą„‡ą¤¶"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/id.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/id.json
index a06e8608d0..87e441cd80 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/id.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/id.json
@@ -36,5 +36,8 @@
"Path to JSON config file": "Alamat berkas konfigurasi JSON",
"Show help": "Lihat bantuan",
"Show version number": "Lihat nomor versi",
- "Did you mean %s?": "Maksud Anda: %s?"
+ "Did you mean %s?": "Maksud Anda: %s?",
+ "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif",
+ "Positionals:": "Posisional-posisional:",
+ "command": "perintah"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ja.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ja.json
index 45a64a8123..64ee6d3fb9 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ja.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ja.json
@@ -35,5 +35,8 @@
"Path to JSON config file": "JSON恮čØ­å®šćƒ•ć‚”ć‚¤ćƒ«ć¾ć§ć®path",
"Show help": "ćƒ˜ćƒ«ćƒ—ć‚’č”Øē¤ŗ",
"Show version number": "ćƒćƒ¼ć‚øćƒ§ćƒ³ć‚’č”Øē¤ŗ",
- "Did you mean %s?": "悂恗恋恗恦 %s?"
+ "Did you mean %s?": "悂恗恋恗恦 %s?",
+ "Arguments %s and %s are mutually exclusive" : "å¼•ę•° %s ćØ %s ćÆåŒę™‚ć«ęŒ‡å®šć§ćć¾ć›ć‚“",
+ "Positionals:": "位ē½®:",
+ "command": "ć‚³ćƒžćƒ³ćƒ‰"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ko.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ko.json
index e714984798..0eaeab2f81 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ko.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/ko.json
@@ -35,5 +35,8 @@
"Path to JSON config file": "JSON ģ„¤ģ •ķŒŒģ¼ ź²½ė”œ",
"Show help": "ė„ģ›€ė§ģ„ ė³“ģ—¬ģ¤ė‹ˆė‹¤",
"Show version number": "ė²„ģ „ ė„˜ė²„ė„¼ ė³“ģ—¬ģ¤ė‹ˆė‹¤",
- "Did you mean %s?": "ģ°¾ź³ ź³„ģ‹ ź²Œ %sģž…ė‹ˆź¹Œ?"
+ "Did you mean %s?": "ģ°¾ź³ ź³„ģ‹ ź²Œ %sģž…ė‹ˆź¹Œ?",
+ "Arguments %s and %s are mutually exclusive" : "%sģ™€ %s ģøģžėŠ” ź°™ģ“ ģ‚¬ģš©ė  ģˆ˜ ģ—†ģŠµė‹ˆė‹¤",
+ "Positionals:": "ģœ„ģ¹˜:",
+ "command": "ėŖ…ė ¹"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nl.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nl.json
index fc029dbebd..1d144724ec 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nl.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nl.json
@@ -35,5 +35,8 @@
"Path to JSON config file": "Pad naar JSON configuratiebestand",
"Show help": "Toon help",
"Show version number": "Toon versie nummer",
- "Did you mean %s?": "Bedoelde u misschien %s?"
+ "Did you mean %s?": "Bedoelde u misschien %s?",
+ "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend",
+ "Positionals:": "Positie-afhankelijke argumenten",
+ "command": "commando"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nn.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nn.json
new file mode 100644
index 0000000000..5e03c505ab
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/nn.json
@@ -0,0 +1,39 @@
+{
+ "Commands:": "Kommandoar:",
+ "Options:": "Alternativ:",
+ "Examples:": "DĆøme:",
+ "boolean": "boolsk",
+ "count": "mengd",
+ "string": "streng",
+ "number": "nummer",
+ "array": "matrise",
+ "required": "obligatorisk",
+ "default:": "standard:",
+ "choices:": "val:",
+ "generated-value": "generert-verdi",
+ "Not enough non-option arguments: got %s, need at least %s":
+ "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s",
+ "Too many non-option arguments: got %s, maximum of %s":
+ "For mange ikkje-alternativ argument: fekk %s, maksimum %s",
+ "Missing argument value: %s": {
+ "one": "Manglar argumentverdi: %s",
+ "other": "Manglar argumentverdiar: %s"
+ },
+ "Missing required argument: %s": {
+ "one": "Manglar obligatorisk argument: %s",
+ "other": "Manglar obligatoriske argument: %s"
+ },
+ "Unknown argument: %s": {
+ "one": "Ukjent argument: %s",
+ "other": "Ukjende argument: %s"
+ },
+ "Invalid values:": "Ugyldige verdiar:",
+ "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s",
+ "Argument check failed: %s": "Argument sjekk mislukkast: %s",
+ "Implications failed:": "Konsekvensane mislukkast:",
+ "Not enough arguments following: %s": "Ikkje nok fylgande argument: %s",
+ "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s",
+ "Path to JSON config file": "Bane til JSON konfigurasjonsfil",
+ "Show help": "Vis hjelp",
+ "Show version number": "Vis versjonsnummer"
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pl.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pl.json
index 1c834f693b..6926a45480 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pl.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pl.json
@@ -35,5 +35,8 @@
"Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON",
"Show help": "Pokaż pomoc",
"Show version number": "Pokaż numer wersji",
- "Did you mean %s?": "Czy chodziło Ci o %s?"
+ "Did you mean %s?": "Czy chodziło Ci o %s?",
+ "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają",
+ "Positionals:": "Pozycyjne:",
+ "command": "polecenie"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pt_BR.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pt_BR.json
index 60e5ffa24d..904cb66eb4 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pt_BR.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/pt_BR.json
@@ -2,7 +2,7 @@
"Commands:": "Comandos:",
"Options:": "OpƧƵes:",
"Examples:": "Exemplos:",
- "boolean": "boolean",
+ "boolean": "booleano",
"count": "contagem",
"string": "string",
"number": "nĆŗmero",
@@ -36,5 +36,7 @@
"Show help": "Exibe ajuda",
"Show version number": "Exibe a versĆ£o",
"Did you mean %s?": "VocĆŖ quis dizer %s?",
- "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s sĆ£o mutualmente exclusivos"
+ "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s sĆ£o mutualmente exclusivos",
+ "Positionals:": "Posicionais:",
+ "command": "comando"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/tr.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/tr.json
index 000060b91a..9b06c52a8d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/tr.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/tr.json
@@ -35,5 +35,7 @@
"Path to JSON config file": "JSON yapılandırma dosya konumu",
"Show help": "Yardım detaylarını gƶster",
"Show version number": "Versiyon detaylarını gƶster",
- "Did you mean %s?": "Bunu mu demek istediniz: %s?"
+ "Did you mean %s?": "Bunu mu demek istediniz: %s?",
+ "Positionals:": "Sıralılar:",
+ "command": "komut"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/zh_CN.json b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/zh_CN.json
index b25c7b9d20..03a3d94f0c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/locales/zh_CN.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/locales/zh_CN.json
@@ -33,5 +33,9 @@
"Invalid JSON config file: %s": "ꗠꕈēš„ JSON 配ē½®ę–‡ä»¶ļ¼š%s",
"Path to JSON config file": "JSON 配ē½®ę–‡ä»¶ēš„č·Æ径",
"Show help": "ę˜¾ē¤ŗåø®åŠ©äæ”ęÆ",
- "Show version number": "ę˜¾ē¤ŗē‰ˆęœ¬å·"
+ "Show version number": "ę˜¾ē¤ŗē‰ˆęœ¬å·",
+ "Did you mean %s?": "ę˜Æꌇ %s?",
+ "Arguments %s and %s are mutually exclusive" : "选锹 %s 和 %s ę˜Æäŗ’ę–„ēš„",
+ "Positionals:": "位ē½®ļ¼š",
+ "command": "命令"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/CHANGELOG.md
index ef6a35ef41..69c08f4874 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/CHANGELOG.md
@@ -2,6 +2,32 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="4.0.0"></a>
+# [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18)
+
+
+### Bug Fixes
+
+* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46))
+* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36))
+
+
+### Chores
+
+* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376))
+
+
+### Features
+
+* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922))
+
+
+### BREAKING CHANGES
+
+* officially drop support for Node < 4
+
+
+
<a name="3.2.0"></a>
# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/README.md
index 028392c263..3ad21198c5 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/README.md
@@ -10,9 +10,7 @@ easily create complex multi-column command-line-interfaces.
## Example
```js
-var ui = require('cliui')({
- width: 80
-})
+var ui = require('cliui')()
ui.div('Usage: $0 [command] [options]')
@@ -88,6 +86,7 @@ cliui = require('cliui')
### cliui({width: integer})
Specify the maximum width of the UI being generated.
+If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`.
### cliui({wrap: boolean})
@@ -99,6 +98,7 @@ Create a row with any number of columns, a column
can either be a string, or an object with the following
options:
+* **text:** some text to place in the column.
* **width:** the width of a column.
* **align:** alignment, `right` or `center`.
* **padding:** `[top, right, bottom, left]`.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/index.js
index e501e78fd7..55abdee9f3 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/index.js
@@ -282,6 +282,10 @@ function _minWidth (col) {
return minWidth
}
+function getWindowWidth () {
+ if (typeof process === 'object' && process.stdout && process.stdout.columns) return process.stdout.columns
+}
+
function alignRight (str, width) {
str = str.trim()
var padding = ''
@@ -310,7 +314,7 @@ module.exports = function (opts) {
opts = opts || {}
return new UI({
- width: (opts || {}).width || 80,
+ width: (opts || {}).width || getWindowWidth() || 80,
wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true
})
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js
index b9bec62440..b9bec62440 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/index.js
index 0432fe6a30..0432fe6a30 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/package.json
index 75b7ae6b15..d70c2e5d40 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/package.json
@@ -3,7 +3,7 @@
"_id": "code-point-at@1.1.0",
"_inBundle": false,
"_integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "_location": "/libnpx/yargs/cliui/string-width/code-point-at",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/string-width/code-point-at",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/cliui/string-width"
+ "/libnpx/yargs/cliui/wrap-ansi/string-width"
],
"_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"_shasum": "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77",
"_shrinkwrap": null,
"_spec": "code-point-at@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width",
"bin": null,
"bundleDependencies": false,
"dependencies": {},
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/readme.md
index 4c97730e69..4c97730e69 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/code-point-at/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/code-point-at/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
index a7d3e3855f..a7d3e3855f 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js
index 79be4b9cb8..79be4b9cb8 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json
index 9f82a47ba7..9544dd9c60 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json
@@ -3,7 +3,7 @@
"_id": "number-is-nan@1.0.1",
"_inBundle": false,
"_integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
- "_location": "/libnpx/yargs/cliui/string-width/is-fullwidth-code-point/number-is-nan",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/string-width/is-fullwidth-code-point/number-is-nan",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/cliui/string-width/is-fullwidth-code-point"
+ "/libnpx/yargs/cliui/wrap-ansi/string-width/is-fullwidth-code-point"
],
"_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"_shasum": "097b602b53422a522c1afb8790318336941a011d",
"_shrinkwrap": null,
"_spec": "number-is-nan@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point",
"bin": null,
"bundleDependencies": false,
"dependencies": {},
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md
index 2463508712..2463508712 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json
index 32957f6932..2ff2d7cd65 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json
@@ -3,7 +3,7 @@
"_id": "is-fullwidth-code-point@1.0.0",
"_inBundle": false,
"_integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "_location": "/libnpx/yargs/cliui/string-width/is-fullwidth-code-point",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/string-width/is-fullwidth-code-point",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/cliui/string-width"
+ "/libnpx/yargs/cliui/wrap-ansi/string-width"
],
"_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
"_shrinkwrap": null,
"_spec": "is-fullwidth-code-point@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md
index 4936464b1b..4936464b1b 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/package.json
index 277962789d..82a2f4129a 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/package.json
@@ -3,7 +3,7 @@
"_id": "string-width@1.0.2",
"_inBundle": false,
"_integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "_location": "/libnpx/yargs/cliui/string-width",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/string-width",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,14 +16,13 @@
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
- "/libnpx/yargs/cliui",
"/libnpx/yargs/cliui/wrap-ansi"
],
"_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3",
"_shrinkwrap": null,
"_spec": "string-width@^1.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/readme.md
index 1ab42c9358..1ab42c9358 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/string-width/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/index.js
index 099480fbfc..099480fbfc 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js
index b9574ed7e8..b9574ed7e8 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/package.json
index 6e890f17e8..d593e439c8 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/package.json
@@ -3,7 +3,7 @@
"_id": "ansi-regex@2.1.1",
"_inBundle": false,
"_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "_location": "/libnpx/yargs/cliui/strip-ansi/ansi-regex",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/strip-ansi/ansi-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/cliui/strip-ansi"
+ "/libnpx/yargs/cliui/wrap-ansi/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
"_shrinkwrap": null,
"_spec": "ansi-regex@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi",
"bin": null,
"bundleDependencies": false,
"dependencies": {},
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
index 6a928edf0f..6a928edf0f 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/package.json
index 5e00cb0e20..b6ef35987d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/package.json
@@ -3,7 +3,7 @@
"_id": "strip-ansi@3.0.1",
"_inBundle": false,
"_integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "_location": "/libnpx/yargs/cliui/strip-ansi",
+ "_location": "/libnpx/yargs/cliui/wrap-ansi/strip-ansi",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,15 +16,14 @@
"fetchSpec": "^3.0.1"
},
"_requiredBy": [
- "/libnpx/yargs/cliui",
- "/libnpx/yargs/cliui/string-width",
- "/libnpx/yargs/cliui/wrap-ansi"
+ "/libnpx/yargs/cliui/wrap-ansi",
+ "/libnpx/yargs/cliui/wrap-ansi/string-width"
],
"_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf",
"_shrinkwrap": null,
"_spec": "strip-ansi@^3.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md
index cb7d9ff7ee..cb7d9ff7ee 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/package.json
index 05ae56ab79..ecd8d86e45 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/package.json
@@ -1,49 +1,99 @@
{
- "_from": "cliui@^3.2.0",
- "_id": "cliui@3.2.0",
+ "_from": "cliui@^4.0.0",
+ "_id": "cliui@4.0.0",
"_inBundle": false,
- "_integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "_integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==",
"_location": "/libnpx/yargs/cliui",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "cliui@^3.2.0",
+ "raw": "cliui@^4.0.0",
"name": "cliui",
"escapedName": "cliui",
- "rawSpec": "^3.2.0",
+ "rawSpec": "^4.0.0",
"saveSpec": null,
- "fetchSpec": "^3.2.0"
+ "fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/libnpx/yargs"
],
- "_resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
- "_shasum": "120601537a916d29940f934da3b48d585a39213d",
- "_shrinkwrap": null,
- "_spec": "cliui@^3.2.0",
+ "_resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz",
+ "_shasum": "743d4650e05f36d1ed2575b59638d87322bfbbcc",
+ "_spec": "cliui@^4.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
+ "author": {
+ "name": "Ben Coe",
+ "email": "ben@npmjs.com"
+ },
+ "bugs": {
+ "url": "https://github.com/yargs/cliui/issues"
+ },
"bundleDependencies": false,
+ "config": {
+ "blanket": {
+ "pattern": [
+ "index.js"
+ ],
+ "data-cover-never": [
+ "node_modules",
+ "test"
+ ],
+ "output-reporter": "spec"
+ }
+ },
"dependencies": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
+ "string-width": "^2.1.1",
+ "strip-ansi": "^4.0.0",
"wrap-ansi": "^2.0.0"
},
"deprecated": false,
- "description": "[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) [![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) [![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)",
+ "description": "easily create complex multi-column command-line-interfaces",
"devDependencies": {
"chai": "^3.5.0",
"chalk": "^1.1.2",
"coveralls": "^2.11.8",
- "mocha": "^2.4.5",
- "nyc": "^6.4.0",
- "standard": "^6.0.8",
- "standard-version": "^2.1.2"
+ "mocha": "^3.0.0",
+ "nyc": "^10.0.0",
+ "standard": "^8.0.0",
+ "standard-version": "^3.0.0"
},
+ "engine": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/yargs/cliui#readme",
+ "keywords": [
+ "cli",
+ "command-line",
+ "layout",
+ "design",
+ "console",
+ "wrap",
+ "table"
+ ],
+ "license": "ISC",
+ "main": "index.js",
"name": "cliui",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "3.2.0"
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/yargs/cliui.git"
+ },
+ "scripts": {
+ "coverage": "nyc --reporter=text-lcov mocha | coveralls",
+ "pretest": "standard",
+ "release": "standard-version",
+ "test": "nyc mocha"
+ },
+ "standard": {
+ "ignore": [
+ "**/example/**"
+ ],
+ "globals": [
+ "it"
+ ]
+ },
+ "version": "4.0.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/index.js
index 939c9553dc..939c9553dc 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/index.js
index 32b108d19b..32b108d19b 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js
index 7461d665b5..7461d665b5 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js
index bfafd2688a..8767db1ca7 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js
@@ -1,4 +1,6 @@
'use strict';
+const pTry = require('p-try');
+
module.exports = concurrency => {
if (concurrency < 1) {
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
@@ -19,7 +21,7 @@ module.exports = concurrency => {
const run = () => {
activeCount++;
- fn().then(
+ pTry(() => fn()).then(
val => {
resolve(val);
next();
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/index.js
new file mode 100644
index 0000000000..efa2f74338
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/index.js
@@ -0,0 +1,4 @@
+'use strict';
+module.exports = cb => new Promise(resolve => {
+ resolve(cb());
+});
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/package.json
new file mode 100644
index 0000000000..61bfc00b1e
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "p-try@^1.0.0",
+ "_id": "p-try@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "_location": "/libnpx/yargs/find-up/locate-path/p-locate/p-limit/p-try",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-try@^1.0.0",
+ "name": "p-try",
+ "escapedName": "p-try",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/libnpx/yargs/find-up/locate-path/p-locate/p-limit"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "_shasum": "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3",
+ "_spec": "p-try@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-try/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "`Promise#try()` ponyfill - Starts a promise chain",
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-try#readme",
+ "keywords": [
+ "promise",
+ "try",
+ "resolve",
+ "function",
+ "catch",
+ "async",
+ "await",
+ "promises",
+ "settled",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-try",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-try.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/readme.md
new file mode 100644
index 0000000000..8e5fdddbe1
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/node_modules/p-try/readme.md
@@ -0,0 +1,38 @@
+# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try)
+
+> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain
+
+[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)
+
+
+## Install
+
+```
+$ npm install --save p-try
+```
+
+
+## Usage
+
+```js
+const pTry = require('p-try');
+
+pTry(() => {
+ return synchronousFunctionThatMightThrow();
+}).then(value => {
+ console.log(value);
+}).catch(error => {
+ console.error(error);
+});
+```
+
+
+## Related
+
+- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome
+- [Moreā€¦](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json
new file mode 100644
index 0000000000..556cb595ae
--- /dev/null
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json
@@ -0,0 +1,81 @@
+{
+ "_from": "p-limit@^1.1.0",
+ "_id": "p-limit@1.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==",
+ "_location": "/libnpx/yargs/find-up/locate-path/p-locate/p-limit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-limit@^1.1.0",
+ "name": "p-limit",
+ "escapedName": "p-limit",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/libnpx/yargs/find-up/locate-path/p-locate"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz",
+ "_shasum": "0e92b6bedcb59f022c13d0f1949dc82d15909f1c",
+ "_spec": "p-limit@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-limit/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-try": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Run multiple promise-returning & async functions with limited concurrency",
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^2.0.0",
+ "in-range": "^1.0.0",
+ "random-int": "^1.0.0",
+ "time-span": "^2.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-limit#readme",
+ "keywords": [
+ "promise",
+ "limit",
+ "limited",
+ "concurrency",
+ "throttle",
+ "throat",
+ "rate",
+ "batch",
+ "ratelimit",
+ "task",
+ "queue",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-limit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-limit.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.2.0"
+}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md
index c7a10deb68..90129925c1 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/readme.md
@@ -6,7 +6,7 @@
## Install
```
-$ npm install --save p-limit
+$ npm install p-limit
```
@@ -23,10 +23,11 @@ const input = [
limit(() => doSomething())
];
-// only one promise is run at once
-Promise.all(input).then(result => {
+(async () => {
+ // Only one promise is run at once
+ const result = await Promise.all(input);
console.log(result);
-});
+})();
```
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json
index bf1139823b..15d59d4d3d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/package.json
@@ -3,7 +3,7 @@
"_id": "p-locate@2.0.0",
"_inBundle": false,
"_integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "_location": "/libnpx/yargs/read-pkg-up/find-up/locate-path/p-locate",
+ "_location": "/libnpx/yargs/find-up/locate-path/p-locate",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/read-pkg-up/find-up/locate-path"
+ "/libnpx/yargs/find-up/locate-path"
],
"_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"_shasum": "20a0103b222a70c8fd39cc2e580680f3dde5ec43",
"_shrinkwrap": null,
"_spec": "p-locate@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md
index 68b96a47ef..68b96a47ef 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js
index 16ae60acb1..16ae60acb1 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json
index a7e85b7ff0..b14eb2ca0b 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/package.json
@@ -3,7 +3,7 @@
"_id": "path-exists@3.0.0",
"_inBundle": false,
"_integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "_location": "/libnpx/yargs/read-pkg-up/find-up/locate-path/path-exists",
+ "_location": "/libnpx/yargs/find-up/locate-path/path-exists",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^3.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/read-pkg-up/find-up/locate-path"
+ "/libnpx/yargs/find-up/locate-path"
],
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"_shasum": "ce0ebeaa5f78cb18925ea7d810d7b59b010fd515",
"_shrinkwrap": null,
"_spec": "path-exists@^3.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path",
"bin": null,
"bundleDependencies": false,
"dependencies": {},
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md
index 1b65fa705d..1b65fa705d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/package.json
index a9531e7a63..02f922120c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/package.json
@@ -3,7 +3,7 @@
"_id": "locate-path@2.0.0",
"_inBundle": false,
"_integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "_location": "/libnpx/yargs/read-pkg-up/find-up/locate-path",
+ "_location": "/libnpx/yargs/find-up/locate-path",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
- "/libnpx/yargs/read-pkg-up/find-up"
+ "/libnpx/yargs/find-up"
],
"_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"_shasum": "2b568b265eec944c6d9c0de9c3dbbbca0354cd8e",
"_shrinkwrap": null,
"_spec": "locate-path@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/readme.md
index f7b337bb2c..f7b337bb2c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/node_modules/locate-path/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/package.json
index 8cd3948e88..56ebb1cb86 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/package.json
@@ -1,28 +1,28 @@
{
- "_from": "find-up@^2.0.0",
+ "_from": "find-up@^2.1.0",
"_id": "find-up@2.1.0",
"_inBundle": false,
"_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "_location": "/libnpx/yargs/read-pkg-up/find-up",
+ "_location": "/libnpx/yargs/find-up",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "find-up@^2.0.0",
+ "raw": "find-up@^2.1.0",
"name": "find-up",
"escapedName": "find-up",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^2.1.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^2.1.0"
},
"_requiredBy": [
- "/libnpx/yargs/read-pkg-up"
+ "/libnpx/yargs"
],
"_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"_shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7",
"_shrinkwrap": null,
- "_spec": "find-up@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up",
+ "_spec": "find-up@^2.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
"bin": null,
"bundleDependencies": false,
"dependencies": {
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/readme.md
index b5ad694552..b5ad694552 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/find-up/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/index.js
index 9bf1763673..08e69d3d88 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/index.js
@@ -4,4 +4,6 @@ module.exports = (to, from) => {
for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
}
+
+ return to;
};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license
index 654d0bfe94..e7af2f7710 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+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 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.
+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/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/package.json
index f3099fa5f1..1009f6fb1c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/package.json
@@ -1,8 +1,8 @@
{
"_from": "mimic-fn@^1.0.0",
- "_id": "mimic-fn@1.1.0",
+ "_id": "mimic-fn@1.2.0",
"_inBundle": false,
- "_integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=",
+ "_integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"_location": "/libnpx/yargs/os-locale/mem/mimic-fn",
"_phantomChildren": {},
"_requested": {
@@ -18,16 +18,21 @@
"_requiredBy": [
"/libnpx/yargs/os-locale/mem"
],
- "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
- "_shasum": "e667783d92e89dbd342818b5230b9d62a672ad18",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "_shasum": "820c86a39334640e99516928bd03fca88057d022",
"_spec": "mimic-fn@^1.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem",
- "bin": null,
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/mimic-fn/issues"
+ },
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
- "description": "> Make a function mimic another one",
+ "description": "Make a function mimic another one",
"devDependencies": {
"ava": "*",
"xo": "*"
@@ -35,9 +40,33 @@
"engines": {
"node": ">=4"
},
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/mimic-fn#readme",
+ "keywords": [
+ "function",
+ "mimic",
+ "imitate",
+ "rename",
+ "copy",
+ "inherit",
+ "properties",
+ "name",
+ "func",
+ "fn",
+ "set",
+ "infer",
+ "change"
+ ],
+ "license": "MIT",
"name": "mimic-fn",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "1.1.0"
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/mimic-fn.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.2.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/readme.md
index 672c79eb3a..e575734389 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/mem/node_modules/mimic-fn/readme.md
@@ -8,7 +8,7 @@ Useful when you wrap a function in another function and like to preserve the ori
## Install
```
-$ npm install --save mimic-fn
+$ npm install mimic-fn
```
@@ -43,6 +43,8 @@ It will copy over the properties `name`, `length`, `displayName`, and any custom
### mimicFn(to, from)
+It will modify `to` and return it.
+
#### to
Type: `Function`
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/index.js
deleted file mode 100644
index 26079760f3..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-const findUp = require('find-up');
-const readPkg = require('read-pkg');
-
-module.exports = opts => {
- return findUp('package.json', opts).then(fp => {
- if (!fp) {
- return {};
- }
-
- return readPkg(fp, opts).then(pkg => ({pkg, path: fp}));
- });
-};
-
-module.exports.sync = opts => {
- const fp = findUp.sync('package.json', opts);
-
- if (!fp) {
- return {};
- }
-
- return {
- pkg: readPkg.sync(fp, opts),
- path: fp
- };
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json
deleted file mode 100644
index afb27e6ab9..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "_from": "p-limit@^1.1.0",
- "_id": "p-limit@1.1.0",
- "_inBundle": false,
- "_integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=",
- "_location": "/libnpx/yargs/read-pkg-up/find-up/locate-path/p-locate/p-limit",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "p-limit@^1.1.0",
- "name": "p-limit",
- "escapedName": "p-limit",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/find-up/locate-path/p-locate"
- ],
- "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz",
- "_shasum": "b07ff2d9a5d88bec806035895a2bab66a27988bc",
- "_shrinkwrap": null,
- "_spec": "p-limit@^1.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/p-locate",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> Run multiple promise-returning & async functions with limited concurrency",
- "devDependencies": {
- "ava": "*",
- "delay": "^1.3.1",
- "in-range": "^1.0.0",
- "random-int": "^1.0.0",
- "time-span": "^1.0.0",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "p-limit",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "1.1.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/index.js
deleted file mode 100644
index dff948b691..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-const path = require('path');
-const loadJsonFile = require('load-json-file');
-const pathType = require('path-type');
-
-module.exports = (fp, opts) => {
- if (typeof fp !== 'string') {
- opts = fp;
- fp = '.';
- }
-
- opts = opts || {};
-
- return pathType.dir(fp)
- .then(isDir => {
- if (isDir) {
- fp = path.join(fp, 'package.json');
- }
-
- return loadJsonFile(fp);
- })
- .then(x => {
- if (opts.normalize !== false) {
- require('normalize-package-data')(x);
- }
-
- return x;
- });
-};
-
-module.exports.sync = (fp, opts) => {
- if (typeof fp !== 'string') {
- opts = fp;
- fp = '.';
- }
-
- opts = opts || {};
- fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp;
-
- const x = loadJsonFile.sync(fp);
-
- if (opts.normalize !== false) {
- require('normalize-package-data')(x);
- }
-
- return x;
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/index.js
deleted file mode 100644
index b2767e3023..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-const path = require('path');
-const fs = require('graceful-fs');
-const stripBom = require('strip-bom');
-const parseJson = require('parse-json');
-const pify = require('pify');
-
-const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp));
-
-module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp));
-module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp);
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/index.js
deleted file mode 100644
index 04add8ae27..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/index.js
+++ /dev/null
@@ -1,35 +0,0 @@
-'use strict';
-var errorEx = require('error-ex');
-var fallback = require('./vendor/parse');
-
-var JSONError = errorEx('JSONError', {
- fileName: errorEx.append('in %s')
-});
-
-module.exports = function (x, reviver, filename) {
- if (typeof reviver === 'string') {
- filename = reviver;
- reviver = null;
- }
-
- try {
- try {
- return JSON.parse(x, reviver);
- } catch (err) {
- fallback.parse(x, {
- mode: 'json',
- reviver: reviver
- });
-
- throw err;
- }
- } catch (err) {
- var jsonErr = new JSONError(err);
-
- if (filename) {
- jsonErr.fileName = filename;
- }
-
- throw jsonErr;
- }
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/README.md
deleted file mode 100644
index 97f744af89..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/README.md
+++ /dev/null
@@ -1,144 +0,0 @@
-# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex)
-> Easily subclass and customize new Error types
-
-## Examples
-To include in your project:
-```javascript
-var errorEx = require('error-ex');
-```
-
-To create an error message type with a specific name (note, that `ErrorFn.name`
-will not reflect this):
-```javascript
-var JSONError = errorEx('JSONError');
-
-var err = new JSONError('error');
-err.name; //-> JSONError
-throw err; //-> JSONError: error
-```
-
-To add a stack line:
-```javascript
-var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')});
-
-var err = new JSONError('error')
-err.fileName = '/a/b/c/foo.json';
-throw err; //-> (line 2)-> in /a/b/c/foo.json
-```
-
-To append to the error message:
-```javascript
-var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')});
-
-var err = new JSONError('error');
-err.fileName = '/a/b/c/foo.json';
-throw err; //-> JSONError: error in /a/b/c/foo.json
-```
-
-## API
-
-#### `errorEx([name], [properties])`
-Creates a new ErrorEx error type
-
-- `name`: the name of the new type (appears in the error message upon throw;
- defaults to `Error.name`)
-- `properties`: if supplied, used as a key/value dictionary of properties to
- use when building up the stack message. Keys are property names that are
- looked up on the error message, and then passed to function values.
- - `line`: if specified and is a function, return value is added as a stack
- entry (error-ex will indent for you). Passed the property value given
- the key.
- - `stack`: if specified and is a function, passed the value of the property
- using the key, and the raw stack lines as a second argument. Takes no
- return value (but the stack can be modified directly).
- - `message`: if specified and is a function, return value is used as new
- `.message` value upon get. Passed the property value of the property named
- by key, and the existing message is passed as the second argument as an
- array of lines (suitable for multi-line messages).
-
-Returns a constructor (Function) that can be used just like the regular Error
-constructor.
-
-```javascript
-var errorEx = require('error-ex');
-
-var BasicError = errorEx();
-
-var NamedError = errorEx('NamedError');
-
-// --
-
-var AdvancedError = errorEx('AdvancedError', {
- foo: {
- line: function (value, stack) {
- if (value) {
- return 'bar ' + value;
- }
- return null;
- }
- }
-}
-
-var err = new AdvancedError('hello, world');
-err.foo = 'baz';
-throw err;
-
-/*
- AdvancedError: hello, world
- bar baz
- at tryReadme() (readme.js:20:1)
-*/
-```
-
-#### `errorEx.line(str)`
-Creates a stack line using a delimiter
-
-> This is a helper function. It is to be used in lieu of writing a value object
-> for `properties` values.
-
-- `str`: The string to create
- - Use the delimiter `%s` to specify where in the string the value should go
-
-```javascript
-var errorEx = require('error-ex');
-
-var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')});
-
-var err = new FileError('problem reading file');
-err.fileName = '/a/b/c/d/foo.js';
-throw err;
-
-/*
- FileError: problem reading file
- in /a/b/c/d/foo.js
- at tryReadme() (readme.js:7:1)
-*/
-```
-
-#### `errorEx.append(str)`
-Appends to the `error.message` string
-
-> This is a helper function. It is to be used in lieu of writing a value object
-> for `properties` values.
-
-- `str`: The string to append
- - Use the delimiter `%s` to specify where in the string the value should go
-
-```javascript
-var errorEx = require('error-ex');
-
-var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')});
-
-var err = new SyntaxError('improper indentation');
-err.fileName = '/a/b/c/d/foo.js';
-throw err;
-
-/*
- SyntaxError: improper indentation in /a/b/c/d/foo.js
- at tryReadme() (readme.js:7:1)
-*/
-```
-
-## License
-Licensed under the [MIT License](http://opensource.org/licenses/MIT).
-You can find a copy of it in [LICENSE](LICENSE).
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/index.js
deleted file mode 100644
index 43641b08ff..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/index.js
+++ /dev/null
@@ -1,133 +0,0 @@
-'use strict';
-
-var util = require('util');
-var isArrayish = require('is-arrayish');
-
-var errorEx = function errorEx(name, properties) {
- if (!name || name.constructor !== String) {
- properties = name || {};
- name = Error.name;
- }
-
- var errorExError = function ErrorEXError(message) {
- if (!this) {
- return new ErrorEXError(message);
- }
-
- message = message instanceof Error
- ? message.message
- : (message || this.message);
-
- Error.call(this, message);
- Error.captureStackTrace(this, errorExError);
-
- this.name = name;
-
- Object.defineProperty(this, 'message', {
- configurable: true,
- enumerable: false,
- get: function () {
- var newMessage = message.split(/\r?\n/g);
-
- for (var key in properties) {
- if (!properties.hasOwnProperty(key)) {
- continue;
- }
-
- var modifier = properties[key];
-
- if ('message' in modifier) {
- newMessage = modifier.message(this[key], newMessage) || newMessage;
- if (!isArrayish(newMessage)) {
- newMessage = [newMessage];
- }
- }
- }
-
- return newMessage.join('\n');
- },
- set: function (v) {
- message = v;
- }
- });
-
- var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
- var stackGetter = stackDescriptor.get;
- var stackValue = stackDescriptor.value;
- delete stackDescriptor.value;
- delete stackDescriptor.writable;
-
- stackDescriptor.get = function () {
- var stack = (stackGetter)
- ? stackGetter.call(this).split(/\r?\n+/g)
- : stackValue.split(/\r?\n+/g);
-
- // starting in Node 7, the stack builder caches the message.
- // just replace it.
- stack[0] = this.name + ': ' + this.message;
-
- var lineCount = 1;
- for (var key in properties) {
- if (!properties.hasOwnProperty(key)) {
- continue;
- }
-
- var modifier = properties[key];
-
- if ('line' in modifier) {
- var line = modifier.line(this[key]);
- if (line) {
- stack.splice(lineCount++, 0, ' ' + line);
- }
- }
-
- if ('stack' in modifier) {
- modifier.stack(this[key], stack);
- }
- }
-
- return stack.join('\n');
- };
-
- Object.defineProperty(this, 'stack', stackDescriptor);
- };
-
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(errorExError.prototype, Error.prototype);
- Object.setPrototypeOf(errorExError, Error);
- } else {
- util.inherits(errorExError, Error);
- }
-
- return errorExError;
-};
-
-errorEx.append = function (str, def) {
- return {
- message: function (v, message) {
- v = v || def;
-
- if (v) {
- message[0] += ' ' + str.replace('%s', v.toString());
- }
-
- return message;
- }
- };
-};
-
-errorEx.line = function (str, def) {
- return {
- line: function (v) {
- v = v || def;
-
- if (v) {
- return str.replace('%s', v.toString());
- }
-
- return null;
- }
- };
-};
-
-module.exports = errorEx;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.editorconfig b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.editorconfig
deleted file mode 100644
index 4c017f8ad2..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.editorconfig
+++ /dev/null
@@ -1,18 +0,0 @@
-root = true
-
-[*]
-indent_style = tab
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[*.coffee]
-indent_style = space
-
-[{package.json,*.yml}]
-indent_style = space
-indent_size = 2
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.istanbul.yml b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.istanbul.yml
deleted file mode 100644
index 19fbec32b8..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.istanbul.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-instrumentation:
- excludes:
- - test.js
- - test/**/*
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.npmignore b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.npmignore
deleted file mode 100644
index 8d5eacb3ef..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/coverage/
-/test.js
-/test/
-*.sw[a-p]
-/node_modules/
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.travis.yml b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.travis.yml
deleted file mode 100644
index 5a0424350e..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: node_js
-
-script:
- - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register
- - cat coverage/lcov.info | node_modules/.bin/coveralls
-node_js:
- - "0.10"
- - "0.11"
- - "0.12"
- - "iojs"
-os:
- - linux
- - osx
-
-notifications:
- slack:
- secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4=
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/README.md
deleted file mode 100644
index 7d360724c0..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish)
-> Determines if an object can be used like an Array
-
-## Example
-```javascript
-var isArrayish = require('is-arrayish');
-
-isArrayish([]); // true
-isArrayish({__proto__: []}); // true
-isArrayish({}); // false
-isArrayish({length:10}); // false
-```
-
-## License
-Licensed under the [MIT License](http://opensource.org/licenses/MIT).
-You can find a copy of it in [LICENSE](LICENSE).
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/index.js
deleted file mode 100644
index 5b971868b6..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = function isArrayish(obj) {
- if (!obj) {
- return false;
- }
-
- return obj instanceof Array || Array.isArray(obj) ||
- (obj.length >= 0 && obj.splice instanceof Function);
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/package.json
deleted file mode 100644
index f191d1f3fa..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules/is-arrayish/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "_from": "is-arrayish@^0.2.1",
- "_id": "is-arrayish@0.2.1",
- "_inBundle": false,
- "_integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/parse-json/error-ex/is-arrayish",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "is-arrayish@^0.2.1",
- "name": "is-arrayish",
- "escapedName": "is-arrayish",
- "rawSpec": "^0.2.1",
- "saveSpec": null,
- "fetchSpec": "^0.2.1"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/parse-json/error-ex"
- ],
- "_resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "_shasum": "77c99840527aa8ecb1a8ba697b80645a7a926a9d",
- "_shrinkwrap": null,
- "_spec": "is-arrayish@^0.2.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> Determines if an object can be used like an Array",
- "devDependencies": {
- "coffee-script": "^1.9.3",
- "coveralls": "^2.11.2",
- "istanbul": "^0.3.17",
- "mocha": "^2.2.5",
- "should": "^7.0.1",
- "xo": "^0.6.1"
- },
- "name": "is-arrayish",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "0.2.1"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/package.json
deleted file mode 100644
index 12985c9fee..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "_from": "error-ex@^1.2.0",
- "_id": "error-ex@1.3.1",
- "_inBundle": false,
- "_integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/parse-json/error-ex",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "error-ex@^1.2.0",
- "name": "error-ex",
- "escapedName": "error-ex",
- "rawSpec": "^1.2.0",
- "saveSpec": null,
- "fetchSpec": "^1.2.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/parse-json"
- ],
- "_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
- "_shasum": "f855a86ce61adc4e8621c3cda21e7a7612c3a8dc",
- "_shrinkwrap": null,
- "_spec": "error-ex@^1.2.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "is-arrayish": "^0.2.1"
- },
- "deprecated": false,
- "description": "> Easily subclass and customize new Error types",
- "devDependencies": {
- "coffee-script": "^1.9.3",
- "coveralls": "^2.11.2",
- "istanbul": "^0.3.17",
- "mocha": "^2.2.5",
- "should": "^7.0.1",
- "xo": "^0.7.1"
- },
- "name": "error-ex",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "1.3.1"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/package.json
deleted file mode 100644
index a5ce0ea9db..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "_from": "parse-json@^2.2.0",
- "_id": "parse-json@2.2.0",
- "_inBundle": false,
- "_integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/parse-json",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "parse-json@^2.2.0",
- "name": "parse-json",
- "escapedName": "parse-json",
- "rawSpec": "^2.2.0",
- "saveSpec": null,
- "fetchSpec": "^2.2.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file"
- ],
- "_resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "_shasum": "f480f40434ef80741f8469099f8dea18f55a4dc9",
- "_shrinkwrap": null,
- "_spec": "parse-json@^2.2.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "error-ex": "^1.2.0"
- },
- "deprecated": false,
- "description": "> Parse JSON with more helpful errors",
- "devDependencies": {
- "ava": "0.0.4",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "name": "parse-json",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.2.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/readme.md
deleted file mode 100644
index ca96e60a69..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/readme.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json)
-
-> Parse JSON with more helpful errors
-
-
-## Install
-
-```
-$ npm install --save parse-json
-```
-
-
-## Usage
-
-```js
-var parseJson = require('parse-json');
-var json = '{\n\t"foo": true,\n}';
-
-
-JSON.parse(json);
-/*
-undefined:3
-}
-^
-SyntaxError: Unexpected token }
-*/
-
-
-parseJson(json);
-/*
-JSONError: Trailing comma in object at 3:1
-}
-^
-*/
-
-
-parseJson(json, 'foo.json');
-/*
-JSONError: Trailing comma in object at 3:1 in foo.json
-}
-^
-*/
-
-
-// you can also add the filename at a later point
-try {
- parseJson(json);
-} catch (err) {
- err.fileName = 'foo.json';
- throw err;
-}
-/*
-JSONError: Trailing comma in object at 3:1 in foo.json
-}
-^
-*/
-```
-
-## API
-
-### parseJson(input, [reviver], [filename])
-
-#### input
-
-Type: `string`
-
-#### reviver
-
-Type: `function`
-
-Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
-) for more.
-
-#### filename
-
-Type: `string`
-
-Filename displayed in the error message.
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/parse.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/parse.js
deleted file mode 100644
index 2b78949378..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/parse.js
+++ /dev/null
@@ -1,751 +0,0 @@
-/*
- * Author: Alex Kocharin <alex@kocharin.ru>
- * GIT: https://github.com/rlidwka/jju
- * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/
- */
-
-// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
-
-var Uni = require('./unicode')
-
-function isHexDigit(x) {
- return (x >= '0' && x <= '9')
- || (x >= 'A' && x <= 'F')
- || (x >= 'a' && x <= 'f')
-}
-
-function isOctDigit(x) {
- return x >= '0' && x <= '7'
-}
-
-function isDecDigit(x) {
- return x >= '0' && x <= '9'
-}
-
-var unescapeMap = {
- '\'': '\'',
- '"' : '"',
- '\\': '\\',
- 'b' : '\b',
- 'f' : '\f',
- 'n' : '\n',
- 'r' : '\r',
- 't' : '\t',
- 'v' : '\v',
- '/' : '/',
-}
-
-function formatError(input, msg, position, lineno, column, json5) {
- var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1)
- , tmppos = position - column - 1
- , srcline = ''
- , underline = ''
-
- var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
-
- // output no more than 70 characters before the wrong ones
- if (tmppos < position - 70) {
- tmppos = position - 70
- }
-
- while (1) {
- var chr = input[++tmppos]
-
- if (isLineTerminator(chr) || tmppos === input.length) {
- if (position >= tmppos) {
- // ending line error, so show it after the last char
- underline += '^'
- }
- break
- }
- srcline += chr
-
- if (position === tmppos) {
- underline += '^'
- } else if (position > tmppos) {
- underline += input[tmppos] === '\t' ? '\t' : ' '
- }
-
- // output no more than 78 characters on the string
- if (srcline.length > 78) break
- }
-
- return result + '\n' + srcline + '\n' + underline
-}
-
-function parse(input, options) {
- // parse as a standard JSON mode
- var json5 = !(options.mode === 'json' || options.legacy)
- var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON
- var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON
-
- var length = input.length
- , lineno = 0
- , linestart = 0
- , position = 0
- , stack = []
-
- var tokenStart = function() {}
- var tokenEnd = function(v) {return v}
-
- /* tokenize({
- raw: '...',
- type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline',
- value: 'number'|'string'|'whatever',
- path: [...],
- })
- */
- if (options._tokenize) {
- ;(function() {
- var start = null
- tokenStart = function() {
- if (start !== null) throw Error('internal error, token overlap')
- start = position
- }
-
- tokenEnd = function(v, type) {
- if (start != position) {
- var hash = {
- raw: input.substr(start, position-start),
- type: type,
- stack: stack.slice(0),
- }
- if (v !== undefined) hash.value = v
- options._tokenize.call(null, hash)
- }
- start = null
- return v
- }
- })()
- }
-
- function fail(msg) {
- var column = position - linestart
-
- if (!msg) {
- if (position < length) {
- var token = '\'' +
- JSON
- .stringify(input[position])
- .replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- + '\''
-
- if (!msg) msg = 'Unexpected token ' + token
- } else {
- if (!msg) msg = 'Unexpected end of input'
- }
- }
-
- var error = SyntaxError(formatError(input, msg, position, lineno, column, json5))
- error.row = lineno + 1
- error.column = column + 1
- throw error
- }
-
- function newline(chr) {
- // account for <cr><lf>
- if (chr === '\r' && input[position] === '\n') position++
- linestart = position
- lineno++
- }
-
- function parseGeneric() {
- var result
-
- while (position < length) {
- tokenStart()
- var chr = input[position++]
-
- if (chr === '"' || (chr === '\'' && json5)) {
- return tokenEnd(parseString(chr), 'literal')
-
- } else if (chr === '{') {
- tokenEnd(undefined, 'separator')
- return parseObject()
-
- } else if (chr === '[') {
- tokenEnd(undefined, 'separator')
- return parseArray()
-
- } else if (chr === '-'
- || chr === '.'
- || isDecDigit(chr)
- // + number Infinity NaN
- || (json5 && (chr === '+' || chr === 'I' || chr === 'N'))
- ) {
- return tokenEnd(parseNumber(), 'literal')
-
- } else if (chr === 'n') {
- parseKeyword('null')
- return tokenEnd(null, 'literal')
-
- } else if (chr === 't') {
- parseKeyword('true')
- return tokenEnd(true, 'literal')
-
- } else if (chr === 'f') {
- parseKeyword('false')
- return tokenEnd(false, 'literal')
-
- } else {
- position--
- return tokenEnd(undefined)
- }
- }
- }
-
- function parseKey() {
- var result
-
- while (position < length) {
- tokenStart()
- var chr = input[position++]
-
- if (chr === '"' || (chr === '\'' && json5)) {
- return tokenEnd(parseString(chr), 'key')
-
- } else if (chr === '{') {
- tokenEnd(undefined, 'separator')
- return parseObject()
-
- } else if (chr === '[') {
- tokenEnd(undefined, 'separator')
- return parseArray()
-
- } else if (chr === '.'
- || isDecDigit(chr)
- ) {
- return tokenEnd(parseNumber(true), 'key')
-
- } else if (json5
- && Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) {
- // unicode char or a unicode sequence
- var rollback = position - 1
- var result = parseIdentifier()
-
- if (result === undefined) {
- position = rollback
- return tokenEnd(undefined)
- } else {
- return tokenEnd(result, 'key')
- }
-
- } else {
- position--
- return tokenEnd(undefined)
- }
- }
- }
-
- function skipWhiteSpace() {
- tokenStart()
- while (position < length) {
- var chr = input[position++]
-
- if (isLineTerminator(chr)) {
- position--
- tokenEnd(undefined, 'whitespace')
- tokenStart()
- position++
- newline(chr)
- tokenEnd(undefined, 'newline')
- tokenStart()
-
- } else if (isWhiteSpace(chr)) {
- // nothing
-
- } else if (chr === '/'
- && json5
- && (input[position] === '/' || input[position] === '*')
- ) {
- position--
- tokenEnd(undefined, 'whitespace')
- tokenStart()
- position++
- skipComment(input[position++] === '*')
- tokenEnd(undefined, 'comment')
- tokenStart()
-
- } else {
- position--
- break
- }
- }
- return tokenEnd(undefined, 'whitespace')
- }
-
- function skipComment(multi) {
- while (position < length) {
- var chr = input[position++]
-
- if (isLineTerminator(chr)) {
- // LineTerminator is an end of singleline comment
- if (!multi) {
- // let parent function deal with newline
- position--
- return
- }
-
- newline(chr)
-
- } else if (chr === '*' && multi) {
- // end of multiline comment
- if (input[position] === '/') {
- position++
- return
- }
-
- } else {
- // nothing
- }
- }
-
- if (multi) {
- fail('Unclosed multiline comment')
- }
- }
-
- function parseKeyword(keyword) {
- // keyword[0] is not checked because it should've checked earlier
- var _pos = position
- var len = keyword.length
- for (var i=1; i<len; i++) {
- if (position >= length || keyword[i] != input[position]) {
- position = _pos-1
- fail()
- }
- position++
- }
- }
-
- function parseObject() {
- var result = options.null_prototype ? Object.create(null) : {}
- , empty_object = {}
- , is_non_empty = false
-
- while (position < length) {
- skipWhiteSpace()
- var item1 = parseKey()
- skipWhiteSpace()
- tokenStart()
- var chr = input[position++]
- tokenEnd(undefined, 'separator')
-
- if (chr === '}' && item1 === undefined) {
- if (!json5 && is_non_empty) {
- position--
- fail('Trailing comma in object')
- }
- return result
-
- } else if (chr === ':' && item1 !== undefined) {
- skipWhiteSpace()
- stack.push(item1)
- var item2 = parseGeneric()
- stack.pop()
-
- if (item2 === undefined) fail('No value found for key ' + item1)
- if (typeof(item1) !== 'string') {
- if (!json5 || typeof(item1) !== 'number') {
- fail('Wrong key type: ' + item1)
- }
- }
-
- if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') {
- if (options.reserved_keys === 'throw') {
- fail('Reserved key: ' + item1)
- } else {
- // silently ignore it
- }
- } else {
- if (typeof(options.reviver) === 'function') {
- item2 = options.reviver.call(null, item1, item2)
- }
-
- if (item2 !== undefined) {
- is_non_empty = true
- Object.defineProperty(result, item1, {
- value: item2,
- enumerable: true,
- configurable: true,
- writable: true,
- })
- }
- }
-
- skipWhiteSpace()
-
- tokenStart()
- var chr = input[position++]
- tokenEnd(undefined, 'separator')
-
- if (chr === ',') {
- continue
-
- } else if (chr === '}') {
- return result
-
- } else {
- fail()
- }
-
- } else {
- position--
- fail()
- }
- }
-
- fail()
- }
-
- function parseArray() {
- var result = []
-
- while (position < length) {
- skipWhiteSpace()
- stack.push(result.length)
- var item = parseGeneric()
- stack.pop()
- skipWhiteSpace()
- tokenStart()
- var chr = input[position++]
- tokenEnd(undefined, 'separator')
-
- if (item !== undefined) {
- if (typeof(options.reviver) === 'function') {
- item = options.reviver.call(null, String(result.length), item)
- }
- if (item === undefined) {
- result.length++
- item = true // hack for check below, not included into result
- } else {
- result.push(item)
- }
- }
-
- if (chr === ',') {
- if (item === undefined) {
- fail('Elisions are not supported')
- }
-
- } else if (chr === ']') {
- if (!json5 && item === undefined && result.length) {
- position--
- fail('Trailing comma in array')
- }
- return result
-
- } else {
- position--
- fail()
- }
- }
- }
-
- function parseNumber() {
- // rewind because we don't know first char
- position--
-
- var start = position
- , chr = input[position++]
- , t
-
- var to_num = function(is_octal) {
- var str = input.substr(start, position - start)
-
- if (is_octal) {
- var result = parseInt(str.replace(/^0o?/, ''), 8)
- } else {
- var result = Number(str)
- }
-
- if (Number.isNaN(result)) {
- position--
- fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"')
- } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {
- // additional restrictions imposed by json
- position--
- fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"')
- } else {
- return result
- }
- }
-
- // ex: -5982475.249875e+29384
- // ^ skipping this
- if (chr === '-' || (chr === '+' && json5)) chr = input[position++]
-
- if (chr === 'N' && json5) {
- parseKeyword('NaN')
- return NaN
- }
-
- if (chr === 'I' && json5) {
- parseKeyword('Infinity')
-
- // returning +inf or -inf
- return to_num()
- }
-
- if (chr >= '1' && chr <= '9') {
- // ex: -5982475.249875e+29384
- // ^^^ skipping these
- while (position < length && isDecDigit(input[position])) position++
- chr = input[position++]
- }
-
- // special case for leading zero: 0.123456
- if (chr === '0') {
- chr = input[position++]
-
- // new syntax, "0o777" old syntax, "0777"
- var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr)
- var is_hex = chr === 'x' || chr === 'X'
-
- if (json5 && (is_octal || is_hex)) {
- while (position < length
- && (is_hex ? isHexDigit : isOctDigit)( input[position] )
- ) position++
-
- var sign = 1
- if (input[start] === '-') {
- sign = -1
- start++
- } else if (input[start] === '+') {
- start++
- }
-
- return sign * to_num(is_octal)
- }
- }
-
- if (chr === '.') {
- // ex: -5982475.249875e+29384
- // ^^^ skipping these
- while (position < length && isDecDigit(input[position])) position++
- chr = input[position++]
- }
-
- if (chr === 'e' || chr === 'E') {
- chr = input[position++]
- if (chr === '-' || chr === '+') position++
- // ex: -5982475.249875e+29384
- // ^^^ skipping these
- while (position < length && isDecDigit(input[position])) position++
- chr = input[position++]
- }
-
- // we have char in the buffer, so count for it
- position--
- return to_num()
- }
-
- function parseIdentifier() {
- // rewind because we don't know first char
- position--
-
- var result = ''
-
- while (position < length) {
- var chr = input[position++]
-
- if (chr === '\\'
- && input[position] === 'u'
- && isHexDigit(input[position+1])
- && isHexDigit(input[position+2])
- && isHexDigit(input[position+3])
- && isHexDigit(input[position+4])
- ) {
- // UnicodeEscapeSequence
- chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16))
- position += 5
- }
-
- if (result.length) {
- // identifier started
- if (Uni.isIdentifierPart(chr)) {
- result += chr
- } else {
- position--
- return result
- }
-
- } else {
- if (Uni.isIdentifierStart(chr)) {
- result += chr
- } else {
- return undefined
- }
- }
- }
-
- fail()
- }
-
- function parseString(endChar) {
- // 7.8.4 of ES262 spec
- var result = ''
-
- while (position < length) {
- var chr = input[position++]
-
- if (chr === endChar) {
- return result
-
- } else if (chr === '\\') {
- if (position >= length) fail()
- chr = input[position++]
-
- if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) {
- result += unescapeMap[chr]
-
- } else if (json5 && isLineTerminator(chr)) {
- // line continuation
- newline(chr)
-
- } else if (chr === 'u' || (chr === 'x' && json5)) {
- // unicode/character escape sequence
- var off = chr === 'u' ? 4 : 2
-
- // validation for \uXXXX
- for (var i=0; i<off; i++) {
- if (position >= length) fail()
- if (!isHexDigit(input[position])) fail('Bad escape sequence')
- position++
- }
-
- result += String.fromCharCode(parseInt(input.substr(position-off, off), 16))
- } else if (json5 && isOctDigit(chr)) {
- if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) {
- // three-digit octal
- var digits = 3
- } else if (isOctDigit(input[position])) {
- // two-digit octal
- var digits = 2
- } else {
- var digits = 1
- }
- position += digits - 1
- result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8))
- /*if (!isOctDigit(input[position])) {
- // \0 is allowed still
- result += '\0'
- } else {
- fail('Octal literals are not supported')
- }*/
-
- } else if (json5) {
- // \X -> x
- result += chr
-
- } else {
- position--
- fail()
- }
-
- } else if (isLineTerminator(chr)) {
- fail()
-
- } else {
- if (!json5 && chr.charCodeAt(0) < 32) {
- position--
- fail('Unexpected control character')
- }
-
- // SourceCharacter but not one of " or \ or LineTerminator
- result += chr
- }
- }
-
- fail()
- }
-
- skipWhiteSpace()
- var return_value = parseGeneric()
- if (return_value !== undefined || position < length) {
- skipWhiteSpace()
-
- if (position >= length) {
- if (typeof(options.reviver) === 'function') {
- return_value = options.reviver.call(null, '', return_value)
- }
- return return_value
- } else {
- fail()
- }
-
- } else {
- if (position) {
- fail('No data, only a whitespace')
- } else {
- fail('No data, empty input')
- }
- }
-}
-
-/*
- * parse(text, options)
- * or
- * parse(text, reviver)
- *
- * where:
- * text - string
- * options - object
- * reviver - function
- */
-module.exports.parse = function parseJSON(input, options) {
- // support legacy functions
- if (typeof(options) === 'function') {
- options = {
- reviver: options
- }
- }
-
- if (input === undefined) {
- // parse(stringify(x)) should be equal x
- // with JSON functions it is not 'cause of undefined
- // so we're fixing it
- return undefined
- }
-
- // JSON.parse compat
- if (typeof(input) !== 'string') input = String(input)
- if (options == null) options = {}
- if (options.reserved_keys == null) options.reserved_keys = 'ignore'
-
- if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') {
- if (options.null_prototype == null) {
- options.null_prototype = true
- }
- }
-
- try {
- return parse(input, options)
- } catch(err) {
- // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack
- //
- // this catch is used to skip all those internal calls
- if (err instanceof SyntaxError && err.row != null && err.column != null) {
- var old_err = err
- err = SyntaxError(old_err.message)
- err.column = old_err.column
- err.row = old_err.row
- }
- throw err
- }
-}
-
-module.exports.tokenize = function tokenizeJSON(input, options) {
- if (options == null) options = {}
-
- options._tokenize = function(smth) {
- if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack)
- tokens.push(smth)
- }
-
- var tokens = []
- tokens.data = module.exports.parse(input, options)
- return tokens
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/unicode.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/unicode.js
deleted file mode 100644
index 1a29143c2d..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/vendor/unicode.js
+++ /dev/null
@@ -1,71 +0,0 @@
-
-// This is autogenerated with esprima tools, see:
-// https://github.com/ariya/esprima/blob/master/esprima.js
-//
-// PS: oh God, I hate Unicode
-
-// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:
-
-var Uni = module.exports
-
-module.exports.isWhiteSpace = function isWhiteSpace(x) {
- // section 7.2, table 2
- return x === '\u0020'
- || x === '\u00A0'
- || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one
- || (x >= '\u0009' && x <= '\u000D') // 9 A B C D
-
- // + whitespace characters from unicode, category Zs
- || x === '\u1680'
- || x === '\u180E'
- || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A
- || x === '\u2028'
- || x === '\u2029'
- || x === '\u202F'
- || x === '\u205F'
- || x === '\u3000'
-}
-
-module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) {
- return x === '\u0020'
- || x === '\u0009'
- || x === '\u000A'
- || x === '\u000D'
-}
-
-module.exports.isLineTerminator = function isLineTerminator(x) {
- // ok, here is the part when JSON is wrong
- // section 7.3, table 3
- return x === '\u000A'
- || x === '\u000D'
- || x === '\u2028'
- || x === '\u2029'
-}
-
-module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) {
- return x === '\u000A'
- || x === '\u000D'
-}
-
-module.exports.isIdentifierStart = function isIdentifierStart(x) {
- return x === '$'
- || x === '_'
- || (x >= 'A' && x <= 'Z')
- || (x >= 'a' && x <= 'z')
- || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x))
-}
-
-module.exports.isIdentifierPart = function isIdentifierPart(x) {
- return x === '$'
- || x === '_'
- || (x >= 'A' && x <= 'Z')
- || (x >= 'a' && x <= 'z')
- || (x >= '0' && x <= '9') // <-- addition to Start
- || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x))
-}
-
-module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
-
-// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:
-
-module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/index.js
deleted file mode 100644
index 7c720ebee8..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-'use strict';
-
-var processFn = function (fn, P, opts) {
- return function () {
- var that = this;
- var args = new Array(arguments.length);
-
- for (var i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P(function (resolve, reject) {
- args.push(function (err, result) {
- if (err) {
- reject(err);
- } else if (opts.multiArgs) {
- var results = new Array(arguments.length - 1);
-
- for (var i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
-
- fn.apply(that, args);
- });
- };
-};
-
-var pify = module.exports = function (obj, P, opts) {
- if (typeof P !== 'function') {
- opts = P;
- P = Promise;
- }
-
- opts = opts || {};
- opts.exclude = opts.exclude || [/.+Sync$/];
-
- var filter = function (key) {
- var match = function (pattern) {
- return typeof pattern === 'string' ? key === pattern : pattern.test(key);
- };
-
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- var ret = typeof obj === 'function' ? function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, P, opts).apply(this, arguments);
- } : {};
-
- return Object.keys(obj).reduce(function (ret, key) {
- var x = obj[key];
-
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
-
- return ret;
- }, ret);
-};
-
-pify.all = pify;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/package.json
deleted file mode 100644
index 70d5b2ff2f..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "_from": "pify@^2.0.0",
- "_id": "pify@2.3.0",
- "_inBundle": false,
- "_integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/pify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pify@^2.0.0",
- "name": "pify",
- "escapedName": "pify",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file"
- ],
- "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c",
- "_shrinkwrap": null,
- "_spec": "pify@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> Promisify a callback-style function",
- "devDependencies": {
- "ava": "*",
- "pinkie-promise": "^1.0.0",
- "v8-natives": "0.0.2",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "name": "pify",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.3.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/readme.md
deleted file mode 100644
index 97aeeb628b..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/pify/readme.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
-
-> Promisify a callback-style function
-
-
-## Install
-
-```
-$ npm install --save pify
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const pify = require('pify');
-
-// promisify a single function
-
-pify(fs.readFile)('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-
-// or promisify all methods in a module
-
-pify(fs).readFile('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-```
-
-
-## API
-
-### pify(input, [promiseModule], [options])
-
-Returns a promise wrapped version of the supplied function or module.
-
-#### input
-
-Type: `function`, `object`
-
-Callback-style function or module whose methods you want to promisify.
-
-#### promiseModule
-
-Type: `function`
-
-Custom promise module to use instead of the native one.
-
-Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
-
-#### options
-
-##### multiArgs
-
-Type: `boolean`
-Default: `false`
-
-By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument.
-
-```js
-const request = require('request');
-const pify = require('pify');
-
-pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
- const [httpResponse, body] = result;
-});
-```
-
-##### include
-
-Type: `array` of (`string`|`regex`)
-
-Methods in a module to promisify. Remaining methods will be left untouched.
-
-##### exclude
-
-Type: `array` of (`string`|`regex`)
-Default: `[/.+Sync$/]`
-
-Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
-
-##### excludeMain
-
-Type: `boolean`
-Default: `false`
-
-By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module.
-
-```js
-const pify = require('pify');
-
-function fn() {
- return true;
-}
-
-fn.method = (data, callback) => {
- setImmediate(() => {
- callback(data, null);
- });
-};
-
-// promisify methods but not fn()
-const promiseFn = pify(fn, {excludeMain: true});
-
-if (promiseFn()) {
- promiseFn.method('hi').then(data => {
- console.log(data);
- });
-}
-```
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/index.js
deleted file mode 100644
index b00feb9a44..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-module.exports = x => {
- if (typeof x !== 'string') {
- throw new TypeError('Expected a string, got ' + typeof x);
- }
-
- // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
- // conversion translates it to FEFF (UTF-16 BOM)
- if (x.charCodeAt(0) === 0xFEFF) {
- return x.slice(1);
- }
-
- return x;
-};
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/package.json
deleted file mode 100644
index 408a730a02..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/package.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "_from": "strip-bom@^3.0.0",
- "_id": "strip-bom@3.0.0",
- "_inBundle": false,
- "_integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file/strip-bom",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strip-bom@^3.0.0",
- "name": "strip-bom",
- "escapedName": "strip-bom",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file"
- ],
- "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "_shasum": "2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3",
- "_shrinkwrap": null,
- "_spec": "strip-bom@^3.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "strip-bom",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "3.0.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/readme.md
deleted file mode 100644
index 812a98071f..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/strip-bom/readme.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom)
-
-> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string
-
-From Wikipedia:
-
-> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
-
-
-## Install
-
-```
-$ npm install --save strip-bom
-```
-
-
-## Usage
-
-```js
-const stripBom = require('strip-bom');
-
-stripBom('\uFEFFunicorn');
-//=> 'unicorn'
-```
-
-
-## Related
-
-- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
-- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module
-- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/package.json
deleted file mode 100644
index c09c606cec..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "_from": "load-json-file@^2.0.0",
- "_id": "load-json-file@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/load-json-file",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "load-json-file@^2.0.0",
- "name": "load-json-file",
- "escapedName": "load-json-file",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg"
- ],
- "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
- "_shasum": "7947e42149af80d696cbf797bcaabcfe1fe29ca8",
- "_shrinkwrap": null,
- "_spec": "load-json-file@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "strip-bom": "^3.0.0"
- },
- "deprecated": false,
- "description": "> Read and parse a JSON file",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "load-json-file",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/readme.md
deleted file mode 100644
index 3319c266c6..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/readme.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file)
-
-> Read and parse a JSON file
-
-[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).
-
-
-## Install
-
-```
-$ npm install --save load-json-file
-```
-
-
-## Usage
-
-```js
-const loadJsonFile = require('load-json-file');
-
-loadJsonFile('foo.json').then(json => {
- console.log(json);
- //=> {foo: true}
-});
-```
-
-
-## API
-
-### loadJsonFile(filepath)
-
-Returns a promise for the parsed JSON.
-
-### loadJsonFile.sync(filepath)
-
-Returns the parsed JSON.
-
-
-## Related
-
-- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/index.js
deleted file mode 100644
index 4ac9dd9679..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-const fs = require('fs');
-const pify = require('pify');
-
-function type(fn, fn2, fp) {
- if (typeof fp !== 'string') {
- return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`));
- }
-
- return pify(fs[fn])(fp).then(stats => stats[fn2]());
-}
-
-function typeSync(fn, fn2, fp) {
- if (typeof fp !== 'string') {
- throw new TypeError(`Expected a string, got ${typeof fp}`);
- }
-
- return fs[fn](fp)[fn2]();
-}
-
-exports.file = type.bind(null, 'stat', 'isFile');
-exports.dir = type.bind(null, 'stat', 'isDirectory');
-exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
-exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
-exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
-exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/index.js
deleted file mode 100644
index 7c720ebee8..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-'use strict';
-
-var processFn = function (fn, P, opts) {
- return function () {
- var that = this;
- var args = new Array(arguments.length);
-
- for (var i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P(function (resolve, reject) {
- args.push(function (err, result) {
- if (err) {
- reject(err);
- } else if (opts.multiArgs) {
- var results = new Array(arguments.length - 1);
-
- for (var i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
-
- fn.apply(that, args);
- });
- };
-};
-
-var pify = module.exports = function (obj, P, opts) {
- if (typeof P !== 'function') {
- opts = P;
- P = Promise;
- }
-
- opts = opts || {};
- opts.exclude = opts.exclude || [/.+Sync$/];
-
- var filter = function (key) {
- var match = function (pattern) {
- return typeof pattern === 'string' ? key === pattern : pattern.test(key);
- };
-
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- var ret = typeof obj === 'function' ? function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, P, opts).apply(this, arguments);
- } : {};
-
- return Object.keys(obj).reduce(function (ret, key) {
- var x = obj[key];
-
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
-
- return ret;
- }, ret);
-};
-
-pify.all = pify;
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/package.json
deleted file mode 100644
index 3c234828b3..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "_from": "pify@^2.0.0",
- "_id": "pify@2.3.0",
- "_inBundle": false,
- "_integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/path-type/pify",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "pify@^2.0.0",
- "name": "pify",
- "escapedName": "pify",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg/path-type"
- ],
- "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c",
- "_spec": "pify@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/pify/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Promisify a callback-style function",
- "devDependencies": {
- "ava": "*",
- "pinkie-promise": "^1.0.0",
- "v8-natives": "0.0.2",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/pify#readme",
- "keywords": [
- "promise",
- "promises",
- "promisify",
- "denodify",
- "denodeify",
- "callback",
- "cb",
- "node",
- "then",
- "thenify",
- "convert",
- "transform",
- "wrap",
- "wrapper",
- "bind",
- "to",
- "async",
- "es2015"
- ],
- "license": "MIT",
- "name": "pify",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/pify.git"
- },
- "scripts": {
- "optimization-test": "node --allow-natives-syntax optimization-test.js",
- "test": "xo && ava && npm run optimization-test"
- },
- "version": "2.3.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/readme.md
deleted file mode 100644
index 97aeeb628b..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/node_modules/pify/readme.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
-
-> Promisify a callback-style function
-
-
-## Install
-
-```
-$ npm install --save pify
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const pify = require('pify');
-
-// promisify a single function
-
-pify(fs.readFile)('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-
-// or promisify all methods in a module
-
-pify(fs).readFile('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-```
-
-
-## API
-
-### pify(input, [promiseModule], [options])
-
-Returns a promise wrapped version of the supplied function or module.
-
-#### input
-
-Type: `function`, `object`
-
-Callback-style function or module whose methods you want to promisify.
-
-#### promiseModule
-
-Type: `function`
-
-Custom promise module to use instead of the native one.
-
-Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
-
-#### options
-
-##### multiArgs
-
-Type: `boolean`
-Default: `false`
-
-By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument.
-
-```js
-const request = require('request');
-const pify = require('pify');
-
-pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
- const [httpResponse, body] = result;
-});
-```
-
-##### include
-
-Type: `array` of (`string`|`regex`)
-
-Methods in a module to promisify. Remaining methods will be left untouched.
-
-##### exclude
-
-Type: `array` of (`string`|`regex`)
-Default: `[/.+Sync$/]`
-
-Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
-
-##### excludeMain
-
-Type: `boolean`
-Default: `false`
-
-By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module.
-
-```js
-const pify = require('pify');
-
-function fn() {
- return true;
-}
-
-fn.method = (data, callback) => {
- setImmediate(() => {
- callback(data, null);
- });
-};
-
-// promisify methods but not fn()
-const promiseFn = pify(fn, {excludeMain: true});
-
-if (promiseFn()) {
- promiseFn.method('hi').then(data => {
- console.log(data);
- });
-}
-```
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/package.json
deleted file mode 100644
index 4aa3ee1c79..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "_from": "path-type@^2.0.0",
- "_id": "path-type@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg/path-type",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "path-type@^2.0.0",
- "name": "path-type",
- "escapedName": "path-type",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up/read-pkg"
- ],
- "_resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
- "_shasum": "f012ccb8415b7096fc2daa1054c3d72389594c73",
- "_shrinkwrap": null,
- "_spec": "path-type@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "pify": "^2.0.0"
- },
- "deprecated": false,
- "description": "> Check if a path is a file, directory, or symlink",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "path-type",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/readme.md
deleted file mode 100644
index b1ea61fe92..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/path-type/readme.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)
-
-> Check if a path is a file, directory, or symlink
-
-
-## Install
-
-```
-$ npm install --save path-type
-```
-
-
-## Usage
-
-```js
-const pathType = require('path-type');
-
-pathType.file('package.json').then(isFile => {
- console.log(isFile);
- //=> true
-})
-```
-
-
-## API
-
-### .file(path)
-### .dir(path)
-### .symlink(path)
-
-Returns a `Promise` for a `boolean` of whether the path is the checked type.
-
-### .fileSync(path)
-### .dirSync(path)
-### .symlinkSync(path)
-
-Returns a `boolean` of whether the path is the checked type.
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/package.json
deleted file mode 100644
index 994de8c34a..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "_from": "read-pkg@^2.0.0",
- "_id": "read-pkg@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
- "_location": "/libnpx/yargs/read-pkg-up/read-pkg",
- "_phantomChildren": {
- "graceful-fs": "4.1.11"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "read-pkg@^2.0.0",
- "name": "read-pkg",
- "escapedName": "read-pkg",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs/read-pkg-up"
- ],
- "_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
- "_shasum": "8ef1c0623c6a6db0dc6713c4bfac46332b2368f8",
- "_shrinkwrap": null,
- "_spec": "read-pkg@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "load-json-file": "^2.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^2.0.0"
- },
- "deprecated": false,
- "description": "> Read a package.json file",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "read-pkg",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/readme.md
deleted file mode 100644
index 5796008b8e..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/readme.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg)
-
-> Read a package.json file
-
-
-## Why
-
-- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
-- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
-- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
-- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
-
-
-## Install
-
-```
-$ npm install --save read-pkg
-```
-
-
-## Usage
-
-```js
-const readPkg = require('read-pkg');
-
-readPkg().then(pkg => {
- console.log(pkg);
- //=> {name: 'read-pkg', ...}
-});
-
-readPkg(__dirname).then(pkg => {
- console.log(pkg);
- //=> {name: 'read-pkg', ...}
-});
-
-readPkg(path.join('unicorn', 'package.json')).then(pkg => {
- console.log(pkg);
- //=> {name: 'read-pkg', ...}
-});
-```
-
-
-## API
-
-### readPkg([path], [options])
-
-Returns a `Promise` for the parsed JSON.
-
-### readPkg.sync([path], [options])
-
-Returns the parsed JSON.
-
-#### path
-
-Type: `string`<br>
-Default: `.`
-
-Path to a `package.json` file or its directory.
-
-#### options
-
-##### normalize
-
-Type: `boolean`<br>
-Default: `true`
-
-[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
-
-
-## Related
-
-- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
-- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
-- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/package.json
deleted file mode 100644
index 1958e74e2e..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "_from": "read-pkg-up@^2.0.0",
- "_id": "read-pkg-up@2.0.0",
- "_inBundle": false,
- "_integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
- "_location": "/libnpx/yargs/read-pkg-up",
- "_phantomChildren": {
- "graceful-fs": "4.1.11",
- "normalize-package-data": "2.4.0"
- },
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "read-pkg-up@^2.0.0",
- "name": "read-pkg-up",
- "escapedName": "read-pkg-up",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpx/yargs"
- ],
- "_resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
- "_shasum": "6b72a8048984e0c41e79510fd5e9fa99b3b549be",
- "_shrinkwrap": null,
- "_spec": "read-pkg-up@^2.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
- "bundleDependencies": false,
- "dependencies": {
- "find-up": "^2.0.0",
- "read-pkg": "^2.0.0"
- },
- "deprecated": false,
- "description": "> Read the closest package.json file",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "name": "read-pkg-up",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "2.0.0"
-}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/readme.md
deleted file mode 100644
index ba18780f90..0000000000
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/readme.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up)
-
-> Read the closest package.json file
-
-
-## Why
-
-- [Finds the closest package.json](https://github.com/sindresorhus/find-up)
-- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
-- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
-- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
-- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
-
-
-## Install
-
-```
-$ npm install --save read-pkg-up
-```
-
-
-## Usage
-
-```js
-const readPkgUp = require('read-pkg-up');
-
-readPkgUp().then(result => {
- console.log(result);
- /*
- {
- pkg: {
- name: 'awesome-package',
- version: '1.0.0',
- ...
- },
- path: '/Users/sindresorhus/dev/awesome-package/package.json'
- }
- */
-});
-```
-
-
-## API
-
-### readPkgUp([options])
-
-Returns a `Promise` for the result object.
-
-### readPkgUp.sync([options])
-
-Returns the result object.
-
-#### options
-
-##### cwd
-
-Type: `string`<br>
-Default: `.`
-
-Directory to start looking for a package.json file.
-
-##### normalize
-
-Type: `boolean`<br>
-Default: `true`
-
-[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
-
-
-## Related
-
-- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file
-- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
-- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
-- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json
-
-
-## License
-
-MIT Ā© [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/LICENSE b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/LICENSE
index 3c157f0b9d..3c157f0b9d 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/LICENSE
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/LICENSE
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/README.md
index 9859458f20..9859458f20 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/README.md
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/index.js
index 91b159e342..91b159e342 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/index.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/package.json
index 8e45957e98..1a098fb5ed 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/node_modules/y18n/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/y18n/package.json
@@ -3,7 +3,7 @@
"_id": "y18n@3.2.1",
"_inBundle": false,
"_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
- "_location": "/npm-profile/make-fetch-happen/cacache/y18n",
+ "_location": "/libnpx/yargs/y18n",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "^3.2.1"
},
"_requiredBy": [
- "/npm-profile/make-fetch-happen/cacache"
+ "/libnpx/yargs"
],
"_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41",
"_spec": "y18n@^3.2.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/CHANGELOG.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/CHANGELOG.md
index 3ad3df821e..f75cfa0ec3 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/CHANGELOG.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/CHANGELOG.md
@@ -2,6 +2,83 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="9.0.2"></a>
+## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20)
+
+
+### Bug Fixes
+
+* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad))
+
+
+
+<a name="9.0.1"></a>
+## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20)
+
+
+### Bug Fixes
+
+* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206))
+
+
+
+<a name="9.0.0"></a>
+# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20)
+
+
+### Features
+
+* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3))
+
+
+### BREAKING CHANGES
+
+* arguments of form --foo, -abc, will no longer be consumed by nargs
+
+
+
+<a name="8.1.0"></a>
+# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20)
+
+
+### Bug Fixes
+
+* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9))
+* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c))
+* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d))
+* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef))
+* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57))
+* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9))
+
+
+### Features
+
+* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536))
+* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6))
+
+
+
+<a name="8.0.0"></a>
+# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05)
+
+
+### Bug Fixes
+
+* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227))
+
+
+### Features
+
+* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d))
+* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb))
+
+
+### BREAKING CHANGES
+
+* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers.
+
+
+
<a name="7.0.0"></a>
# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/README.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/README.md
index d1817fccc4..6d6d0d4c9c 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/README.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/README.md
@@ -212,6 +212,14 @@ node example.js --no-foo
{ _: [], "no-foo": true }
```
+### combine arrays
+
+* default: `false`
+* key: `combine-arrays`
+
+Should arrays be combined when provided by both command line arguments and
+a configuration file.
+
### duplicate arguments array
* default: `true`
@@ -250,6 +258,25 @@ node example.js -x 1 2 -x 3 4
{ _: [], x: [[1, 2], [3, 4]] }
```
+### negation prefix
+
+* default: `no-`
+* key: `negation-prefix`
+
+The prefix to use for negated boolean variables.
+
+```sh
+node example.js --no-foo
+{ _: [], foo: false }
+```
+
+_if set to `quux`:_
+
+```sh
+node example.js --quuxfoo
+{ _: [], foo: false }
+```
+
### populate --
* default: `false`.
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/index.js
index 73154066f7..d39414b737 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/index.js
@@ -16,9 +16,11 @@ function parse (args, opts) {
'dot-notation': true,
'parse-numbers': true,
'boolean-negation': true,
+ 'negation-prefix': 'no-',
'duplicate-arguments-array': true,
'flatten-duplicate-arrays': true,
- 'populate--': false
+ 'populate--': false,
+ 'combine-arrays': false
}, opts.configuration)
var defaults = opts.default || {}
var configObjects = opts.configObjects || []
@@ -45,6 +47,7 @@ function parse (args, opts) {
coercions: {}
}
var negative = /^-[0-9]+(\.[0-9]+)?/
+ var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)')
;[].concat(opts.array).filter(Boolean).forEach(function (key) {
flags.arrays[key] = true
@@ -141,8 +144,8 @@ function parse (args, opts) {
} else {
setArg(m[1], m[2])
}
- } else if (arg.match(/^--no-.+/) && configuration['boolean-negation']) {
- key = arg.match(/^--no-(.+)/)[1]
+ } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
+ key = arg.match(negatedBoolean)[1]
setArg(key, false)
// -- seperated by space.
@@ -268,9 +271,7 @@ function parse (args, opts) {
}
}
} else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- )
+ argv._.push(maybeCoerceNumber('_', arg))
}
}
@@ -301,15 +302,25 @@ function parse (args, opts) {
// how many arguments should we consume, based
// on the nargs option?
function eatNargs (i, key, args) {
- var toEat = checkAllAliases(key, flags.nargs)
+ var ii
+ const toEat = checkAllAliases(key, flags.nargs)
+
+ // nargs will not consume flag arguments, e.g., -abc, --foo,
+ // and terminates when one is observed.
+ var available = 0
+ for (ii = i + 1; ii < args.length; ii++) {
+ if (!args[ii].match(/^-[^0-9]/)) available++
+ else break
+ }
- if (args.length - (i + 1) < toEat) error = Error(__('Not enough arguments following: %s', key))
+ if (available < toEat) error = Error(__('Not enough arguments following: %s', key))
- for (var ii = i + 1; ii < (toEat + i + 1); ii++) {
+ const consumed = Math.min(available, toEat)
+ for (ii = i + 1; ii < (consumed + i + 1); ii++) {
setArg(key, args[ii])
}
- return (i + toEat)
+ return (i + consumed)
}
// if an option is an array, eat all non-hyphenated arguments
@@ -346,10 +357,8 @@ function parse (args, opts) {
function setArg (key, val) {
unsetDefaulted(key)
- if (/-/.test(key) && !(flags.aliases[key] && flags.aliases[key].length) && configuration['camel-case-expansion']) {
- var c = camelCase(key)
- flags.aliases[key] = [c]
- newAliases[c] = true
+ if (/-/.test(key) && configuration['camel-case-expansion']) {
+ addNewAlias(key, camelCase(key))
}
var value = processValue(key, val)
@@ -394,17 +403,23 @@ function parse (args, opts) {
}
}
+ function addNewAlias (key, alias) {
+ if (!(flags.aliases[key] && flags.aliases[key].length)) {
+ flags.aliases[key] = [alias]
+ newAliases[alias] = true
+ }
+ if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
+ addNewAlias(alias, key)
+ }
+ }
+
function processValue (key, val) {
// handle parsing boolean arguments --foo=true --bar false.
if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
if (typeof val === 'string') val = val === 'true'
}
- var value = val
- if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) {
- if (isNumber(val)) value = Number(val)
- if (!isUndefined(val) && !isNumber(val) && checkAllAliases(key, flags.numbers)) value = NaN
- }
+ var value = maybeCoerceNumber(key, val)
// increment a count given as arg (either no value or value parsed as boolean)
if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
@@ -419,6 +434,16 @@ function parse (args, opts) {
return value
}
+ function maybeCoerceNumber (key, value) {
+ if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) {
+ const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && (
+ Number.isSafeInteger(Math.floor(value))
+ )
+ if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value)
+ }
+ return value
+ }
+
// set args from config.json file, this should be
// applied last so that defaults can be applied.
function setConfig (argv) {
@@ -467,13 +492,13 @@ function parse (args, opts) {
// if the value is an inner object and we have dot-notation
// enabled, treat inner objects in config the same as
// heavily nested dot notations (foo.bar.apple).
- if (typeof value === 'object' && !Array.isArray(value) && configuration['dot-notation']) {
+ if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
// if the value is an object but not an array, check nested object
setConfigObject(value, fullKey)
} else {
// setting arguments via CLI takes precedence over
// values within the config file.
- if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey])) {
+ if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
setArg(fullKey, value)
}
}
@@ -511,13 +536,19 @@ function parse (args, opts) {
function applyCoercions (argv) {
var coerce
+ var applied = {}
Object.keys(argv).forEach(function (key) {
- coerce = checkAllAliases(key, flags.coercions)
- if (typeof coerce === 'function') {
- try {
- argv[key] = coerce(argv[key])
- } catch (err) {
- error = err
+ if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases
+ coerce = checkAllAliases(key, flags.coercions)
+ if (typeof coerce === 'function') {
+ try {
+ var value = coerce(argv[key])
+ ;([].concat(flags.aliases[key] || [], key)).forEach(ali => {
+ applied[ali] = argv[ali] = value
+ })
+ } catch (err) {
+ error = err
+ }
}
}
})
@@ -556,9 +587,24 @@ function parse (args, opts) {
if (!configuration['dot-notation']) keys = [keys.join('.')]
- keys.slice(0, -1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {}
- o = o[key]
+ keys.slice(0, -1).forEach(function (key, index) {
+ if (typeof o === 'object' && o[key] === undefined) {
+ o[key] = {}
+ }
+
+ if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
+ // ensure that o[key] is an array, and that the last item is an empty object.
+ if (Array.isArray(o[key])) {
+ o[key].push({})
+ } else {
+ o[key] = [o[key], {}]
+ }
+
+ // we want to update the empty object at the end of the o[key] array, so set o to that object
+ o = o[key][o[key].length - 1]
+ } else {
+ o = o[key]
+ }
})
var key = keys[keys.length - 1]
@@ -600,8 +646,10 @@ function parse (args, opts) {
flags.aliases[key].concat(key).forEach(function (x) {
if (/-/.test(x) && configuration['camel-case-expansion']) {
var c = camelCase(x)
- flags.aliases[key].push(c)
- newAliases[c] = true
+ if (c !== key && flags.aliases[key].indexOf(c) === -1) {
+ flags.aliases[key].push(c)
+ newAliases[c] = true
+ }
}
})
flags.aliases[key].forEach(function (x) {
@@ -662,7 +710,6 @@ function parse (args, opts) {
}
function isNumber (x) {
- if (!configuration['parse-numbers']) return false
if (typeof x === 'number') return true
if (/^0x[0-9a-f]+$/i.test(x)) return true
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x)
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js
index 23d39e1feb..6c8d23ef21 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js
@@ -2,17 +2,23 @@
module.exports = function (argString) {
if (Array.isArray(argString)) return argString
+ argString = argString.trim()
+
var i = 0
+ var prevC = null
var c = null
var opening = null
var args = []
for (var ii = 0; ii < argString.length; ii++) {
+ prevC = c
c = argString.charAt(ii)
// split on spaces unless we're in quotes.
if (c === ' ' && !opening) {
- i++
+ if (!(prevC === ' ')) {
+ i++
+ }
continue
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/index.js
index c8492a2286..c8492a2286 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/index.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/index.js
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/license
index 654d0bfe94..654d0bfe94 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/find-up/node_modules/locate-path/node_modules/path-exists/license
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/license
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/package.json
index a174878a6f..8b020b8dbc 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/package.json
@@ -3,7 +3,7 @@
"_id": "camelcase@4.1.0",
"_inBundle": false,
"_integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "_location": "/libnpx/yargs/camelcase",
+ "_location": "/libnpx/yargs/yargs-parser/camelcase",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,14 +16,13 @@
"fetchSpec": "^4.1.0"
},
"_requiredBy": [
- "/libnpx/yargs",
"/libnpx/yargs/yargs-parser"
],
"_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"_shasum": "d545635be1e33c542649c69173e5de6acfae34dd",
"_shrinkwrap": null,
"_spec": "camelcase@^4.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser",
"bin": null,
"bundleDependencies": false,
"dependencies": {},
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/readme.md
index 0610dc627d..0610dc627d 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/camelcase/readme.md
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/node_modules/camelcase/readme.md
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/package.json
index e0e0851602..3434b662a2 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/yargs-parser/package.json
@@ -1,46 +1,75 @@
{
- "_from": "yargs-parser@^7.0.0",
- "_id": "yargs-parser@7.0.0",
+ "_from": "yargs-parser@^9.0.2",
+ "_id": "yargs-parser@9.0.2",
"_inBundle": false,
- "_integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
+ "_integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
"_location": "/libnpx/yargs/yargs-parser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "yargs-parser@^7.0.0",
+ "raw": "yargs-parser@^9.0.2",
"name": "yargs-parser",
"escapedName": "yargs-parser",
- "rawSpec": "^7.0.0",
+ "rawSpec": "^9.0.2",
"saveSpec": null,
- "fetchSpec": "^7.0.0"
+ "fetchSpec": "^9.0.2"
},
"_requiredBy": [
"/libnpx/yargs"
],
- "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
- "_shasum": "8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9",
- "_shrinkwrap": null,
- "_spec": "yargs-parser@^7.0.0",
+ "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
+ "_shasum": "9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077",
+ "_spec": "yargs-parser@^9.0.2",
"_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx/node_modules/yargs",
- "bin": null,
+ "author": {
+ "name": "Ben Coe",
+ "email": "ben@npmjs.com"
+ },
+ "bugs": {
+ "url": "https://github.com/yargs/yargs-parser/issues"
+ },
"bundleDependencies": false,
"dependencies": {
"camelcase": "^4.1.0"
},
"deprecated": false,
- "description": "[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser) [![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) [![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) [![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)",
+ "description": "the mighty option parser used by yargs",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.12",
"mocha": "^3.0.1",
- "nyc": "^10.0.0",
+ "nyc": "^11.4.1",
"standard": "^10.0.2",
- "standard-version": "^4.0.0"
+ "standard-version": "^4.3.0"
},
+ "files": [
+ "lib",
+ "index.js"
+ ],
+ "homepage": "https://github.com/yargs/yargs-parser#readme",
+ "keywords": [
+ "argument",
+ "parser",
+ "yargs",
+ "command",
+ "cli",
+ "parsing",
+ "option",
+ "args",
+ "argument"
+ ],
+ "license": "ISC",
+ "main": "index.js",
"name": "yargs-parser",
- "optionalDependencies": {},
- "peerDependencies": {},
- "scripts": {},
- "version": "7.0.0"
+ "repository": {
+ "url": "git+ssh://git@github.com/yargs/yargs-parser.git"
+ },
+ "scripts": {
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "posttest": "standard",
+ "release": "standard-version",
+ "test": "nyc mocha test/*.js"
+ },
+ "version": "9.0.2"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/package.json b/deps/npm/node_modules/libnpx/node_modules/yargs/package.json
index 9ae1b0f1ad..be5b47f015 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/package.json
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/package.json
@@ -1,53 +1,53 @@
{
- "_args": [
- [
- "yargs@8.0.2",
- "/Users/zkat/Documents/code/npx"
- ]
- ],
- "_from": "yargs@8.0.2",
- "_id": "yargs@8.0.2",
- "_inBundle": true,
- "_integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
+ "_from": "yargs@^11.0.0",
+ "_id": "yargs@11.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==",
"_location": "/libnpx/yargs",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "lru-cache": "4.1.1",
+ "strip-ansi": "4.0.0",
+ "which": "1.3.0"
+ },
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "yargs@8.0.2",
+ "raw": "yargs@^11.0.0",
"name": "yargs",
"escapedName": "yargs",
- "rawSpec": "8.0.2",
+ "rawSpec": "^11.0.0",
"saveSpec": null,
- "fetchSpec": "8.0.2"
+ "fetchSpec": "^11.0.0"
},
"_requiredBy": [
"/libnpx"
],
- "_resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
- "_spec": "8.0.2",
- "_where": "/Users/zkat/Documents/code/npx",
+ "_resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz",
+ "_shasum": "c052931006c5eee74610e5fc0354bedfd08a201b",
+ "_spec": "yargs@^11.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/libnpx",
"bugs": {
"url": "https://github.com/yargs/yargs/issues"
},
+ "bundleDependencies": false,
"dependencies": {
- "camelcase": "^4.1.0",
- "cliui": "^3.2.0",
+ "cliui": "^4.0.0",
"decamelize": "^1.1.1",
+ "find-up": "^2.1.0",
"get-caller-file": "^1.0.1",
"os-locale": "^2.0.0",
- "read-pkg-up": "^2.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
- "yargs-parser": "^7.0.0"
+ "yargs-parser": "^9.0.2"
},
+ "deprecated": false,
"description": "yargs the modern, pirate-themed, successor to optimist.",
"devDependencies": {
- "chai": "^3.4.1",
+ "chai": "^4.1.2",
"chalk": "^1.1.3",
"coveralls": "^2.11.11",
"cpr": "^2.0.0",
@@ -55,7 +55,7 @@
"es6-promise": "^4.0.2",
"hashish": "0.0.4",
"mocha": "^3.0.1",
- "nyc": "^10.3.0",
+ "nyc": "^11.2.1",
"rimraf": "^2.5.0",
"standard": "^8.6.0",
"standard-version": "^4.2.0",
@@ -63,7 +63,7 @@
"yargs-test-extends": "^1.0.1"
},
"engine": {
- "node": ">=0.10"
+ "node": ">=4"
},
"files": [
"index.js",
@@ -92,7 +92,7 @@
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
- "pretest": "standard",
+ "posttest": "standard",
"release": "standard-version",
"test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks"
},
@@ -101,5 +101,5 @@
"**/example/**"
]
},
- "version": "8.0.2"
+ "version": "11.0.0"
}
diff --git a/deps/npm/node_modules/libnpx/node_modules/yargs/yargs.js b/deps/npm/node_modules/libnpx/node_modules/yargs/yargs.js
index 078bf8f149..9b50b8bfeb 100644
--- a/deps/npm/node_modules/libnpx/node_modules/yargs/yargs.js
+++ b/deps/npm/node_modules/libnpx/node_modules/yargs/yargs.js
@@ -1,5 +1,6 @@
+'use strict'
const argsert = require('./lib/argsert')
-const assign = require('./lib/assign')
+const fs = require('fs')
const Command = require('./lib/command')
const Completion = require('./lib/completion')
const Parser = require('yargs-parser')
@@ -12,18 +13,18 @@ const setBlocking = require('set-blocking')
const applyExtends = require('./lib/apply-extends')
const YError = require('./lib/yerror')
-var exports = module.exports = Yargs
+exports = module.exports = Yargs
function Yargs (processArgs, cwd, parentRequire) {
processArgs = processArgs || [] // handle calling yargs().
const self = {}
- var command = null
- var completion = null
- var groups = {}
- var output = ''
- var preservedGroups = {}
- var usage = null
- var validation = null
+ let command = null
+ let completion = null
+ let groups = {}
+ let output = ''
+ let preservedGroups = {}
+ let usage = null
+ let validation = null
const y18n = Y18n({
directory: path.resolve(__dirname, './locales'),
@@ -34,58 +35,54 @@ function Yargs (processArgs, cwd, parentRequire) {
self.$0 = process.argv
.slice(0, 2)
- .map(function (x, i) {
+ .map((x, i) => {
// ignore the node bin, specify this in your
// bin file with #!/usr/bin/env node
if (i === 0 && /\b(node|iojs)(\.exe)?$/.test(x)) return
- var b = rebase(cwd, x)
+ const b = rebase(cwd, x)
return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x
})
.join(' ').trim()
if (process.env._ !== undefined && process.argv[1] === process.env._) {
self.$0 = process.env._.replace(
- path.dirname(process.execPath) + '/', ''
+ `${path.dirname(process.execPath)}/`, ''
)
}
// use context object to keep track of resets, subcommand execution, etc
// submodules should modify and check the state of context as necessary
- const context = { resets: -1, commands: [], files: [] }
- self.getContext = function () {
- return context
- }
+ const context = { resets: -1, commands: [], fullCommands: [], files: [] }
+ self.getContext = () => context
// puts yargs back into an initial state. any keys
// that have been set to "global" will not be reset
// by this action.
- var options
- self.resetOptions = self.reset = function (aliases) {
+ let options
+ self.resetOptions = self.reset = function resetOptions (aliases) {
context.resets++
aliases = aliases || {}
options = options || {}
// put yargs back into an initial state, this
// logic is used to build a nested command
// hierarchy.
- var tmpOptions = {}
+ const tmpOptions = {}
tmpOptions.local = options.local ? options.local : []
tmpOptions.configObjects = options.configObjects ? options.configObjects : []
// if a key has been explicitly set as local,
// we should reset it before passing options to command.
- var localLookup = {}
- tmpOptions.local.forEach(function (l) {
+ const localLookup = {}
+ tmpOptions.local.forEach((l) => {
localLookup[l] = true
- ;(aliases[l] || []).forEach(function (a) {
+ ;(aliases[l] || []).forEach((a) => {
localLookup[a] = true
})
})
// preserve all groups not set to local.
- preservedGroups = Object.keys(groups).reduce(function (acc, groupName) {
- var keys = groups[groupName].filter(function (key) {
- return !(key in localLookup)
- })
+ preservedGroups = Object.keys(groups).reduce((acc, groupName) => {
+ const keys = groups[groupName].filter(key => !(key in localLookup))
if (keys.length > 0) {
acc[groupName] = keys
}
@@ -94,26 +91,22 @@ function Yargs (processArgs, cwd, parentRequire) {
// groups can now be reset
groups = {}
- var arrayOptions = [
- 'array', 'boolean', 'string', 'requiresArg', 'skipValidation',
+ const arrayOptions = [
+ 'array', 'boolean', 'string', 'skipValidation',
'count', 'normalize', 'number'
]
- var objectOptions = [
+ const objectOptions = [
'narg', 'key', 'alias', 'default', 'defaultDescription',
'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce'
]
- arrayOptions.forEach(function (k) {
- tmpOptions[k] = (options[k] || []).filter(function (k) {
- return !localLookup[k]
- })
+ arrayOptions.forEach((k) => {
+ tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k])
})
- objectOptions.forEach(function (k) {
- tmpOptions[k] = objFilter(options[k], function (k, v) {
- return !localLookup[k]
- })
+ objectOptions.forEach((k) => {
+ tmpOptions[k] = objFilter(options[k], (k, v) => !localLookup[k])
})
tmpOptions.envPrefix = options.envPrefix
@@ -137,7 +130,7 @@ function Yargs (processArgs, cwd, parentRequire) {
self.resetOptions()
// temporary hack: allow "freezing" of reset-able state for parse(msg, cb)
- var frozen
+ let frozen
function freeze () {
frozen = {}
frozen.options = options
@@ -211,7 +204,7 @@ function Yargs (processArgs, cwd, parentRequire) {
self.requiresArg = function (keys) {
argsert('<array|string>', [keys], arguments.length)
- populateParserHintArray('requiresArg', keys)
+ populateParserHintObject(self.nargs, false, 'narg', keys, 1)
return self
}
@@ -223,7 +216,7 @@ function Yargs (processArgs, cwd, parentRequire) {
function populateParserHintArray (type, keys, value) {
keys = [].concat(keys)
- keys.forEach(function (key) {
+ keys.forEach((key) => {
options[type].push(key)
})
}
@@ -280,14 +273,14 @@ function Yargs (processArgs, cwd, parentRequire) {
function populateParserHintObject (builder, isArray, type, key, value) {
if (Array.isArray(key)) {
// an array of keys with one value ['x', 'y', 'z'], function parse () {}
- var temp = {}
- key.forEach(function (k) {
+ const temp = {}
+ key.forEach((k) => {
temp[k] = value
})
builder(temp)
} else if (typeof key === 'object') {
// an object of key value pairs: {'x': parse () {}, 'y': parse() {}}
- Object.keys(key).forEach(function (k) {
+ Object.keys(key).forEach((k) => {
builder(k, key[k])
})
} else {
@@ -300,7 +293,22 @@ function Yargs (processArgs, cwd, parentRequire) {
}
}
- self.config = function (key, msg, parseFn) {
+ function deleteFromParserHintObject (optionKey) {
+ // delete from all parsing hints:
+ // boolean, array, key, alias, etc.
+ Object.keys(options).forEach((hintKey) => {
+ const hint = options[hintKey]
+ if (Array.isArray(hint)) {
+ if (~hint.indexOf(optionKey)) hint.splice(hint.indexOf(optionKey), 1)
+ } else if (typeof hint === 'object') {
+ delete hint[optionKey]
+ }
+ })
+ // now delete the description from usage.js.
+ delete usage.getDescriptions()[optionKey]
+ }
+
+ self.config = function config (key, msg, parseFn) {
argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length)
// allow a config object to be provided directly.
if (typeof key === 'object') {
@@ -317,7 +325,7 @@ function Yargs (processArgs, cwd, parentRequire) {
key = key || 'config'
self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file'))
- ;(Array.isArray(key) ? key : [key]).forEach(function (k) {
+ ;(Array.isArray(key) ? key : [key]).forEach((k) => {
options.config[k] = parseFn || true
})
@@ -330,9 +338,9 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- self.command = function (cmd, description, builder, handler) {
- argsert('<string|array|object> [string|boolean] [function|object] [function]', [cmd, description, builder, handler], arguments.length)
- command.addHandler(cmd, description, builder, handler)
+ self.command = function (cmd, description, builder, handler, middlewares) {
+ argsert('<string|array|object> [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length)
+ command.addHandler(cmd, description, builder, handler, middlewares)
return self
}
@@ -345,12 +353,12 @@ function Yargs (processArgs, cwd, parentRequire) {
// TODO: deprecate self.demand in favor of
// .demandCommand() .demandOption().
- self.demand = self.required = self.require = function (keys, max, msg) {
+ self.demand = self.required = self.require = function demand (keys, max, msg) {
// you can optionally provide a 'max' key,
// which will raise an exception if too many '_'
// options are provided.
if (Array.isArray(max)) {
- max.forEach(function (key) {
+ max.forEach((key) => {
self.demandOption(key, msg)
})
max = Infinity
@@ -362,7 +370,7 @@ function Yargs (processArgs, cwd, parentRequire) {
if (typeof keys === 'number') {
self.demandCommand(keys, max, msg, msg)
} else if (Array.isArray(keys)) {
- keys.forEach(function (key) {
+ keys.forEach((key) => {
self.demandOption(key, msg)
})
} else {
@@ -376,8 +384,8 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- self.demandCommand = function (min, max, minMsg, maxMsg) {
- argsert('[number] [number|string] [string|null] [string|null]', [min, max, minMsg, maxMsg], arguments.length)
+ self.demandCommand = function demandCommand (min, max, minMsg, maxMsg) {
+ argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length)
if (typeof min === 'undefined') min = 1
@@ -389,50 +397,52 @@ function Yargs (processArgs, cwd, parentRequire) {
self.global('_', false)
options.demandedCommands._ = {
- min: min,
- max: max,
- minMsg: minMsg,
- maxMsg: maxMsg
+ min,
+ max,
+ minMsg,
+ maxMsg
}
return self
}
- self.getDemandedOptions = function () {
+ self.getDemandedOptions = () => {
argsert([], 0)
return options.demandedOptions
}
- self.getDemandedCommands = function () {
+ self.getDemandedCommands = () => {
argsert([], 0)
return options.demandedCommands
}
self.implies = function (key, value) {
- argsert('<string|object> [string]', [key, value], arguments.length)
+ argsert('<string|object> [number|string|array]', [key, value], arguments.length)
validation.implies(key, value)
return self
}
self.conflicts = function (key1, key2) {
- argsert('<string|object> [string]', [key1, key2], arguments.length)
+ argsert('<string|object> [string|array]', [key1, key2], arguments.length)
validation.conflicts(key1, key2)
return self
}
- self.usage = function (msg, opts) {
- argsert('<string|null|object> [object]', [msg, opts], arguments.length)
+ self.usage = function (msg, description, builder, handler) {
+ argsert('<string|null|undefined> [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length)
- if (!opts && typeof msg === 'object') {
- opts = msg
- msg = null
+ if (description !== undefined) {
+ // .usage() can be used as an alias for defining
+ // a default command.
+ if ((msg || '').match(/^\$0( |$)/)) {
+ return self.command(msg, description, builder, handler)
+ } else {
+ throw new YError('.usage() description must start with $0 if being used as alias for .command()')
+ }
+ } else {
+ usage.usage(msg)
+ return self
}
-
- usage.usage(msg)
-
- if (opts) self.options(opts)
-
- return self
}
self.epilogue = self.epilog = function (msg) {
@@ -453,28 +463,26 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- self.global = function (globals, global) {
+ self.global = function global (globals, global) {
argsert('<string|array> [boolean]', [globals, global], arguments.length)
globals = [].concat(globals)
if (global !== false) {
- options.local = options.local.filter(function (l) {
- return globals.indexOf(l) === -1
- })
+ options.local = options.local.filter(l => globals.indexOf(l) === -1)
} else {
- globals.forEach(function (g) {
+ globals.forEach((g) => {
if (options.local.indexOf(g) === -1) options.local.push(g)
})
}
return self
}
- self.pkgConf = function (key, path) {
+ self.pkgConf = function pkgConf (key, path) {
argsert('<string> [string]', [key, path], arguments.length)
- var conf = null
+ let conf = null
// prefer cwd to require-main-filename in this method
// since we're looking for e.g. "nyc" config in nyc consumer
// rather than "yargs" config in nyc (where nyc is the main filename)
- var obj = pkgUp(path || cwd)
+ const obj = pkgUp(path || cwd)
// If an object exists in the key, add it to options.configObjects
if (obj[key] && typeof obj[key] === 'object') {
@@ -485,28 +493,30 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- var pkgs = {}
+ const pkgs = {}
function pkgUp (path) {
- var npath = path || '*'
+ const npath = path || '*'
if (pkgs[npath]) return pkgs[npath]
- const readPkgUp = require('read-pkg-up')
+ const findUp = require('find-up')
- var obj = {}
+ let obj = {}
try {
- obj = readPkgUp.sync({
- cwd: path || require('require-main-filename')(parentRequire || require),
+ const pkgJsonPath = findUp.sync('package.json', {
+ cwd: path || require('path').dirname(require('require-main-filename')(parentRequire || require)),
normalize: false
})
+ obj = JSON.parse(fs.readFileSync(pkgJsonPath))
} catch (noop) {}
- pkgs[npath] = obj.pkg || {}
+ pkgs[npath] = obj || {}
return pkgs[npath]
}
- var parseFn = null
- var parseContext = null
- self.parse = function (args, shortCircuit, _parseFn) {
- argsert('<string|array> [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length)
+ let parseFn = null
+ let parseContext = null
+ self.parse = function parse (args, shortCircuit, _parseFn) {
+ argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length)
+ if (typeof args === 'undefined') args = processArgs
// a context object can optionally be provided, this allows
// additional information to be passed to a command handler.
@@ -529,25 +539,21 @@ function Yargs (processArgs, cwd, parentRequire) {
freeze()
if (parseFn) exitProcess = false
- var parsed = self._parseArgs(args, shortCircuit)
+ const parsed = self._parseArgs(args, shortCircuit)
if (parseFn) parseFn(exitError, parsed, output)
unfreeze()
return parsed
}
- self._getParseContext = function () {
- return parseContext || {}
- }
+ self._getParseContext = () => parseContext || {}
- self._hasParseCallback = function () {
- return !!parseFn
- }
+ self._hasParseCallback = () => !!parseFn
- self.option = self.options = function (key, opt) {
+ self.option = self.options = function option (key, opt) {
argsert('<string|object> [object]', [key, opt], arguments.length)
if (typeof key === 'object') {
- Object.keys(key).forEach(function (k) {
+ Object.keys(key).forEach((k) => {
self.options(k, key[k])
})
} else {
@@ -559,7 +565,7 @@ function Yargs (processArgs, cwd, parentRequire) {
if (opt.alias) self.alias(key, opt.alias)
- var demand = opt.demand || opt.required || opt.require
+ const demand = opt.demand || opt.required || opt.require
// deprecated, use 'demandOption' instead
if (demand) {
@@ -570,10 +576,6 @@ function Yargs (processArgs, cwd, parentRequire) {
self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined)
}
- if ('config' in opt) {
- self.config(key, opt.configParser)
- }
-
if ('conflicts' in opt) {
self.conflicts(key, opt.conflicts)
}
@@ -590,7 +592,11 @@ function Yargs (processArgs, cwd, parentRequire) {
self.nargs(key, opt.nargs)
}
- if ('normalize' in opt) {
+ if (opt.config) {
+ self.config(key, opt.configParser)
+ }
+
+ if (opt.normalize) {
self.normalize(key)
}
@@ -642,8 +648,8 @@ function Yargs (processArgs, cwd, parentRequire) {
self.skipValidation(key)
}
- var desc = opt.describe || opt.description || opt.desc
- if (desc) {
+ const desc = opt.describe || opt.description || opt.desc
+ if (!opt.hidden) {
self.describe(key, desc)
}
@@ -654,29 +660,62 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- self.getOptions = function () {
- return options
+ self.getOptions = () => options
+
+ self.positional = function (key, opts) {
+ argsert('<string> <object>', [key, opts], arguments.length)
+ if (context.resets === 0) {
+ throw new YError(".positional() can only be called in a command's builder function")
+ }
+
+ // .positional() only supports a subset of the configuration
+ // options availble to .option().
+ const supportedOpts = ['default', 'implies', 'normalize',
+ 'choices', 'conflicts', 'coerce', 'type', 'describe',
+ 'desc', 'description', 'alias']
+ opts = objFilter(opts, (k, v) => {
+ let accept = supportedOpts.indexOf(k) !== -1
+ // type can be one of string|number|boolean.
+ if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) accept = false
+ return accept
+ })
+
+ // copy over any settings that can be inferred from the command string.
+ const fullCommand = context.fullCommands[context.fullCommands.length - 1]
+ const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : {
+ array: [],
+ alias: {},
+ default: {},
+ demand: {}
+ }
+ Object.keys(parseOptions).forEach((pk) => {
+ if (Array.isArray(parseOptions[pk])) {
+ if (parseOptions[pk].indexOf(key) !== -1) opts[pk] = true
+ } else {
+ if (parseOptions[pk][key] && !(pk in opts)) opts[pk] = parseOptions[pk][key]
+ }
+ })
+ self.group(key, usage.getPositionalGroupName())
+ return self.option(key, opts)
}
- self.group = function (opts, groupName) {
+ self.group = function group (opts, groupName) {
argsert('<string|array> <string>', [opts, groupName], arguments.length)
- var existing = preservedGroups[groupName] || groups[groupName]
+ const existing = preservedGroups[groupName] || groups[groupName]
if (preservedGroups[groupName]) {
// we now only need to track this group name in groups.
delete preservedGroups[groupName]
}
- var seen = {}
- groups[groupName] = (existing || []).concat(opts).filter(function (key) {
+ const seen = {}
+ groups[groupName] = (existing || []).concat(opts).filter((key) => {
if (seen[key]) return false
return (seen[key] = true)
})
return self
}
- self.getGroups = function () {
- // combine explicit and preserved groups. explicit groups should be first
- return assign(groups, preservedGroups)
- }
+ // combine explicit and preserved groups. explicit groups should be first
+ self.getGroups = () => Object.assign({}, groups, preservedGroups)
// as long as options.envPrefix is not undefined,
// parser will apply env vars matching prefix to argv
@@ -688,43 +727,58 @@ function Yargs (processArgs, cwd, parentRequire) {
}
self.wrap = function (cols) {
- argsert('<number|null>', [cols], arguments.length)
+ argsert('<number|null|undefined>', [cols], arguments.length)
usage.wrap(cols)
return self
}
- var strict = false
+ let strict = false
self.strict = function (enabled) {
argsert('[boolean]', [enabled], arguments.length)
strict = enabled !== false
return self
}
- self.getStrict = function () {
- return strict
- }
+ self.getStrict = () => strict
self.showHelp = function (level) {
argsert('[string|function]', [level], arguments.length)
if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed.
+ if (command.hasDefaultCommand()) {
+ context.resets++ // override the restriction on top-level positoinals.
+ command.runDefaultBuilderOn(self, true)
+ }
usage.showHelp(level)
return self
}
- var versionOpt = null
- self.version = function (opt, msg, ver) {
- argsert('[string|function] [string|function] [string]', [opt, msg, ver], arguments.length)
+ let versionOpt = null
+ self.version = function version (opt, msg, ver) {
+ const defaultVersionOpt = 'version'
+ argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length)
+
+ // nuke the key previously configured
+ // to return version #.
+ if (versionOpt) {
+ deleteFromParserHintObject(versionOpt)
+ usage.version(undefined)
+ versionOpt = null
+ }
+
if (arguments.length === 0) {
ver = guessVersion()
- opt = 'version'
+ opt = defaultVersionOpt
} else if (arguments.length === 1) {
+ if (opt === false) { // disable default 'version' key.
+ return self
+ }
ver = opt
- opt = 'version'
+ opt = defaultVersionOpt
} else if (arguments.length === 2) {
ver = msg
msg = null
}
- versionOpt = opt
+ versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt
msg = msg || usage.deferY18nLookup('Show version number')
usage.version(ver || undefined)
@@ -734,44 +788,35 @@ function Yargs (processArgs, cwd, parentRequire) {
}
function guessVersion () {
- var obj = pkgUp()
+ const obj = pkgUp()
return obj.version || 'unknown'
}
- var helpOpt = null
- var useHelpOptAsCommand = false // a call to .help() will enable this
- self.addHelpOpt = self.help = function (opt, msg, addImplicitCmd) {
- argsert('[string|boolean] [string|boolean] [boolean]', [opt, msg, addImplicitCmd], arguments.length)
+ let helpOpt = null
+ self.addHelpOpt = self.help = function addHelpOpt (opt, msg) {
+ const defaultHelpOpt = 'help'
+ argsert('[string|boolean] [string]', [opt, msg], arguments.length)
- // argument shuffle
- if (arguments.length === 0) {
- useHelpOptAsCommand = true
- } else if (arguments.length === 1) {
- if (typeof opt === 'boolean') {
- useHelpOptAsCommand = opt
- opt = null
- } else {
- useHelpOptAsCommand = true
- }
- } else if (arguments.length === 2) {
- if (typeof msg === 'boolean') {
- useHelpOptAsCommand = msg
- msg = null
- } else {
- useHelpOptAsCommand = true
- }
- } else {
- useHelpOptAsCommand = Boolean(addImplicitCmd)
+ // nuke the key previously configured
+ // to return help.
+ if (helpOpt) {
+ deleteFromParserHintObject(helpOpt)
+ helpOpt = null
+ }
+
+ if (arguments.length === 1) {
+ if (opt === false) return self
}
+
// use arguments, fallback to defaults for opt and msg
- helpOpt = opt || 'help'
+ helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt
self.boolean(helpOpt)
self.describe(helpOpt, msg || usage.deferY18nLookup('Show help'))
return self
}
- self.showHelpOnFail = function (enabled, message) {
+ self.showHelpOnFail = function showHelpOnFail (enabled, message) {
argsert('[boolean|string] [string]', [enabled, message], arguments.length)
usage.showHelpOnFail(enabled, message)
return self
@@ -786,9 +831,7 @@ function Yargs (processArgs, cwd, parentRequire) {
exitProcess = enabled
return self
}
- self.getExitProcess = function () {
- return exitProcess
- }
+ self.getExitProcess = () => exitProcess
var completionCommand = null
self.completion = function (cmd, desc, fn) {
@@ -818,7 +861,7 @@ function Yargs (processArgs, cwd, parentRequire) {
self.showCompletionScript = function ($0) {
argsert('[string]', [$0], arguments.length)
$0 = $0 || self.$0
- _logger.log(completion.generateCompletionScript($0))
+ _logger.log(completion.generateCompletionScript($0, completionCommand))
return self
}
@@ -845,21 +888,19 @@ function Yargs (processArgs, cwd, parentRequire) {
return self
}
- var detectLocale = true
+ let detectLocale = true
self.detectLocale = function (detect) {
argsert('<boolean>', [detect], arguments.length)
detectLocale = detect
return self
}
- self.getDetectLocale = function () {
- return detectLocale
- }
+ self.getDetectLocale = () => detectLocale
var hasOutput = false
var exitError = null
// maybe exit, always capture
// context about why we wanted to exit.
- self.exit = function (code, err) {
+ self.exit = (code, err) => {
hasOutput = true
exitError = err
if (exitProcess) process.exit(code)
@@ -867,78 +908,67 @@ function Yargs (processArgs, cwd, parentRequire) {
// we use a custom logger that buffers output,
// so that we can print to non-CLIs, e.g., chat-bots.
- var _logger = {
- log: function () {
+ const _logger = {
+ log () {
const args = []
- for (var i = 0; i < arguments.length; i++) args.push(arguments[i])
+ for (let i = 0; i < arguments.length; i++) args.push(arguments[i])
if (!self._hasParseCallback()) console.log.apply(console, args)
hasOutput = true
if (output.length) output += '\n'
output += args.join(' ')
},
- error: function () {
+ error () {
const args = []
- for (var i = 0; i < arguments.length; i++) args.push(arguments[i])
+ for (let i = 0; i < arguments.length; i++) args.push(arguments[i])
if (!self._hasParseCallback()) console.error.apply(console, args)
hasOutput = true
if (output.length) output += '\n'
output += args.join(' ')
}
}
- self._getLoggerInstance = function () {
- return _logger
- }
+ self._getLoggerInstance = () => _logger
// has yargs output an error our help
// message in the current execution context.
- self._hasOutput = function () {
- return hasOutput
- }
+ self._hasOutput = () => hasOutput
- self._setHasOutput = function () {
+ self._setHasOutput = () => {
hasOutput = true
}
- var recommendCommands
+ let recommendCommands
self.recommendCommands = function (recommend) {
argsert('[boolean]', [recommend], arguments.length)
recommendCommands = typeof recommend === 'boolean' ? recommend : true
return self
}
- self.getUsageInstance = function () {
- return usage
- }
+ self.getUsageInstance = () => usage
- self.getValidationInstance = function () {
- return validation
- }
+ self.getValidationInstance = () => validation
- self.getCommandInstance = function () {
- return command
- }
+ self.getCommandInstance = () => command
- self.terminalWidth = function () {
+ self.terminalWidth = () => {
argsert([], 0)
return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null
}
Object.defineProperty(self, 'argv', {
- get: function () {
- return self._parseArgs(processArgs)
- },
+ get: () => self._parseArgs(processArgs),
enumerable: true
})
- self._parseArgs = function (args, shortCircuit, _skipValidation, commandIndex) {
- var skipValidation = !!_skipValidation
+ self._parseArgs = function parseArgs (args, shortCircuit, _skipValidation, commandIndex) {
+ let skipValidation = !!_skipValidation
args = args || processArgs
options.__ = y18n.__
options.configuration = pkgUp()['yargs'] || {}
+
const parsed = Parser.detailed(args, options)
- var argv = parsed.argv
- if (parseContext) argv = assign(argv, parseContext)
- var aliases = parsed.aliases
+ let argv = parsed.argv
+ if (parseContext) argv = Object.assign({}, argv, parseContext)
+ const aliases = parsed.aliases
argv.$0 = self.$0
self.parsed = parsed
@@ -953,34 +983,28 @@ function Yargs (processArgs, cwd, parentRequire) {
return argv
}
- if (argv._.length) {
- // check for helpOpt in argv._ before running commands
- // assumes helpOpt must be valid if useHelpOptAsCommand is true
- if (useHelpOptAsCommand) {
- // consider any multi-char helpOpt alias as a valid help command
- // unless all helpOpt aliases are single-char
- // note that parsed.aliases is a normalized bidirectional map :)
- var helpCmds = [helpOpt].concat(aliases[helpOpt] || [])
- var multiCharHelpCmds = helpCmds.filter(function (k) {
- return k.length > 1
- })
- if (multiCharHelpCmds.length) helpCmds = multiCharHelpCmds
- // look for and strip any helpCmds from argv._
- argv._ = argv._.filter(function (cmd) {
- if (~helpCmds.indexOf(cmd)) {
- argv[helpOpt] = true
- return false
- }
- return true
- })
+ // if there's a handler associated with a
+ // command defer processing to it.
+ if (helpOpt) {
+ // consider any multi-char helpOpt alias as a valid help command
+ // unless all helpOpt aliases are single-char
+ // note that parsed.aliases is a normalized bidirectional map :)
+ const helpCmds = [helpOpt]
+ .concat(aliases[helpOpt] || [])
+ .filter(k => k.length > 1)
+ // check if help should trigger and strip it from _.
+ if (~helpCmds.indexOf(argv._[argv._.length - 1])) {
+ argv._.pop()
+ argv[helpOpt] = true
}
+ }
+ const handlerKeys = command.getCommands()
+ const skipDefaultCommand = argv[helpOpt] && (handlerKeys.length > 1 || handlerKeys[0] !== '$0')
- // if there's a handler associated with a
- // command defer processing to it.
- var handlerKeys = command.getCommands()
+ if (argv._.length) {
if (handlerKeys.length) {
- var firstUnknownCommand
- for (var i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) {
+ let firstUnknownCommand
+ for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) {
cmd = String(argv._[i])
if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) {
setPlaceholderKeys(argv)
@@ -995,7 +1019,7 @@ function Yargs (processArgs, cwd, parentRequire) {
}
// run the default command, if defined
- if (command.hasDefaultCommand() && !argv[helpOpt]) {
+ if (command.hasDefaultCommand() && !skipDefaultCommand) {
setPlaceholderKeys(argv)
return command.runCommand(null, self, parsed)
}
@@ -1013,7 +1037,7 @@ function Yargs (processArgs, cwd, parentRequire) {
self.showCompletionScript()
self.exit(0)
}
- } else if (command.hasDefaultCommand() && !argv[helpOpt]) {
+ } else if (command.hasDefaultCommand() && !skipDefaultCommand) {
setPlaceholderKeys(argv)
return command.runCommand(null, self, parsed)
}
@@ -1025,9 +1049,9 @@ function Yargs (processArgs, cwd, parentRequire) {
// we allow for asynchronous completions,
// e.g., loading in a list of commands from an API.
- var completionArgs = args.slice(args.indexOf('--' + completion.completionKey) + 1)
- completion.getCompletion(completionArgs, function (completions) {
- ;(completions || []).forEach(function (completion) {
+ const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1)
+ completion.getCompletion(completionArgs, (completions) => {
+ ;(completions || []).forEach((completion) => {
_logger.log(completion)
})
@@ -1039,7 +1063,7 @@ function Yargs (processArgs, cwd, parentRequire) {
// Handle 'help' and 'version' options
// if we haven't already output help!
if (!hasOutput) {
- Object.keys(argv).forEach(function (key) {
+ Object.keys(argv).forEach((key) => {
if (key === helpOpt && argv[key]) {
if (exitProcess) setBlocking(true)
@@ -1058,9 +1082,7 @@ function Yargs (processArgs, cwd, parentRequire) {
// Check if any of the options to skip validation were provided
if (!skipValidation && options.skipValidation.length > 0) {
- skipValidation = Object.keys(argv).some(function (key) {
- return options.skipValidation.indexOf(key) >= 0 && argv[key] === true
- })
+ skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true)
}
// If the help or version options where used and exitProcess is false,
@@ -1082,10 +1104,9 @@ function Yargs (processArgs, cwd, parentRequire) {
return setPlaceholderKeys(argv)
}
- self._runValidation = function (argv, aliases, positionalMap, parseErrors) {
+ self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) {
if (parseErrors) throw new YError(parseErrors.message)
validation.nonOptionCount(argv)
- validation.missingArgumentValue(argv)
validation.requiredArguments(argv)
if (strict) validation.unknownArguments(argv, aliases, positionalMap)
validation.customChecks(argv, aliases)
@@ -1107,7 +1128,7 @@ function Yargs (processArgs, cwd, parentRequire) {
}
function setPlaceholderKeys (argv) {
- Object.keys(options.key).forEach(function (key) {
+ Object.keys(options.key).forEach((key) => {
// don't set placeholder keys for dot
// notation options 'foo.bar'.
if (~key.indexOf('.')) return
@@ -1116,6 +1137,11 @@ function Yargs (processArgs, cwd, parentRequire) {
return argv
}
+ // an app should almost always have --version and --help,
+ // if you *really* want to disable this use .help(false)/.version(false).
+ self.help()
+ self.version()
+
return self
}
diff --git a/deps/npm/node_modules/libnpx/package.json b/deps/npm/node_modules/libnpx/package.json
index 243543fd55..29feb48f73 100644
--- a/deps/npm/node_modules/libnpx/package.json
+++ b/deps/npm/node_modules/libnpx/package.json
@@ -1,37 +1,31 @@
{
- "_from": "libnpx@latest",
- "_id": "libnpx@9.7.1",
+ "_from": "libnpx@10.0.1",
+ "_id": "libnpx@10.0.1",
"_inBundle": false,
- "_integrity": "sha512-OktT775uhfL93SoUfERj4ilM3D7c0hyUyALX9oJ2D/yO4Msm5hbkOKHcrOVHXRcEX9ytstviYQAEygFIiDj2bQ==",
+ "_integrity": "sha512-87491jxL9jeP2rDF4px3JNHTKCsHFTRAuRkGZ9/b0vb/312mxFCAsuNcGvbw0BTED0iGf+IeNDgBGy9lcy3pTQ==",
"_location": "/libnpx",
"_phantomChildren": {
- "graceful-fs": "4.1.11",
- "hosted-git-info": "2.5.0",
"lru-cache": "4.1.1",
- "normalize-package-data": "2.4.0",
- "osenv": "0.1.4",
- "semver": "5.4.1",
"strip-ansi": "4.0.0",
- "validate-npm-package-name": "3.0.0",
"which": "1.3.0"
},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "libnpx@latest",
+ "raw": "libnpx@10.0.1",
"name": "libnpx",
"escapedName": "libnpx",
- "rawSpec": "latest",
+ "rawSpec": "10.0.1",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "10.0.1"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-9.7.1.tgz",
- "_shasum": "55300b5e119bd47b714be9704ca0696ffb18b025",
- "_spec": "libnpx@latest",
+ "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.0.1.tgz",
+ "_shasum": "a0104a1336e7621e52172d7970dc1b97fa17ae89",
+ "_spec": "libnpx@10.0.1",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Kat MarchƔn",
@@ -50,29 +44,29 @@
}
},
"dependencies": {
- "dotenv": "^4.0.0",
- "npm-package-arg": "^5.1.2",
- "rimraf": "^2.6.1",
+ "dotenv": "^5.0.1",
+ "npm-package-arg": "^6.0.0",
+ "rimraf": "^2.6.2",
"safe-buffer": "^5.1.0",
- "update-notifier": "^2.2.0",
- "which": "^1.2.14",
- "y18n": "^3.2.1",
- "yargs": "^8.0.2"
+ "update-notifier": "^2.3.0",
+ "which": "^1.3.0",
+ "y18n": "^4.0.0",
+ "yargs": "^11.0.0"
},
"deprecated": false,
"description": "support library for npx -- an tool for executing npm-based packages.",
"devDependencies": {
- "cross-env": "^5.0.1",
+ "cross-env": "^5.1.3",
"json": "^9.0.6",
"marked-man": "^0.2.1",
"mkdirp": "^0.5.1",
- "npm": "^5.3.0",
- "nyc": "^11.0.2",
+ "npm": "^5.7.1",
+ "nyc": "^11.4.1",
"require-inject": "^1.4.0",
- "standard": "^10.0.2",
- "standard-version": "^4.2.0",
+ "standard": "^11.0.0",
+ "standard-version": "^4.3.0",
"tacks": "^1.2.6",
- "tap": "^10.5.1",
+ "tap": "^11.1.2",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -90,7 +84,7 @@
"npm bin",
"cli"
],
- "license": "CC0-1.0",
+ "license": "ISC",
"main": "index.js",
"man": [
"./libnpx.1"
@@ -106,12 +100,12 @@
"docs": "tail -n +2 README.md | marked-man --manual 'User Commands' --version \"$npm_package_name@$npm_package_version\" > $npm_package_name.1",
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t && npm run docs",
- "pretest": "standard ./*.js test bin/*.js locales",
+ "pretest": "standard *.js test bin/*.js locales",
"publish-bin": "npm run bin && cd bin && npm publish",
"release": "standard-version -s",
"test": "cross-env NPX_UPDATE_LOCALE_FILES=true LC_ALL=en nyc --all -- tap -J test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "9.7.1"
+ "version": "10.0.1"
}
diff --git a/deps/npm/node_modules/libnpx/parse-args.js b/deps/npm/node_modules/libnpx/parse-args.js
index 240fdd463f..3f50660550 100644
--- a/deps/npm/node_modules/libnpx/parse-args.js
+++ b/deps/npm/node_modules/libnpx/parse-args.js
@@ -47,8 +47,8 @@ function parseArgs (argv, defaultNpm) {
const parsed = parser.parse(argv.slice(0, cmdIndex))
const parsedCmd = npa(argv[cmdIndex])
parsed.command = parsed.package && parsedCmd.type !== 'directory'
- ? argv[cmdIndex]
- : guessCmdName(parsedCmd)
+ ? argv[cmdIndex]
+ : guessCmdName(parsedCmd)
parsed.isLocal = parsedCmd.type === 'directory'
parsed.cmdOpts = argv.slice(cmdIndex + 1)
if (typeof parsed.package === 'string') {
@@ -56,8 +56,8 @@ function parseArgs (argv, defaultNpm) {
}
parsed.packageRequested = !!parsed.package
parsed.cmdHadVersion = parsed.package || parsedCmd.type === 'directory'
- ? false
- : parsedCmd.name !== parsedCmd.raw
+ ? false
+ : parsedCmd.name !== parsedCmd.raw
const pkg = parsed.package || [argv[cmdIndex]]
parsed.p = parsed.package = pkg.map(p => npa(p).toString())
return parsed
@@ -80,13 +80,13 @@ function parseArgs (argv, defaultNpm) {
const splitCmd = parsed._.slice(2)
const parsedCmd = npa(splitCmd[0])
parsed.command = parsed.package
- ? splitCmd[0]
- : guessCmdName(parsedCmd)
+ ? splitCmd[0]
+ : guessCmdName(parsedCmd)
parsed.cmdOpts = splitCmd.slice(1)
parsed.packageRequested = !!parsed.package
parsed.cmdHadVersion = parsed.package
- ? false
- : parsedCmd.name !== parsedCmd.raw
+ ? false
+ : parsedCmd.name !== parsedCmd.raw
const pkg = parsed.package || [splitCmd[0]]
parsed.p = parsed.package = pkg.map(p => npa(p).toString())
}
@@ -169,65 +169,65 @@ function yargsParser (argv, defaultNpm) {
`
return require('yargs')
- .usage(Y()`Execute binaries from npm packages.\n${usage}`)
- .option('package', {
- alias: 'p',
- type: 'string',
- describe: Y()`Package to be installed.`
- })
- .option('cache', {
- type: 'string',
- describe: Y()`Location of the npm cache.`
- })
- .option('no-install', {
- type: 'boolean',
- describe: Y()`Skip installation if a package is missing.`
- })
- .option('userconfig', {
- type: 'string',
- describe: Y()`Path to user npmrc.`
- })
- .option('call', {
- alias: 'c',
- type: 'string',
- describe: Y()`Execute string as if inside \`npm run-script\`.`
- })
- .option('shell', {
- alias: 's',
- type: 'string',
- describe: Y()`Shell to execute the command with, if any.`,
- default: false
- })
- .option('shell-auto-fallback', {
- choices: ['', 'bash', 'fish', 'zsh'],
- describe: Y()`Generate shell code to use npx as the "command not found" fallback.`,
- requireArg: false,
- type: 'string'
- })
- .option('ignore-existing', {
- describe: Y()`Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.`,
- type: 'boolean'
- })
- .option('quiet', {
- alias: 'q',
- describe: Y()`Suppress output from npx itself. Subcommands will not be affected.`,
- type: 'boolean'
- })
- .option('npm', {
- describe: Y()`npm binary to use for internal operations.`,
- type: 'string',
- default: defaultNpm || 'npm'
- })
- .option('node-arg', {
- alias: 'n',
- type: 'string',
- describe: Y()`Extra node argument when calling a node binary.`
- })
- .version(() => require('./package.json').version)
- .alias('version', 'v')
- .help()
- .alias('help', 'h')
- .epilogue(Y()`For the full documentation, see the manual page for npx(1).`)
+ .usage(Y()`Execute binaries from npm packages.\n${usage}`)
+ .option('package', {
+ alias: 'p',
+ type: 'string',
+ describe: Y()`Package to be installed.`
+ })
+ .option('cache', {
+ type: 'string',
+ describe: Y()`Location of the npm cache.`
+ })
+ .option('no-install', {
+ type: 'boolean',
+ describe: Y()`Skip installation if a package is missing.`
+ })
+ .option('userconfig', {
+ type: 'string',
+ describe: Y()`Path to user npmrc.`
+ })
+ .option('call', {
+ alias: 'c',
+ type: 'string',
+ describe: Y()`Execute string as if inside \`npm run-script\`.`
+ })
+ .option('shell', {
+ alias: 's',
+ type: 'string',
+ describe: Y()`Shell to execute the command with, if any.`,
+ default: false
+ })
+ .option('shell-auto-fallback', {
+ choices: ['', 'bash', 'fish', 'zsh'],
+ describe: Y()`Generate shell code to use npx as the "command not found" fallback.`,
+ requireArg: false,
+ type: 'string'
+ })
+ .option('ignore-existing', {
+ describe: Y()`Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.`,
+ type: 'boolean'
+ })
+ .option('quiet', {
+ alias: 'q',
+ describe: Y()`Suppress output from npx itself. Subcommands will not be affected.`,
+ type: 'boolean'
+ })
+ .option('npm', {
+ describe: Y()`npm binary to use for internal operations.`,
+ type: 'string',
+ default: defaultNpm || 'npm'
+ })
+ .option('node-arg', {
+ alias: 'n',
+ type: 'string',
+ describe: Y()`Extra node argument when calling a node binary.`
+ })
+ .version()
+ .alias('version', 'v')
+ .help()
+ .alias('help', 'h')
+ .epilogue(Y()`For the full documentation, see the manual page for npx(1).`)
}
var _y
diff --git a/deps/npm/node_modules/mississippi/changelog.md b/deps/npm/node_modules/mississippi/changelog.md
new file mode 100644
index 0000000000..75333b0844
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/changelog.md
@@ -0,0 +1,10 @@
+# mississippi Change Log
+All notable changes to this project will be documented in this file.
+This project adheres to [Semantic Versioning](http://semver.org/).
+
+## 3.0.0 - 2018-02-26
+* Update to pump@3.0.0. Returns the last stream the pipeline to enable chaining. (Use the individual modules to avoid potentially unnecessary major updates in your project).
+
+## 2.0.0 - 2018-01-30
+* Update to pump@2.0.1. (Use the individual modules to avoid potentially unnecessary major updates in your project)
+* Pin engines support to >= Node 4.0.0. Run Node LTS or greater.
diff --git a/deps/npm/node_modules/mississippi/index.js b/deps/npm/node_modules/mississippi/index.js
index da3de5e0a7..d635b29c56 100644
--- a/deps/npm/node_modules/mississippi/index.js
+++ b/deps/npm/node_modules/mississippi/index.js
@@ -7,3 +7,4 @@ module.exports.concat = require('concat-stream')
module.exports.finished = require('end-of-stream')
module.exports.from = require('from2')
module.exports.to = require('flush-write-stream')
+module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/mississippi/license b/deps/npm/node_modules/mississippi/license
new file mode 100644
index 0000000000..e34763968c
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/license
@@ -0,0 +1,7 @@
+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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json
index 3ec39aba0e..3d8b508cf9 100644
--- a/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/concat-stream/package.json
@@ -1,7 +1,8 @@
{
"_from": "concat-stream@^1.5.0",
- "_id": "concat-stream@1.6.0",
- "_integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "_id": "concat-stream@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
"_location": "/mississippi/concat-stream",
"_phantomChildren": {},
"_requested": {
@@ -17,16 +18,14 @@
"_requiredBy": [
"/mississippi"
],
- "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
- "_shasum": "0aac662fd52be78964d5532f694784e70110acf7",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+ "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26",
"_spec": "concat-stream@^1.5.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Max Ogden",
"email": "max@maxogden.com"
},
- "bin": null,
"bugs": {
"url": "http://github.com/maxogden/concat-stream/issues"
},
@@ -51,8 +50,6 @@
"license": "MIT",
"main": "index.js",
"name": "concat-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/maxogden/concat-stream.git"
@@ -82,5 +79,5 @@
"android-browser/4.2..latest"
]
},
- "version": "1.6.0"
+ "version": "1.6.1"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md
index 27669f6b6b..8352900fc6 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md
+++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/README.md
@@ -46,7 +46,7 @@ If you call `setReadable` or `setWritable` multiple times it will unregister the
To disable the readable or writable part call `setReadable` or `setWritable` with `null`.
If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.
-You can also explictly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
+You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
error object as argument, in which case the error is emitted as part of the `error` event.
``` js
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js
index a04f124fa9..8323e654ac 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/index.js
@@ -3,7 +3,9 @@ var eos = require('end-of-stream')
var inherits = require('inherits')
var shift = require('stream-shift')
-var SIGNAL_FLUSH = new Buffer([0])
+var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)
+ ? Buffer.from([0])
+ : new Buffer([0])
var onuncork = function(self, fn) {
if (self._corked) self.once('uncork', fn)
@@ -12,7 +14,7 @@ var onuncork = function(self, fn) {
var destroyer = function(self, end) {
return function(err) {
- if (err) self.destroy(err.message === 'premature close' ? null : err)
+ if (err) self._destroyInterval(err)
else if (end && !self._ended) self.end()
}
}
@@ -46,6 +48,8 @@ var Duplexify = function(writable, readable, opts) {
this._unwrite = null
this._unread = null
this._ended = false
+ this._error = null
+ this._preferError = false
this.destroyed = false
@@ -167,15 +171,24 @@ Duplexify.prototype._forward = function() {
}
Duplexify.prototype.destroy = function(err) {
+ if (this._preferError && !this._error && err) this._error = err
+
if (this.destroyed) return
this.destroyed = true
var self = this
process.nextTick(function() {
- self._destroy(err)
+ self._destroy(self._preferError ? self._error : err)
})
}
+Duplexify.prototype._destroyInterval = function(err) {
+ if (this.destroyed) return
+ if (err.message !== 'premature close') return this.destroy(err)
+ this._preferError = true
+ this.destroy(null)
+}
+
Duplexify.prototype._destroy = function(err) {
if (err) {
var ondrain = this._ondrain
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md b/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md
deleted file mode 100644
index a2981ea070..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# once
-
-Only call a function once.
-
-## usage
-
-```javascript
-var once = require('once')
-
-function load (file, cb) {
- cb = once(cb)
- loader.load('file')
- loader.once('load', cb)
- loader.once('error', cb)
-}
-```
-
-Or add to the Function.prototype in a responsible way:
-
-```javascript
-// only has to be done once
-require('once').proto()
-
-function load (file, cb) {
- cb = cb.once()
- loader.load('file')
- loader.once('load', cb)
- loader.once('error', cb)
-}
-```
-
-Ironically, the prototype feature makes this module twice as
-complicated as necessary.
-
-To check whether you function has been called, use `fn.called`. Once the
-function is called for the first time the return value of the original
-function is saved in `fn.value` and subsequent calls will continue to
-return this value.
-
-```javascript
-var once = require('once')
-
-function load (cb) {
- cb = once(cb)
- var stream = createStream()
- stream.once('data', cb)
- stream.once('end', function () {
- if (!cb.called) cb(new Error('not found'))
- })
-}
-```
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js b/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js
deleted file mode 100644
index 2e1e721bfe..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var wrappy = require('wrappy')
-module.exports = wrappy(once)
-
-once.proto = once(function () {
- Object.defineProperty(Function.prototype, 'once', {
- value: function () {
- return once(this)
- },
- configurable: true
- })
-})
-
-function once (fn) {
- var f = function () {
- if (f.called) return f.value
- f.called = true
- return f.value = fn.apply(this, arguments)
- }
- f.called = false
- return f
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json b/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json
deleted file mode 100644
index 8c0e6e2991..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "_from": "once@~1.3.0",
- "_id": "once@1.3.3",
- "_integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
- "_location": "/mississippi/duplexify/end-of-stream/once",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "once@~1.3.0",
- "name": "once",
- "escapedName": "once",
- "rawSpec": "~1.3.0",
- "saveSpec": null,
- "fetchSpec": "~1.3.0"
- },
- "_requiredBy": [
- "/mississippi/duplexify/end-of-stream"
- ],
- "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
- "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20",
- "_shrinkwrap": null,
- "_spec": "once@~1.3.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/isaacs/once/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "wrappy": "1"
- },
- "deprecated": false,
- "description": "Run a function exactly one time",
- "devDependencies": {
- "tap": "^1.2.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "once.js"
- ],
- "homepage": "https://github.com/isaacs/once#readme",
- "keywords": [
- "once",
- "function",
- "one",
- "single"
- ],
- "license": "ISC",
- "main": "once.js",
- "name": "once",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/once.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "1.3.3"
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/test.js b/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/test.js
deleted file mode 100644
index d4d126fe56..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var assert = require('assert');
-var eos = require('./index');
-
-var expected = 6;
-var fs = require('fs');
-var net = require('net');
-
-var ws = fs.createWriteStream('/dev/null');
-eos(ws, function(err) {
- expected--;
- assert(!!err);
- if (!expected) process.exit(0);
-});
-ws.close();
-
-var rs = fs.createReadStream('/dev/random');
-eos(rs, function(err) {
- expected--;
- assert(!!err);
- if (!expected) process.exit(0);
-});
-rs.close();
-
-var rs = fs.createReadStream(__filename);
-eos(rs, function(err) {
- expected--;
- assert(!err);
- if (!expected) process.exit(0);
-});
-rs.pipe(fs.createWriteStream('/dev/null'));
-
-var rs = fs.createReadStream(__filename);
-eos(rs, function(err) {
- throw new Error('no go')
-})();
-rs.pipe(fs.createWriteStream('/dev/null'));
-
-var socket = net.connect(50000);
-eos(socket, function(err) {
- expected--;
- assert(!!err);
- if (!expected) process.exit(0);
-});
-
-var server = net.createServer(function(socket) {
- eos(socket, function() {
- expected--;
- if (!expected) process.exit(0);
- });
- socket.destroy();
-}).listen(30000, function() {
- var socket = net.connect(30000);
- eos(socket, function() {
- expected--;
- if (!expected) process.exit(0);
- });
-});
-
-setTimeout(function() {
- assert(expected === 0);
- process.exit(0);
-}, 1000);
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json
index 2249d135e5..ed3ea4ab17 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/package.json
@@ -1,11 +1,10 @@
{
"_from": "duplexify@^3.4.2",
- "_id": "duplexify@3.5.0",
- "_integrity": "sha1-GqdzAC4VeEV+nZ1KULDMquvL1gQ=",
+ "_id": "duplexify@3.5.4",
+ "_inBundle": false,
+ "_integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
"_location": "/mississippi/duplexify",
- "_phantomChildren": {
- "wrappy": "1.0.2"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
@@ -20,21 +19,19 @@
"/mississippi",
"/mississippi/pumpify"
],
- "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz",
- "_shasum": "1aa773002e1578457e9d9d4a50b0ccaaebcbd604",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
+ "_shasum": "4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4",
"_spec": "duplexify@^3.4.2",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Mathias Buus"
},
- "bin": null,
"bugs": {
"url": "https://github.com/mafintosh/duplexify/issues"
},
"bundleDependencies": false,
"dependencies": {
- "end-of-stream": "1.0.0",
+ "end-of-stream": "^1.0.0",
"inherits": "^2.0.1",
"readable-stream": "^2.0.0",
"stream-shift": "^1.0.0"
@@ -42,9 +39,9 @@
"deprecated": false,
"description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
"devDependencies": {
- "concat-stream": "^1.4.6",
- "tape": "^2.13.3",
- "through2": "^0.5.1"
+ "concat-stream": "^1.5.2",
+ "tape": "^4.0.0",
+ "through2": "^2.0.0"
},
"homepage": "https://github.com/mafintosh/duplexify",
"keywords": [
@@ -59,8 +56,6 @@
"license": "MIT",
"main": "index.js",
"name": "duplexify",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/duplexify.git"
@@ -68,5 +63,5 @@
"scripts": {
"test": "tape test.js"
},
- "version": "3.5.0"
+ "version": "3.5.4"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/test.js b/deps/npm/node_modules/mississippi/node_modules/duplexify/test.js
index f4856d39ea..4330e93cf0 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/test.js
+++ b/deps/npm/node_modules/mississippi/node_modules/duplexify/test.js
@@ -260,7 +260,6 @@ tape('prefinish not twice', function(t) {
tape('close', function(t) {
var passthrough = through()
var dup = duplexify(passthrough, passthrough)
- var ok = false
passthrough.emit('close')
dup.on('close', function() {
diff --git a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js
index b3a9068634..be426c227c 100644
--- a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js
@@ -39,6 +39,10 @@ var eos = function(stream, opts, callback) {
callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
};
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
var onclose = function() {
if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
@@ -62,7 +66,7 @@ var eos = function(stream, opts, callback) {
stream.on('end', onend);
stream.on('finish', onfinish);
- if (opts.error !== false) stream.on('error', callback);
+ if (opts.error !== false) stream.on('error', onerror);
stream.on('close', onclose);
return function() {
@@ -75,7 +79,7 @@ var eos = function(stream, opts, callback) {
stream.removeListener('finish', onfinish);
stream.removeListener('exit', onexit);
stream.removeListener('end', onend);
- stream.removeListener('error', callback);
+ stream.removeListener('error', onerror);
stream.removeListener('close', onclose);
};
};
diff --git a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/package.json b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/package.json
index 5610bee443..4af362d2b1 100644
--- a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/package.json
@@ -1,7 +1,8 @@
{
"_from": "end-of-stream@^1.1.0",
- "_id": "end-of-stream@1.4.0",
- "_integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=",
+ "_id": "end-of-stream@1.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
"_location": "/mississippi/end-of-stream",
"_phantomChildren": {},
"_requested": {
@@ -16,19 +17,18 @@
},
"_requiredBy": [
"/mississippi",
+ "/mississippi/duplexify",
"/mississippi/pump",
"/mississippi/stream-each"
],
- "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz",
- "_shasum": "7a90d833efda6cfa6eac0f4949dbb0fad3a63206",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43",
"_spec": "end-of-stream@^1.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Mathias Buus",
"email": "mathiasbuus@gmail.com"
},
- "bin": null,
"bugs": {
"url": "https://github.com/mafintosh/end-of-stream/issues"
},
@@ -38,7 +38,6 @@
},
"deprecated": false,
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
- "devDependencies": {},
"files": [
"index.js"
],
@@ -55,8 +54,6 @@
"license": "MIT",
"main": "index.js",
"name": "end-of-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/end-of-stream.git"
@@ -64,5 +61,5 @@
"scripts": {
"test": "node test.js"
},
- "version": "1.4.0"
+ "version": "1.4.1"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/mississippi/node_modules/pump/README.md
index 5029b27d68..4c81471a0e 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/README.md
+++ b/deps/npm/node_modules/mississippi/node_modules/pump/README.md
@@ -47,6 +47,15 @@ pump(source, transform, anotherTransform, dest, function(err) {
If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do:
+
+```
+return pump(s1, s2) // returns s2
+```
+
+If you want to return a stream that combines *both* s1 and s2 to a single stream use
+[pumpify](https://github.com/mafintosh/pumpify) instead.
+
## License
MIT
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/mississippi/node_modules/pump/index.js
index 060ce5f4fd..c15059f176 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/pump/index.js
@@ -3,12 +3,14 @@ var eos = require('end-of-stream')
var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
var isFn = function (fn) {
return typeof fn === 'function'
}
var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
if (!fs) return false // browser
return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
}
@@ -37,7 +39,7 @@ var destroyer = function (stream, reading, writing, callback) {
if (destroyed) return
destroyed = true
- if (isFS(stream)) return stream.close() // use close for fs streams to avoid fd leaks
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
if (isFn(stream.destroy)) return stream.destroy()
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/mississippi/node_modules/pump/package.json
index 2ec8b797bc..6e62ee06cd 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/pump/package.json
@@ -1,33 +1,31 @@
{
- "_from": "pump@^1.0.0",
- "_id": "pump@1.0.2",
- "_integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=",
+ "_from": "pump@^3.0.0",
+ "_id": "pump@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"_location": "/mississippi/pump",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "pump@^1.0.0",
+ "raw": "pump@^3.0.0",
"name": "pump",
"escapedName": "pump",
- "rawSpec": "^1.0.0",
+ "rawSpec": "^3.0.0",
"saveSpec": null,
- "fetchSpec": "^1.0.0"
+ "fetchSpec": "^3.0.0"
},
"_requiredBy": [
- "/mississippi",
- "/mississippi/pumpify"
+ "/mississippi"
],
- "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz",
- "_shasum": "3b3ee6512f94f0e575538c17995f9f16990a5d51",
- "_shrinkwrap": null,
- "_spec": "pump@^1.0.0",
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "_shasum": "b4a2116815bde2f4e1ea602354e8c75565107a64",
+ "_spec": "pump@^3.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Mathias Buus Madsen",
"email": "mathiasbuus@gmail.com"
},
- "bin": null,
"browser": {
"fs": false
},
@@ -41,7 +39,6 @@
},
"deprecated": false,
"description": "pipe streams together and close all of them if one of them closes",
- "devDependencies": {},
"homepage": "https://github.com/mafintosh/pump#readme",
"keywords": [
"streams",
@@ -51,14 +48,12 @@
],
"license": "MIT",
"name": "pump",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/pump.git"
},
"scripts": {
- "test": "node test.js"
+ "test": "node test-browser.js && node test-node.js"
},
- "version": "1.0.2"
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js
index 80e852c7dc..9a06c8a4cc 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js
+++ b/deps/npm/node_modules/mississippi/node_modules/pump/test-browser.js
@@ -30,7 +30,10 @@ var rsClosed = false
var callbackCalled = false
var check = function () {
- if (wsClosed && rsClosed && callbackCalled) console.log('done')
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
}
ws.on('finish', function () {
@@ -43,16 +46,21 @@ rs.on('end', function () {
check()
})
-pump(rs, toHex(), toHex(), toHex(), ws, function () {
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
callbackCalled = true
check()
})
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
setTimeout(function () {
rs.push(null)
rs.emit('close')
}, 1000)
-setTimeout(function () {
- if (!check()) throw new Error('timeout')
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
}, 5000)
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/test-node.js b/deps/npm/node_modules/mississippi/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..561251a082
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/index.js b/deps/npm/node_modules/mississippi/node_modules/pumpify/index.js
index 147de675c3..45bb987e85 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pumpify/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/index.js
@@ -53,3 +53,4 @@ var define = function(opts) {
module.exports = define({destroy:false})
module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16})
+module.exports.ctor = define
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
new file mode 100644
index 0000000000..d9ca0335cb
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
new file mode 100644
index 0000000000..ebd36d7415
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "pump@^2.0.0",
+ "_id": "pump@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+ "_location": "/mississippi/pumpify/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^2.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
+ "_spec": "pump@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/pumpify",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "2.0.1"
+}
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..75ea4a292e
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
@@ -0,0 +1,62 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..034a65414d
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res) {
+ process.exit(1)
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/package.json b/deps/npm/node_modules/mississippi/node_modules/pumpify/package.json
index 8bb5cbd0c9..f2be43f0b9 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pumpify/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/package.json
@@ -1,7 +1,8 @@
{
"_from": "pumpify@^1.3.3",
- "_id": "pumpify@1.3.5",
- "_integrity": "sha1-G2ccYZlAq8rqwK0OOjwWS+dgmTs=",
+ "_id": "pumpify@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
"_location": "/mississippi/pumpify",
"_phantomChildren": {},
"_requested": {
@@ -17,29 +18,27 @@
"_requiredBy": [
"/mississippi"
],
- "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.3.5.tgz",
- "_shasum": "1b671c619940abcaeac0ad0e3a3c164be760993b",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+ "_shasum": "80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb",
"_spec": "pumpify@^1.3.3",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Mathias Buus"
},
- "bin": null,
"bugs": {
"url": "https://github.com/mafintosh/pumpify/issues"
},
"bundleDependencies": false,
"dependencies": {
- "duplexify": "^3.1.2",
- "inherits": "^2.0.1",
- "pump": "^1.0.0"
+ "duplexify": "^3.5.3",
+ "inherits": "^2.0.3",
+ "pump": "^2.0.0"
},
"deprecated": false,
"description": "Combine an array of streams into a single duplex stream using pump and duplexify",
"devDependencies": {
- "tape": "^2.13.3",
- "through2": "^0.5.1"
+ "tape": "^4.8.0",
+ "through2": "^2.0.3"
},
"homepage": "https://github.com/mafintosh/pumpify",
"keywords": [
@@ -54,8 +53,6 @@
"license": "MIT",
"main": "index.js",
"name": "pumpify",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/pumpify.git"
@@ -63,5 +60,5 @@
"scripts": {
"test": "tape test.js"
},
- "version": "1.3.5"
+ "version": "1.4.0"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/pumpify/test.js b/deps/npm/node_modules/mississippi/node_modules/pumpify/test.js
index 4ee91c5f3e..de6b16e346 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pumpify/test.js
+++ b/deps/npm/node_modules/mississippi/node_modules/pumpify/test.js
@@ -160,4 +160,22 @@ tape('early destroy', function(t) {
setTimeout(function() {
pipeline.setPipeline(a, b, c)
}, 100)
-}) \ No newline at end of file
+})
+
+tape('preserves error', function (t) {
+ var a = through()
+ var b = through(function (data, enc, cb) {
+ cb(new Error('stop'))
+ })
+ var c = through()
+ var s = pumpify()
+
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ s.setPipeline(a, b, c)
+ s.resume()
+ s.write('hi')
+})
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
index 2c07e957a3..7e67f7337a 100644
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
@@ -8,6 +8,7 @@ function each (stream, fn, cb) {
var error = null
var ended = false
var running = false
+ var calling = false
stream.on('readable', onreadable)
onreadable()
@@ -35,20 +36,23 @@ function each (stream, fn, cb) {
return
}
if (ended) return cb(error)
- read()
+ if (!calling) read()
}
function read () {
- if (ended || running) return
- want = false
-
- var data = shift(stream)
- if (!data) {
- want = true
- return
+ while (!running && !ended) {
+ want = false
+
+ var data = shift(stream)
+ if (data === null) {
+ want = true
+ return
+ }
+
+ running = true
+ calling = true
+ fn(data, afterRead)
+ calling = false
}
-
- running = true
- fn(data, afterRead)
}
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
index 39f4cd01f4..49b4df18e1 100644
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
@@ -1,7 +1,8 @@
{
"_from": "stream-each@^1.1.0",
- "_id": "stream-each@1.2.0",
- "_integrity": "sha1-HpXUdXP1gNgU3A/4zQ9m8c5TyZE=",
+ "_id": "stream-each@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
"_location": "/mississippi/stream-each",
"_phantomChildren": {},
"_requested": {
@@ -17,16 +18,14 @@
"_requiredBy": [
"/mississippi"
],
- "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.0.tgz",
- "_shasum": "1e95d47573f580d814dc0ff8cd0f66f1ce53c991",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+ "_shasum": "8e8c463f91da8991778765873fe4d960d8f616bd",
"_spec": "stream-each@^1.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
"author": {
"name": "Mathias Buus",
"url": "@mafintosh"
},
- "bin": null,
"bugs": {
"url": "https://github.com/mafintosh/stream-each/issues"
},
@@ -46,8 +45,6 @@
"license": "MIT",
"main": "index.js",
"name": "stream-each",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/mafintosh/stream-each.git"
@@ -55,5 +52,5 @@
"scripts": {
"test": "standard && tape test.js"
},
- "version": "1.2.0"
+ "version": "1.2.2"
}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js
index 36454c45eb..277634cd05 100644
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js
@@ -80,3 +80,43 @@ tape('each error and callback', function (t) {
t.end()
})
})
+
+tape('each with falsey values', function (t) {
+ var s = through.obj()
+ s.write(0)
+ s.write(false)
+ s.write(undefined)
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = [0, false]
+ var count = 0
+ each(s, function (data, next) {
+ count++
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.same(count, 2)
+ })
+})
+
+tape('huge stack', function (t) {
+ var s = through.obj()
+
+ for (var i = 0; i < 5000; i++) {
+ s.write('foo')
+ }
+
+ s.end()
+
+ each(s, function (data, cb) {
+ if (data !== 'foo') t.fail('bad data')
+ cb()
+ }, function (err) {
+ t.error(err, 'no error')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/mississippi/package.json b/deps/npm/node_modules/mississippi/package.json
index 1e6d2ab81f..7cb47a7cd5 100644
--- a/deps/npm/node_modules/mississippi/package.json
+++ b/deps/npm/node_modules/mississippi/package.json
@@ -1,39 +1,35 @@
{
- "_from": "mississippi@~1.3.0",
- "_id": "mississippi@1.3.0",
- "_integrity": "sha1-0gFYPrEjJ+PFwWQqQEqcrPlONPU=",
+ "_from": "mississippi@3.0.0",
+ "_id": "mississippi@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
"_location": "/mississippi",
"_phantomChildren": {
"inherits": "2.0.3",
"once": "1.4.0",
- "readable-stream": "2.2.9",
- "wrappy": "1.0.2"
+ "readable-stream": "2.3.5"
},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "mississippi@~1.3.0",
+ "raw": "mississippi@3.0.0",
"name": "mississippi",
"escapedName": "mississippi",
- "rawSpec": "~1.3.0",
+ "rawSpec": "3.0.0",
"saveSpec": null,
- "fetchSpec": "~1.3.0"
+ "fetchSpec": "3.0.0"
},
"_requiredBy": [
- "/",
- "/cacache",
- "/pacote",
- "/pacote/make-fetch-happen"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.0.tgz",
- "_shasum": "d201583eb12327e3c5c1642a404a9cacf94e34f5",
- "_shrinkwrap": null,
- "_spec": "mississippi@~1.3.0",
+ "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
+ "_shasum": "ea0a3291f97e0b5e8776b363d5f0a12d94c67022",
+ "_spec": "mississippi@3.0.0",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "max ogden"
},
- "bin": null,
"bugs": {
"url": "https://github.com/maxogden/mississippi/issues"
},
@@ -45,7 +41,7 @@
"flush-write-stream": "^1.0.0",
"from2": "^2.1.0",
"parallel-transform": "^1.1.0",
- "pump": "^1.0.0",
+ "pump": "^3.0.0",
"pumpify": "^1.3.3",
"stream-each": "^1.1.0",
"through2": "^2.0.0"
@@ -53,12 +49,13 @@
"deprecated": false,
"description": "a collection of useful streams",
"devDependencies": {},
+ "engines": {
+ "node": ">=4.0.0"
+ },
"homepage": "https://github.com/maxogden/mississippi#readme",
"license": "BSD-2-Clause",
"main": "index.js",
"name": "mississippi",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/maxogden/mississippi.git"
@@ -66,5 +63,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
- "version": "1.3.0"
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/mississippi/readme.md b/deps/npm/node_modules/mississippi/readme.md
index 569803865c..5fa6d66c89 100644
--- a/deps/npm/node_modules/mississippi/readme.md
+++ b/deps/npm/node_modules/mississippi/readme.md
@@ -74,7 +74,7 @@ var split = require('split2')
var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
-var each = miss.each(pipeline, eachLine, done)
+miss.each(pipeline, eachLine, done)
var sum = 0
function eachLine (line, next) {
@@ -94,6 +94,8 @@ function done (err) {
Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
+If you are pumping object streams together use `pipeline = miss.pipeline.obj(s1, s2, ...)`.
+
If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
#### original module
@@ -154,7 +156,7 @@ var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
### through
-#####`var transformer = miss.through([options, transformFunction, flushFunction])`
+##### `var transformer = miss.through([options, transformFunction, flushFunction])`
Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
@@ -194,7 +196,7 @@ miss.pipe(read, uppercaser, write, function (err) {
### from
-#####`miss.from([opts], read)`
+##### `miss.from([opts], read)`
Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
@@ -237,17 +239,17 @@ fromString('hello world').pipe(process.stdout)
### to
-#####`miss.to([options], write, [flush])`
+##### `miss.to([options], write, [flush])`
Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
-`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.to.obj([...])`).
+`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
- `data` is the received data to write the destination.
- `enc` encoding of the piece of data received.
-- `next(err, chunk)` should be called when you're ready to write more data, or encountered an error.
+- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
@@ -291,7 +293,7 @@ finished
### concat
-#####`var concat = miss.concat(cb)`
+##### `var concat = miss.concat(cb)`
Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
@@ -307,13 +309,18 @@ Note that `miss.concat` will not handle stream errors for you. To handle errors,
```js
var fs = require('fs')
-var concat = require('concat-stream')
var readStream = fs.createReadStream('cat.png')
-var concatStream = concat(gotPicture)
+var concatStream = miss.concat(gotPicture)
+
+function callback (err) {
+ if (err) {
+ console.error(err)
+ process.exit(1)
+ }
+}
-readStream.on('error', handleError)
-readStream.pipe(concatStream)
+miss.pipe(readStream, concatStream, callback)
function gotPicture(imageBuffer) {
// imageBuffer is all of `cat.png` as a node.js Buffer
@@ -328,7 +335,7 @@ function handleError(err) {
### finished
-#####`miss.finished(stream, cb)`
+##### `miss.finished(stream, cb)`
Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
@@ -354,7 +361,7 @@ miss.finished(copyDest, function(err) {
### parallel
-#####`miss.parallel(concurrency, each)`
+##### `miss.parallel(concurrency, each)`
This works like `through` except you can process items in parallel, while still preserving the original input order.
@@ -392,3 +399,13 @@ miss.pipe(
})
)
```
+
+## see also
+
+- [substack/stream-handbook](https://github.com/substack/stream-handbook)
+- [nodejs.org/api/stream.html](https://nodejs.org/api/stream.html)
+- [awesome-nodejs-streams](https://github.com/thejmazz/awesome-nodejs-streams)
+
+## license
+
+Licensed under the BSD 2-clause license.
diff --git a/deps/npm/node_modules/node-gyp/.jshintrc b/deps/npm/node_modules/node-gyp/.jshintrc
deleted file mode 100644
index 52475ba2e6..0000000000
--- a/deps/npm/node_modules/node-gyp/.jshintrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "asi": true,
- "laxcomma": true,
- "es5": true,
- "node": true,
- "strict": false
-}
diff --git a/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md b/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md
index 84effd0a30..f6e6e1e12d 100644
--- a/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-lifecycle/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="2.0.1"></a>
+## [2.0.1](https://github.com/npm/lifecycle/compare/v2.0.0...v2.0.1) (2018-03-08)
+
+
+### Bug Fixes
+
+* **log:** Fix formatting of invalid wd warning ([#12](https://github.com/npm/lifecycle/issues/12)) ([ced38f3](https://github.com/npm/lifecycle/commit/ced38f3))
+
+
+
<a name="2.0.0"></a>
# [2.0.0](https://github.com/npm/lifecycle/compare/v1.0.3...v2.0.0) (2017-11-17)
diff --git a/deps/npm/node_modules/npm-lifecycle/index.js b/deps/npm/node_modules/npm-lifecycle/index.js
index 040269be40..ad3152bd94 100644
--- a/deps/npm/node_modules/npm-lifecycle/index.js
+++ b/deps/npm/node_modules/npm-lifecycle/index.js
@@ -53,9 +53,7 @@ function lifecycle (pkg, stage, wd, opts) {
if ((wd.indexOf(opts.dir) !== 0 || _incorrectWorkingDirectory(wd, pkg)) &&
!opts.unsafePerm && pkg.scripts[stage]) {
- opts.log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd',
- '%s %s (wd=%s)', pkg._id, pkg.scripts[stage], wd
- )
+ opts.log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd', pkg._id, pkg.scripts[stage], `(wd=${wd})`)
return resolve()
}
diff --git a/deps/npm/node_modules/node-gyp/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/.npmignore
index 6748492014..6748492014 100644
--- a/deps/npm/node_modules/node-gyp/.npmignore
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/.npmignore
diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/CHANGELOG.md
index 70aca6bc9e..9a56013dae 100644
--- a/deps/npm/node_modules/node-gyp/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/CHANGELOG.md
@@ -92,7 +92,7 @@ v3.2.0 2015-11-25
* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755)
* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753)
* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766)
-* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton)
+* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton)
v3.1.0 2015-11-14
=================
diff --git a/deps/npm/node_modules/node-gyp/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/LICENSE
index 2ea4dc5efb..2ea4dc5efb 100644
--- a/deps/npm/node_modules/node-gyp/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/README.md
index a5c1325c71..a5c1325c71 100644
--- a/deps/npm/node_modules/node-gyp/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/README.md
diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/addon.gypi
index f2f6a7925e..f2f6a7925e 100644
--- a/deps/npm/node_modules/node-gyp/addon.gypi
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/addon.gypi
diff --git a/deps/npm/node_modules/node-gyp/bin/node-gyp.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js
index 70d7d50262..70d7d50262 100755
--- a/deps/npm/node_modules/node-gyp/bin/node-gyp.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js
diff --git a/deps/npm/node_modules/node-gyp/gyp/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/.npmignore
index 0d20b6487c..0d20b6487c 100644
--- a/deps/npm/node_modules/node-gyp/gyp/.npmignore
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/.npmignore
diff --git a/deps/npm/node_modules/node-gyp/gyp/AUTHORS b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/AUTHORS
index fecf84a1c4..fecf84a1c4 100644
--- a/deps/npm/node_modules/node-gyp/gyp/AUTHORS
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/AUTHORS
diff --git a/deps/npm/node_modules/node-gyp/gyp/DEPS b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/DEPS
index 2e1120f274..2e1120f274 100644
--- a/deps/npm/node_modules/node-gyp/gyp/DEPS
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/DEPS
diff --git a/deps/npm/node_modules/node-gyp/gyp/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/LICENSE
index ab6b011a10..ab6b011a10 100644
--- a/deps/npm/node_modules/node-gyp/gyp/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/gyp/OWNERS b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/OWNERS
index 72e8ffc0db..72e8ffc0db 100644
--- a/deps/npm/node_modules/node-gyp/gyp/OWNERS
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/OWNERS
diff --git a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/PRESUBMIT.py
index dde025383c..dde025383c 100644
--- a/deps/npm/node_modules/node-gyp/gyp/PRESUBMIT.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/PRESUBMIT.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml
index bd73b303c6..bd73b303c6 100644
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/aosp_manifest.xml
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
index 9a2b71f1b3..9a2b71f1b3 100755
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS
index b269c198b4..b269c198b4 100644
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/OWNERS
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/README
index 9428497883..9428497883 100644
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/README
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/README
diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json
index 656c21e54f..656c21e54f 100644
--- a/deps/npm/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/commit_queue/cq_config.json
diff --git a/deps/npm/node_modules/node-gyp/gyp/codereview.settings b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/codereview.settings
index faf37f1145..faf37f1145 100644
--- a/deps/npm/node_modules/node-gyp/gyp/codereview.settings
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/codereview.settings
diff --git a/deps/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
index 8bca510815..8bca510815 100644
--- a/deps/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp
index 1b8b9bdfb0..1b8b9bdfb0 100755
--- a/deps/npm/node_modules/node-gyp/gyp/gyp
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp
diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp.bat b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp.bat
index c0b4ca24e5..ad797c3081 100644
--- a/deps/npm/node_modules/node-gyp/gyp/gyp.bat
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp.bat
@@ -1,5 +1,5 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python "%~dp0gyp_main.py" %*
+@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python "%~dp0gyp_main.py" %*
diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py
index 25a6eba94a..25a6eba94a 100755
--- a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/gyptest.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyptest.py
index 8e4fc47d5c..8e4fc47d5c 100755
--- a/deps/npm/node_modules/node-gyp/gyp/gyptest.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyptest.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
index 593f0e5b0b..593f0e5b0b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
index db1ceede34..db1ceede34 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
index 4985756bdd..4985756bdd 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
index bf6ea6b802..bf6ea6b802 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
index 74e529a17f..74e529a17f 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
index 6c07e9a893..6c07e9a893 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
index 0b32e91180..0b32e91180 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
index d9bfa684fa..d9bfa684fa 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
index 668f38b60d..668f38b60d 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common.py
index 256e3f3a6b..256e3f3a6b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
index ad6f9a1438..ad6f9a1438 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
index 2b0bb60cb4..b71e9d4e8a 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
@@ -115,7 +115,7 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
xml_string = XmlToString(content, encoding, pretty)
if win32 and os.linesep != '\r\n':
xml_string = xml_string.replace('\n', '\r\n')
-
+
try:
xml_string = xml_string.encode(encoding)
except Exception:
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
index df64354982..df64354982 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
index b38d8660f7..b38d8660f7 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
index 921c1a6b71..921c1a6b71 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
index 5b26cc785a..5b26cc785a 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
index 17f5e6396c..17f5e6396c 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
index 160eafe2ef..160eafe2ef 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
index 3544347b3b..f4c7c12f59 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
@@ -422,4 +422,3 @@ def GenerateOutput(target_list, target_dicts, data, params):
for config_name in config_names:
GenerateOutputForConfig(target_list, target_dicts, data, params,
config_name)
-
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
index 3efdb9966a..3efdb9966a 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
index bd405f43a9..bd405f43a9 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
index 64b9dd267b..64b9dd267b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
index 6bfad0f3bd..6bfad0f3bd 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
index c0b021df50..c0b021df50 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
index 841067ed34..841067ed34 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
index 1767b2f45a..1767b2f45a 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
index 0e3fb9301e..0e3fb9301e 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
index 260324a43f..260324a43f 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py
index 7567d0a05b..7567d0a05b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
index 4234fbb830..4234fbb830 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
index eeeaceb0c7..eeeaceb0c7 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
index ca67b122f0..ca67b122f0 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
index d2948f06c0..d2948f06c0 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
index a1e89f9199..fd6b7276be 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
@@ -286,4 +286,3 @@ class OrderedDict(dict):
def viewitems(self):
"od.viewitems() -> a set-like object providing a view on od's items"
return ItemsView(self)
-
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
index 74c98c5a79..74c98c5a79 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
index bb6f1ea436..bb6f1ea436 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
index b06bdc4e8b..b06bdc4e8b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
index 3820d6bf04..3820d6bf04 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
index d08b7f7770..d08b7f7770 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
index 5de848158d..5de848158d 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/samples/samples b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples
index 804b618998..804b618998 100755
--- a/deps/npm/node_modules/node-gyp/gyp/samples/samples
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples
diff --git a/deps/npm/node_modules/node-gyp/gyp/samples/samples.bat b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples.bat
index 778d9c90f0..568325565c 100644
--- a/deps/npm/node_modules/node-gyp/gyp/samples/samples.bat
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/samples/samples.bat
@@ -1,5 +1,5 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python %~dp0/samples %*
+@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python %~dp0/samples %*
diff --git a/deps/npm/node_modules/node-gyp/gyp/setup.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/setup.py
index 75a42558d8..75a42558d8 100755
--- a/deps/npm/node_modules/node-gyp/gyp/setup.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/setup.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/README b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/README
index 712e4efbb7..712e4efbb7 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/README
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/README
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/README
index 2492a2c2f8..2492a2c2f8 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/README
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
index 85e2e268a5..85e2e268a5 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
index 3b3506d319..ab1312e6ee 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
@@ -2,7 +2,7 @@
Copyright (c) 2011 Google Inc. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-
+
gyp.xclangspec
GYP language specification for Xcode 3
@@ -35,9 +35,9 @@
{
Identifier = "xcode.lang.gyp.target.declarator";
Syntax = {
- Words = (
- "'target_name'",
- );
+ Words = (
+ "'target_name'",
+ );
Type = "xcode.syntax.identifier.type";
};
},
@@ -54,12 +54,12 @@
End = "'";
};
},
-
+
{
Identifier = "xcode.lang.gyp.comma";
Syntax = {
Words = ( ",", );
-
+
};
},
@@ -107,14 +107,14 @@
Syntax = {
Tokenizer = "xcode.lang.gyp.lexer";
Rules = (
- "xcode.lang.gyp.assignment.lhs",
- ":",
+ "xcode.lang.gyp.assignment.lhs",
+ ":",
"xcode.lang.gyp.assignment.rhs",
);
};
-
+
},
-
+
{
Identifier = "xcode.lang.gyp.target.declaration";
Syntax = {
@@ -126,7 +126,7 @@
);
};
},
-
+
{
Identifier = "xcode.lang.gyp.target.name";
Syntax = {
@@ -134,27 +134,27 @@
Rules = (
"xcode.lang.gyp.string.singlequote",
);
- Type = "xcode.syntax.definition.function";
+ Type = "xcode.syntax.definition.function";
};
},
-
+
{
Identifier = "xcode.lang.gyp.assignment.lhs";
Syntax = {
Tokenizer = "xcode.lang.gyp.lexer";
Rules = (
- "xcode.lang.gyp.string.singlequote",
+ "xcode.lang.gyp.string.singlequote",
);
- Type = "xcode.syntax.identifier.type";
+ Type = "xcode.syntax.identifier.type";
};
},
-
+
{
Identifier = "xcode.lang.gyp.assignment.rhs";
Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
+ Tokenizer = "xcode.lang.gyp.lexer";
Rules = (
- "xcode.lang.gyp.string.singlequote?",
+ "xcode.lang.gyp.string.singlequote?",
"xcode.lang.gyp.array?",
"xcode.lang.gyp.dictionary?",
"xcode.lang.number?",
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/README b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/README
index eeef39f41b..eeef39f41b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/README
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/README
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el
index 11b8497886..11b8497886 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp.el
index b98b155ced..b98b155ced 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/gyp.el
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh
index 6e62b9b28c..6e62b9b28c 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
index 29300fe1b8..29300fe1b8 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified
index 962b7b2c43..962b7b2c43 100644
--- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/graphviz.py
index 326ae221cf..326ae221cf 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/graphviz.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_gyp.py
index c51d35872c..c51d35872c 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_gyp.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_sln.py
index ca8cf4ad3f..ca8cf4ad3f 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_sln.py
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
index 6099bd7cc4..6099bd7cc4 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
diff --git a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/Find-VS2017.cs
index 87e0a9c9bb..87e0a9c9bb 100644
--- a/deps/npm/node_modules/node-gyp/lib/Find-VS2017.cs
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/Find-VS2017.cs
diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js
index 0445fb6452..0445fb6452 100644
--- a/deps/npm/node_modules/node-gyp/lib/build.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js
diff --git a/deps/npm/node_modules/node-gyp/lib/clean.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/clean.js
index e69164d45a..e69164d45a 100644
--- a/deps/npm/node_modules/node-gyp/lib/clean.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/clean.js
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js
index 1351576d12..1351576d12 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js
diff --git a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-node-directory.js
index 3aee8a109a..3aee8a109a 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-node-directory.js
diff --git a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-vs2017.js
index 8c79e9ec9b..8c79e9ec9b 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-vs2017.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/find-vs2017.js
diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/install.js
index fa2e1c5430..fa2e1c5430 100644
--- a/deps/npm/node_modules/node-gyp/lib/install.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/install.js
diff --git a/deps/npm/node_modules/node-gyp/lib/list.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/list.js
index 9d680a56a4..9d680a56a4 100644
--- a/deps/npm/node_modules/node-gyp/lib/list.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/list.js
diff --git a/deps/npm/node_modules/node-gyp/lib/node-gyp.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/node-gyp.js
index a841161e32..0dcea7298f 100644
--- a/deps/npm/node_modules/node-gyp/lib/node-gyp.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/node-gyp.js
@@ -213,4 +213,3 @@ Object.defineProperty(proto, 'version', {
}
, enumerable: true
})
-
diff --git a/deps/npm/node_modules/node-gyp/lib/process-release.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/process-release.js
index 0d177f1c93..f9ba98f199 100644
--- a/deps/npm/node_modules/node-gyp/lib/process-release.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/process-release.js
@@ -9,7 +9,7 @@ var semver = require('semver')
, bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should
// have been "x86"
-// Captures all the logic required to determine download URLs, local directory and
+// Captures all the logic required to determine download URLs, local directory and
// file names. Inputs come from command-line switches (--target, --dist-url),
// `process.version` and `process.release` where it exists.
function processRelease (argv, gyp, defaultVersion, defaultRelease) {
diff --git a/deps/npm/node_modules/node-gyp/lib/rebuild.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/rebuild.js
index 4c6f472aa7..4c6f472aa7 100644
--- a/deps/npm/node_modules/node-gyp/lib/rebuild.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/rebuild.js
diff --git a/deps/npm/node_modules/node-gyp/lib/remove.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/remove.js
index eb80981b88..eb80981b88 100644
--- a/deps/npm/node_modules/node-gyp/lib/remove.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/remove.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.npmignore
index 494272a81a..494272a81a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.npmignore
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.travis.yml
index 9f5972ab5a..9f5972ab5a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/.travis.yml
diff --git a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/mississippi/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/README.md
index 9d8cb77e5c..9d8cb77e5c 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js
index 83dadef8a6..83dadef8a6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/pipe.js
index 3de42ef32b..3de42ef32b 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/pipe.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/reader.js
index 19affbe7e6..19affbe7e6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js
index 19e81eea9f..19e81eea9f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/fstream.js
index c0eb3bea78..c0eb3bea78 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/fstream.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/abstract.js
index 97c120e1d5..97c120e1d5 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/abstract.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/collect.js
index e5d4f35833..e5d4f35833 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/collect.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js
index 820cdc85a8..820cdc85a8 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js
index ec50dca900..ec50dca900 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js
index baa01f4b3d..baa01f4b3d 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js
index 4c803d8d68..4c803d8d68 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/get-type.js
index 19f6a657db..19f6a657db 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/get-type.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js
index fb4cc67a98..fb4cc67a98 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js
index af54284008..af54284008 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js
index 4f431c9d9e..4f431c9d9e 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js
index a6544621bf..a6544621bf 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/reader.js
index be4f570eeb..be4f570eeb 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js
index e0456ba890..e0456ba890 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/writer.js
index 140e449e06..140e449e06 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/lib/writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/package.json
index 5ac16f546b..92e06be562 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/fstream/package.json
@@ -3,7 +3,7 @@
"_id": "fstream@1.0.11",
"_inBundle": false,
"_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
- "_location": "/node-gyp/fstream",
+ "_location": "/npm-lifecycle/node-gyp/fstream",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,13 +16,13 @@
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
- "/node-gyp",
- "/node-gyp/tar"
+ "/npm-lifecycle/node-gyp",
+ "/npm-lifecycle/node-gyp/tar"
],
"_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
"_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171",
"_spec": "fstream@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/README.md
index ad72b8133e..ad72b8133e 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/minimatch.js
index 5b5f8cf444..5b5f8cf444 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/minimatch.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/minimatch.js
diff --git a/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/LICENSE
new file mode 100644
index 0000000000..de3226673c
--- /dev/null
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+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/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md
index ed2ec1fdd7..bbfd3fcb88 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/README.md
@@ -1,6 +1,6 @@
# brace-expansion
-[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
@@ -63,7 +63,7 @@ Valid expansions are:
// {a,b,...}
```
-A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
@@ -98,6 +98,12 @@ npm install brace-expansion
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
+## Sponsors
+
+This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
+
+Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
+
## License
(MIT)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js
index 0478be81ea..2b6f4f85c9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/index.js
@@ -198,4 +198,3 @@ function expand(str, isTop) {
return expansions;
}
-
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
index ae5d8c36ac..ae5d8c36ac 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md
index 2cdc8e4148..2cdc8e4148 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
index 08e918c0db..08e918c0db 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
index 1685a76293..1685a76293 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
index 3e66f4f7df..c8a1dfc7c3 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -3,7 +3,7 @@
"_id": "balanced-match@1.0.0",
"_inBundle": false,
"_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "_location": "/node-gyp/minimatch/brace-expansion/balanced-match",
+ "_location": "/npm-lifecycle/node-gyp/minimatch/brace-expansion/balanced-match",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
- "/node-gyp/minimatch/brace-expansion"
+ "/npm-lifecycle/node-gyp/minimatch/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
"_spec": "balanced-match@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
index f1d0f13c8a..f1d0f13c8a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
index ee27ba4b44..ee27ba4b44 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
index 408f70a1be..408f70a1be 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
index 33656217b6..33656217b6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
index b29a7812e5..b29a7812e5 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
index 76e10c8948..d27e688606 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
@@ -1,8 +1,9 @@
{
"_from": "concat-map@0.0.1",
"_id": "concat-map@0.0.1",
+ "_inBundle": false,
"_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "_location": "/node-gyp/minimatch/brace-expansion/concat-map",
+ "_location": "/npm-lifecycle/node-gyp/minimatch/brace-expansion/concat-map",
"_phantomChildren": {},
"_requested": {
"type": "version",
@@ -15,13 +16,13 @@
"fetchSpec": "0.0.1"
},
"_requiredBy": [
- "/node-gyp/minimatch/brace-expansion"
+ "/npm-lifecycle/node-gyp/minimatch/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"_shrinkwrap": null,
"_spec": "concat-map@0.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
index fdbd7022f6..fdbd7022f6 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json
index 10ec0bbe52..4c6256179c 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -1,9 +1,9 @@
{
"_from": "brace-expansion@^1.1.7",
- "_id": "brace-expansion@1.1.8",
+ "_id": "brace-expansion@1.1.11",
"_inBundle": false,
- "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
- "_location": "/node-gyp/minimatch/brace-expansion",
+ "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "_location": "/npm-lifecycle/node-gyp/minimatch/brace-expansion",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "^1.1.7"
},
"_requiredBy": [
- "/node-gyp/minimatch"
+ "/npm-lifecycle/node-gyp/minimatch"
],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
"_spec": "brace-expansion@^1.1.7",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/minimatch",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
@@ -71,5 +71,5 @@
"android-browser/4.2..latest"
]
},
- "version": "1.1.8"
+ "version": "1.1.11"
}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/package.json
index 3cdb284428..4e2da98f85 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/minimatch/package.json
@@ -3,7 +3,7 @@
"_id": "minimatch@3.0.4",
"_inBundle": false,
"_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "_location": "/node-gyp/minimatch",
+ "_location": "/npm-lifecycle/node-gyp/minimatch",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "^3.0.2"
},
"_requiredBy": [
- "/node-gyp"
+ "/npm-lifecycle/node-gyp"
],
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
"_spec": "minimatch@^3.0.2",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/node-gyp",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.travis.yml
index 99f2bbf506..99f2bbf506 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/.travis.yml
diff --git a/deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/minimatch/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/README.md
index f21a4b31c5..f21a4b31c5 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/bin/nopt.js
index 3232d4c570..3232d4c570 100755
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/bin/nopt.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/examples/my-program.js
index 142447e18e..142447e18e 100755
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/examples/my-program.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/lib/nopt.js
index 97707e7842..97707e7842 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/lib/nopt.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/package.json
index 011e21e0ab..62d2bcafb3 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/package.json
@@ -1,8 +1,9 @@
{
"_from": "nopt@2 || 3",
"_id": "nopt@3.0.6",
+ "_inBundle": false,
"_integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
- "_location": "/node-gyp/nopt",
+ "_location": "/npm-lifecycle/node-gyp/nopt",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -15,13 +16,13 @@
"fetchSpec": "2 || 3"
},
"_requiredBy": [
- "/node-gyp"
+ "/npm-lifecycle/node-gyp"
],
"_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9",
"_shrinkwrap": null,
"_spec": "nopt@2 || 3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/node-gyp",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/test/basic.js
index d399de9209..d399de9209 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/nopt/test/basic.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/README.md
index cbd956549d..cbd956549d 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/bin/semver
index c5f2e857e8..c5f2e857e8 100755
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/bin/semver
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/package.json
index 80f00fe575..8fbdcec9c7 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/package.json
@@ -3,7 +3,7 @@
"_id": "semver@5.3.0",
"_inBundle": false,
"_integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
- "_location": "/node-gyp/semver",
+ "_location": "/npm-lifecycle/node-gyp/semver",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,12 +16,12 @@
"fetchSpec": "~5.3.0"
},
"_requiredBy": [
- "/node-gyp"
+ "/npm-lifecycle/node-gyp"
],
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
"_spec": "semver@~5.3.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/node-gyp",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp",
"bin": {
"semver": "./bin/semver"
},
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/range.bnf
index 25ebd5c832..25ebd5c832 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/range.bnf
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/semver.js
index 5f1a3c5c9e..5f1a3c5c9e 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/semver/semver.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.npmignore
index c167ad5b1c..c167ad5b1c 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.npmignore
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.travis.yml
index fca8ef0194..fca8ef0194 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/.travis.yml
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/LICENSE
index 019b7e40ea..019b7e40ea 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/README.md
index cfda2ac180..cfda2ac180 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/extracter.js
index f6253a72c5..f6253a72c5 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/extracter.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/packer.js
index 039969ce30..039969ce30 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/packer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/reader.js
index 8d113ad30d..8d113ad30d 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/examples/reader.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
index 6c1da2373a..6c1da2373a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
index 8e09042d01..8e09042d01 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry.js
index 5f5dd3c268..5f5dd3c268 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/entry.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
index 1728c4583a..1728c4583a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
index 74f432ceee..74f432ceee 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extract.js
index fe1bb976eb..fe1bb976eb 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/extract.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
index 0bfc7b80aa..0bfc7b80aa 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/header.js
index 3741d5d3f2..3741d5d3f2 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/header.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/pack.js
index 5a3bb95a12..5a3bb95a12 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/pack.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/parse.js
index 600ad782f0..600ad782f0 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/lib/parse.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE
index 74489e2e26..74489e2e26 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md
index c16e9c4688..c16e9c4688 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js
index 008de035c2..008de035c2 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json
index bf449e9633..19895afd9a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json
@@ -5,28 +5,29 @@
"/Users/rebecca/code/npm"
]
],
- "_from": "block-stream@0.0.9",
+ "_from": "block-stream@*",
"_id": "block-stream@0.0.9",
"_inBundle": false,
"_integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
- "_location": "/node-gyp/tar/block-stream",
+ "_location": "/npm-lifecycle/node-gyp/tar/block-stream",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "block-stream@0.0.9",
+ "raw": "block-stream@*",
"name": "block-stream",
"escapedName": "block-stream",
- "rawSpec": "0.0.9",
+ "rawSpec": "*",
"saveSpec": null,
- "fetchSpec": "0.0.9"
+ "fetchSpec": "*"
},
"_requiredBy": [
- "/node-gyp/tar"
+ "/npm-lifecycle/node-gyp/tar"
],
"_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
- "_spec": "0.0.9",
- "_where": "/Users/rebecca/code/npm",
+ "_shasum": "13ebfe778a03205cfe03751481ebb4b3300c126a",
+ "_spec": "block-stream@*",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -35,9 +36,11 @@
"bugs": {
"url": "https://github.com/isaacs/block-stream/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"inherits": "~2.0.0"
},
+ "deprecated": false,
"description": "a stream of blocks",
"devDependencies": {
"tap": "^5.7.1"
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/package.json
index 0cb9624034..50badc2fbb 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/package.json
@@ -5,30 +5,31 @@
"/Users/rebecca/code/npm"
]
],
- "_from": "tar@2.2.1",
+ "_from": "tar@^2.0.0",
"_id": "tar@2.2.1",
"_inBundle": false,
"_integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
- "_location": "/node-gyp/tar",
+ "_location": "/npm-lifecycle/node-gyp/tar",
"_phantomChildren": {
"inherits": "2.0.3"
},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "tar@2.2.1",
+ "raw": "tar@^2.0.0",
"name": "tar",
"escapedName": "tar",
- "rawSpec": "2.2.1",
+ "rawSpec": "^2.0.0",
"saveSpec": null,
- "fetchSpec": "2.2.1"
+ "fetchSpec": "^2.0.0"
},
"_requiredBy": [
- "/node-gyp"
+ "/npm-lifecycle/node-gyp"
],
"_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
- "_spec": "2.2.1",
- "_where": "/Users/rebecca/code/npm",
+ "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1",
+ "_spec": "tar@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -37,11 +38,13 @@
"bugs": {
"url": "https://github.com/isaacs/node-tar/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"block-stream": "*",
"fstream": "^1.0.2",
"inherits": "2"
},
+ "deprecated": false,
"description": "tar for node",
"devDependencies": {
"graceful-fs": "^4.1.2",
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/tar.js
index a81298b9a0..a81298b9a0 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/tar.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
index 1524ff7af0..1524ff7af0 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz
index 9e7014d85a..9e7014d85a 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz
Binary files differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js
index 9719c42f35..9719c42f35 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar
index 3c4845356c..3c4845356c 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar
Binary files differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js
index e484920fd9..e484920fd9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract-move.js
index 45400cd9bb..45400cd9bb 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract-move.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract.js
index eca4e7cc96..eca4e7cc96 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/extract.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
index f1676023af..f1676023af 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
Binary files differ
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/header.js
index 8ea6f79500..8ea6f79500 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/header.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
index d4b03a1fe9..d4b03a1fe9 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack.js
index 0f16c07bb0..0f16c07bb0 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/pack.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse-discard.js
index 79408c274b..79408c274b 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse-discard.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse.js
index f765a50129..f765a50129 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/parse.js
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
index a00ff7faa0..a00ff7faa0 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/package.json
index eb272af664..e778e439b1 100644
--- a/deps/npm/node_modules/node-gyp/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/package.json
@@ -1,30 +1,33 @@
{
- "_from": "node-gyp@~3.6.2",
+ "_from": "node-gyp@^3.6.2",
"_id": "node-gyp@3.6.2",
"_inBundle": false,
"_integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=",
- "_location": "/node-gyp",
+ "_location": "/npm-lifecycle/node-gyp",
"_phantomChildren": {
- "abbrev": "1.1.0"
+ "abbrev": "1.1.1",
+ "graceful-fs": "4.1.11",
+ "inherits": "2.0.3",
+ "mkdirp": "0.5.1",
+ "rimraf": "2.6.2"
},
"_requested": {
"type": "range",
"registry": true,
- "raw": "node-gyp@~3.6.2",
+ "raw": "node-gyp@^3.6.2",
"name": "node-gyp",
"escapedName": "node-gyp",
- "rawSpec": "~3.6.2",
+ "rawSpec": "^3.6.2",
"saveSpec": null,
- "fetchSpec": "~3.6.2"
+ "fetchSpec": "^3.6.2"
},
"_requiredBy": [
- "#USER",
- "/"
+ "/npm-lifecycle"
],
"_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz",
"_shasum": "9bfbe54562286284838e750eac05295853fa1c60",
- "_spec": "node-gyp@~3.6.2",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "node-gyp@^3.6.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-lifecycle",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/src/win_delay_load_hook.cc
index e75954b605..e75954b605 100644
--- a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.cc
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/src/win_delay_load_hook.cc
diff --git a/deps/npm/node_modules/node-gyp/test/docker.sh b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/docker.sh
index ac21aa8d75..ac21aa8d75 100755
--- a/deps/npm/node_modules/node-gyp/test/docker.sh
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/docker.sh
diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/ca-bundle.crt b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca-bundle.crt
index fb1dea98a7..fb1dea98a7 100644
--- a/deps/npm/node_modules/node-gyp/test/fixtures/ca-bundle.crt
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca-bundle.crt
diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca.crt
index 9d2755a74f..9d2755a74f 100644
--- a/deps/npm/node_modules/node-gyp/test/fixtures/ca.crt
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/ca.crt
diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/server.crt b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.crt
index fe13bb96c5..fe13bb96c5 100644
--- a/deps/npm/node_modules/node-gyp/test/fixtures/server.crt
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.crt
diff --git a/deps/npm/node_modules/node-gyp/test/fixtures/server.key b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.key
index f8227f4c0c..f8227f4c0c 100644
--- a/deps/npm/node_modules/node-gyp/test/fixtures/server.key
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/fixtures/server.key
diff --git a/deps/npm/node_modules/node-gyp/test/simple-proxy.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/simple-proxy.js
index e55330c445..e55330c445 100644
--- a/deps/npm/node_modules/node-gyp/test/simple-proxy.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/simple-proxy.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-addon.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-addon.js
index c2a71f4498..c2a71f4498 100644
--- a/deps/npm/node_modules/node-gyp/test/test-addon.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-addon.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-configure-python.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-configure-python.js
index f235bdbba1..f235bdbba1 100644
--- a/deps/npm/node_modules/node-gyp/test/test-configure-python.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-configure-python.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-download.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-download.js
index 6e6f64f058..6e6f64f058 100644
--- a/deps/npm/node_modules/node-gyp/test/test-download.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-download.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-accessible-sync.js
index d336243dd0..d336243dd0 100644
--- a/deps/npm/node_modules/node-gyp/test/test-find-accessible-sync.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-accessible-sync.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-node-directory.js
index 46659d0cfe..46659d0cfe 100644
--- a/deps/npm/node_modules/node-gyp/test/test-find-node-directory.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-node-directory.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-find-python.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-python.js
index 2d9f171c57..2d9f171c57 100644
--- a/deps/npm/node_modules/node-gyp/test/test-find-python.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-find-python.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-options.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-options.js
index d097f81be6..d097f81be6 100644
--- a/deps/npm/node_modules/node-gyp/test/test-options.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-options.js
diff --git a/deps/npm/node_modules/node-gyp/test/test-process-release.js b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-process-release.js
index 48411ae0a7..48411ae0a7 100644
--- a/deps/npm/node_modules/node-gyp/test/test-process-release.js
+++ b/deps/npm/node_modules/npm-lifecycle/node_modules/node-gyp/test/test-process-release.js
diff --git a/deps/npm/node_modules/npm-lifecycle/package.json b/deps/npm/node_modules/npm-lifecycle/package.json
index ffd5f2952f..c4c32bd221 100644
--- a/deps/npm/node_modules/npm-lifecycle/package.json
+++ b/deps/npm/node_modules/npm-lifecycle/package.json
@@ -1,28 +1,40 @@
{
- "_from": "npm-lifecycle@latest",
- "_id": "npm-lifecycle@2.0.0",
+ "_from": "npm-lifecycle@2.0.1",
+ "_id": "npm-lifecycle@2.0.1",
"_inBundle": false,
- "_integrity": "sha512-aE7H012O01GKXT9BWnsGMLVci+MOgkhpSwq02ok20aXcNHxFs7enfampNMkiOV1DJEU0LynzemwdjbtXahXKcw==",
+ "_integrity": "sha512-6CypRO6iNsSfrWOUajeQnesouUgkeh7clByYDORUV6AhwRaGfHYh+5rFdDCIqzmMqomGlyDsSpazthNPG2BAOA==",
"_location": "/npm-lifecycle",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "abbrev": "1.1.1",
+ "glob": "7.1.2",
+ "graceful-fs": "4.1.11",
+ "inherits": "2.0.3",
+ "mkdirp": "0.5.1",
+ "npmlog": "4.1.2",
+ "osenv": "0.1.5",
+ "request": "2.83.0",
+ "rimraf": "2.6.2",
+ "which": "1.3.0"
+ },
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "npm-lifecycle@latest",
+ "raw": "npm-lifecycle@2.0.1",
"name": "npm-lifecycle",
"escapedName": "npm-lifecycle",
- "rawSpec": "latest",
+ "rawSpec": "2.0.1",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "2.0.1"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/libcipm"
],
- "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.0.0.tgz",
- "_shasum": "d66fba59e7098dbb5862df66c0d81ed75108f1c6",
- "_spec": "npm-lifecycle@latest",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-2.0.1.tgz",
+ "_shasum": "897313f05ed24db8e28d99fa8b42c31b625e6237",
+ "_spec": "npm-lifecycle@2.0.1",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Mike Sherov"
},
@@ -79,5 +91,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.0.0"
+ "version": "2.0.1"
}
diff --git a/deps/npm/node_modules/npm-profile/CHANGELOG.md b/deps/npm/node_modules/npm-profile/CHANGELOG.md
new file mode 100644
index 0000000000..0e461412e3
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/CHANGELOG.md
@@ -0,0 +1,28 @@
+# v3.0.1 (2018-02-18)
+
+- Log `npm-notice` headers
+
+# v3.0.0 (2018-02-18)
+
+## BREAKING CHANGES:
+
+- profile.login() and profile.adduser() take 2 functions: opener() and
+ prompter(). opener is used when we get the url couplet from the
+ registry. prompter is used if web-based login fails.
+- Non-200 status codes now always throw. Previously if the `content.error`
+ property was set, `content` would be returned. Content is available on the
+ thrown error object in the `body` property.
+
+## FEATURES:
+
+- The previous adduser is available as adduserCouch
+- The previous login is available as loginCouch
+- New loginWeb and adduserWeb commands added, which take an opener
+ function to open up the web browser.
+- General errors have better error message reporting
+
+## FIXES:
+
+- General errors now correctly include the URL.
+- Missing user errors from Couch are now thrown. (As was always intended.)
+- Many errors have better stacktrace filtering.
diff --git a/deps/npm/node_modules/npm-profile/README.md b/deps/npm/node_modules/npm-profile/README.md
index 001c551cf4..1937e23f72 100644
--- a/deps/npm/node_modules/npm-profile/README.md
+++ b/deps/npm/node_modules/npm-profile/README.md
@@ -16,7 +16,149 @@ The API that this implements is documented here:
## Functions
-### profile.adduser(username, email, password, config) ā†’ Promise
+### profile.adduser(opener, prompter, config) ā†’ Promise
+
+Tries to create a user new web based login, if that fails it falls back to
+using the legacy CouchDB APIs.
+
+* `opener` Function (url) ā†’ Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
+* `prompter` Function (creds) ā†’ Promise, returns a promise that resolves to an object with `username`, `email` and `password` properties.
+* `config` Object
+ * `creds` Object, passed through to prompter, common values are:
+ * `username` String, default value for username
+ * `email` String, default value for email
+ * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
+ * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
+ things like cache, proxy, SSL CA and retry rules.
+
+#### **Promise Value**
+
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
+
+#### **Promise Rejection**
+
+An error object indicating what went wrong.
+
+The `headers` property will contain the HTTP headers of the response.
+
+If the action was denied because it came from an IP address that this action
+on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
+
+Otherwise the code will be `'E'` followed by the HTTP response code, for
+example a Forbidden response would be `E403`.
+
+### profile.login(opener, prompter, config) ā†’ Promise
+
+Tries to login using new web based login, if that fails it falls back to
+using the legacy CouchDB APIs.
+
+* `opener` Function (url) ā†’ Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
+* `prompter` Function (creds) ā†’ Promise, returns a promise that resolves to an object with `username`, and `password` properties.
+* `config` Object
+ * `creds` Object, passed through to prompter, common values are:
+ * `name` String, default value for username
+ * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
+ * `auth` Object, properties: `otp`
+ the one-time password from a two-factor authentication device.
+ * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
+ things like cache, proxy, SSL CA and retry rules.
+
+#### **Promise Value**
+
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
+
+#### **Promise Rejection**
+
+An error object indicating what went wrong.
+
+The `headers` property will contain the HTTP headers of the response.
+
+If the action was denied because an OTP is required then `code` will be set
+to `EOTP`. This error code can only come from a legacy CouchDB login and so
+this should be retried with loginCouch.
+
+If the action was denied because it came from an IP address that this action
+on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
+
+Otherwise the code will be `'E'` followed by the HTTP response code, for
+example a Forbidden response would be `E403`.
+
+### profile.adduserWeb(opener, config) ā†’ Promise
+
+Tries to create a user new web based login, if that fails it falls back to
+using the legacy CouchDB APIs.
+
+* `opener` Function (url) ā†’ Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
+* `config` Object
+ * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
+ * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
+ things like cache, proxy, SSL CA and retry rules.
+
+#### **Promise Value**
+
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
+
+#### **Promise Rejection**
+
+An error object indicating what went wrong.
+
+The `headers` property will contain the HTTP headers of the response.
+
+If the registry does not support web-login then an error will be thrown with
+its `code` property set to `ENYI` . You should retry with `adduserCouch`.
+If you use `adduser` then this fallback will be done automatically.
+
+If the action was denied because it came from an IP address that this action
+on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
+
+Otherwise the code will be `'E'` followed by the HTTP response code, for
+example a Forbidden response would be `E403`.
+
+### profile.loginWeb(opener, config) ā†’ Promise
+
+Tries to login using new web based login, if that fails it falls back to
+using the legacy CouchDB APIs.
+
+* `opener` Function (url) ā†’ Promise, returns a promise that resolves after a browser has been opened for the user at `url`.
+* `config` Object
+ * `registry` String (for reference, the npm registry is `https://registry.npmjs.org`)
+ * `opts` Object, [make-fetch-happen options](https://www.npmjs.com/package/make-fetch-happen#extra-options) for setting
+ things like cache, proxy, SSL CA and retry rules.
+
+#### **Promise Value**
+
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
+
+#### **Promise Rejection**
+
+An error object indicating what went wrong.
+
+The `headers` property will contain the HTTP headers of the response.
+
+If the registry does not support web-login then an error will be thrown with
+its `code` property set to `ENYI` . You should retry with `loginCouch`.
+If you use `login` then this fallback will be done automatically.
+
+
+If the action was denied because it came from an IP address that this action
+on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
+
+Otherwise the code will be `'E'` followed by the HTTP response code, for
+example a Forbidden response would be `E403`.
+
+### profile.adduserCouch(username, email, password, config) ā†’ Promise
```js
profile.adduser(username, email, password, {registry}).then(result => {
@@ -41,7 +183,10 @@ this is registry specific and not guaranteed.
#### **Promise Value**
-An object with a `token` property that can be passed into future authentication requests.
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
#### **Promise Rejection**
@@ -58,7 +203,7 @@ on this account isn't allowed from then the `code` will be set to `EAUTHIP`.
Otherwise the code will be `'E'` followed by the HTTP response code, for
example a Forbidden response would be `E403`.
-### profile.login(username, password, config) ā†’ Promise
+### profile.loginCouch(username, password, config) ā†’ Promise
```js
profile.login(username, password, {registry}).catch(err => {
@@ -88,7 +233,10 @@ future authentication. This is what you use as an `authToken` in an `.npmrc`.
#### **Promise Value**
-An object with a `token` property that can be passed into future authentication requests.
+An object with the following properties:
+
+* `token` String, to be used to authenticate further API calls
+* `username` String, the username the user authenticated as
#### **Promise Rejection**
diff --git a/deps/npm/node_modules/npm-profile/index.js b/deps/npm/node_modules/npm-profile/index.js
index 611200c5f8..f99b631e63 100644
--- a/deps/npm/node_modules/npm-profile/index.js
+++ b/deps/npm/node_modules/npm-profile/index.js
@@ -2,16 +2,123 @@
const fetch = require('make-fetch-happen').defaults({retry: false})
const validate = require('aproba')
const url = require('url')
+const os = require('os')
-exports.adduser = adduser
+exports.adduserCouch = adduserCouch
+exports.loginCouch = loginCouch
+exports.adduserWeb = adduserWeb
+exports.loginWeb = loginWeb
exports.login = login
+exports.adduser = adduser
exports.get = get
exports.set = set
exports.listTokens = listTokens
exports.removeToken = removeToken
exports.createToken = createToken
-function adduser (username, email, password, conf) {
+// try loginWeb, catch the "not supported" message and fall back to couch
+function login (opener, prompter, conf) {
+ validate('FFO', arguments)
+ return loginWeb(opener, conf).catch(er => {
+ if (er instanceof WebLoginNotSupported) {
+ process.emit('log', 'verbose', 'web login not supported, trying couch')
+ return prompter(conf.creds)
+ .then(data => loginCouch(data.username, data.password, conf))
+ } else {
+ throw er
+ }
+ })
+}
+
+function adduser (opener, prompter, conf) {
+ validate('FFO', arguments)
+ return adduserWeb(opener, conf).catch(er => {
+ if (er instanceof WebLoginNotSupported) {
+ process.emit('log', 'verbose', 'web adduser not supported, trying couch')
+ return prompter(conf.creds)
+ .then(data => adduserCouch(data.username, data.email, data.password, conf))
+ } else {
+ throw er
+ }
+ })
+}
+
+function adduserWeb (opener, conf) {
+ validate('FO', arguments)
+ const body = { create: true }
+ process.emit('log', 'verbose', 'web adduser', 'before first POST')
+ return webAuth(opener, conf, body)
+}
+
+function loginWeb (opener, conf) {
+ validate('FO', arguments)
+ process.emit('log', 'verbose', 'web login', 'before first POST')
+ return webAuth(opener, conf, {})
+}
+
+function webAuth (opener, conf, body) {
+ if (!conf.opts) conf.opts = {}
+ const target = url.resolve(conf.registry, '-/v1/login')
+ body.hostname = conf.hostname || os.hostname()
+ return fetchJSON({
+ target: target,
+ method: 'POST',
+ body: body,
+ opts: conf.opts,
+ saveResponse: true
+ }).then(result => {
+ const res = result[0]
+ const content = result[1]
+ process.emit('log', 'verbose', 'web auth', 'got response', content)
+ const doneUrl = content.doneUrl
+ const loginUrl = content.loginUrl
+ if (typeof doneUrl !== 'string' ||
+ typeof loginUrl !== 'string' ||
+ !doneUrl || !loginUrl) {
+ throw new WebLoginInvalidResponse('POST', target, res, content)
+ }
+ process.emit('log', 'verbose', 'web auth', 'opening url pair')
+ const doneConf = {
+ target: doneUrl,
+ method: 'GET',
+ opts: conf.opts,
+ saveResponse: true
+ }
+ return opener(loginUrl).then(() => fetchJSON(doneConf)).then(onDone)
+ function onDone (result) {
+ const res = result[0]
+ const content = result[1]
+ if (res.status === 200) {
+ if (!content.token) {
+ throw new WebLoginInvalidResponse('GET', doneUrl, res, content)
+ } else {
+ return content
+ }
+ } else if (res.status === 202) {
+ const retry = +res.headers.get('retry-after')
+ if (retry > 0) {
+ return new Promise(resolve => setTimeout(resolve, 1000 * retry))
+ .then(() => fetchJSON(doneConf)).then(onDone)
+ } else {
+ return fetchJSON(doneConf).then(onDone)
+ }
+ } else {
+ throw new WebLoginInvalidResponse('GET', doneUrl, res, content)
+ }
+ }
+ }).catch(er => {
+ if (er.statusCode >= 400 && er.statusCode <= 499) {
+ throw new WebLoginNotSupported('POST', target, {
+ status: er.statusCode,
+ headers: { raw: () => er.headers }
+ }, er.body)
+ } else {
+ throw er
+ }
+ })
+}
+
+function adduserCouch (username, email, password, conf) {
validate('SSSO', arguments)
if (!conf.opts) conf.opts = {}
const userobj = {
@@ -32,9 +139,13 @@ function adduser (username, email, password, conf) {
const target = url.resolve(conf.registry, '-/user/org.couchdb.user:' + encodeURIComponent(username))
return fetchJSON({target: target, method: 'PUT', body: userobj, opts: conf.opts})
+ .then(result => {
+ result.username = username
+ return result
+ })
}
-function login (username, password, conf) {
+function loginCouch (username, password, conf) {
validate('SSO', arguments)
const userobj = {
_id: 'org.couchdb.user:' + username,
@@ -52,7 +163,10 @@ function login (username, password, conf) {
const target = url.resolve(conf.registry, '-/user/org.couchdb.user:' + encodeURIComponent(username))
return fetchJSON(Object.assign({method: 'PUT', target: target, body: userobj}, conf)).catch(err => {
- if (err.code === 'E400') err.message = `There is no user with the username "${username}".`
+ if (err.code === 'E400') {
+ err.message = `There is no user with the username "${username}".`
+ throw err
+ }
if (err.code !== 'E409') throw err
return fetchJSON(Object.assign({method: 'GET', target: target + '?write=true'}, conf)).then(result => {
Object.keys(result).forEach(function (k) {
@@ -73,6 +187,9 @@ function login (username, password, conf) {
}
return fetchJSON(Object.assign({}, conf, req))
})
+ }).then(result => {
+ result.username = username
+ return result
})
}
@@ -145,37 +262,59 @@ class HttpErrorBase extends Error {
}
}
-class General extends HttpErrorBase {
+class HttpErrorGeneral extends HttpErrorBase {
+ constructor (method, target, res, body) {
+ super(method, target, res, body)
+ if (body && body.error) {
+ this.message = `Registry returned ${this.statusCode} for ${this.method} on ${this.target}: ${body.error}`
+ } else {
+ this.message = `Registry returned ${this.statusCode} for ${this.method} on ${this.target}`
+ }
+ Error.captureStackTrace(this, HttpErrorGeneral)
+ }
+}
+
+class WebLoginInvalidResponse extends HttpErrorBase {
constructor (method, target, res, body) {
super(method, target, res, body)
- this.message = `Registry returned ${this.statusCode} for ${this.method} on ${this.href}`
+ this.message = 'Invalid response from web login endpoint'
+ Error.captureStackTrace(this, WebLoginInvalidResponse)
}
}
-class AuthOTP extends HttpErrorBase {
+class WebLoginNotSupported extends HttpErrorBase {
+ constructor (method, target, res, body) {
+ super(method, target, res, body)
+ this.message = 'Web login not supported'
+ this.code = 'ENYI'
+ Error.captureStackTrace(this, WebLoginNotSupported)
+ }
+}
+
+class HttpErrorAuthOTP extends HttpErrorBase {
constructor (method, target, res, body) {
super(method, target, res, body)
this.message = 'OTP required for authentication'
this.code = 'EOTP'
- Error.captureStackTrace(this, AuthOTP)
+ Error.captureStackTrace(this, HttpErrorAuthOTP)
}
}
-class AuthIPAddress extends HttpErrorBase {
- constructor (res, body) {
+class HttpErrorAuthIPAddress extends HttpErrorBase {
+ constructor (method, target, res, body) {
super(method, target, res, body)
this.message = 'Login is not allowed from your IP address'
this.code = 'EAUTHIP'
- Error.captureStackTrace(this, AuthIPAddress)
+ Error.captureStackTrace(this, HttpErrorAuthIPAddress)
}
}
-class AuthUnknown extends HttpErrorBase {
+class HttpErrorAuthUnknown extends HttpErrorBase {
constructor (method, target, res, body) {
super(method, target, res, body)
this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
this.code = 'EAUTHIP'
- Error.captureStackTrace(this, AuthIPAddress)
+ Error.captureStackTrace(this, HttpErrorAuthUnknown)
}
}
@@ -201,10 +340,13 @@ function fetchJSON (conf) {
fetchOpts.headers['Content-Type'] = 'application/json'
fetchOpts.body = JSON.stringify(conf.body)
}
- process.emit('log', 'http', 'request', 'ā†’',conf.method || 'GET', conf.target)
+ process.emit('log', 'http', 'request', 'ā†’', conf.method || 'GET', conf.target)
return fetch.defaults(conf.opts || {})(conf.target, fetchOpts).catch(err => {
throw new FetchError(err, conf.method, conf.target)
}).then(res => {
+ if (res.headers.has('npm-notice')) {
+ process.emit('warn', 'notice', res.headers.get('npm-notice'))
+ }
if (res.headers.get('content-type') === 'application/json') {
return res.json().then(content => [res, content])
} else {
@@ -219,24 +361,21 @@ function fetchJSON (conf) {
}).then(result => {
const res = result[0]
const content = result[1]
+ const retVal = conf.saveResponse ? result : content
process.emit('log', 'http', res.status, `ā† ${res.statusText} (${conf.target})`)
if (res.status === 401 && res.headers.get('www-authenticate')) {
const auth = res.headers.get('www-authenticate').split(/,\s*/).map(s => s.toLowerCase())
if (auth.indexOf('ipaddress') !== -1) {
- throw new AuthIPAddress(conf.method, conf.target, res, content)
+ throw new HttpErrorAuthIPAddress(conf.method, conf.target, res, content)
} else if (auth.indexOf('otp') !== -1) {
- throw new AuthOTP(conf.method, conf.target, res, content)
+ throw new HttpErrorAuthOTP(conf.method, conf.target, res, content)
} else {
- throw new AuthUnknown(conf.method, conf.target, res, content)
+ throw new HttpErrorAuthUnknown(conf.method, conf.target, res, content)
}
} else if (res.status < 200 || res.status >= 300) {
- if (typeof content === 'object' && content.error) {
- return content
- } else {
- throw new General(conf.method, conf.target, res, content)
- }
+ throw new HttpErrorGeneral(conf.method, conf.target, res, content)
} else {
- return content
+ return retVal
}
})
}
@@ -257,4 +396,4 @@ function packageName (href) {
} catch (_) {
// this is ok
}
-} \ No newline at end of file
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md
index 59698d1c27..f91df12721 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md
@@ -2,6 +2,21 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="2.6.0"></a>
+# [2.6.0](https://github.com/zkat/make-fetch-happen/compare/v2.5.0...v2.6.0) (2017-11-14)
+
+
+### Bug Fixes
+
+* **integrity:** disable node-fetch compress when checking integrity (#42) ([a7cc74c](https://github.com/zkat/make-fetch-happen/commit/a7cc74c))
+
+
+### Features
+
+* **onretry:** Add `options.onRetry` (#48) ([f90ccff](https://github.com/zkat/make-fetch-happen/commit/f90ccff))
+
+
+
<a name="2.5.0"></a>
# [2.5.0](https://github.com/zkat/make-fetch-happen/compare/v2.4.13...v2.5.0) (2017-08-24)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md
index 7160fa8389..4d12d8dae7 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md
@@ -2,8 +2,8 @@
[`make-fetch-happen`](https://github.com/zkat/make-fetch-happen) is a Node.js
-library that wraps [`node-fetch`](https://npm.im/node-fetch) with additional
-features it doesn't intend to include, including HTTP Cache support, request
+library that wraps [`node-fetch-npm`](https://github.com/npm/node-fetch-npm) with additional
+features [`node-fetch`](https://github.com/bitinn/node-fetch) doesn't intend to include, including HTTP Cache support, request
pooling, proxies, retries, [and more](#features)!
## Install
@@ -27,6 +27,7 @@ pooling, proxies, retries, [and more](#features)!
* [`opts.ca, opts.cert, opts.key`](#https-opts)
* [`opts.maxSockets`](#opts-max-sockets)
* [`opts.retry`](#opts-retry)
+ * [`opts.onRetry`](#opts-onretry)
* [`opts.integrity`](#opts-integrity)
* [Message From Our Sponsors](#wow)
@@ -143,6 +144,7 @@ make-fetch-happen augments the `node-fetch` API with additional features availab
* [`opts.localAddress`](#opts-local-address)
* [`opts.maxSockets`](#opts-max-sockets)
* [`opts.retry`](#opts-retry) - Request retry settings
+* [`opts.onRetry`](#opts-onretry) - a function called whenever a retry is attempted
* [`opts.integrity`](#opts-integrity) - [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata.
#### <a name="opts-cache-manager"></a> `> opts.cacheManager`
@@ -363,6 +365,20 @@ fetch('http://one-more.site.com', {
})
```
+#### <a name="opts-onretry"></a> `> opts.onRetry`
+
+A function called whenever a retry is attempted.
+
+##### Example
+
+```javascript
+fetch('https://flaky.site.com', {
+ onRetry() {
+ console.log('we will retry!')
+ }
+})
+```
+
#### <a name="opts-integrity"></a> `> opts.integrity`
Matches the response body against the given [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) metadata. If verification fails, the request will fail with an `EINTEGRITY` error.
@@ -376,7 +392,7 @@ fetch('https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tg
integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
}) // -> ok
-fetch('https://malicious-registry.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz'. {
+fetch('https://malicious-registry.org/make-fetch-happen/-/make-fetch-happen-1.0.0.tgz', {
integrity: 'sha1-o47j7zAYnedYFn1dF/fR9OV3z8Q='
}) // Error: EINTEGRITY
```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js
index d82811b63d..0f2c164e19 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js
@@ -108,6 +108,8 @@ function cachingFetch (uri, _opts) {
if (opts.integrity) {
initializeSsri()
+ // if verifying integrity, node-fetch must not decompress
+ opts.compress = false
}
const isCachable = (opts.method === 'GET' || opts.method === 'HEAD') &&
@@ -353,6 +355,10 @@ function remoteFetch (uri, opts) {
if (!isMethodGetHead) {
return opts.cacheManager.delete(req).then(() => {
if (res.status >= 500 && req.method !== 'POST' && !isStream) {
+ if (typeof opts.onRetry === 'function') {
+ opts.onRetry(res)
+ }
+
return retryHandler(res)
}
@@ -370,6 +376,10 @@ function remoteFetch (uri, opts) {
)
if (isRetriable) {
+ if (typeof opts.onRetry === 'function') {
+ opts.onRetry(res)
+ }
+
return retryHandler(res)
}
@@ -437,6 +447,10 @@ function remoteFetch (uri, opts) {
throw err
}
+ if (typeof opts.onRetry === 'function') {
+ opts.onRetry(err)
+ }
+
return retryHandler(err)
})
},
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
index 6a522b16b3..72297501f9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
@@ -6,6 +6,7 @@ var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
+var w = d * 7;
var y = d * 365.25;
/**
@@ -49,7 +50,7 @@ function parse(str) {
if (str.length > 100) {
return;
}
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
@@ -64,6 +65,10 @@ function parse(str) {
case 'yr':
case 'y':
return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
case 'days':
case 'day':
case 'd':
@@ -106,16 +111,17 @@ function parse(str) {
*/
function fmtShort(ms) {
- if (ms >= d) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
- if (ms >= h) {
+ if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
- if (ms >= m) {
+ if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
- if (ms >= s) {
+ if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
@@ -130,23 +136,27 @@ function fmtShort(ms) {
*/
function fmtLong(ms) {
- return plural(ms, d, 'day') ||
- plural(ms, h, 'hour') ||
- plural(ms, m, 'minute') ||
- plural(ms, s, 'second') ||
- ms + ' ms';
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
}
/**
* Pluralization helper.
*/
-function plural(ms, n, name) {
- if (ms < n) {
- return;
- }
- if (ms < n * 1.5) {
- return Math.floor(ms / n) + ' ' + name;
- }
- return Math.ceil(ms / n) + ' ' + name + 's';
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
index 298ecd3f2d..620608a335 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
@@ -1,8 +1,8 @@
{
"_from": "ms@^2.0.0",
- "_id": "ms@2.0.0",
+ "_id": "ms@2.1.1",
"_inBundle": false,
- "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"_location": "/npm-profile/make-fetch-happen/agentkeepalive/humanize-ms/ms",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/agentkeepalive/humanize-ms"
],
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a",
"_spec": "ms@^2.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms",
"bugs": {
@@ -27,13 +27,13 @@
},
"bundleDependencies": false,
"deprecated": false,
- "description": "Tiny milisecond conversion utility",
+ "description": "Tiny millisecond conversion utility",
"devDependencies": {
- "eslint": "3.19.0",
+ "eslint": "4.12.1",
"expect.js": "0.3.1",
- "husky": "0.13.3",
- "lint-staged": "3.4.1",
- "mocha": "3.4.1"
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
},
"eslintConfig": {
"extends": "eslint:recommended",
@@ -65,5 +65,5 @@
"precommit": "lint-staged",
"test": "mocha tests.js"
},
- "version": "2.0.0"
+ "version": "2.1.1"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
index 84a9974ccc..bb767293ac 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
@@ -17,35 +17,44 @@ ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
```
-### Convert from milliseconds
+### Convert from Milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
ms(ms('10 hours')) // "10h"
```
-### Time format written-out
+### Time Format Written-Out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
-- Works both in [node](https://nodejs.org) and in the browser.
-- If a number is supplied to `ms`, a string with a unit is returned.
-- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
-- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
-## Caught a bug?
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
-3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
As always, you can run the tests using: `npm test`
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/CHANGELOG.md
deleted file mode 100644
index 8edd5486b7..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/CHANGELOG.md
+++ /dev/null
@@ -1,423 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="9.3.0"></a>
-# [9.3.0](https://github.com/zkat/cacache/compare/v9.2.9...v9.3.0) (2017-10-07)
-
-
-### Features
-
-* **copy:** added cacache.get.copy api for fast copies (#107) ([067b5f6](https://github.com/zkat/cacache/commit/067b5f6))
-
-
-
-<a name="9.2.9"></a>
-## [9.2.9](https://github.com/zkat/cacache/compare/v9.2.8...v9.2.9) (2017-06-17)
-
-
-
-<a name="9.2.8"></a>
-## [9.2.8](https://github.com/zkat/cacache/compare/v9.2.7...v9.2.8) (2017-06-05)
-
-
-### Bug Fixes
-
-* **ssri:** bump ssri for bugfix ([c3232ea](https://github.com/zkat/cacache/commit/c3232ea))
-
-
-
-<a name="9.2.7"></a>
-## [9.2.7](https://github.com/zkat/cacache/compare/v9.2.6...v9.2.7) (2017-06-05)
-
-
-### Bug Fixes
-
-* **content:** make verified content completely read-only (#96) ([4131196](https://github.com/zkat/cacache/commit/4131196))
-
-
-
-<a name="9.2.6"></a>
-## [9.2.6](https://github.com/zkat/cacache/compare/v9.2.5...v9.2.6) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** update ssri to prevent old node 4 crash ([5209ffe](https://github.com/zkat/cacache/commit/5209ffe))
-
-
-
-<a name="9.2.5"></a>
-## [9.2.5](https://github.com/zkat/cacache/compare/v9.2.4...v9.2.5) (2017-05-25)
-
-
-### Bug Fixes
-
-* **deps:** fix lockfile issues and bump ssri ([84e1d7e](https://github.com/zkat/cacache/commit/84e1d7e))
-
-
-
-<a name="9.2.4"></a>
-## [9.2.4](https://github.com/zkat/cacache/compare/v9.2.3...v9.2.4) (2017-05-24)
-
-
-### Bug Fixes
-
-* **deps:** bumping deps ([bbccb12](https://github.com/zkat/cacache/commit/bbccb12))
-
-
-
-<a name="9.2.3"></a>
-## [9.2.3](https://github.com/zkat/cacache/compare/v9.2.2...v9.2.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **rm:** stop crashing if content is missing on rm ([ac90bc0](https://github.com/zkat/cacache/commit/ac90bc0))
-
-
-
-<a name="9.2.2"></a>
-## [9.2.2](https://github.com/zkat/cacache/compare/v9.2.1...v9.2.2) (2017-05-14)
-
-
-### Bug Fixes
-
-* **i18n:** lets pretend this didn't happen ([519b4ee](https://github.com/zkat/cacache/commit/519b4ee))
-
-
-
-<a name="9.2.1"></a>
-## [9.2.1](https://github.com/zkat/cacache/compare/v9.2.0...v9.2.1) (2017-05-14)
-
-
-### Bug Fixes
-
-* **docs:** fixing translation messup ([bb9e4f9](https://github.com/zkat/cacache/commit/bb9e4f9))
-
-
-
-<a name="9.2.0"></a>
-# [9.2.0](https://github.com/zkat/cacache/compare/v9.1.0...v9.2.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** add Spanish translation for API ([531f9a4](https://github.com/zkat/cacache/commit/531f9a4))
-
-
-
-<a name="9.1.0"></a>
-# [9.1.0](https://github.com/zkat/cacache/compare/v9.0.0...v9.1.0) (2017-05-14)
-
-
-### Features
-
-* **i18n:** Add Spanish translation and i18n setup (#91) ([323b90c](https://github.com/zkat/cacache/commit/323b90c))
-
-
-
-<a name="9.0.0"></a>
-# [9.0.0](https://github.com/zkat/cacache/compare/v8.0.0...v9.0.0) (2017-04-28)
-
-
-### Bug Fixes
-
-* **memoization:** actually use the LRU ([0e55dc9](https://github.com/zkat/cacache/commit/0e55dc9))
-
-
-### Features
-
-* **memoization:** memoizers can be injected through opts.memoize (#90) ([e5614c7](https://github.com/zkat/cacache/commit/e5614c7))
-
-
-### BREAKING CHANGES
-
-* **memoization:** If you were passing an object to opts.memoize, it will now be used as an injected memoization object. If you were only passing booleans and other non-objects through that option, no changes are needed.
-
-
-
-<a name="8.0.0"></a>
-# [8.0.0](https://github.com/zkat/cacache/compare/v7.1.0...v8.0.0) (2017-04-22)
-
-
-### Features
-
-* **read:** change hasContent to return {sri, size} (#88) ([bad6c49](https://github.com/zkat/cacache/commit/bad6c49)), closes [#87](https://github.com/zkat/cacache/issues/87)
-
-
-### BREAKING CHANGES
-
-* **read:** hasContent now returns an object with `{sri, size}` instead of `sri`. Use `result.sri` anywhere that needed the old return value.
-
-
-
-<a name="7.1.0"></a>
-# [7.1.0](https://github.com/zkat/cacache/compare/v7.0.5...v7.1.0) (2017-04-20)
-
-
-### Features
-
-* **size:** handle content size info (#49) ([91230af](https://github.com/zkat/cacache/commit/91230af))
-
-
-
-<a name="7.0.5"></a>
-## [7.0.5](https://github.com/zkat/cacache/compare/v7.0.4...v7.0.5) (2017-04-18)
-
-
-### Bug Fixes
-
-* **integrity:** new ssri with fixed integrity stream ([6d13e8e](https://github.com/zkat/cacache/commit/6d13e8e))
-* **write:** wrap stuff in promises to improve errors ([3624fc5](https://github.com/zkat/cacache/commit/3624fc5))
-
-
-
-<a name="7.0.4"></a>
-## [7.0.4](https://github.com/zkat/cacache/compare/v7.0.3...v7.0.4) (2017-04-15)
-
-
-### Bug Fixes
-
-* **fix-owner:** throw away ENOENTs on chownr ([d49bbcd](https://github.com/zkat/cacache/commit/d49bbcd))
-
-
-
-<a name="7.0.3"></a>
-## [7.0.3](https://github.com/zkat/cacache/compare/v7.0.2...v7.0.3) (2017-04-05)
-
-
-### Bug Fixes
-
-* **read:** fixing error message for integrity verification failures ([9d4f0a5](https://github.com/zkat/cacache/commit/9d4f0a5))
-
-
-
-<a name="7.0.2"></a>
-## [7.0.2](https://github.com/zkat/cacache/compare/v7.0.1...v7.0.2) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** use EINTEGRITY error code and update ssri ([8dc2e62](https://github.com/zkat/cacache/commit/8dc2e62))
-
-
-
-<a name="7.0.1"></a>
-## [7.0.1](https://github.com/zkat/cacache/compare/v7.0.0...v7.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **docs:** fix header name conflict in readme ([afcd456](https://github.com/zkat/cacache/commit/afcd456))
-
-
-
-<a name="7.0.0"></a>
-# [7.0.0](https://github.com/zkat/cacache/compare/v6.3.0...v7.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **test:** fix content.write tests when running in docker ([d2e9b6a](https://github.com/zkat/cacache/commit/d2e9b6a))
-
-
-### Features
-
-* **integrity:** subresource integrity support (#78) ([b1e731f](https://github.com/zkat/cacache/commit/b1e731f))
-
-
-### BREAKING CHANGES
-
-* **integrity:** The entire API has been overhauled to use SRI hashes instead of digest/hashAlgorithm pairs. SRI hashes follow the Subresource Integrity standard and support strings and objects compatible with [`ssri`](https://npm.im/ssri).
-
-* This change bumps the index version, which will invalidate all previous index entries. Content entries will remain intact, and existing caches will automatically reuse any content from before this breaking change.
-
-* `cacache.get.info()`, `cacache.ls()`, and `cacache.ls.stream()` will now return objects that looks like this:
-
-```
-{
- key: String,
- integrity: '<algorithm>-<base64hash>',
- path: ContentPath,
- time: Date<ms>,
- metadata: Any
-}
-```
-
-* `opts.digest` and `opts.hashAlgorithm` are obsolete for any API calls that used them.
-
-* Anywhere `opts.digest` was accepted, `opts.integrity` is now an option. Any valid SRI hash is accepted here -- multiple hash entries will be resolved according to the standard: first, the "strongest" hash algorithm will be picked, and then each of the entries for that algorithm will be matched against the content. Content will be validated if *any* of the entries match (so, a single integrity string can be used for multiple "versions" of the same document/data).
-
-* `put.byDigest()`, `put.stream.byDigest`, `get.byDigest()` and `get.stream.byDigest()` now expect an SRI instead of a `digest` + `opts.hashAlgorithm` pairing.
-
-* `get.hasContent()` now expects an integrity hash instead of a digest. If content exists, it will return the specific single integrity hash that was found in the cache.
-
-* `verify()` has learned to handle integrity-based caches, and forgotten how to handle old-style cache indices due to the format change.
-
-* `cacache.rm.content()` now expects an integrity hash instead of a hex digest.
-
-
-
-<a name="6.3.0"></a>
-# [6.3.0](https://github.com/zkat/cacache/compare/v6.2.0...v6.3.0) (2017-04-01)
-
-
-### Bug Fixes
-
-* **fixOwner:** ignore EEXIST race condition from mkdirp ([4670e9b](https://github.com/zkat/cacache/commit/4670e9b))
-* **index:** ignore index removal races when inserting ([b9d2fa2](https://github.com/zkat/cacache/commit/b9d2fa2))
-* **memo:** use lru-cache for better mem management (#75) ([d8ac5aa](https://github.com/zkat/cacache/commit/d8ac5aa))
-
-
-### Features
-
-* **dependencies:** Switch to move-concurrently (#77) ([dc6482d](https://github.com/zkat/cacache/commit/dc6482d))
-
-
-
-<a name="6.2.0"></a>
-# [6.2.0](https://github.com/zkat/cacache/compare/v6.1.2...v6.2.0) (2017-03-15)
-
-
-### Bug Fixes
-
-* **index:** additional bucket entry verification with checksum (#72) ([f8e0f25](https://github.com/zkat/cacache/commit/f8e0f25))
-* **verify:** return fixOwner.chownr promise ([6818521](https://github.com/zkat/cacache/commit/6818521))
-
-
-### Features
-
-* **tmp:** safe tmp dir creation/management util (#73) ([c42da71](https://github.com/zkat/cacache/commit/c42da71))
-
-
-
-<a name="6.1.2"></a>
-## [6.1.2](https://github.com/zkat/cacache/compare/v6.1.1...v6.1.2) (2017-03-13)
-
-
-### Bug Fixes
-
-* **index:** set default hashAlgorithm ([d6eb2f0](https://github.com/zkat/cacache/commit/d6eb2f0))
-
-
-
-<a name="6.1.1"></a>
-## [6.1.1](https://github.com/zkat/cacache/compare/v6.1.0...v6.1.1) (2017-03-13)
-
-
-### Bug Fixes
-
-* **coverage:** bumping coverage for verify (#71) ([0b7faf6](https://github.com/zkat/cacache/commit/0b7faf6))
-* **deps:** glob should have been a regular dep :< ([0640bc4](https://github.com/zkat/cacache/commit/0640bc4))
-
-
-
-<a name="6.1.0"></a>
-# [6.1.0](https://github.com/zkat/cacache/compare/v6.0.2...v6.1.0) (2017-03-12)
-
-
-### Bug Fixes
-
-* **coverage:** more coverage for content reads (#70) ([ef4f70a](https://github.com/zkat/cacache/commit/ef4f70a))
-* **tests:** use safe-buffer because omfg (#69) ([6ab8132](https://github.com/zkat/cacache/commit/6ab8132))
-
-
-### Features
-
-* **rm:** limited rm.all and fixed bugs (#66) ([d5d25ba](https://github.com/zkat/cacache/commit/d5d25ba)), closes [#66](https://github.com/zkat/cacache/issues/66)
-* **verify:** tested, working cache verifier/gc (#68) ([45ad77a](https://github.com/zkat/cacache/commit/45ad77a))
-
-
-
-<a name="6.0.2"></a>
-## [6.0.2](https://github.com/zkat/cacache/compare/v6.0.1...v6.0.2) (2017-03-11)
-
-
-### Bug Fixes
-
-* **index:** segment cache items with another subbucket (#64) ([c3644e5](https://github.com/zkat/cacache/commit/c3644e5))
-
-
-
-<a name="6.0.1"></a>
-## [6.0.1](https://github.com/zkat/cacache/compare/v6.0.0...v6.0.1) (2017-03-05)
-
-
-### Bug Fixes
-
-* **docs:** Missed spots in README ([8ffb7fa](https://github.com/zkat/cacache/commit/8ffb7fa))
-
-
-
-<a name="6.0.0"></a>
-# [6.0.0](https://github.com/zkat/cacache/compare/v5.0.3...v6.0.0) (2017-03-05)
-
-
-### Bug Fixes
-
-* **api:** keep memo cache mostly-internal ([2f72d0a](https://github.com/zkat/cacache/commit/2f72d0a))
-* **content:** use the rest of the string, not the whole string ([fa8f3c3](https://github.com/zkat/cacache/commit/fa8f3c3))
-* **deps:** removed `format-number[@2](https://github.com/2).0.2` ([1187791](https://github.com/zkat/cacache/commit/1187791))
-* **deps:** removed inflight[@1](https://github.com/1).0.6 ([0d1819c](https://github.com/zkat/cacache/commit/0d1819c))
-* **deps:** rimraf[@2](https://github.com/2).6.1 ([9efab6b](https://github.com/zkat/cacache/commit/9efab6b))
-* **deps:** standard[@9](https://github.com/9).0.0 ([4202cba](https://github.com/zkat/cacache/commit/4202cba))
-* **deps:** tap[@10](https://github.com/10).3.0 ([aa03088](https://github.com/zkat/cacache/commit/aa03088))
-* **deps:** weallcontribute[@1](https://github.com/1).0.8 ([ad4f4dc](https://github.com/zkat/cacache/commit/ad4f4dc))
-* **docs:** add security note to hashKey ([03f81ba](https://github.com/zkat/cacache/commit/03f81ba))
-* **hashes:** change default hashAlgorithm to sha512 ([ea00ba6](https://github.com/zkat/cacache/commit/ea00ba6))
-* **hashes:** missed a spot for hashAlgorithm defaults ([45997d8](https://github.com/zkat/cacache/commit/45997d8))
-* **index:** add length header before JSON for verification ([fb8cb4d](https://github.com/zkat/cacache/commit/fb8cb4d))
-* **index:** change index filenames to sha1s of keys ([bbc5fca](https://github.com/zkat/cacache/commit/bbc5fca))
-* **index:** who cares about race conditions anyway ([b1d3888](https://github.com/zkat/cacache/commit/b1d3888))
-* **perf:** bulk-read get+read for massive speed ([d26cdf9](https://github.com/zkat/cacache/commit/d26cdf9))
-* **perf:** use bulk file reads for index reads ([79a8891](https://github.com/zkat/cacache/commit/79a8891))
-* **put-stream:** remove tmp file on stream insert error ([65f6632](https://github.com/zkat/cacache/commit/65f6632))
-* **put-stream:** robustified and predictibilized ([daf9e08](https://github.com/zkat/cacache/commit/daf9e08))
-* **put-stream:** use new promise API for moves ([1d36013](https://github.com/zkat/cacache/commit/1d36013))
-* **readme:** updated to reflect new default hashAlgo ([c60a2fa](https://github.com/zkat/cacache/commit/c60a2fa))
-* **verify:** tiny typo fix ([db22d05](https://github.com/zkat/cacache/commit/db22d05))
-
-
-### Features
-
-* **api:** converted external api ([7bf032f](https://github.com/zkat/cacache/commit/7bf032f))
-* **cacache:** exported clearMemoized() utility ([8d2c5b6](https://github.com/zkat/cacache/commit/8d2c5b6))
-* **cache:** add versioning to content and index ([31bc549](https://github.com/zkat/cacache/commit/31bc549))
-* **content:** collate content files into subdirs ([c094d9f](https://github.com/zkat/cacache/commit/c094d9f))
-* **deps:** [@npmcorp](https://github.com/npmcorp)/move[@1](https://github.com/1).0.0 ([bdd00bf](https://github.com/zkat/cacache/commit/bdd00bf))
-* **deps:** bluebird[@3](https://github.com/3).4.7 ([3a17aff](https://github.com/zkat/cacache/commit/3a17aff))
-* **deps:** promise-inflight[@1](https://github.com/1).0.1 ([a004fe6](https://github.com/zkat/cacache/commit/a004fe6))
-* **get:** added memoization support for get ([c77d794](https://github.com/zkat/cacache/commit/c77d794))
-* **get:** export hasContent ([2956ec3](https://github.com/zkat/cacache/commit/2956ec3))
-* **index:** add hashAlgorithm and format insert ret val ([b639746](https://github.com/zkat/cacache/commit/b639746))
-* **index:** collate index files into subdirs ([e8402a5](https://github.com/zkat/cacache/commit/e8402a5))
-* **index:** promisify entry index ([cda3335](https://github.com/zkat/cacache/commit/cda3335))
-* **memo:** added memoization lib ([da07b92](https://github.com/zkat/cacache/commit/da07b92))
-* **memo:** export memoization api ([954b1b3](https://github.com/zkat/cacache/commit/954b1b3))
-* **move-file:** add move fallback for weird errors ([5cf4616](https://github.com/zkat/cacache/commit/5cf4616))
-* **perf:** bulk content write api ([51b536e](https://github.com/zkat/cacache/commit/51b536e))
-* **put:** added memoization support to put ([b613a70](https://github.com/zkat/cacache/commit/b613a70))
-* **read:** switched to promises ([a869362](https://github.com/zkat/cacache/commit/a869362))
-* **rm:** added memoization support to rm ([4205cf0](https://github.com/zkat/cacache/commit/4205cf0))
-* **rm:** switched to promises ([a000d24](https://github.com/zkat/cacache/commit/a000d24))
-* **util:** promise-inflight ownership fix requests ([9517cd7](https://github.com/zkat/cacache/commit/9517cd7))
-* **util:** use promises for api ([ae204bb](https://github.com/zkat/cacache/commit/ae204bb))
-* **verify:** converted to Promises ([f0b3974](https://github.com/zkat/cacache/commit/f0b3974))
-
-
-### BREAKING CHANGES
-
-* cache: index/content directories are now versioned. Previous caches are no longer compatible and cannot be migrated.
-* util: fix-owner now uses Promises instead of callbacks
-* index: Previously-generated index entries are no longer compatible and the index must be regenerated.
-* index: The index format has changed and previous caches are no longer compatible. Existing caches will need to be regenerated.
-* hashes: Default hashAlgorithm changed from sha1 to sha512. If you
-rely on the prior setting, pass `opts.hashAlgorithm` in explicitly.
-* content: Previously-generated content directories are no longer compatible
-and must be regenerated.
-* verify: API is now promise-based
-* read: Switches to a Promise-based API and removes callback stuff
-* rm: Switches to a Promise-based API and removes callback stuff
-* index: this changes the API to work off promises instead of callbacks
-* api: this means we are going all in on promises now
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/LICENSE.md
deleted file mode 100644
index c05cb09586..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/LICENSE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project.
-
-For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.es.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.es.md
deleted file mode 100644
index 783a0a19b0..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.es.md
+++ /dev/null
@@ -1,628 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) es una librerĆ­a de Node.js para
-manejar caches locales en disco, con acceso tanto con claves Ćŗnicas como
-direcciones de contenido (hashes/hacheos). Es sĆŗper rĆ”pida, excelente con el
-acceso concurrente, y jamĆ”s te darĆ” datos incorrectos, aĆŗn si se corrompen o
-manipulan directamente los ficheros del cache.
-
-El propĆ³sito original era reemplazar el cachĆ© local de
-[npm](https://npm.im/npm), pero se puede usar por su propia cuenta.
-
-_Traducciones: [English](README.md)_
-
-## InstalaciĆ³n
-
-`$ npm install --save cacache`
-
-## ƍndice
-
-* [Ejemplo](#ejemplo)
-* [CaracterĆ­sticas](#caracterĆ­sticas)
-* [CĆ³mo Contribuir](#cĆ³mo-contribuir)
-* [API](#api)
- * [Usando el API en espaƱol](#localized-api)
- * Leer
- * [`ls`](#ls)
- * [`ls.flujo`](#ls-stream)
- * [`saca`](#get-data)
- * [`saca.flujo`](#get-stream)
- * [`saca.info`](#get-info)
- * [`saca.tieneDatos`](#get-hasContent)
- * Escribir
- * [`mete`](#put-data)
- * [`mete.flujo`](#put-stream)
- * [opciones para `mete*`](#put-options)
- * [`rm.todo`](#rm-all)
- * [`rm.entrada`](#rm-entry)
- * [`rm.datos`](#rm-content)
- * Utilidades
- * [`ponLenguaje`](#set-locale)
- * [`limpiaMemoizado`](#clear-memoized)
- * [`tmp.hazdir`](#tmp-mkdir)
- * [`tmp.conTmp`](#with-tmp)
- * Integridad
- * [Subresource Integrity](#integrity)
- * [`verifica`](#verify)
- * [`verifica.ultimaVez`](#verify-last-run)
-
-### Ejemplo
-
-```javascript
-const cacache = require('cacache/es')
-const fs = require('fs')
-
-const tarbol = '/ruta/a/mi-tar.tgz'
-const rutaCache = '/tmp/my-toy-cache'
-const clave = 'mi-clave-Ćŗnica-1234'
-
-// Ā”AƱƔdelo al cachĆ©! Usa `rutaCache` como raĆ­z del cachĆ©.
-cacache.mete(rutaCache, clave, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${rutaCache}.`)
-})
-
-const destino = '/tmp/mytar.tgz'
-
-// Copia el contenido del cachƩ a otro fichero, pero esta vez con flujos.
-cacache.saca.flujo(
- rutaCache, clave
-).pipe(
- fs.createWriteStream(destino)
-).on('finish', () => {
- console.log('extracciĆ³n completada')
-})
-
-// La misma cosa, pero accesando el contenido directamente, sin tocar el Ć­ndice.
-cacache.saca.porHacheo(rutaCache, integridad).then(datos => {
- fs.writeFile(destino, datos, err => {
- console.log('datos del tarbol sacados basado en su sha512, y escrito a otro fichero')
- })
-})
-```
-
-### CaracterĆ­sticas
-
-* ExtracciĆ³n por clave o por direcciĆ³n de contenido (shasum, etc)
-* Usa el estƔndard de web, [Subresource Integrity](#integrity)
-* Compatible con multiples algoritmos - usa sha1, sha512, etc, en el mismo cachƩ sin problema
-* Entradas con contenido idƩntico comparten ficheros
-* Tolerancia de fallas (inmune a corrupciĆ³n, ficheros parciales, carreras de proceso, etc)
-* VerificaciĆ³n completa de datos cuando (escribiendo y leyendo)
-* Concurrencia rƔpida, segura y "lockless"
-* Compatible con `stream`s (flujos)
-* Compatible con `Promise`s (promesas)
-* Bastante rĆ”pida -- acceso, incluyendo verificaciĆ³n, en microsegundos
-* Almacenaje de metadatos arbitrarios
-* ColecciĆ³n de basura y verificaciĆ³n adicional fuera de banda
-* Cobertura rigurosa de pruebas
-* Probablente hay un "Bloom filter" por ahĆ­ en algĆŗn lado. Eso le mola a la gente, ĀæVerdad? šŸ¤”
-
-### CĆ³mo Contribuir
-
-El equipo de cacache felizmente acepta contribuciones de cĆ³digo y otras maneras de participaciĆ³n. Ā”Hay muchas formas diferentes de contribuir! La [GuĆ­a de Colaboradores](CONTRIBUTING.md) (en inglĆ©s) tiene toda la informaciĆ³n que necesitas para cualquier tipo de contribuciĆ³n: todo desde cĆ³mo reportar errores hasta cĆ³mo someter parches con nuevas caracterĆ­sticas. Con todo y eso, no se preocupe por si lo que haces estĆ” exĆ”ctamente correcto: no hay ningĆŗn problema en hacer preguntas si algo no estĆ” claro, o no lo encuentras.
-
-El equipo de cacache tiene miembros hispanohablantes: es completamente aceptable crear `issues` y `pull requests` en espaƱol/castellano.
-
-Todos los participantes en este proyecto deben obedecer el [CĆ³digo de Conducta](CODE_OF_CONDUCT.md) (en inglĆ©s), y en general actuar de forma amable y respetuosa mientras participan en esta comunidad.
-
-Por favor refiĆ©rase al [Historial de Cambios](CHANGELOG.md) (en inglĆ©s) para detalles sobre cambios importantes incluĆ­dos en cada versiĆ³n.
-
-Finalmente, cacache tiene un sistema de localizaciĆ³n de lenguaje. Si te interesa aƱadir lenguajes o mejorar los que existen, mira en el directorio `./locales` para comenzar.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Usando el API en espaƱol
-
-cacache incluye una traducciĆ³n completa de su API al castellano, con las mismas
-caracterĆ­sticas. Para usar el API como estĆ” documentado en este documento, usa
-`require('cacache/es')`
-
-cacache tambiƩn tiene otros lenguajes: encuƩntralos bajo `./locales`, y podrƔs
-usar el API en ese lenguaje con `require('cacache/<lenguaje>')`
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Enumera todas las entradas en el cachƩ, dentro de un solo objeto. Cada entrada
-en el objeto tendrĆ” como clave la clave Ćŗnica usada para el Ć­ndice, el valor
-siendo un objeto de [`saca.info`](#get-info).
-
-##### Ejemplo
-
-```javascript
-cacache.ls(rutaCache).then(console.log)
-// Salida
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.flujo(cache) -> Readable`
-
-Enumera todas las entradas en el cachƩ, emitiendo un objeto de
-[`saca.info`](#get-info) por cada evento de `data` en el flujo.
-
-##### Ejemplo
-
-```javascript
-cacache.ls.flujo(rutaCache).on('data', console.log)
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // unido con `rutaCache`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.saca(cache, clave, [ops]) -> Promise({data, metadata, integrity})`
-
-Devuelve un objeto con los datos, hacheo de integridad y metadatos identificados
-por la `clave`. La propiedad `data` de este objeto serĆ” una instancia de
-`Buffer` con los datos almacenados en el cachƩ. to do with it! cacache just
-won't care.
-
-`integrity` es un `string` de [Subresource Integrity](#integrity). DĆ­gase, un
-`string` que puede ser usado para verificar a la `data`, que tiene como formato
-`<algoritmo>-<hacheo-integridad-base64>`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificaciĆ³n, el `Promise` fallarĆ”.
-
-Una sub-funciĆ³n, `saca.porHacheo`, tiene casi el mismo comportamiento, excepto
-que busca entradas usando el hacheo de integridad, sin tocar el Ć­ndice general.
-Esta versiĆ³n *sĆ³lo* devuelve `data`, sin ningĆŗn objeto conteniĆ©ndola.
-
-##### Nota
-
-Esta funciĆ³n lee la entrada completa a la memoria antes de devolverla. Si estĆ”s
-almacenando datos Muy Grandes, es posible que [`saca.flujo`](#get-stream) sea
-una mejor soluciĆ³n.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca(rutaCache, 'my-thing').then(console.log)
-// Salida:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Busca por hacheo
-cache.saca.porHacheo(rutaCache, 'sha512-BaSe64HaSh').then(console.log)
-// Salida:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.saca.flujo(cache, clave, [ops]) -> Readable`
-
-Devuelve un [Readable
-Stream](https://nodejs.org/api/stream.html#stream_readable_streams) de los datos
-almacenados bajo `clave`.
-
-So no existe ninguna entrada identificada por `clave`, o se los datos
-almacenados localmente fallan verificaciĆ³n, el `Promise` fallarĆ”.
-
-`metadata` y `integrity` serƔn emitidos como eventos antes de que el flujo
-cierre.
-
-Una sub-funciĆ³n, `saca.flujo.porHacheo`, tiene casi el mismo comportamiento,
-excepto que busca entradas usando el hacheo de integridad, sin tocar el Ć­ndice
-general. Esta versiĆ³n no emite eventos de `metadata` o `integrity`.
-
-##### Ejemplo
-
-```javascript
-// Busca por clave
-cache.saca.flujo(
- rutaCache, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Salidas:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Busca por hacheo
-cache.saca.flujo.porHacheo(
- rutaCache, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.saca.info(cache, clave) -> Promise`
-
-Busca la `clave` en el Ć­ndice del cachĆ©, devolviendo informaciĆ³n sobre la
-entrada si existe.
-
-##### Campos
-
-* `key` - Clave de la entrada. Igual al argumento `clave`.
-* `integrity` - [hacheo de Subresource Integrity](#integrity) del contenido al que se refiere esta entrada.
-* `path` - DirecciĆ³n del fichero de datos almacenados, relativa al argumento `cache`.
-* `time` - Hora de creaciĆ³n de la entrada
-* `metadata` - Metadatos asignados a esta entrada por el usuario
-
-##### Ejemplo
-
-```javascript
-cacache.saca.info(rutaCache, 'my-thing').then(console.log)
-
-// Salida
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.saca.tieneDatos(cache, integrity) -> Promise`
-
-Busca un [hacheo Subresource Integrity](#integrity) en el cachƩ. Si existe el
-contenido asociado con `integrity`, devuelve un objeto con dos campos: el hacheo
-_especĆ­fico_ que se usĆ³ para la bĆŗsqueda, `sri`, y el tamaƱo total del
-contenido, `size`. Si no existe ningĆŗn contenido asociado con `integrity`,
-devuelve `false`.
-
-##### Ejemplo
-
-```javascript
-cacache.saca.tieneDatos(rutaCache, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Salida
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.saca.tieneDatos(rutaCache, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Salida
-false
-```
-
-#### <a name="put-data"></a> `> cacache.mete(cache, clave, datos, [ops]) -> Promise`
-
-Inserta `datos` en el cachƩ. El `Promise` devuelto se resuelve con un hacheo
-(generado conforme a [`ops.algorithms`](#optsalgorithms)) despuƩs que la entrada
-haya sido escrita en completo.
-
-##### Ejemplo
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(datos => {
- return cacache.mete(rutaCache, 'registry.npmjs.org|cacache@1.0.0', datos)
-}).then(integridad => {
- console.log('el hacheo de integridad es', integridad)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.mete.flujo(cache, clave, [ops]) -> Writable`
-
-Devuelve un [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) que inserta
-al cachƩ los datos escritos a Ʃl. Emite un evento `integrity` con el hacheo del
-contenido escrito, cuando completa.
-
-##### Ejemplo
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.mete.flujo(
- rutaCache, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> opciones para cacache.mete`
-
-La funciones `cacache.mete` tienen un nĆŗmero de opciones en comĆŗn.
-
-##### `ops.metadata`
-
-Metadatos del usuario que se almacenarƔn con la entrada.
-
-##### `ops.size`
-
-El tamaƱo declarado de los datos que se van a insertar. Si es proveƭdo, cacache
-verificarƔ que los datos escritos sean de ese tamaƱo, o si no, fallarƔ con un
-error con cĆ³digo `EBADSIZE`.
-
-##### `ops.integrity`
-
-El hacheo de integridad de los datos siendo escritos.
-
-Si es proveĆ­do, y los datos escritos no le corresponden, la operaciĆ³n fallarĆ”
-con un error con cĆ³digo `EINTEGRITY`.
-
-`ops.algorithms` no tiene ningĆŗn efecto si esta opciĆ³n estĆ” presente.
-
-##### `ops.algorithms`
-
-Por Defecto: `['sha512']`
-
-Algoritmos que se deben usar cuando se calcule el hacheo de [subresource
-integrity](#integrity) para los datos insertados. Puede usar cualquier algoritmo
-enumerado en `crypto.getHashes()`.
-
-Por el momento, sĆ³lo se acepta un algoritmo (dĆ­gase, un array con exĆ”ctamente un
-valor). No tiene ningĆŗn efecto si `ops.integrity` tambiĆ©n ha sido proveido.
-
-##### `ops.uid`/`ops.gid`
-
-Si estƔn presentes, cacache harƔ todo lo posible para asegurarse que todos los
-ficheros creados en el proceso de sus operaciones en el cachƩ usen esta
-combinaciĆ³n en particular.
-
-##### `ops.memoize`
-
-Por Defecto: `null`
-
-Si es verdad, cacache tratarĆ” de memoizar los datos de la entrada en memoria. La
-prĆ³xima vez que el proceso corriente trate de accesar los datos o entrada,
-cacache buscarĆ” en memoria antes de buscar en disco.
-
-Si `ops.memoize` es un objeto regular o un objeto como `Map` (es decir, un
-objeto con mƩtodos `get()` y `set()`), este objeto en sƭ sera usado en vez del
-cachĆ© de memoria global. Esto permite tener lĆ³gica especĆ­fica a tu aplicaciĆ³n
-encuanto al almacenaje en memoria de tus datos.
-
-Si quieres asegurarte que los datos se lean del disco en vez de memoria, usa
-`memoize: false` cuando uses funciones de `cacache.saca`.
-
-#### <a name="rm-all"></a> `> cacache.rm.todo(cache) -> Promise`
-
-Borra el cachƩ completo, incluyendo ficheros temporeros, ficheros de datos, y el
-ƭndice del cachƩ.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.todo(rutaCache).then(() => {
- console.log('THE APOCALYPSE IS UPON US šŸ˜±')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entrada(cache, clave) -> Promise`
-
-Alias: `cacache.rm`
-
-Borra la entrada `clave` del Ć­nduce. El contenido asociado con esta entrada
-seguirĆ” siendo accesible por hacheo usando
-[`saca.flujo.porHacheo`](#get-stream).
-
-Para borrar el contenido en sĆ­, usa [`rm.datos`](#rm-content). Si quieres hacer
-esto de manera mƔs segura (pues ficheros de contenido pueden ser usados por
-multiples entradas), usa [`verifica`](#verify) para borrar huƩrfanos.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.entrada(rutaCache, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.datos(cache, integrity) -> Promise`
-
-Borra el contenido identificado por `integrity`. Cualquier entrada que se
-refiera a este contenido quedarƔn huƩrfanas y se invalidarƔn si se tratan de
-accesar, al menos que contenido idƩntico sea aƱadido bajo `integrity`.
-
-##### Ejemplo
-
-```javascript
-cacache.rm.datos(rutaCache, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('los datos para `mi-cosa` se borraron')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.ponLenguaje(locale)`
-
-Configura el lenguaje usado para mensajes y errores de cacache. La lista de
-lenguajes disponibles estĆ” en el directorio `./locales` del proyecto.
-
-_Te interesa aƱadir mƔs lenguajes? [Somete un PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.limpiaMemoizado()`
-
-Completamente reinicializa el cachƩ de memoria interno. Si estƔs usando tu
-propio objecto con `ops.memoize`, debes hacer esto de manera especĆ­fica a Ć©l.
-
-#### <a name="tmp-mkdir"></a> `> tmp.hazdir(cache, ops) -> Promise<Path>`
-
-Alias: `tmp.mkdir`
-
-Devuelve un directorio Ćŗnico dentro del directorio `tmp` del cachĆ©.
-
-Una vez tengas el directorio, es responsabilidad tuya asegurarte que todos los
-ficheros escrito a Ć©l sean creados usando los permisos y `uid`/`gid` concordante
-con el cachƩ. Si no, puedes pedirle a cacache que lo haga llamando a
-[`cacache.tmp.fix()`](#tmp-fix). Esta funciĆ³n arreglarĆ” todos los permisos en el
-directorio tmp.
-
-Si quieres que cacache limpie el directorio automƔticamente cuando termines, usa
-[`cacache.tmp.conTmp()`](#with-tpm).
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.conTmp(cache, ops, cb) -> Promise`
-
-Crea un directorio temporero con [`tmp.mkdir()`](#tmp-mkdir) y ejecuta `cb` con
-Ʃl como primer argumento. El directorio creado serƔ removido automƔticamente
-cuando el valor devolvido por `cb()` se resuelva.
-
-Las mismas advertencias aplican en cuanto a manejando permisos para los ficheros
-dentro del directorio.
-
-##### Ejemplo
-
-```javascript
-cacache.tmp.conTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Hacheos de Subresource Integrity
-
-cacache usa strings que siguen la especificaciĆ³n de [Subresource Integrity
-spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-
-Es decir, donde quiera cacache espera un argumento o opciĆ³n `integrity`, ese
-string deberĆ­a usar el formato `<algoritmo>-<hacheo-base64>`.
-
-Una variaciĆ³n importante sobre los hacheos que cacache acepta es que acepta el
-nombre de cualquier algoritmo aceptado por el proceso de Node.js donde se usa.
-Puedes usar `crypto.getHashes()` para ver cuales estƔn disponibles.
-
-##### Generando tus propios hacheos
-
-Si tienes un `shasum`, en general va a estar en formato de string hexadecimal
-(es decir, un `sha1` se verĆ­a como algo asĆ­:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`).
-
-Para ser compatible con cacache, necesitas convertir esto a su equivalente en
-subresource integrity. Por ejemplo, el hacheo correspondiente al ejemplo
-anterior serĆ­a: `sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-Puedes usar cĆ³digo asĆ­ para generarlo por tu cuenta:
-
-```javascript
-const crypto = require('crypto')
-const algoritmo = 'sha512'
-const datos = 'foobarbaz'
-
-const integrity = (
- algorithm +
- '-' +
- crypto.createHash(algoritmo).update(datos).digest('base64')
-)
-```
-
-TambiƩn puedes usar [`ssri`](https://npm.im/ssri) para deferir el trabajo a otra
-librerƭa que garantiza que todo estƩ correcto, pues maneja probablemente todas
-las operaciones que tendrĆ­as que hacer con SRIs, incluyendo convirtiendo entre
-hexadecimal y el formato SRI.
-
-#### <a name="verify"></a> `> cacache.verifica(cache, ops) -> Promise`
-
-Examina y arregla tu cachƩ:
-
-* Limpia entradas invƔlidas, huƩrfanas y corrompidas
-* Te deja filtrar cuales entradas retener, con tu propio filtro
-* Reclama cualquier ficheros de contenido sin referencias en el Ć­ndice
-* Verifica integridad de todos los ficheros de contenido y remueve los malos
-* Arregla permisos del cachƩ
-* Remieve el directorio `tmp` en el cachƩ, y todo su contenido.
-
-Cuando termine, devuelve un objeto con varias estadĆ­sticas sobre el proceso de
-verificaciĆ³n, por ejemplo la cantidad de espacio de disco reclamado, el nĆŗmero
-de entradas vĆ”lidas, nĆŗmero de entradas removidas, etc.
-
-##### Opciones
-
-* `ops.uid` - uid para asignarle al cachƩ y su contenido
-* `ops.gid` - gid para asignarle al cachƩ y su contenido
-* `ops.filter` - recibe una entrada como argumento. Devuelve falso para removerla. Nota: es posible que esta funciĆ³n sea invocada con la misma entrada mĆ”s de una vez.
-
-##### Example
-
-```sh
-echo somegarbage >> $RUTACACHE/content/deadbeef
-```
-
-```javascript
-cacache.verifica(rutaCache).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verifica.ultimaVez(cache) -> Promise`
-
-Alias: `ĆŗltimaVez`
-
-Devuelve un `Date` que representa la Ćŗltima vez que `cacache.verifica` fue
-ejecutada en `cache`.
-
-##### Example
-
-```javascript
-cacache.verifica(rutaCache).then(() => {
- cacache.verifica.ultimaVez(rutaCache).then(Ćŗltima => {
- console.log('La Ćŗltima vez que se usĆ³ cacache.verifica() fue ' + Ćŗltima)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.md
deleted file mode 100644
index ea69b8f540..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/README.md
+++ /dev/null
@@ -1,624 +0,0 @@
-# cacache [![npm version](https://img.shields.io/npm/v/cacache.svg)](https://npm.im/cacache) [![license](https://img.shields.io/npm/l/cacache.svg)](https://npm.im/cacache) [![Travis](https://img.shields.io/travis/zkat/cacache.svg)](https://travis-ci.org/zkat/cacache) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/cacache?svg=true)](https://ci.appveyor.com/project/zkat/cacache) [![Coverage Status](https://coveralls.io/repos/github/zkat/cacache/badge.svg?branch=latest)](https://coveralls.io/github/zkat/cacache?branch=latest)
-
-[`cacache`](https://github.com/zkat/cacache) is a Node.js library for managing
-local key and content address caches. It's really fast, really good at
-concurrency, and it will never give you corrupted data, even if cache files
-get corrupted or manipulated.
-
-It was originally written to be used as [npm](https://npm.im)'s local cache, but
-can just as easily be used on its own
-
-_Translations: [espaƱol](README.es.md)_
-
-## Install
-
-`$ npm install --save cacache`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [Using localized APIs](#localized-api)
- * Reading
- * [`ls`](#ls)
- * [`ls.stream`](#ls-stream)
- * [`get`](#get-data)
- * [`get.stream`](#get-stream)
- * [`get.info`](#get-info)
- * [`get.hasContent`](#get-hasContent)
- * Writing
- * [`put`](#put-data)
- * [`put.stream`](#put-stream)
- * [`put*` opts](#put-options)
- * [`rm.all`](#rm-all)
- * [`rm.entry`](#rm-entry)
- * [`rm.content`](#rm-content)
- * Utilities
- * [`setLocale`](#set-locale)
- * [`clearMemoized`](#clear-memoized)
- * [`tmp.mkdir`](#tmp-mkdir)
- * [`tmp.withTmp`](#with-tmp)
- * Integrity
- * [Subresource Integrity](#integrity)
- * [`verify`](#verify)
- * [`verify.lastRun`](#verify-last-run)
-
-### Example
-
-```javascript
-const cacache = require('cacache/en')
-const fs = require('fs')
-
-const tarball = '/path/to/mytar.tgz'
-const cachePath = '/tmp/my-toy-cache'
-const key = 'my-unique-key-1234'
-
-// Cache it! Use `cachePath` as the root of the content cache
-cacache.put(cachePath, key, '10293801983029384').then(integrity => {
- console.log(`Saved content to ${cachePath}.`)
-})
-
-const destination = '/tmp/mytar.tgz'
-
-// Copy the contents out of the cache and into their destination!
-// But this time, use stream instead!
-cacache.get.stream(
- cachePath, key
-).pipe(
- fs.createWriteStream(destination)
-).on('finish', () => {
- console.log('done extracting!')
-})
-
-// The same thing, but skip the key index.
-cacache.get.byDigest(cachePath, integrityHash).then(data => {
- fs.writeFile(destination, data, err => {
- console.log('tarball data fetched based on its sha512sum and written out!')
- })
-})
-```
-
-### Features
-
-* Extraction by key or by content address (shasum, etc)
-* [Subresource Integrity](#integrity) web standard support
-* Multi-hash support - safely host sha1, sha512, etc, in a single cache
-* Automatic content deduplication
-* Fault tolerance (immune to corruption, partial writes, process races, etc)
-* Consistency guarantees on read and write (full data verification)
-* Lockless, high-concurrency cache access
-* Streaming support
-* Promise support
-* Pretty darn fast -- sub-millisecond reads and writes including verification
-* Arbitrary metadata storage
-* Garbage collection and additional offline verification
-* Thorough test coverage
-* There's probably a bloom filter in there somewhere. Those are cool, right? šŸ¤”
-
-### Contributing
-
-The cacache team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
-
-All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
-
-Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
-
-Happy hacking!
-
-### API
-
-#### <a name="localized-api"></a> Using localized APIs
-
-cacache includes a complete API in English, with the same features as other
-translations. To use the English API as documented in this README, use
-`require('cacache/en')`. This is also currently the default if you do
-`require('cacache')`, but may change in the future.
-
-cacache also supports other languages! You can find the list of currently
-supported ones my looking in `./locales` in the source directory. You can use
-the API in that language with `require('cacache/<lang>')`.
-
-Want to add support for a new language? Please go ahead! You should be able to
-copy `./locales/en.js` and `./locales/en.json` and fill them in. Translating the
-`README.md` is a bit more work, but also appreciated if you get around to it. šŸ‘šŸ¼
-
-#### <a name="ls"></a> `> cacache.ls(cache) -> Promise<Object>`
-
-Lists info for all entries currently in the cache as a single large object. Each
-entry in the object will be keyed by the unique index key, with corresponding
-[`get.info`](#get-info) objects as the values.
-
-##### Example
-
-```javascript
-cacache.ls(cachePath).then(console.log)
-// Output
-{
- 'my-thing': {
- key: 'my-thing',
- integrity: 'sha512-BaSe64/EnCoDED+HAsh=='
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 4023948,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
- },
- 'other-thing': {
- key: 'other-thing',
- integrity: 'sha1-ANothER+hasH=',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 111112
- }
-}
-```
-
-#### <a name="ls-stream"></a> `> cacache.ls.stream(cache) -> Readable`
-
-Lists info for all entries currently in the cache as a single large object.
-
-This works just like [`ls`](#ls), except [`get.info`](#get-info) entries are
-returned as `'data'` events on the returned stream.
-
-##### Example
-
-```javascript
-cacache.ls.stream(cachePath).on('data', console.log)
-// Output
-{
- key: 'my-thing',
- integrity: 'sha512-BaSe64HaSh',
- path: '.testcache/content/deadbeef', // joined with `cachePath`
- time: 12345698490,
- size: 13423,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-
-{
- key: 'other-thing',
- integrity: 'whirlpool-WoWSoMuchSupport',
- path: '.testcache/content/bada55',
- time: 11992309289,
- size: 498023984029
-}
-
-{
- ...
-}
-```
-
-#### <a name="get-data"></a> `> cacache.get(cache, key, [opts]) -> Promise({data, metadata, integrity})`
-
-Returns an object with the cached data, digest, and metadata identified by
-`key`. The `data` property of this object will be a `Buffer` instance that
-presumably holds some data that means something to you. I'm sure you know what
-to do with it! cacache just won't care.
-
-`integrity` is a [Subresource
-Integrity](#integrity)
-string. That is, a string that can be used to verify `data`, which looks like
-`<hash-algorithm>-<base64-integrity-hash>`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, the promise will be rejected.
-
-A sub-function, `get.byDigest` may be used for identical behavior, except lookup
-will happen by integrity hash, bypassing the index entirely. This version of the
-function *only* returns `data` itself, without any wrapper.
-
-##### Note
-
-This function loads the entire cache entry into memory before returning it. If
-you're dealing with Very Large data, consider using [`get.stream`](#get-stream)
-instead.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get(cachePath, 'my-thing').then(console.log)
-// Output:
-{
- metadata: {
- thingName: 'my'
- },
- integrity: 'sha512-BaSe64HaSh',
- data: Buffer#<deadbeef>,
- size: 9320
-}
-
-// Look up by digest
-cache.get.byDigest(cachePath, 'sha512-BaSe64HaSh').then(console.log)
-// Output:
-Buffer#<deadbeef>
-```
-
-#### <a name="get-stream"></a> `> cacache.get.stream(cache, key, [opts]) -> Readable`
-
-Returns a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams) of the cached data identified by `key`.
-
-If there is no content identified by `key`, or if the locally-stored data does
-not pass the validity checksum, an error will be emitted.
-
-`metadata` and `integrity` events will be emitted before the stream closes, if
-you need to collect that extra data about the cached entry.
-
-A sub-function, `get.stream.byDigest` may be used for identical behavior,
-except lookup will happen by integrity hash, bypassing the index entirely. This
-version does not emit the `metadata` and `integrity` events at all.
-
-##### Example
-
-```javascript
-// Look up by key
-cache.get.stream(
- cachePath, 'my-thing'
-).on('metadata', metadata => {
- console.log('metadata:', metadata)
-}).on('integrity', integrity => {
- console.log('integrity:', integrity)
-}).pipe(
- fs.createWriteStream('./x.tgz')
-)
-// Outputs:
-metadata: { ... }
-integrity: 'sha512-SoMeDIGest+64=='
-
-// Look up by digest
-cache.get.stream.byDigest(
- cachePath, 'sha512-SoMeDIGest+64=='
-).pipe(
- fs.createWriteStream('./x.tgz')
-)
-```
-
-#### <a name="get-info"></a> `> cacache.get.info(cache, key) -> Promise`
-
-Looks up `key` in the cache index, returning information about the entry if
-one exists.
-
-##### Fields
-
-* `key` - Key the entry was looked up under. Matches the `key` argument.
-* `integrity` - [Subresource Integrity hash](#integrity) for the content this entry refers to.
-* `path` - Filesystem path relative to `cache` argument where content is stored.
-* `time` - Timestamp the entry was first added on.
-* `metadata` - User-assigned metadata associated with the entry/content.
-
-##### Example
-
-```javascript
-cacache.get.info(cachePath, 'my-thing').then(console.log)
-
-// Output
-{
- key: 'my-thing',
- integrity: 'sha256-MUSTVERIFY+ALL/THINGS=='
- path: '.testcache/content/deadbeef',
- time: 12345698490,
- size: 849234,
- metadata: {
- name: 'blah',
- version: '1.2.3',
- description: 'this was once a package but now it is my-thing'
- }
-}
-```
-
-#### <a name="get-hasContent"></a> `> cacache.get.hasContent(cache, integrity) -> Promise`
-
-Looks up a [Subresource Integrity hash](#integrity) in the cache. If content
-exists for this `integrity`, it will return an object, with the specific single integrity hash
-that was found in `sri` key, and the size of the found content as `size`. If no content exists for this integrity, it will return `false`.
-
-##### Example
-
-```javascript
-cacache.get.hasContent(cachePath, 'sha256-MUSTVERIFY+ALL/THINGS==').then(console.log)
-
-// Output
-{
- sri: {
- source: 'sha256-MUSTVERIFY+ALL/THINGS==',
- algorithm: 'sha256',
- digest: 'MUSTVERIFY+ALL/THINGS==',
- options: []
- },
- size: 9001
-}
-
-cacache.get.hasContent(cachePath, 'sha521-NOT+IN/CACHE==').then(console.log)
-
-// Output
-false
-```
-
-#### <a name="put-data"></a> `> cacache.put(cache, key, data, [opts]) -> Promise`
-
-Inserts data passed to it into the cache. The returned Promise resolves with a
-digest (generated according to [`opts.algorithms`](#optsalgorithms)) after the
-cache entry has been successfully written.
-
-##### Example
-
-```javascript
-fetch(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).then(data => {
- return cacache.put(cachePath, 'registry.npmjs.org|cacache@1.0.0', data)
-}).then(integrity => {
- console.log('integrity hash is', integrity)
-})
-```
-
-#### <a name="put-stream"></a> `> cacache.put.stream(cache, key, [opts]) -> Writable`
-
-Returns a [Writable
-Stream](https://nodejs.org/api/stream.html#stream_writable_streams) that inserts
-data written to it into the cache. Emits an `integrity` event with the digest of
-written contents when it succeeds.
-
-##### Example
-
-```javascript
-request.get(
- 'https://registry.npmjs.org/cacache/-/cacache-1.0.0.tgz'
-).pipe(
- cacache.put.stream(
- cachePath, 'registry.npmjs.org|cacache@1.0.0'
- ).on('integrity', d => console.log(`integrity digest is ${d}`))
-)
-```
-
-#### <a name="put-options"></a> `> cacache.put options`
-
-`cacache.put` functions have a number of options in common.
-
-##### `opts.metadata`
-
-Arbitrary metadata to be attached to the inserted key.
-
-##### `opts.size`
-
-If provided, the data stream will be verified to check that enough data was
-passed through. If there's more or less data than expected, insertion will fail
-with an `EBADSIZE` error.
-
-##### `opts.integrity`
-
-If present, the pre-calculated digest for the inserted content. If this option
-if provided and does not match the post-insertion digest, insertion will fail
-with an `EINTEGRITY` error.
-
-`algorithms` has no effect if this option is present.
-
-##### `opts.algorithms`
-
-Default: ['sha512']
-
-Hashing algorithms to use when calculating the [subresource integrity
-digest](#integrity)
-for inserted data. Can use any algorithm listed in `crypto.getHashes()` or
-`'omakase'`/`'ćŠä»»ć›ć—ć¾ć™'` to pick a random hash algorithm on each insertion. You
-may also use any anagram of `'modnar'` to use this feature.
-
-Currently only supports one algorithm at a time (i.e., an array length of
-exactly `1`). Has no effect if `opts.integrity` is present.
-
-##### `opts.uid`/`opts.gid`
-
-If provided, cacache will do its best to make sure any new files added to the
-cache use this particular `uid`/`gid` combination. This can be used,
-for example, to drop permissions when someone uses `sudo`, but cacache makes
-no assumptions about your needs here.
-
-##### `opts.memoize`
-
-Default: null
-
-If provided, cacache will memoize the given cache insertion in memory, bypassing
-any filesystem checks for that key or digest in future cache fetches. Nothing
-will be written to the in-memory cache unless this option is explicitly truthy.
-
-If `opts.memoize` is an object or a `Map`-like (that is, an object with `get`
-and `set` methods), it will be written to instead of the global memoization
-cache.
-
-Reading from disk data can be forced by explicitly passing `memoize: false` to
-the reader functions, but their default will be to read from memory.
-
-#### <a name="rm-all"></a> `> cacache.rm.all(cache) -> Promise`
-
-Clears the entire cache. Mainly by blowing away the cache directory itself.
-
-##### Example
-
-```javascript
-cacache.rm.all(cachePath).then(() => {
- console.log('THE APOCALYPSE IS UPON US šŸ˜±')
-})
-```
-
-#### <a name="rm-entry"></a> `> cacache.rm.entry(cache, key) -> Promise`
-
-Alias: `cacache.rm`
-
-Removes the index entry for `key`. Content will still be accessible if
-requested directly by content address ([`get.stream.byDigest`](#get-stream)).
-
-To remove the content itself (which might still be used by other entries), use
-[`rm.content`](#rm-content). Or, to safely vacuum any unused content, use
-[`verify`](#verify).
-
-##### Example
-
-```javascript
-cacache.rm.entry(cachePath, 'my-thing').then(() => {
- console.log('I did not like it anyway')
-})
-```
-
-#### <a name="rm-content"></a> `> cacache.rm.content(cache, integrity) -> Promise`
-
-Removes the content identified by `integrity`. Any index entries referring to it
-will not be usable again until the content is re-added to the cache with an
-identical digest.
-
-##### Example
-
-```javascript
-cacache.rm.content(cachePath, 'sha512-SoMeDIGest/IN+BaSE64==').then(() => {
- console.log('data for my-thing is gone!')
-})
-```
-
-#### <a name="set-locale"></a> `> cacache.setLocale(locale)`
-
-Configure the language/locale used for messages and errors coming from cacache.
-The list of available locales is in the `./locales` directory in the project
-root.
-
-_Interested in contributing more languages! [Submit a PR](CONTRIBUTING.md)!_
-
-#### <a name="clear-memoized"></a> `> cacache.clearMemoized()`
-
-Completely resets the in-memory entry cache.
-
-#### <a name="tmp-mkdir"></a> `> tmp.mkdir(cache, opts) -> Promise<Path>`
-
-Returns a unique temporary directory inside the cache's `tmp` dir. This
-directory will use the same safe user assignment that all the other stuff use.
-
-Once the directory is made, it's the user's responsibility that all files within
-are made according to the same `opts.gid`/`opts.uid` settings that would be
-passed in. If not, you can ask cacache to do it for you by calling
-[`tmp.fix()`](#tmp-fix), which will fix all tmp directory permissions.
-
-If you want automatic cleanup of this directory, use
-[`tmp.withTmp()`](#with-tpm)
-
-##### Example
-
-```javascript
-cacache.tmp.mkdir(cache).then(dir => {
- fs.writeFile(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-})
-```
-
-#### <a name="with-tmp"></a> `> tmp.withTmp(cache, opts, cb) -> Promise`
-
-Creates a temporary directory with [`tmp.mkdir()`](#tmp-mkdir) and calls `cb`
-with it. The created temporary directory will be removed when the return value
-of `cb()` resolves -- that is, if you return a Promise from `cb()`, the tmp
-directory will be automatically deleted once that promise completes.
-
-The same caveats apply when it comes to managing permissions for the tmp dir's
-contents.
-
-##### Example
-
-```javascript
-cacache.tmp.withTmp(cache, dir => {
- return fs.writeFileAsync(path.join(dir, 'blablabla'), Buffer#<1234>, ...)
-}).then(() => {
- // `dir` no longer exists
-})
-```
-
-#### <a name="integrity"></a> Subresource Integrity Digests
-
-For content verification and addressing, cacache uses strings following the
-[Subresource
-Integrity spec](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
-That is, any time cacache expects an `integrity` argument or option, it
-should be in the format `<hashAlgorithm>-<base64-hash>`.
-
-One deviation from the current spec is that cacache will support any hash
-algorithms supported by the underlying Node.js process. You can use
-`crypto.getHashes()` to see which ones you can use.
-
-##### Generating Digests Yourself
-
-If you have an existing content shasum, they are generally formatted as a
-hexadecimal string (that is, a sha1 would look like:
-`5f5513f8822fdbe5145af33b64d8d970dcf95c6e`). In order to be compatible with
-cacache, you'll need to convert this to an equivalent subresource integrity
-string. For this example, the corresponding hash would be:
-`sha1-X1UT+IIv2+UUWvM7ZNjZcNz5XG4=`.
-
-If you want to generate an integrity string yourself for existing data, you can
-use something like this:
-
-```javascript
-const crypto = require('crypto')
-const hashAlgorithm = 'sha512'
-const data = 'foobarbaz'
-
-const integrity = (
- hashAlgorithm +
- '-' +
- crypto.createHash(hashAlgorithm).update(data).digest('base64')
-)
-```
-
-You can also use [`ssri`](https://npm.im/ssri) to have a richer set of functionality
-around SRI strings, including generation, parsing, and translating from existing
-hex-formatted strings.
-
-#### <a name="verify"></a> `> cacache.verify(cache, opts) -> Promise`
-
-Checks out and fixes up your cache:
-
-* Cleans up corrupted or invalid index entries.
-* Custom entry filtering options.
-* Garbage collects any content entries not referenced by the index.
-* Checks integrity for all content entries and removes invalid content.
-* Fixes cache ownership.
-* Removes the `tmp` directory in the cache and all its contents.
-
-When it's done, it'll return an object with various stats about the verification
-process, including amount of storage reclaimed, number of valid entries, number
-of entries removed, etc.
-
-##### Options
-
-* `opts.uid` - uid to assign to cache and its contents
-* `opts.gid` - gid to assign to cache and its contents
-* `opts.filter` - receives a formatted entry. Return false to remove it.
- Note: might be called more than once on the same entry.
-
-##### Example
-
-```sh
-echo somegarbage >> $CACHEPATH/content/deadbeef
-```
-
-```javascript
-cacache.verify(cachePath).then(stats => {
- // deadbeef collected, because of invalid checksum.
- console.log('cache is much nicer now! stats:', stats)
-})
-```
-
-#### <a name="verify-last-run"></a> `> cacache.verify.lastRun(cache) -> Promise`
-
-Returns a `Date` representing the last time `cacache.verify` was run on `cache`.
-
-##### Example
-
-```javascript
-cacache.verify(cachePath).then(() => {
- cacache.verify.lastRun(cachePath).then(lastTime => {
- console.log('cacache.verify was last called on' + lastTime)
- })
-})
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/en.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/en.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/en.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/es.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/es.js
deleted file mode 100644
index 6282363c3b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/es.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/es.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/get.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/get.js
deleted file mode 100644
index 2bb3afa528..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/get.js
+++ /dev/null
@@ -1,190 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fs = require('fs')
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const pipe = require('mississippi').pipe
-const pipeline = require('mississippi').pipeline
-const read = require('./lib/content/read')
-const through = require('mississippi').through
-
-module.exports = function get (cache, key, opts) {
- return getData(false, cache, key, opts)
-}
-module.exports.byDigest = function getByDigest (cache, digest, opts) {
- return getData(true, cache, digest, opts)
-}
-function getData (byDigest, cache, key, opts) {
- opts = opts || {}
- const memoized = (
- byDigest
- ? memo.get.byDigest(cache, key, opts)
- : memo.get(cache, key, opts)
- )
- if (memoized && opts.memoize !== false) {
- return BB.resolve(byDigest ? memoized : {
- metadata: memoized.entry.metadata,
- data: memoized.data,
- integrity: memoized.entry.integrity,
- size: memoized.entry.size
- })
- }
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read(cache, byDigest ? key : entry.integrity, {
- integrity: opts.integrity,
- size: opts.size
- }).then(data => byDigest ? data : {
- metadata: entry.metadata,
- data: data,
- size: entry.size,
- integrity: entry.integrity
- }).then(res => {
- if (opts.memoize && byDigest) {
- memo.put.byDigest(cache, key, res, opts)
- } else if (opts.memoize) {
- memo.put(cache, entry, res.data, opts)
- }
- return res
- })
- })
-}
-
-module.exports.stream = getStream
-function getStream (cache, key, opts) {
- opts = opts || {}
- let stream = through()
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(memoized.entry.metadata)
- ev === 'integrity' && cb(memoized.entry.integrity)
- ev === 'size' && cb(memoized.entry.size)
- })
- stream.write(memoized.data, () => stream.end())
- return stream
- }
- index.find(cache, key).then(entry => {
- if (!entry) {
- return stream.emit(
- 'error', new index.NotFoundError(cache, key)
- )
- }
- let memoStream
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put(cache, entry, Buffer.concat(memoData, memoLength), opts)
- cb()
- })
- } else {
- memoStream = through()
- }
- opts.size = opts.size == null ? entry.size : opts.size
- stream.emit('metadata', entry.metadata)
- stream.emit('integrity', entry.integrity)
- stream.emit('size', entry.size)
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(entry.metadata)
- ev === 'integrity' && cb(entry.integrity)
- ev === 'size' && cb(entry.size)
- })
- pipe(
- read.readStream(cache, entry.integrity, opts),
- memoStream,
- stream
- )
- }, err => stream.emit('error', err))
- return stream
-}
-
-module.exports.stream.byDigest = getStreamDigest
-function getStreamDigest (cache, integrity, opts) {
- opts = opts || {}
- const memoized = memo.get.byDigest(cache, integrity, opts)
- if (memoized && opts.memoize !== false) {
- const stream = through()
- stream.write(memoized, () => stream.end())
- return stream
- } else {
- let stream = read.readStream(cache, integrity, opts)
- if (opts.memoize) {
- let memoData = []
- let memoLength = 0
- const memoStream = through((c, en, cb) => {
- memoData && memoData.push(c)
- memoLength += c.length
- cb(null, c, en)
- }, cb => {
- memoData && memo.put.byDigest(
- cache,
- integrity,
- Buffer.concat(memoData, memoLength),
- opts
- )
- cb()
- })
- stream = pipeline(stream, memoStream)
- }
- return stream
- }
-}
-
-module.exports.info = info
-function info (cache, key, opts) {
- opts = opts || {}
- const memoized = memo.get(cache, key, opts)
- if (memoized && opts.memoize !== false) {
- return BB.resolve(memoized.entry)
- } else {
- return index.find(cache, key)
- }
-}
-
-module.exports.hasContent = read.hasContent
-
-module.exports.copy = function cp (cache, key, dest, opts) {
- return copy(false, cache, key, dest, opts)
-}
-module.exports.copy.byDigest = function cpDigest (cache, digest, dest, opts) {
- return copy(true, cache, digest, dest, opts)
-}
-function copy (byDigest, cache, key, dest, opts) {
- opts = opts || {}
- if (read.copy) {
- return (
- byDigest ? BB.resolve(null) : index.find(cache, key, opts)
- ).then(entry => {
- if (!entry && !byDigest) {
- throw new index.NotFoundError(cache, key)
- }
- return read.copy(
- cache, byDigest ? key : entry.integrity, dest, opts
- ).then(() => byDigest ? key : {
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity
- })
- })
- } else {
- return getData(byDigest, cache, key, opts).then(res => {
- return fs.writeFileAsync(dest, byDigest ? res : res.data)
- .then(() => byDigest ? key : {
- metadata: res.metadata,
- size: res.size,
- integrity: res.integrity
- })
- })
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/index.js
deleted file mode 100644
index a3db581c9f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./locales/en.js')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/path.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/path.js
deleted file mode 100644
index fa6491ba6f..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/path.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const contentVer = require('../../package.json')['cache-version'].content
-const hashToSegments = require('../util/hash-to-segments')
-const path = require('path')
-const ssri = require('ssri')
-
-// Current format of content file path:
-//
-// sha512-BaSE64Hex= ->
-// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
-//
-module.exports = contentPath
-function contentPath (cache, integrity) {
- const sri = ssri.parse(integrity, {single: true})
- // contentPath is the *strongest* algo given
- return path.join.apply(path, [
- contentDir(cache),
- sri.algorithm
- ].concat(hashToSegments(sri.hexDigest())))
-}
-
-module.exports._contentDir = contentDir
-function contentDir (cache) {
- return path.join(cache, `content-v${contentVer}`)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/read.js
deleted file mode 100644
index b09ad5cb40..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/read.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fs = require('graceful-fs')
-const PassThrough = require('stream').PassThrough
-const pipe = BB.promisify(require('mississippi').pipe)
-const ssri = require('ssri')
-const Y = require('../util/y.js')
-
-BB.promisifyAll(fs)
-
-module.exports = read
-function read (cache, integrity, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.readFileAsync(cpath, null).then(data => {
- if (typeof opts.size === 'number' && opts.size !== data.length) {
- throw sizeError(opts.size, data.length)
- } else if (ssri.checkData(data, sri)) {
- return data
- } else {
- throw integrityError(sri, cpath)
- }
- })
- })
-}
-
-module.exports.stream = readStream
-module.exports.readStream = readStream
-function readStream (cache, integrity, opts) {
- opts = opts || {}
- const stream = new PassThrough()
- pickContentSri(
- cache, integrity
- ).then(content => {
- const sri = content.sri
- return pipe(
- fs.createReadStream(contentPath(cache, sri)),
- ssri.integrityStream({
- integrity: sri,
- size: opts.size
- }),
- stream
- )
- }).catch(err => {
- stream.emit('error', err)
- })
- return stream
-}
-
-if (fs.copyFile) {
- module.exports.copy = copy
-}
-function copy (cache, integrity, dest, opts) {
- opts = opts || {}
- return pickContentSri(cache, integrity).then(content => {
- const sri = content.sri
- const cpath = contentPath(cache, sri)
- return fs.copyFileAsync(cpath, dest).then(() => content.size)
- })
-}
-
-module.exports.hasContent = hasContent
-function hasContent (cache, integrity) {
- if (!integrity) { return BB.resolve(false) }
- return pickContentSri(cache, integrity)
- .catch({code: 'ENOENT'}, () => false)
- .catch({code: 'EPERM'}, err => {
- if (process.platform !== 'win32') {
- throw err
- } else {
- return false
- }
- }).then(content => {
- if (!content.sri) return false
- return ({ sri: content.sri, size: content.stat.size })
- })
-}
-
-module.exports._pickContentSri = pickContentSri
-function pickContentSri (cache, integrity) {
- const sri = ssri.parse(integrity)
- // If `integrity` has multiple entries, pick the first digest
- // with available local data.
- const algo = sri.pickAlgorithm()
- const digests = sri[algo]
- if (digests.length <= 1) {
- const cpath = contentPath(cache, digests[0])
- return fs.lstatAsync(cpath).then(stat => ({ sri: digests[0], stat }))
- } else {
- return BB.any(sri[sri.pickAlgorithm()].map(meta => {
- return pickContentSri(cache, meta)
- }))
- }
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function integrityError (sri, path) {
- var err = new Error(Y`Integrity verification failed for ${sri} (${path})`)
- err.code = 'EINTEGRITY'
- err.sri = sri
- err.path = path
- return err
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/rm.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/rm.js
deleted file mode 100644
index 12cf158235..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/rm.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const hasContent = require('./read').hasContent
-const rimraf = BB.promisify(require('rimraf'))
-
-module.exports = rm
-function rm (cache, integrity) {
- return hasContent(cache, integrity).then(content => {
- if (content) {
- const sri = content.sri
- if (sri) {
- return rimraf(contentPath(cache, sri)).then(() => true)
- }
- } else {
- return false
- }
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/write.js
deleted file mode 100644
index a79ae92902..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/content/write.js
+++ /dev/null
@@ -1,162 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./path')
-const fixOwner = require('../util/fix-owner')
-const fs = require('graceful-fs')
-const moveFile = require('../util/move-file')
-const PassThrough = require('stream').PassThrough
-const path = require('path')
-const pipe = BB.promisify(require('mississippi').pipe)
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-const to = require('mississippi').to
-const uniqueFilename = require('unique-filename')
-const Y = require('../util/y.js')
-
-const writeFileAsync = BB.promisify(fs.writeFile)
-
-module.exports = write
-function write (cache, data, opts) {
- opts = opts || {}
- if (opts.algorithms && opts.algorithms.length > 1) {
- throw new Error(
- Y`opts.algorithms only supports a single algorithm for now`
- )
- }
- if (typeof opts.size === 'number' && data.length !== opts.size) {
- return BB.reject(sizeError(opts.size, data.length))
- }
- const sri = ssri.fromData(data, opts)
- if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) {
- return BB.reject(checksumError(opts.integrity, sri))
- }
- return BB.using(makeTmp(cache, opts), tmp => (
- writeFileAsync(
- tmp.target, data, {flag: 'wx'}
- ).then(() => (
- moveToDestination(tmp, cache, sri, opts)
- ))
- )).then(() => ({integrity: sri, size: data.length}))
-}
-
-module.exports.stream = writeStream
-function writeStream (cache, opts) {
- opts = opts || {}
- const inputStream = new PassThrough()
- let inputErr = false
- function errCheck () {
- if (inputErr) { throw inputErr }
- }
-
- let allDone
- const ret = to((c, n, cb) => {
- if (!allDone) {
- allDone = handleContent(inputStream, cache, opts, errCheck)
- }
- inputStream.write(c, n, cb)
- }, cb => {
- inputStream.end(() => {
- if (!allDone) {
- const e = new Error(Y`Cache input stream was empty`)
- e.code = 'ENODATA'
- return ret.emit('error', e)
- }
- allDone.then(res => {
- res.integrity && ret.emit('integrity', res.integrity)
- res.size !== null && ret.emit('size', res.size)
- cb()
- }, e => {
- ret.emit('error', e)
- })
- })
- })
- ret.once('error', e => {
- inputErr = e
- })
- return ret
-}
-
-function handleContent (inputStream, cache, opts, errCheck) {
- return BB.using(makeTmp(cache, opts), tmp => {
- errCheck()
- return pipeToTmp(
- inputStream, cache, tmp.target, opts, errCheck
- ).then(res => {
- return moveToDestination(
- tmp, cache, res.integrity, opts, errCheck
- ).then(() => res)
- })
- })
-}
-
-function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) {
- return BB.resolve().then(() => {
- let integrity
- let size
- const hashStream = ssri.integrityStream({
- integrity: opts.integrity,
- algorithms: opts.algorithms,
- size: opts.size
- }).on('integrity', s => {
- integrity = s
- }).on('size', s => {
- size = s
- })
- const outStream = fs.createWriteStream(tmpTarget, {
- flags: 'wx'
- })
- errCheck()
- return pipe(inputStream, hashStream, outStream).then(() => {
- return {integrity, size}
- }, err => {
- return rimraf(tmpTarget).then(() => { throw err })
- })
- })
-}
-
-function makeTmp (cache, opts) {
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(
- path.dirname(tmpTarget), opts.uid, opts.gid
- ).then(() => ({
- target: tmpTarget,
- moved: false
- })).disposer(tmp => (!tmp.moved && rimraf(tmp.target)))
-}
-
-function moveToDestination (tmp, cache, sri, opts, errCheck) {
- errCheck && errCheck()
- const destination = contentPath(cache, sri)
- const destDir = path.dirname(destination)
-
- return fixOwner.mkdirfix(
- destDir, opts.uid, opts.gid
- ).then(() => {
- errCheck && errCheck()
- return moveFile(tmp.target, destination)
- }).then(() => {
- errCheck && errCheck()
- tmp.moved = true
- return fixOwner.chownr(destination, opts.uid, opts.gid)
- })
-}
-
-function sizeError (expected, found) {
- var err = new Error(Y`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function checksumError (expected, found) {
- var err = new Error(Y`Integrity check failed:
- Wanted: ${expected}
- Found: ${found}`)
- err.code = 'EINTEGRITY'
- err.expected = expected
- err.found = found
- return err
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/entry-index.js
deleted file mode 100644
index face0fe79c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/entry-index.js
+++ /dev/null
@@ -1,224 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const crypto = require('crypto')
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const hashToSegments = require('./util/hash-to-segments')
-const ms = require('mississippi')
-const path = require('path')
-const ssri = require('ssri')
-const Y = require('./util/y.js')
-
-const indexV = require('../package.json')['cache-version'].index
-
-const appendFileAsync = BB.promisify(fs.appendFile)
-const readFileAsync = BB.promisify(fs.readFile)
-const readdirAsync = BB.promisify(fs.readdir)
-const concat = ms.concat
-const from = ms.from
-
-module.exports.NotFoundError = class NotFoundError extends Error {
- constructor (cache, key) {
- super(Y`No cache entry for \`${key}\` found in \`${cache}\``)
- this.code = 'ENOENT'
- this.cache = cache
- this.key = key
- }
-}
-
-module.exports.insert = insert
-function insert (cache, key, integrity, opts) {
- opts = opts || {}
- const bucket = bucketPath(cache, key)
- const entry = {
- key,
- integrity: integrity && ssri.stringify(integrity),
- time: Date.now(),
- size: opts.size,
- metadata: opts.metadata
- }
- return fixOwner.mkdirfix(
- path.dirname(bucket), opts.uid, opts.gid
- ).then(() => {
- const stringified = JSON.stringify(entry)
- // NOTE - Cleverness ahoy!
- //
- // This works because it's tremendously unlikely for an entry to corrupt
- // another while still preserving the string length of the JSON in
- // question. So, we just slap the length in there and verify it on read.
- //
- // Thanks to @isaacs for the whiteboarding session that ended up with this.
- return appendFileAsync(
- bucket, `\n${hashEntry(stringified)}\t${stringified}`
- )
- }).then(
- () => fixOwner.chownr(bucket, opts.uid, opts.gid)
- ).catch({code: 'ENOENT'}, () => {
- // There's a class of race conditions that happen when things get deleted
- // during fixOwner, or between the two mkdirfix/chownr calls.
- //
- // It's perfectly fine to just not bother in those cases and lie
- // that the index entry was written. Because it's a cache.
- }).then(() => {
- return formatEntry(cache, entry)
- })
-}
-
-module.exports.find = find
-function find (cache, key) {
- const bucket = bucketPath(cache, key)
- return bucketEntries(cache, bucket).then(entries => {
- return entries.reduce((latest, next) => {
- if (next && next.key === key) {
- return formatEntry(cache, next)
- } else {
- return latest
- }
- }, null)
- }).catch(err => {
- if (err.code === 'ENOENT') {
- return null
- } else {
- throw err
- }
- })
-}
-
-module.exports.delete = del
-function del (cache, key, opts) {
- return insert(cache, key, null, opts)
-}
-
-module.exports.lsStream = lsStream
-function lsStream (cache) {
- const indexDir = bucketDir(cache)
- const stream = from.obj()
-
- // "/cachename/*"
- readdirOrEmpty(indexDir).map(bucket => {
- const bucketPath = path.join(indexDir, bucket)
-
- // "/cachename/<bucket 0xFF>/*"
- return readdirOrEmpty(bucketPath).map(subbucket => {
- const subbucketPath = path.join(bucketPath, subbucket)
-
- // "/cachename/<bucket 0xFF>/<bucket 0xFF>/*"
- return readdirOrEmpty(subbucketPath).map(entry => {
- const getKeyToEntry = bucketEntries(
- cache,
- path.join(subbucketPath, entry)
- ).reduce((acc, entry) => {
- acc.set(entry.key, entry)
- return acc
- }, new Map())
-
- return getKeyToEntry.then(reduced => {
- return Array.from(reduced.values()).map(
- entry => stream.push(formatEntry(cache, entry))
- )
- }).catch({code: 'ENOENT'}, nop)
- })
- })
- }).then(() => {
- stream.push(null)
- }, err => {
- stream.emit('error', err)
- })
-
- return stream
-}
-
-module.exports.ls = ls
-function ls (cache) {
- return BB.fromNode(cb => {
- lsStream(cache).on('error', cb).pipe(concat(entries => {
- cb(null, entries.reduce((acc, xs) => {
- acc[xs.key] = xs
- return acc
- }, {}))
- }))
- })
-}
-
-function bucketEntries (cache, bucket, filter) {
- return readFileAsync(
- bucket, 'utf8'
- ).then(data => {
- let entries = []
- data.split('\n').forEach(entry => {
- if (!entry) { return }
- const pieces = entry.split('\t')
- if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
- // Hash is no good! Corruption or malice? Doesn't matter!
- // EJECT EJECT
- return
- }
- let obj
- try {
- obj = JSON.parse(pieces[1])
- } catch (e) {
- // Entry is corrupted!
- return
- }
- if (obj) {
- entries.push(obj)
- }
- })
- return entries
- })
-}
-
-module.exports._bucketDir = bucketDir
-function bucketDir (cache) {
- return path.join(cache, `index-v${indexV}`)
-}
-
-module.exports._bucketPath = bucketPath
-function bucketPath (cache, key) {
- const hashed = hashKey(key)
- return path.join.apply(path, [bucketDir(cache)].concat(
- hashToSegments(hashed)
- ))
-}
-
-module.exports._hashKey = hashKey
-function hashKey (key) {
- return hash(key, 'sha256')
-}
-
-module.exports._hashEntry = hashEntry
-function hashEntry (str) {
- return hash(str, 'sha1')
-}
-
-function hash (str, digest) {
- return crypto
- .createHash(digest)
- .update(str)
- .digest('hex')
-}
-
-function formatEntry (cache, entry) {
- // Treat null digests as deletions. They'll shadow any previous entries.
- if (!entry.integrity) { return null }
- return {
- key: entry.key,
- integrity: entry.integrity,
- path: contentPath(cache, entry.integrity),
- size: entry.size,
- time: entry.time,
- metadata: entry.metadata
- }
-}
-
-function readdirOrEmpty (dir) {
- return readdirAsync(dir)
- .catch({code: 'ENOENT'}, () => [])
- .catch({code: 'ENOTDIR'}, () => [])
-}
-
-function nop () {
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/memoization.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/memoization.js
deleted file mode 100644
index 92179c7ac6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/memoization.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict'
-
-const LRU = require('lru-cache')
-
-const MAX_SIZE = 50 * 1024 * 1024 // 50MB
-const MAX_AGE = 3 * 60 * 1000
-
-let MEMOIZED = new LRU({
- max: MAX_SIZE,
- maxAge: MAX_AGE,
- length: (entry, key) => {
- if (key.startsWith('key:')) {
- return entry.data.length
- } else if (key.startsWith('digest:')) {
- return entry.length
- }
- }
-})
-
-module.exports.clearMemoized = clearMemoized
-function clearMemoized () {
- const old = {}
- MEMOIZED.forEach((v, k) => {
- old[k] = v
- })
- MEMOIZED.reset()
- return old
-}
-
-module.exports.put = put
-function put (cache, entry, data, opts) {
- pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data })
- putDigest(cache, entry.integrity, data, opts)
-}
-
-module.exports.put.byDigest = putDigest
-function putDigest (cache, integrity, data, opts) {
- pickMem(opts).set(`digest:${cache}:${integrity}`, data)
-}
-
-module.exports.get = get
-function get (cache, key, opts) {
- return pickMem(opts).get(`key:${cache}:${key}`)
-}
-
-module.exports.get.byDigest = getDigest
-function getDigest (cache, integrity, opts) {
- return pickMem(opts).get(`digest:${cache}:${integrity}`)
-}
-
-class ObjProxy {
- constructor (obj) {
- this.obj = obj
- }
- get (key) { return this.obj[key] }
- set (key, val) { this.obj[key] = val }
-}
-
-function pickMem (opts) {
- if (!opts || !opts.memoize) {
- return MEMOIZED
- } else if (opts.memoize.get && opts.memoize.set) {
- return opts.memoize
- } else if (typeof opts.memoize === 'object') {
- return new ObjProxy(opts.memoize)
- } else {
- return MEMOIZED
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/fix-owner.js
deleted file mode 100644
index 7000bff048..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/fix-owner.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const chownr = BB.promisify(require('chownr'))
-const mkdirp = BB.promisify(require('mkdirp'))
-const inflight = require('promise-inflight')
-
-module.exports.chownr = fixOwner
-function fixOwner (filepath, uid, gid) {
- if (!process.getuid) {
- // This platform doesn't need ownership fixing
- return BB.resolve()
- }
- if (typeof uid !== 'number' && typeof gid !== 'number') {
- // There's no permissions override. Nothing to do here.
- return BB.resolve()
- }
- if ((typeof uid === 'number' && process.getuid() === uid) &&
- (typeof gid === 'number' && process.getgid() === gid)) {
- // No need to override if it's already what we used.
- return BB.resolve()
- }
- return inflight(
- 'fixOwner: fixing ownership on ' + filepath,
- () => chownr(
- filepath,
- typeof uid === 'number' ? uid : process.getuid(),
- typeof gid === 'number' ? gid : process.getgid()
- ).catch({code: 'ENOENT'}, () => null)
- )
-}
-
-module.exports.mkdirfix = mkdirfix
-function mkdirfix (p, uid, gid, cb) {
- return mkdirp(p).then(made => {
- if (made) {
- return fixOwner(made, uid, gid).then(() => made)
- }
- }).catch({code: 'EEXIST'}, () => {
- // There's a race in mkdirp!
- return fixOwner(p, uid, gid).then(() => null)
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/hash-to-segments.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/hash-to-segments.js
deleted file mode 100644
index 192be2a6d6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/hash-to-segments.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-module.exports = hashToSegments
-
-function hashToSegments (hash) {
- return [
- hash.slice(0, 2),
- hash.slice(2, 4),
- hash.slice(4)
- ]
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/move-file.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/move-file.js
deleted file mode 100644
index e12e98188c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/move-file.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const BB = require('bluebird')
-const chmod = BB.promisify(fs.chmod)
-const unlink = BB.promisify(fs.unlink)
-let move
-let pinflight
-
-module.exports = moveFile
-function moveFile (src, dest) {
- // This isn't quite an fs.rename -- the assumption is that
- // if `dest` already exists, and we get certain errors while
- // trying to move it, we should just not bother.
- //
- // In the case of cache corruption, users will receive an
- // EINTEGRITY error elsewhere, and can remove the offending
- // content their own way.
- //
- // Note that, as the name suggests, this strictly only supports file moves.
- return BB.fromNode(cb => {
- fs.link(src, dest, err => {
- if (err) {
- if (err.code === 'EEXIST' || err.code === 'EBUSY') {
- // file already exists, so whatever
- } else if (err.code === 'EPERM' && process.platform === 'win32') {
- // file handle stayed open even past graceful-fs limits
- } else {
- return cb(err)
- }
- }
- return cb()
- })
- }).then(() => {
- // content should never change for any reason, so make it read-only
- return BB.join(unlink(src), process.platform !== 'win32' && chmod(dest, '0444'))
- }).catch(err => {
- if (process.platform !== 'win32') {
- throw err
- } else {
- if (!pinflight) { pinflight = require('promise-inflight') }
- return pinflight('cacache-move-file:' + dest, () => {
- return BB.promisify(fs.stat)(dest).catch(err => {
- if (err !== 'ENOENT') {
- // Something else is wrong here. Bail bail bail
- throw err
- }
- // file doesn't already exist! let's try a rename -> copy fallback
- if (!move) { move = require('move-concurrently') }
- return move(src, dest, { BB, fs })
- })
- })
- }
- })
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/tmp.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/tmp.js
deleted file mode 100644
index 4fc4512cc8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/tmp.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const fixOwner = require('./fix-owner')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const uniqueFilename = require('unique-filename')
-
-module.exports.mkdir = mktmpdir
-function mktmpdir (cache, opts) {
- opts = opts || {}
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- return fixOwner.mkdirfix(tmpTarget, opts.uid, opts.gid).then(() => {
- return tmpTarget
- })
-}
-
-module.exports.withTmp = withTmp
-function withTmp (cache, opts, cb) {
- if (!cb) {
- cb = opts
- opts = null
- }
- opts = opts || {}
- return BB.using(mktmpdir(cache, opts).disposer(rimraf), cb)
-}
-
-module.exports.fix = fixtmpdir
-function fixtmpdir (cache, opts) {
- return fixOwner(path.join(cache, 'tmp'), opts.uid, opts.gid)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/y.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/y.js
deleted file mode 100644
index d62bedacb3..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/util/y.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict'
-
-const path = require('path')
-const y18n = require('y18n')({
- directory: path.join(__dirname, '../../locales'),
- locale: 'en',
- updateFiles: process.env.CACACHE_UPDATE_LOCALE_FILES === 'true'
-})
-
-module.exports = yTag
-function yTag (parts) {
- let str = ''
- parts.forEach((part, i) => {
- const arg = arguments[i + 1]
- str += part
- if (arg) {
- str += '%s'
- }
- })
- return y18n.__.apply(null, [str].concat([].slice.call(arguments, 1)))
-}
-
-module.exports.setLocale = locale => {
- y18n.setLocale(locale)
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/verify.js
deleted file mode 100644
index 6a01004c97..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/lib/verify.js
+++ /dev/null
@@ -1,213 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const contentPath = require('./content/path')
-const finished = BB.promisify(require('mississippi').finished)
-const fixOwner = require('./util/fix-owner')
-const fs = require('graceful-fs')
-const glob = BB.promisify(require('glob'))
-const index = require('./entry-index')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const ssri = require('ssri')
-
-BB.promisifyAll(fs)
-
-module.exports = verify
-function verify (cache, opts) {
- opts = opts || {}
- opts.log && opts.log.silly('verify', 'verifying cache at', cache)
- return BB.reduce([
- markStartTime,
- fixPerms,
- garbageCollect,
- rebuildIndex,
- cleanTmp,
- writeVerifile,
- markEndTime
- ], (stats, step, i) => {
- const label = step.name || `step #${i}`
- const start = new Date()
- return BB.resolve(step(cache, opts)).then(s => {
- s && Object.keys(s).forEach(k => {
- stats[k] = s[k]
- })
- const end = new Date()
- if (!stats.runTime) { stats.runTime = {} }
- stats.runTime[label] = end - start
- return stats
- })
- }, {}).tap(stats => {
- stats.runTime.total = stats.endTime - stats.startTime
- opts.log && opts.log.silly('verify', 'verification finished for', cache, 'in', `${stats.runTime.total}ms`)
- })
-}
-
-function markStartTime (cache, opts) {
- return { startTime: new Date() }
-}
-
-function markEndTime (cache, opts) {
- return { endTime: new Date() }
-}
-
-function fixPerms (cache, opts) {
- opts.log && opts.log.silly('verify', 'fixing cache permissions')
- return fixOwner.mkdirfix(cache, opts.uid, opts.gid).then(() => {
- // TODO - fix file permissions too
- return fixOwner.chownr(cache, opts.uid, opts.gid)
- }).then(() => null)
-}
-
-// Implements a naive mark-and-sweep tracing garbage collector.
-//
-// The algorithm is basically as follows:
-// 1. Read (and filter) all index entries ("pointers")
-// 2. Mark each integrity value as "live"
-// 3. Read entire filesystem tree in `content-vX/` dir
-// 4. If content is live, verify its checksum and delete it if it fails
-// 5. If content is not marked as live, rimraf it.
-//
-function garbageCollect (cache, opts) {
- opts.log && opts.log.silly('verify', 'garbage collecting content')
- const indexStream = index.lsStream(cache)
- const liveContent = new Set()
- indexStream.on('data', entry => {
- if (opts && opts.filter && !opts.filter(entry)) { return }
- liveContent.add(entry.integrity.toString())
- })
- return finished(indexStream).then(() => {
- const contentDir = contentPath._contentDir(cache)
- return glob(path.join(contentDir, '**'), {
- follow: false,
- nodir: true,
- nosort: true
- }).then(files => {
- return BB.resolve({
- verifiedContent: 0,
- reclaimedCount: 0,
- reclaimedSize: 0,
- badContentCount: 0,
- keptSize: 0
- }).tap((stats) => BB.map(files, (f) => {
- const split = f.split(/[/\\]/)
- const digest = split.slice(split.length - 3).join('')
- const algo = split[split.length - 4]
- const integrity = ssri.fromHex(digest, algo)
- if (liveContent.has(integrity.toString())) {
- return verifyContent(f, integrity).then(info => {
- if (!info.valid) {
- stats.reclaimedCount++
- stats.badContentCount++
- stats.reclaimedSize += info.size
- } else {
- stats.verifiedContent++
- stats.keptSize += info.size
- }
- return stats
- })
- } else {
- // No entries refer to this content. We can delete.
- stats.reclaimedCount++
- return fs.statAsync(f).then(s => {
- return rimraf(f).then(() => {
- stats.reclaimedSize += s.size
- return stats
- })
- })
- }
- }, {concurrency: opts.concurrency || 20}))
- })
- })
-}
-
-function verifyContent (filepath, sri) {
- return fs.statAsync(filepath).then(stat => {
- const contentInfo = {
- size: stat.size,
- valid: true
- }
- return ssri.checkStream(
- fs.createReadStream(filepath),
- sri
- ).catch(err => {
- if (err.code !== 'EINTEGRITY') { throw err }
- return rimraf(filepath).then(() => {
- contentInfo.valid = false
- })
- }).then(() => contentInfo)
- }).catch({code: 'ENOENT'}, () => ({size: 0, valid: false}))
-}
-
-function rebuildIndex (cache, opts) {
- opts.log && opts.log.silly('verify', 'rebuilding index')
- return index.ls(cache).then(entries => {
- const stats = {
- missingContent: 0,
- rejectedEntries: 0,
- totalEntries: 0
- }
- const buckets = {}
- for (let k in entries) {
- if (entries.hasOwnProperty(k)) {
- const hashed = index._hashKey(k)
- const entry = entries[k]
- const excluded = opts && opts.filter && !opts.filter(entry)
- excluded && stats.rejectedEntries++
- if (buckets[hashed] && !excluded) {
- buckets[hashed].push(entry)
- } else if (buckets[hashed] && excluded) {
- // skip
- } else if (excluded) {
- buckets[hashed] = []
- buckets[hashed]._path = index._bucketPath(cache, k)
- } else {
- buckets[hashed] = [entry]
- buckets[hashed]._path = index._bucketPath(cache, k)
- }
- }
- }
- return BB.map(Object.keys(buckets), key => {
- return rebuildBucket(cache, buckets[key], stats, opts)
- }, {concurrency: opts.concurrency || 20}).then(() => stats)
- })
-}
-
-function rebuildBucket (cache, bucket, stats, opts) {
- return fs.truncateAsync(bucket._path).then(() => {
- // This needs to be serialized because cacache explicitly
- // lets very racy bucket conflicts clobber each other.
- return BB.mapSeries(bucket, entry => {
- const content = contentPath(cache, entry.integrity)
- return fs.statAsync(content).then(() => {
- return index.insert(cache, entry.key, entry.integrity, {
- uid: opts.uid,
- gid: opts.gid,
- metadata: entry.metadata
- }).then(() => { stats.totalEntries++ })
- }).catch({code: 'ENOENT'}, () => {
- stats.rejectedEntries++
- stats.missingContent++
- })
- })
- })
-}
-
-function cleanTmp (cache, opts) {
- opts.log && opts.log.silly('verify', 'cleaning tmp directory')
- return rimraf(path.join(cache, 'tmp'))
-}
-
-function writeVerifile (cache, opts) {
- const verifile = path.join(cache, '_lastverified')
- opts.log && opts.log.silly('verify', 'writing verifile to ' + verifile)
- return fs.writeFileAsync(verifile, '' + (+(new Date())))
-}
-
-module.exports.lastRun = lastRun
-function lastRun (cache) {
- return fs.readFileAsync(
- path.join(cache, '_lastverified'), 'utf8'
- ).then(data => new Date(+data))
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.js
deleted file mode 100644
index 22025cf0e8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('en')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.stream = cache => ls.stream(cache)
-
-x.get = (cache, key, opts) => get(cache, key, opts)
-x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts)
-x.get.stream = (cache, key, opts) => get.stream(cache, key, opts)
-x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts)
-x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts)
-x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts)
-x.get.info = (cache, key) => get.info(cache, key)
-x.get.hasContent = (cache, hash) => get.hasContent(cache, hash)
-
-x.put = (cache, key, data, opts) => put(cache, key, data, opts)
-x.put.stream = (cache, key, opts) => put.stream(cache, key, opts)
-
-x.rm = (cache, key) => rm.entry(cache, key)
-x.rm.all = cache => rm.all(cache)
-x.rm.entry = x.rm
-x.rm.content = (cache, hash) => rm.content(cache, hash)
-
-x.setLocale = lang => setLocale(lang)
-x.clearMemoized = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, opts) => tmp.mkdir(cache, opts)
-x.tmp.withTmp = (cache, opts, cb) => tmp.withTmp(cache, opts, cb)
-
-x.verify = (cache, opts) => verify(cache, opts)
-x.verify.lastRun = cache => verify.lastRun(cache)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.json
deleted file mode 100644
index 82ecb08324..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/en.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No cache entry for %s found in %s",
- "Integrity verification failed for %s (%s)": "Integrity verification failed for %s (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Bad data size: expected inserted data to be %s bytes, but got %s instead",
- "Cache input stream was empty": "Cache input stream was empty"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.js
deleted file mode 100644
index 9a27de6585..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict'
-
-const ls = require('../ls.js')
-const get = require('../get.js')
-const put = require('../put.js')
-const rm = require('../rm.js')
-const verify = require('../verify.js')
-const setLocale = require('../lib/util/y.js').setLocale
-const clearMemoized = require('../lib/memoization.js').clearMemoized
-const tmp = require('../lib/util/tmp.js')
-
-setLocale('es')
-
-const x = module.exports
-
-x.ls = cache => ls(cache)
-x.ls.flujo = cache => ls.stream(cache)
-
-x.saca = (cache, clave, ops) => get(cache, clave, ops)
-x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops)
-x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops)
-x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops)
-x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts)
-x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino, opts)
-x.saca.info = (cache, clave) => get.info(cache, clave)
-x.saca.tieneDatos = (cache, hacheo) => get.hasContent(cache, hacheo)
-
-x.mete = (cache, clave, datos, ops) => put(cache, clave, datos, ops)
-x.mete.flujo = (cache, clave, ops) => put.stream(cache, clave, ops)
-
-x.rm = (cache, clave) => rm.entry(cache, clave)
-x.rm.todo = cache => rm.all(cache)
-x.rm.entrada = x.rm
-x.rm.datos = (cache, hacheo) => rm.content(cache, hacheo)
-
-x.ponLenguaje = lang => setLocale(lang)
-x.limpiaMemoizado = () => clearMemoized()
-
-x.tmp = {}
-x.tmp.mkdir = (cache, ops) => tmp.mkdir(cache, ops)
-x.tmp.hazdir = x.tmp.mkdir
-x.tmp.conTmp = (cache, ops, cb) => tmp.withTmp(cache, ops, cb)
-
-x.verifica = (cache, ops) => verify(cache, ops)
-x.verifica.ultimaVez = cache => verify.lastRun(cache)
-x.verifica.ĆŗltimaVez = x.verifica.ultimaVez
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.json
deleted file mode 100644
index a91d76225b..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/locales/es.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "No cache entry for `%s` found in `%s`": "No existe ninguna entrada para Ā«%sĀ» en Ā«%sĀ»",
- "Integrity verification failed for %s (%s)": "VerificaciĆ³n de integridad fallĆ³ para Ā«%sĀ» (%s)",
- "Bad data size: expected inserted data to be %s bytes, but got %s instead": "TamaƱo incorrecto de datos: los datos insertados debieron haber sido %s octetos, pero fueron %s",
- "Cache input stream was empty": "El stream de entrada al cachƩ estaba vacƭo"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/ls.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/ls.js
deleted file mode 100644
index 9f49b388ac..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/ls.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict'
-
-var index = require('./lib/entry-index')
-
-module.exports = index.ls
-module.exports.stream = index.lsStream
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/package.json
deleted file mode 100644
index 7f7ad4057e..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/package.json
+++ /dev/null
@@ -1,126 +0,0 @@
-{
- "_from": "cacache@^9.2.9",
- "_id": "cacache@9.3.0",
- "_inBundle": false,
- "_integrity": "sha512-Vbi8J1XfC8v+FbQ6QkOtKXsHpPnB0i9uMeYFJoj40EbdOsEqWB3DPpNjfsnYBkqOPYA8UvrqH6FZPpBP0zdN7g==",
- "_location": "/npm-profile/make-fetch-happen/cacache",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cacache@^9.2.9",
- "name": "cacache",
- "escapedName": "cacache",
- "rawSpec": "^9.2.9",
- "saveSpec": null,
- "fetchSpec": "^9.2.9"
- },
- "_requiredBy": [
- "/npm-profile/make-fetch-happen"
- ],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-9.3.0.tgz",
- "_shasum": "9cd58f2dd0b8c8cacf685b7067b416d6d3cf9db1",
- "_spec": "cacache@^9.2.9",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "Kat MarchƔn",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/cacache/issues"
- },
- "bundleDependencies": false,
- "cache-version": {
- "content": "2",
- "index": "5"
- },
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "contributors": [
- {
- "name": "Charlotte Spencer",
- "email": "charlottelaspencer@gmail.com"
- },
- {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- }
- ],
- "dependencies": {
- "bluebird": "^3.5.0",
- "chownr": "^1.0.1",
- "glob": "^7.1.2",
- "graceful-fs": "^4.1.11",
- "lru-cache": "^4.1.1",
- "mississippi": "^1.3.0",
- "mkdirp": "^0.5.1",
- "move-concurrently": "^1.0.1",
- "promise-inflight": "^1.0.1",
- "rimraf": "^2.6.1",
- "ssri": "^4.1.6",
- "unique-filename": "^1.1.0",
- "y18n": "^3.2.1"
- },
- "deprecated": false,
- "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
- "devDependencies": {
- "benchmark": "^2.1.4",
- "chalk": "^2.0.1",
- "cross-env": "^5.0.1",
- "nyc": "^11.1.0",
- "require-inject": "^1.4.2",
- "safe-buffer": "^5.1.1",
- "standard": "^10.0.2",
- "standard-version": "^4.2.0",
- "tacks": "^1.2.2",
- "tap": "^10.7.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js",
- "lib",
- "locales"
- ],
- "homepage": "https://github.com/zkat/cacache#readme",
- "keywords": [
- "cache",
- "caching",
- "content-addressable",
- "sri",
- "sri hash",
- "subresource integrity",
- "cache",
- "storage",
- "store",
- "file store",
- "filesystem",
- "disk cache",
- "disk storage"
- ],
- "license": "CC0-1.0",
- "main": "index.js",
- "name": "cacache",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/cacache.git"
- },
- "scripts": {
- "benchmarks": "node test/benchmarks",
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard lib test *.js",
- "release": "standard-version -s",
- "test": "cross-env CACACHE_UPDATE_LOCALE_FILES=true nyc --all -- tap -J test/*.js",
- "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "9.3.0"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/put.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/put.js
deleted file mode 100644
index fe1293e5e7..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/put.js
+++ /dev/null
@@ -1,71 +0,0 @@
-'use strict'
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const write = require('./lib/content/write')
-const to = require('mississippi').to
-
-module.exports = putData
-function putData (cache, key, data, opts) {
- opts = opts || {}
- return write(cache, data, opts).then(res => {
- // TODO - stop modifying opts
- opts.size = res.size
- return index.insert(cache, key, res.integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, data, opts)
- }
- return res.integrity
- })
- })
-}
-
-module.exports.stream = putStream
-function putStream (cache, key, opts) {
- opts = opts || {}
- let integrity
- let size
- const contentStream = write.stream(
- cache, opts
- ).on('integrity', int => {
- integrity = int
- }).on('size', s => {
- size = s
- })
- let memoData
- let memoTotal = 0
- const stream = to((chunk, enc, cb) => {
- contentStream.write(chunk, enc, () => {
- if (opts.memoize) {
- if (!memoData) { memoData = [] }
- memoData.push(chunk)
- memoTotal += chunk.length
- }
- cb()
- })
- }, cb => {
- contentStream.end(() => {
- // TODO - stop modifying `opts`
- opts.size = size
- index.insert(cache, key, integrity, opts).then(entry => {
- if (opts.memoize) {
- memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts)
- }
- stream.emit('integrity', integrity)
- cb()
- })
- })
- })
- let erred = false
- stream.once('error', err => {
- if (erred) { return }
- erred = true
- contentStream.emit('error', err)
- })
- contentStream.once('error', err => {
- if (erred) { return }
- erred = true
- stream.emit('error', err)
- })
- return stream
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/rm.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/rm.js
deleted file mode 100644
index e71a1d27b4..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/rm.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict'
-
-const BB = require('bluebird')
-
-const index = require('./lib/entry-index')
-const memo = require('./lib/memoization')
-const path = require('path')
-const rimraf = BB.promisify(require('rimraf'))
-const rmContent = require('./lib/content/rm')
-
-module.exports = entry
-module.exports.entry = entry
-function entry (cache, key) {
- memo.clearMemoized()
- return index.delete(cache, key)
-}
-
-module.exports.content = content
-function content (cache, integrity) {
- memo.clearMemoized()
- return rmContent(cache, integrity)
-}
-
-module.exports.all = all
-function all (cache) {
- memo.clearMemoized()
- return rimraf(path.join(cache, '*(content-*|index-*)'))
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/verify.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/verify.js
deleted file mode 100644
index db7763d7af..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/cacache/verify.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict'
-
-module.exports = require('./lib/verify')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
index 5dc07ac58c..99069fc8d7 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
@@ -155,6 +155,10 @@ if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
![satisfiesWithoutRevalidation](fresh.jpg)
+## Used by
+
+* [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/pornel/http-cache-semantics/network/dependents)
+
## Implemented
* `Cache-Control` response header with all the quirks.
@@ -169,5 +173,5 @@ if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
## Unimplemented
-* Range requests, If-Range
+* Merging of range requests, If-Range (but correctly supports them as non-cacheable)
* Revalidation of multiple representations
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js
deleted file mode 100644
index 8a5bcab597..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js
+++ /dev/null
@@ -1,497 +0,0 @@
-'use strict';
-// rfc7231 6.1
-const statusCodeCacheableByDefault = [200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501];
-
-// This implementation does not understand partial responses (206)
-const understoodStatuses = [200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501];
-
-const hopByHopHeaders = {'connection':true, 'keep-alive':true, 'proxy-authenticate':true, 'proxy-authorization':true, 'te':true, 'trailer':true, 'transfer-encoding':true, 'upgrade':true};
-const excludedFromRevalidationUpdate = {
- // Since the old body is reused, it doesn't make sense to change properties of the body
- 'content-length': true, 'content-encoding': true, 'transfer-encoding': true,
- 'content-range': true,
-};
-
-function parseCacheControl(header) {
- const cc = {};
- if (!header) return cc;
-
- // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives),
- // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale
- const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing
- for(const part of parts) {
- const [k,v] = part.split(/\s*=\s*/, 2);
- cc[k] = (v === undefined) ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
- }
-
- return cc;
-}
-
-function formatCacheControl(cc) {
- let parts = [];
- for(const k in cc) {
- const v = cc[k];
- parts.push(v === true ? k : k + '=' + v);
- }
- if (!parts.length) {
- return undefined;
- }
- return parts.join(', ');
-}
-
-module.exports = class CachePolicy {
- constructor(req, res, {shared, cacheHeuristic, immutableMinTimeToLive, ignoreCargoCult, _fromObject} = {}) {
- if (_fromObject) {
- this._fromObject(_fromObject);
- return;
- }
-
- if (!res || !res.headers) {
- throw Error("Response headers missing");
- }
- this._assertRequestHasHeaders(req);
-
- this._responseTime = this.now();
- this._isShared = shared !== false;
- this._cacheHeuristic = undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE
- this._immutableMinTtl = undefined !== immutableMinTimeToLive ? immutableMinTimeToLive : 24*3600*1000;
-
- this._status = 'status' in res ? res.status : 200;
- this._resHeaders = res.headers;
- this._rescc = parseCacheControl(res.headers['cache-control']);
- this._method = 'method' in req ? req.method : 'GET';
- this._url = req.url;
- this._host = req.headers.host;
- this._noAuthorization = !req.headers.authorization;
- this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used
- this._reqcc = parseCacheControl(req.headers['cache-control']);
-
- // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching,
- // so there's no point stricly adhering to the blindly copy&pasted directives.
- if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
- delete this._rescc['pre-check'];
- delete this._rescc['post-check'];
- delete this._rescc['no-cache'];
- delete this._rescc['no-store'];
- delete this._rescc['must-revalidate'];
- this._resHeaders = Object.assign({}, this._resHeaders, {'cache-control': formatCacheControl(this._rescc)});
- delete this._resHeaders.expires;
- delete this._resHeaders.pragma;
- }
-
- // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive
- // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1).
- if (!res.headers['cache-control'] && /no-cache/.test(res.headers.pragma)) {
- this._rescc['no-cache'] = true;
- }
- }
-
- now() {
- return Date.now();
- }
-
- storable() {
- // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it.
- return !!(!this._reqcc['no-store'] &&
- // A cache MUST NOT store a response to any request, unless:
- // The request method is understood by the cache and defined as being cacheable, and
- ('GET' === this._method || 'HEAD' === this._method || ('POST' === this._method && this._hasExplicitExpiration())) &&
- // the response status code is understood by the cache, and
- understoodStatuses.indexOf(this._status) !== -1 &&
- // the "no-store" cache directive does not appear in request or response header fields, and
- !this._rescc['no-store'] &&
- // the "private" response directive does not appear in the response, if the cache is shared, and
- (!this._isShared || !this._rescc.private) &&
- // the Authorization header field does not appear in the request, if the cache is shared,
- (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) &&
- // the response either:
- (
- // contains an Expires header field, or
- this._resHeaders.expires ||
- // contains a max-age response directive, or
- // contains a s-maxage response directive and the cache is shared, or
- // contains a public response directive.
- this._rescc.public || this._rescc['max-age'] || this._rescc['s-maxage'] ||
- // has a status code that is defined as cacheable by default
- statusCodeCacheableByDefault.indexOf(this._status) !== -1
- ));
- }
-
- _hasExplicitExpiration() {
- // 4.2.1 Calculating Freshness Lifetime
- return (this._isShared && this._rescc['s-maxage']) ||
- this._rescc['max-age'] ||
- this._resHeaders.expires;
- }
-
- _assertRequestHasHeaders(req) {
- if (!req || !req.headers) {
- throw Error("Request headers missing");
- }
- }
-
- satisfiesWithoutRevalidation(req) {
- this._assertRequestHasHeaders(req);
-
- // When presented with a request, a cache MUST NOT reuse a stored response, unless:
- // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive,
- // unless the stored response is successfully validated (Section 4.3), and
- const requestCC = parseCacheControl(req.headers['cache-control']);
- if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {
- return false;
- }
-
- if (requestCC['max-age'] && this.age() > requestCC['max-age']) {
- return false;
- }
-
- if (requestCC['min-fresh'] && this.timeToLive() < 1000*requestCC['min-fresh']) {
- return false;
- }
-
- // the stored response is either:
- // fresh, or allowed to be served stale
- if (this.stale()) {
- const allowsStale = requestCC['max-stale'] && !this._rescc['must-revalidate'] && (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge());
- if (!allowsStale) {
- return false;
- }
- }
-
- return this._requestMatches(req, false);
- }
-
- _requestMatches(req, allowHeadMethod) {
- // The presented effective request URI and that of the stored response match, and
- return (!this._url || this._url === req.url) &&
- (this._host === req.headers.host) &&
- // the request method associated with the stored response allows it to be used for the presented request, and
- (!req.method || this._method === req.method || (allowHeadMethod && 'HEAD' === req.method)) &&
- // selecting header fields nominated by the stored response (if any) match those presented, and
- this._varyMatches(req);
- }
-
- _allowsStoringAuthenticated() {
- // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.
- return this._rescc['must-revalidate'] || this._rescc.public || this._rescc['s-maxage'];
- }
-
- _varyMatches(req) {
- if (!this._resHeaders.vary) {
- return true;
- }
-
- // A Vary header field-value of "*" always fails to match
- if (this._resHeaders.vary === '*') {
- return false;
- }
-
- const fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
- for(const name of fields) {
- if (req.headers[name] !== this._reqHeaders[name]) return false;
- }
- return true;
- }
-
- _copyWithoutHopByHopHeaders(inHeaders) {
- const headers = {};
- for(const name in inHeaders) {
- if (hopByHopHeaders[name]) continue;
- headers[name] = inHeaders[name];
- }
- // 9.1. Connection
- if (inHeaders.connection) {
- const tokens = inHeaders.connection.trim().split(/\s*,\s*/);
- for(const name of tokens) {
- delete headers[name];
- }
- }
- if (headers.warning) {
- const warnings = headers.warning.split(/,/).filter(warning => {
- return !/^\s*1[0-9][0-9]/.test(warning);
- });
- if (!warnings.length) {
- delete headers.warning;
- } else {
- headers.warning = warnings.join(',').trim();
- }
- }
- return headers;
- }
-
- responseHeaders() {
- const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
- const age = this.age();
-
- // A cache SHOULD generate 113 warning if it heuristically chose a freshness
- // lifetime greater than 24 hours and the response's age is greater than 24 hours.
- if (age > 3600*24 && !this._hasExplicitExpiration() && this.maxAge() > 3600*24) {
- headers.warning = (headers.warning ? `${headers.warning}, ` : '') + '113 - "rfc7234 5.5.4"';
- }
- headers.age = `${Math.round(age)}`;
- return headers;
- }
-
- /**
- * Value of the Date response header or current time if Date was demed invalid
- * @return timestamp
- */
- date() {
- const dateValue = Date.parse(this._resHeaders.date)
- const maxClockDrift = 8*3600*1000;
- if (Number.isNaN(dateValue) || dateValue < this._responseTime-maxClockDrift || dateValue > this._responseTime+maxClockDrift) {
- return this._responseTime;
- }
- return dateValue;
- }
-
- /**
- * Value of the Age header, in seconds, updated for the current time.
- * May be fractional.
- *
- * @return Number
- */
- age() {
- let age = Math.max(0, (this._responseTime - this.date())/1000);
- if (this._resHeaders.age) {
- let ageValue = this._ageValue();
- if (ageValue > age) age = ageValue;
- }
-
- const residentTime = (this.now() - this._responseTime)/1000;
- return age + residentTime;
- }
-
- _ageValue() {
- const ageValue = parseInt(this._resHeaders.age);
- return isFinite(ageValue) ? ageValue : 0;
- }
-
- /**
- * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
- *
- * For an up-to-date value, see `timeToLive()`.
- *
- * @return Number
- */
- maxAge() {
- if (!this.storable() || this._rescc['no-cache']) {
- return 0;
- }
-
- // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default
- // so this implementation requires explicit opt-in via public header
- if (this._isShared && (this._resHeaders['set-cookie'] && !this._rescc.public && !this._rescc.immutable)) {
- return 0;
- }
-
- if (this._resHeaders.vary === '*') {
- return 0;
- }
-
- if (this._isShared) {
- if (this._rescc['proxy-revalidate']) {
- return 0;
- }
- // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.
- if (this._rescc['s-maxage']) {
- return parseInt(this._rescc['s-maxage'], 10);
- }
- }
-
- // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.
- if (this._rescc['max-age']) {
- return parseInt(this._rescc['max-age'], 10);
- }
-
- const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;
-
- const dateValue = this.date();
- if (this._resHeaders.expires) {
- const expires = Date.parse(this._resHeaders.expires);
- // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired").
- if (Number.isNaN(expires) || expires < dateValue) {
- return 0;
- }
- return Math.max(defaultMinTtl, (expires - dateValue)/1000);
- }
-
- if (this._resHeaders['last-modified']) {
- const lastModified = Date.parse(this._resHeaders['last-modified']);
- if (isFinite(lastModified) && dateValue > lastModified) {
- return Math.max(defaultMinTtl, (dateValue - lastModified)/1000 * this._cacheHeuristic);
- }
- }
-
- return defaultMinTtl;
- }
-
- timeToLive() {
- return Math.max(0, this.maxAge() - this.age())*1000;
- }
-
- stale() {
- return this.maxAge() <= this.age();
- }
-
- static fromObject(obj) {
- return new this(undefined, undefined, {_fromObject:obj});
- }
-
- _fromObject(obj) {
- if (this._responseTime) throw Error("Reinitialized");
- if (!obj || obj.v !== 1) throw Error("Invalid serialization");
-
- this._responseTime = obj.t;
- this._isShared = obj.sh;
- this._cacheHeuristic = obj.ch;
- this._immutableMinTtl = obj.imm !== undefined ? obj.imm : 24*3600*1000;
- this._status = obj.st;
- this._resHeaders = obj.resh;
- this._rescc = obj.rescc;
- this._method = obj.m;
- this._url = obj.u;
- this._host = obj.h;
- this._noAuthorization = obj.a;
- this._reqHeaders = obj.reqh;
- this._reqcc = obj.reqcc;
- }
-
- toObject() {
- return {
- v:1,
- t: this._responseTime,
- sh: this._isShared,
- ch: this._cacheHeuristic,
- imm: this._immutableMinTtl,
- st: this._status,
- resh: this._resHeaders,
- rescc: this._rescc,
- m: this._method,
- u: this._url,
- h: this._host,
- a: this._noAuthorization,
- reqh: this._reqHeaders,
- reqcc: this._reqcc,
- };
- }
-
- /**
- * Headers for sending to the origin server to revalidate stale response.
- * Allows server to return 304 to allow reuse of the previous response.
- *
- * Hop by hop headers are always stripped.
- * Revalidation headers may be added or removed, depending on request.
- */
- revalidationHeaders(incomingReq) {
- this._assertRequestHasHeaders(incomingReq);
- const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
-
- // This implementation does not understand range requests
- delete headers['if-range'];
-
- if (!this._requestMatches(incomingReq, true) || !this.storable()) { // revalidation allowed via HEAD
- // not for the same resource, or wasn't allowed to be cached anyway
- delete headers['if-none-match'];
- delete headers['if-modified-since'];
- return headers;
- }
-
- /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */
- if (this._resHeaders.etag) {
- headers['if-none-match'] = headers['if-none-match'] ? `${headers['if-none-match']}, ${this._resHeaders.etag}` : this._resHeaders.etag;
- }
-
- // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request.
- const forbidsWeakValidators = headers['accept-ranges'] || headers['if-match'] || headers['if-unmodified-since'] || (this._method && this._method != 'GET');
-
- /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server.
- Note: This implementation does not understand partial responses (206) */
- if (forbidsWeakValidators) {
- delete headers['if-modified-since'];
-
- if (headers['if-none-match']) {
- const etags = headers['if-none-match'].split(/,/).filter(etag => {
- return !/^\s*W\//.test(etag);
- });
- if (!etags.length) {
- delete headers['if-none-match'];
- } else {
- headers['if-none-match'] = etags.join(',').trim();
- }
- }
- } else if (this._resHeaders['last-modified'] && !headers['if-modified-since']) {
- headers['if-modified-since'] = this._resHeaders['last-modified'];
- }
-
- return headers;
- }
-
- /**
- * Creates new CachePolicy with information combined from the previews response,
- * and the new revalidation response.
- *
- * Returns {policy, modified} where modified is a boolean indicating
- * whether the response body has been modified, and old cached body can't be used.
- *
- * @return {Object} {policy: CachePolicy, modified: Boolean}
- */
- revalidatedPolicy(request, response) {
- this._assertRequestHasHeaders(request);
- if (!response || !response.headers) {
- throw Error("Response headers missing");
- }
-
- // These aren't going to be supported exactly, since one CachePolicy object
- // doesn't know about all the other cached objects.
- let matches = false;
- if (response.status !== undefined && response.status != 304) {
- matches = false;
- } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) {
- // "All of the stored responses with the same strong validator are selected.
- // If none of the stored responses contain the same strong validator,
- // then the cache MUST NOT use the new response to update any stored responses."
- matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//,'') === response.headers.etag;
- } else if (this._resHeaders.etag && response.headers.etag) {
- // "If the new response contains a weak validator and that validator corresponds
- // to one of the cache's stored responses,
- // then the most recent of those matching stored responses is selected for update."
- matches = this._resHeaders.etag.replace(/^\s*W\//,'') === response.headers.etag.replace(/^\s*W\//,'');
- } else if (this._resHeaders['last-modified']) {
- matches = this._resHeaders['last-modified'] === response.headers['last-modified'];
- } else {
- // If the new response does not include any form of validator (such as in the case where
- // a client generates an If-Modified-Since request from a source other than the Last-Modified
- // response header field), and there is only one stored response, and that stored response also
- // lacks a validator, then that stored response is selected for update.
- if (!this._resHeaders.etag && !this._resHeaders['last-modified'] &&
- !response.headers.etag && !response.headers['last-modified']) {
- matches = true;
- }
- }
-
- if (!matches) {
- return {
- policy: new this.constructor(request, response),
- modified: true,
- }
- }
-
- // use other header fields provided in the 304 (Not Modified) response to replace all instances
- // of the corresponding header fields in the stored response.
- const headers = {};
- for(const k in this._resHeaders) {
- headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k];
- }
-
- const newResponse = Object.assign({}, response, {
- status: this._status,
- method: this._method,
- headers,
- });
- return {
- policy: new this.constructor(request, newResponse),
- modified: false,
- };
- }
-};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
index 0b18a6f9f6..dd0512f64a 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
@@ -1,27 +1,27 @@
{
- "_from": "http-cache-semantics@^3.7.3",
- "_id": "http-cache-semantics@3.8.0",
+ "_from": "http-cache-semantics@^3.8.0",
+ "_id": "http-cache-semantics@3.8.1",
"_inBundle": false,
- "_integrity": "sha512-HGQFfBdru2fj/dwPn1oLx1fy6QMPeTAD1yzKcxD4l5biw+5QVaui/ehCqxaitoKJC/vHMLKv3Yd+nTlxboOJig==",
+ "_integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==",
"_location": "/npm-profile/make-fetch-happen/http-cache-semantics",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "http-cache-semantics@^3.7.3",
+ "raw": "http-cache-semantics@^3.8.0",
"name": "http-cache-semantics",
"escapedName": "http-cache-semantics",
- "rawSpec": "^3.7.3",
+ "rawSpec": "^3.8.0",
"saveSpec": null,
- "fetchSpec": "^3.7.3"
+ "fetchSpec": "^3.8.0"
},
"_requiredBy": [
"/npm-profile/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.0.tgz",
- "_shasum": "1e3ce248730e189ac692a6697b9e3fdea2ff8da3",
- "_spec": "http-cache-semantics@^3.7.3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
+ "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
+ "_shasum": "39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2",
+ "_spec": "http-cache-semantics@^3.8.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
"author": {
"name": "Kornel Lesiński",
"email": "kornel@geekhood.net",
@@ -35,13 +35,11 @@
"description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
"devDependencies": {
"babel-cli": "^6.24.1",
- "babel-preset-env": "^1.5.2",
+ "babel-preset-env": "^1.6.1",
"mocha": "^3.4.2"
},
"files": [
- "node4/index.js",
- "index.js",
- "test"
+ "node4/index.js"
],
"homepage": "https://github.com/pornel/http-cache-semantics#readme",
"license": "BSD-2-Clause",
@@ -56,5 +54,5 @@
"prepublish": "npm run compile",
"test": "npm run compile; mocha node4/test"
},
- "version": "3.8.0"
+ "version": "3.8.1"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js
deleted file mode 100644
index 643567d962..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-
-describe('Other', function() {
- it('Thaw wrong object', function() {
- assert.throws(() => {
- CachePolicy.fromObject({});
- });
- });
-
- it('Missing headers', function() {
- assert.throws(() => {
- new CachePolicy({});
- });
- assert.throws(() => {
- new CachePolicy({headers:{}}, {});
- });
-
- const cache = new CachePolicy({headers:{}}, {headers:{}});
- assert.throws(() => {
- cache.satisfiesWithoutRevalidation({});
- });
- assert.throws(() => {
- cache.revalidatedPolicy({});
- });
- assert.throws(() => {
- cache.revalidatedPolicy({headers:{}}, {});
- });
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js
deleted file mode 100644
index 315f114ae8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js
+++ /dev/null
@@ -1,301 +0,0 @@
-'use strict';
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('okhttp tests', function(){
- it('responseCachingByResponseCode', function(){
- // Test each documented HTTP/1.1 code, plus the first unused value in each range.
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
-
- assertCached(false, 100);
- assertCached(false, 101);
- assertCached(false, 102);
- assertCached(true, 200);
- assertCached(false, 201);
- assertCached(false, 202);
- assertCached(true, 203);
- assertCached(true, 204);
- assertCached(false, 205);
- assertCached(false, 206); //Electing to not cache partial responses
- assertCached(false, 207);
- assertCached(true, 300);
- assertCached(true, 301);
- assertCached(true, 302);
- // assertCached(false, 303);
- assertCached(false, 304);
- assertCached(false, 305);
- assertCached(false, 306);
- assertCached(true, 307);
- assertCached(true, 308);
- assertCached(false, 400);
- assertCached(false, 401);
- assertCached(false, 402);
- assertCached(false, 403);
- assertCached(true, 404);
- assertCached(true, 405);
- assertCached(false, 406);
- assertCached(false, 408);
- assertCached(false, 409);
- // the HTTP spec permits caching 410s, but the RI doesn't.
- assertCached(true, 410);
- assertCached(false, 411);
- assertCached(false, 412);
- assertCached(false, 413);
- assertCached(true, 414);
- assertCached(false, 415);
- assertCached(false, 416);
- assertCached(false, 417);
- assertCached(false, 418);
- assertCached(false, 429);
-
- assertCached(false, 500);
- assertCached(true, 501);
- assertCached(false, 502);
- assertCached(false, 503);
- assertCached(false, 504);
- assertCached(false, 505);
- assertCached(false, 506);
- });
-
- function assertCached(shouldPut, responseCode) {
- let expectedResponseCode = responseCode;
-
- const mockResponse = {headers:{
- "last-modified": formatDate(-1, 3600),
- "expires": formatDate(1, 3600),
- "www-authenticate": "challenge",
- },
- status: responseCode,
- body: "ABCDE",
- };
- if (responseCode == 407) {
- mockResponse.headers["proxy-authenticate"] = "Basic realm=\"protected area\"";
- } else if (responseCode == 401) {
- mockResponse.headers["www-authenticate"] = "Basic realm=\"protected area\"";
- } else if (responseCode == 204 || responseCode == 205) {
- mockResponse.body = ""; // We forbid bodies for 204 and 205.
- }
-
- const request = {url: "/", headers:{}};
-
- const cache = new CachePolicy(request, mockResponse, {shared:false});
-
- assert.equal(shouldPut, cache.storable());
- }
-
-
- it('defaultExpirationDateFullyCachedForLessThan24Hours', function() {
- // last modified: 105 seconds ago
- // served: 5 seconds ago
- // default lifetime: (105 - 5) / 10 = 10 seconds
- // expires: 10 seconds from served date = 5 seconds from now
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-105, 1),
- "date": formatDate(-5, 1),
- },
- body: "A"}, {shared:false});
-
- assert(cache.timeToLive() > 4000);
- });
-
- it('defaultExpirationDateFullyCachedForMoreThan24Hours', function() {
- // last modified: 105 days ago
- // served: 5 days ago
- // default lifetime: (105 - 5) / 10 = 10 days
- // expires: 10 days from served date = 5 days from now
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-105, 3600*24),
- "date": formatDate(-5, 3600*24),
- },
- body: "A"}, {shared:false});
-
- assert(cache.maxAge() >= 10*3600*24);
- assert(cache.timeToLive()+1000 >= 5*3600*24);
- });
-
- it('maxAgeInThePastWithDateHeaderButNoLastModifiedHeader', function() {
- // Chrome interprets max-age relative to the local clock. Both our cache
- // and Firefox both use the earlier of the local and server's clock.
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-120, 1),
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(cache.stale());
- });
-
- it('maxAgePreferredOverLowerSharedMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-2, 60),
- "cache-control": "s-maxage=60, max-age=180",
- }}, {shared:false});
-
- assert.equal(cache.maxAge(), 180);
- });
-
- it('maxAgePreferredOverHigherMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-3, 60),
- "cache-control": "s-maxage=60, max-age=180",
- }}, {shared:false});
-
- assert(cache.stale());
- });
-
- it('requestMethodOptionsIsNotCached', function() {
- testRequestMethodNotCached("OPTIONS");
- });
-
- it('requestMethodPutIsNotCached', function() {
- testRequestMethodNotCached("PUT");
- });
-
- it('requestMethodDeleteIsNotCached', function() {
- testRequestMethodNotCached("DELETE");
- });
-
- it('requestMethodTraceIsNotCached', function() {
- testRequestMethodNotCached("TRACE");
- });
-
- function testRequestMethodNotCached(method) {
- // 1. seed the cache (potentially)
- // 2. expect a cache hit or miss
- const cache = new CachePolicy({method, headers:{}}, {headers:{
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(cache.stale());
- }
-
- it('etagAndExpirationDateInTheFuture', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "etag": "v1",
- "last-modified": formatDate(-2, 3600),
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(cache.timeToLive() > 0);
- });
-
- it('clientSideNoStore', function() {
- const cache = new CachePolicy({headers:{
- "cache-control": "no-store",
- }}, {headers:{
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(!cache.storable());
- });
-
- it('requestMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-2, 3600),
- "date": formatDate(-1, 60),
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(!cache.stale());
- assert(cache.age() >= 60);
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-age=90",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-age=30",
- }}));
- });
-
- it('requestMinFresh', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(!cache.stale());
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "min-fresh=120",
- }}));
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "min-fresh=10",
- }}));
- });
-
- it('requestMaxStale', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=120",
- "date": formatDate(-4, 60),
- }}, {shared:false});
-
- assert(cache.stale());
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=180",
- }}));
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=10",
- }}));
- });
-
- it('requestMaxStaleNotHonoredWithMustRevalidate', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=120, must-revalidate",
- "date": formatDate(-4, 60),
- }}, {shared:false});
-
- assert(cache.stale());
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=180",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale",
- }}));
- });
-
- it('getHeadersDeletesCached100LevelWarnings', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "warning": "199 test danger, 200 ok ok",
- }});
-
- assert.equal("200 ok ok", cache.responseHeaders().warning);
- });
-
- it('doNotCachePartialResponse', function() {
- const cache = new CachePolicy({headers:{}}, {
- status: 206,
- headers:{
- "content-range": "bytes 100-100/200",
- "cache-control": "max-age=60",
- }});
- assert(!cache.storable());
- });
-
- function formatDate(delta, unit) {
- return new Date(Date.now() + delta*unit*1000).toUTCString();
- }
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js
deleted file mode 100644
index f668556ff8..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const publicCacheableResponse = {headers:{'cache-control': 'public, max-age=222'}};
-const cacheableResponse = {headers:{'cache-control': 'max-age=111'}};
-
-describe('Request properties', function() {
- it('No store kills cache', function() {
- const cache = new CachePolicy({method:'GET',headers:{'cache-control':'no-store'}}, publicCacheableResponse);
- assert(cache.stale());
- assert(!cache.storable());
- });
-
- it('POST not cacheable by default', function() {
- const cache = new CachePolicy({method:'POST',headers:{}}, {headers:{'cache-control': 'public'}});
- assert(cache.stale());
- assert(!cache.storable());
- });
-
- it('POST cacheable explicitly', function() {
- const cache = new CachePolicy({method:'POST',headers:{}}, publicCacheableResponse);
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Public cacheable auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, publicCacheableResponse);
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Proxy cacheable auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, {headers:{'cache-control':'max-age=0,s-maxage=12'}});
- assert(!cache.stale());
- assert(cache.storable());
-
- const cache2 = CachePolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof CachePolicy);
- assert(!cache2.stale());
- assert(cache2.storable());
- });
-
- it('Private auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, cacheableResponse, {shared:false});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Revalidated auth is OK', function() {
- const cache = new CachePolicy({headers:{'authorization': 'test'}}, {headers:{'cache-control':'max-age=88,must-revalidate'}});
- assert(cache.storable());
- });
-
- it('Auth prevents caching by default', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, cacheableResponse);
- assert(cache.stale());
- assert(!cache.storable());
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js
deleted file mode 100644
index 763910b82c..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js
+++ /dev/null
@@ -1,385 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const req = {method:'GET', headers:{}};
-
-describe('Response headers', function() {
- it('simple miss', function() {
- const cache = new CachePolicy(req, {headers:{}});
- assert(cache.stale());
- });
-
- it('simple hit', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'public, max-age=999999'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 999999);
- });
-
- it('weird syntax', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': ',,,,max-age = 456 ,'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 456);
-
- const cache2 = CachePolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof CachePolicy);
- assert(!cache2.stale());
- assert.equal(cache2.maxAge(), 456);
- });
-
- it('quoted syntax', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': ' max-age = "678" '}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 678);
- });
-
- it('IIS', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'private, public, max-age=259200'}}, {shared:false});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 259200);
- });
-
- it('pre-check tolerated', function() {
- const cc = 'pre-check=0, post-check=0, no-store, no-cache, max-age=100';
- const cache = new CachePolicy(req, {headers:{'cache-control': cc}});
- assert(cache.stale());
- assert(!cache.storable());
- assert.equal(cache.maxAge(), 0);
- assert.equal(cache.responseHeaders()['cache-control'], cc);
- });
-
- it('pre-check poison', function() {
- const origCC = 'pre-check=0, post-check=0, no-cache, no-store, max-age=100, custom, foo=bar';
- const res = {headers:{'cache-control': origCC, pragma: 'no-cache'}};
- const cache = new CachePolicy(req, res, {ignoreCargoCult:true});
- assert(!cache.stale());
- assert(cache.storable());
- assert.equal(cache.maxAge(), 100);
-
- const cc = cache.responseHeaders()['cache-control'];
- assert(!/pre-check/.test(cc), cc);
- assert(!/post-check/.test(cc), cc);
- assert(!/no-store/.test(cc), cc);
-
- assert(/max-age=100/.test(cc));
- assert(/custom(,|$)/.test(cc));
- assert(/foo=bar/.test(cc));
-
- assert.equal(res.headers['cache-control'], origCC);
- assert(res.headers['pragma']);
- assert(!cache.responseHeaders()['pragma']);
- });
-
- it('pre-check poison undefined header', function() {
- const origCC = 'pre-check=0, post-check=0, no-cache, no-store';
- const res = {headers:{'cache-control': origCC, expires: 'yesterday!'}};
- const cache = new CachePolicy(req, res, {ignoreCargoCult:true});
- assert(cache.stale());
- assert(cache.storable());
- assert.equal(cache.maxAge(), 0);
-
- const cc = cache.responseHeaders()['cache-control'];
- assert(!cc);
-
- assert(res.headers['expires']);
- assert(!cache.responseHeaders()['expires']);
- });
-
- it('cache with expires', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'expires': new Date(Date.now() + 2000).toGMTString(),
- }});
- assert(!cache.stale());
- assert.equal(2, cache.maxAge());
- });
-
- it('cache expires no date', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public',
- 'expires': new Date(Date.now()+3600*1000).toGMTString(),
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 3595);
- assert(cache.maxAge() < 3605);
- });
-
- it('Ages', function() {
- let now = 1000;
- class TimeTravellingPolicy extends CachePolicy {
- now() {
- return now;
- }
- }
- const cache = new TimeTravellingPolicy(req, {headers:{
- 'cache-control':'max-age=100',
- 'age': '50',
- }});
- assert(cache.storable());
-
- assert.equal(50*1000, cache.timeToLive());
- assert(!cache.stale());
- now += 48*1000;
- assert.equal(2*1000, cache.timeToLive());
- assert(!cache.stale());
- now += 5*1000;
- assert(cache.stale());
- assert.equal(0, cache.timeToLive());
- });
-
- it('Age can make stale', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=100',
- 'age': '101',
- }});
- assert(cache.stale());
- assert(cache.storable());
- });
-
- it('Age not always stale', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=20',
- 'age': '15',
- }});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Bogus age ignored', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=20',
- 'age': 'golden',
- }});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('cache old files', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 100);
- });
-
- it('immutable simple hit', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'immutable, max-age=999999'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 999999);
- });
-
- it('immutable can expire', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'immutable, max-age=0'}});
- assert(cache.stale());
- assert.equal(cache.maxAge(), 0);
- });
-
- it('cache immutable files', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'cache-control':'immutable',
- 'last-modified': new Date().toGMTString(),
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 100);
- });
-
- it('immutable can be off', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'cache-control':'immutable',
- 'last-modified': new Date().toGMTString(),
- }}, {immutableMinTimeToLive: 0});
- assert(cache.stale());
- assert.equal(cache.maxAge(), 0);
- });
-
- it('pragma: no-cache', function() {
- const cache = new CachePolicy(req, {headers:{
- 'pragma': 'no-cache',
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(cache.stale());
- });
-
- it('no-store', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'no-store, public, max-age=1',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('observe private cache', function() {
- const privateHeader = {
- 'cache-control': 'private, max-age=1234',
- };
- const proxyCache = new CachePolicy(req, {headers:privateHeader});
- assert(proxyCache.stale());
- assert.equal(0, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:privateHeader}, {shared:false});
- assert(!uaCache.stale());
- assert.equal(1234, uaCache.maxAge());
- });
-
- it('don\'t share cookies', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'max-age=99',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(proxyCache.stale());
- assert.equal(0, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:cookieHeader}, {shared:false});
- assert(!uaCache.stale());
- assert.equal(99, uaCache.maxAge());
- });
-
- it('do share cookies if immutable', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'immutable, max-age=99',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(!proxyCache.stale());
- assert.equal(99, proxyCache.maxAge());
- });
-
- it('cache explicitly public cookie', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'max-age=5, public',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(!proxyCache.stale());
- assert.equal(5, proxyCache.maxAge());
- });
-
- it('miss max-age=0', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=0',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('uncacheable 503', function() {
- const cache = new CachePolicy(req, {
- status: 503,
- headers:{
- 'cache-control': 'public, max-age=1000',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('cacheable 301', function() {
- const cache = new CachePolicy(req, {
- status: 301,
- headers:{
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(!cache.stale());
- });
-
- it('uncacheable 303', function() {
- const cache = new CachePolicy(req, {
- status: 303,
- headers:{
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('cacheable 303', function() {
- const cache = new CachePolicy(req, {
- status: 303,
- headers:{
- 'cache-control': 'max-age=1000',
- }});
- assert(!cache.stale());
- });
-
- it('uncacheable 412', function() {
- const cache = new CachePolicy(req, {
- status: 412,
- headers:{
- 'cache-control': 'public, max-age=1000',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('expired expires cached with max-age', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=9999',
- 'expires': 'Sat, 07 May 2016 15:35:18 GMT',
- }});
- assert(!cache.stale());
- assert.equal(9999, cache.maxAge());
- });
-
- it('expired expires cached with s-maxage', function() {
- const sMaxAgeHeaders = {
- 'cache-control': 'public, s-maxage=9999',
- 'expires': 'Sat, 07 May 2016 15:35:18 GMT',
- };
- const proxyCache = new CachePolicy(req, {headers:sMaxAgeHeaders});
- assert(!proxyCache.stale());
- assert.equal(9999, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:sMaxAgeHeaders}, {shared:false});
- assert(uaCache.stale());
- assert.equal(0, uaCache.maxAge());
- });
-
- it('max-age wins over future expires', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=333',
- 'expires': new Date(Date.now()+3600*1000).toGMTString(),
- }});
- assert(!cache.stale());
- assert.equal(333, cache.maxAge());
- });
-
- it('remove hop headers', function() {
- let now = 10000;
- class TimeTravellingPolicy extends CachePolicy {
- now() {
- return now;
- }
- }
-
- const res = {headers:{
- 'te': 'deflate',
- 'date': 'now',
- 'custom': 'header',
- 'oompa': 'lumpa',
- 'connection': 'close, oompa, header',
- 'age': '10',
- 'cache-control': 'public, max-age=333',
- }};
- const cache = new TimeTravellingPolicy(req, res);
-
- now += 1005;
- const h = cache.responseHeaders();
- assert(!h.connection);
- assert(!h.te);
- assert(!h.oompa);
- assert.equal(h['cache-control'], 'public, max-age=333');
- assert.equal(h.date, 'now', "date must stay the same for expires, age, etc");
- assert.equal(h.custom, 'header');
- assert.equal(h.age, '11');
- assert.equal(res.headers.age, '10');
-
- const cache2 = TimeTravellingPolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof TimeTravellingPolicy);
- const h2 = cache2.responseHeaders();
- assert.deepEqual(h, h2);
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js
deleted file mode 100644
index 9dc737718d..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js
+++ /dev/null
@@ -1,181 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const simpleRequest = {
- method:'GET',
- headers:{
- host:'www.w3c.org',
- connection: 'close',
- 'x-custom': 'yes',
- },
- url:'/Protocols/rfc2616/rfc2616-sec14.html',
-};
-function simpleRequestBut(overrides) {
- return Object.assign({}, simpleRequest, overrides);
-}
-
-const cacheableResponse = {headers:{'cache-control':'max-age=111'}};
-const etaggedResponse = {headers:Object.assign({'etag':'"123456789"'},cacheableResponse.headers)};
-const lastModifiedResponse = {headers:Object.assign({'last-modified':'Tue, 15 Nov 1994 12:45:26 GMT'},cacheableResponse.headers)};
-const multiValidatorResponse = {headers:Object.assign({},etaggedResponse.headers,lastModifiedResponse.headers)};
-const alwaysVariableResponse = {headers:Object.assign({'vary':'*'},cacheableResponse.headers)};
-
-function assertHeadersPassed(headers) {
- assert.strictEqual(headers.connection, undefined);
- assert.strictEqual(headers['x-custom'], 'yes');
-}
-function assertNoValidators(headers) {
- assert.strictEqual(headers['if-none-match'], undefined);
- assert.strictEqual(headers['if-modified-since'], undefined);
-}
-
-describe('Can be revalidated?', function() {
- it('ok if method changes to HEAD', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const headers = cache.revalidationHeaders(simpleRequestBut({method:'HEAD'}));
- assertHeadersPassed(headers);
- assert.equal(headers['if-none-match'], '"123456789"');
- });
-
- it('not if method mismatch (other than HEAD)', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({method:'POST'});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('not if url mismatch', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({url:'/yomomma'});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('not if host mismatch', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({headers:{host:'www.w4c.org'}});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertNoValidators(headers);
- assert.strictEqual(headers['x-custom'], undefined);
- });
-
- it('not if vary fields prevent', function(){
- const cache = new CachePolicy(simpleRequest,alwaysVariableResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('when entity tag validator is present', function() {
- const cache = new CachePolicy(simpleRequest, etaggedResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assert.equal(headers['if-none-match'], '"123456789"');
- });
-
- it('skips weak validtors on post', function() {
- const postReq = simpleRequestBut({method:'POST', headers:{'if-none-match': 'W/"weak", "strong", W/"weak2"'}});
- const cache = new CachePolicy(postReq, multiValidatorResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.equal(headers['if-none-match'], '"strong", "123456789"');
- assert.strictEqual(undefined, headers['if-modified-since']);
- });
-
- it('skips weak validtors on post 2', function() {
- const postReq = simpleRequestBut({method:'POST', headers:{'if-none-match': 'W/"weak"'}});
- const cache = new CachePolicy(postReq, lastModifiedResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.strictEqual(undefined, headers['if-none-match']);
- assert.strictEqual(undefined, headers['if-modified-since']);
- });
-
- it('merges validtors', function() {
- const postReq = simpleRequestBut({headers:{'if-none-match': 'W/"weak", "strong", W/"weak2"'}});
- const cache = new CachePolicy(postReq, multiValidatorResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.equal(headers['if-none-match'], 'W/"weak", "strong", W/"weak2", "123456789"');
- assert.equal('Tue, 15 Nov 1994 12:45:26 GMT', headers['if-modified-since']);
- });
-
- it('when last-modified validator is present', function() {
- const cache = new CachePolicy(simpleRequest, lastModifiedResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assert.equal(headers['if-modified-since'], 'Tue, 15 Nov 1994 12:45:26 GMT');
- assert(!/113/.test(headers.warning));
- });
-
- it('not without validators', function() {
- const cache = new CachePolicy(simpleRequest, cacheableResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- assert(!/113/.test(headers.warning));
- })
-
- it('113 added', function() {
- const veryOldResponse = {
- headers: {
- age: 3600*72,
- 'last-modified': 'Tue, 15 Nov 1994 12:45:26 GMT',
- },
- };
-
- const cache = new CachePolicy(simpleRequest, veryOldResponse);
- const headers = cache.responseHeaders(simpleRequest);
- assert(/113/.test(headers.warning));
- })
-
-});
-
-describe('Validation request', function(){
- it('removes warnings', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "warning": "199 test danger",
- }});
-
- assert.strictEqual(undefined, cache.responseHeaders().warning);
- });
-
- it('must contain any etag', function(){
- const cache = new CachePolicy(simpleRequest,multiValidatorResponse);
- const expected = multiValidatorResponse.headers.etag;
- const actual = cache.revalidationHeaders(simpleRequest)['if-none-match'];
- assert.equal(actual,expected);
- });
-
- it('merges etags', function(){
- const cache = new CachePolicy(simpleRequest, etaggedResponse);
- const expected = `"foo", "bar", ${etaggedResponse.headers.etag}`;
- const headers = cache.revalidationHeaders(simpleRequestBut({headers:{
- host:'www.w3c.org',
- 'if-none-match': '"foo", "bar"',
- }}));
- assert.equal(headers['if-none-match'],expected);
- });
-
- it('should send the Last-Modified value', function(){
- const cache = new CachePolicy(simpleRequest,multiValidatorResponse);
- const expected = multiValidatorResponse.headers['last-modified'];
- const actual = cache.revalidationHeaders(simpleRequest)['if-modified-since'];
- assert.equal(actual,expected);
- });
-
- it('should not send the Last-Modified value for POST', function(){
- const postReq = {method:'POST', headers:{'if-modified-since':'yesterday'}};
- const cache = new CachePolicy(postReq, lastModifiedResponse);
- const actual = cache.revalidationHeaders(postReq)['if-modified-since'];
- assert.equal(actual, undefined);
- });
-
- it('should not send the Last-Modified value for range requests', function(){
- const rangeReq = {method:'GET', headers:{'accept-ranges':'1-3', 'if-modified-since':'yesterday'}};
- const cache = new CachePolicy(rangeReq, lastModifiedResponse);
- const actual = cache.revalidationHeaders(rangeReq)['if-modified-since'];
- assert.equal(actual, undefined);
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js
deleted file mode 100644
index 3131ee73d0..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('Satisfies', function() {
- it('when URLs match', function() {
- const policy = new CachePolicy({url:'/',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({url:'/',headers:{}}));
- });
-
- it('when expires is present', function() {
- const policy = new CachePolicy({headers:{}}, {status:302,headers:{'expires':new Date(Date.now()+2000).toGMTString()}});
- assert(policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('not when URLs mismatch', function() {
- const policy = new CachePolicy({url:'/foo',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({url:'/foo?bar',headers:{}}));
- });
-
- it('when methods match', function() {
- const policy = new CachePolicy({method:'GET',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when hosts mismatch', function() {
- const policy = new CachePolicy({headers:{'host':'foo'}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({headers:{'host':'foo'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'host':'foofoo'}}));
- });
-
- it('when methods match HEAD', function() {
- const policy = new CachePolicy({method:'HEAD',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({method:'HEAD',headers:{}}));
- });
-
- it('not when methods mismatch', function() {
- const policy = new CachePolicy({method:'POST',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when methods mismatch HEAD', function() {
- const policy = new CachePolicy({method:'HEAD',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when proxy revalidating', function() {
- const policy = new CachePolicy({headers:{}}, {status:200,headers:{'cache-control':'max-age=2, proxy-revalidate '}});
- assert(!policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('when not a proxy revalidating', function() {
- const policy = new CachePolicy({headers:{}}, {status:200,headers:{'cache-control':'max-age=2, proxy-revalidate '}}, {shared:false});
- assert(policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('not when no-cache requesting', function() {
- const policy = new CachePolicy({headers:{}}, {headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({headers:{'cache-control':'fine'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'cache-control':'no-cache'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'pragma':'no-cache'}}));
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js
deleted file mode 100644
index 6d498c86e3..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const simpleRequest = {
- method:'GET',
- headers:{
- host:'www.w3c.org',
- connection: 'close',
- },
- url:'/Protocols/rfc2616/rfc2616-sec14.html',
-};
-function withHeaders(request, headers) {
- return Object.assign({}, request, {
- headers: Object.assign({}, request.headers, headers),
- });
-}
-
-const cacheableResponse = {headers:{'cache-control':'max-age=111'}};
-const etaggedResponse = {headers:Object.assign({'etag':'"123456789"'},cacheableResponse.headers)};
-const weakTaggedResponse = {headers:Object.assign({'etag':'W/"123456789"'},cacheableResponse.headers)};
-const lastModifiedResponse = {headers:Object.assign({'last-modified':'Tue, 15 Nov 1994 12:45:26 GMT'},cacheableResponse.headers)};
-const multiValidatorResponse = {headers:Object.assign({},etaggedResponse.headers,lastModifiedResponse.headers)};
-
-function notModifiedResponseHeaders(firstRequest, firstResponse, secondRequest, secondResponse) {
- const cache = new CachePolicy(firstRequest, firstResponse);
- const headers = cache.revalidationHeaders(secondRequest);
- const {policy:newCache, modified} = cache.revalidatedPolicy({headers}, secondResponse);
- if (modified) {
- return false;
- }
- return newCache.responseHeaders();
-}
-
-function assertUpdates(firstRequest, firstResponse, secondRequest, secondResponse) {
- const headers = notModifiedResponseHeaders(firstRequest, withHeaders(firstResponse, {'foo': 'original', 'x-other':'original'}),
- secondRequest, withHeaders(secondResponse, {'foo': 'updated', 'x-ignore-new':'ignoreme'}));
- assert(headers);
- assert.equal(headers['foo'], 'updated');
- assert.equal(headers['x-other'], 'original');
- assert.strictEqual(headers['x-ignore-new'], undefined);
- assert.strictEqual(headers['etag'], secondResponse.headers.etag);
-}
-
-describe('Update revalidated', function() {
- it('Matching etags are updated', function(){
- assertUpdates(simpleRequest, etaggedResponse, simpleRequest, etaggedResponse);
- });
-
- it('Matching weak etags are updated', function(){
- assertUpdates(simpleRequest, weakTaggedResponse, simpleRequest, weakTaggedResponse);
- });
-
- it('Matching lastmod are updated', function(){
- assertUpdates(simpleRequest, lastModifiedResponse, simpleRequest, lastModifiedResponse);
- });
-
- it('Both matching are updated', function(){
- assertUpdates(simpleRequest, multiValidatorResponse, simpleRequest, multiValidatorResponse);
- });
-
- it('Checks status', function(){
- const response304 = Object.assign({}, multiValidatorResponse, {status:304});
- const response200 = Object.assign({}, multiValidatorResponse, {status:200});
- assertUpdates(simpleRequest, multiValidatorResponse, simpleRequest, response304);
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, response200));
- });
-
- it('Last-mod ignored if etag is wrong', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, withHeaders(multiValidatorResponse, {'etag':'bad'})));
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, withHeaders(multiValidatorResponse, {'etag':'W/bad'})));
- });
-
- it('Ignored if validator is missing', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, cacheableResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, weakTaggedResponse, simpleRequest, cacheableResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, cacheableResponse));
- });
-
- it('Skips update of content-length', function(){
- const etaggedResponseWithLenght1 = withHeaders(etaggedResponse, {'content-length':1});
- const etaggedResponseWithLenght2 = withHeaders(etaggedResponse, {'content-length':2});
- const headers = notModifiedResponseHeaders(simpleRequest, etaggedResponseWithLenght1, simpleRequest, etaggedResponseWithLenght2);
- assert.equal(1, headers['content-length']);
- });
-
- it('Ignored if validator is different', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, etaggedResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, weakTaggedResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, lastModifiedResponse));
- });
-
- it('Ignored if validator doesn\'t match', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, withHeaders(etaggedResponse, {etag:'"other"'})), "bad etag");
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, withHeaders(lastModifiedResponse, {'last-modified':'dunno'})), "bad lastmod");
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js
deleted file mode 100644
index 9d5cfb2325..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('Vary', function() {
- it('Basic', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- });
-
- it("* doesn't match", function() {
- const policy = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'max-age=5','vary':'*'}});
-
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'ok'}}));
- });
-
- it("* is stale", function() {
- const policy1 = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'public,max-age=99', 'vary':'*'}});
- const policy2 = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'public,max-age=99', 'vary':'weather'}});
-
- assert(policy1.stale());
- assert(!policy2.stale());
- });
-
- it('Values are case-sensitive', function() {
- const policy = new CachePolicy({headers:{'weather': 'BAD'}}, {headers:{'cache-control':'max-age=5','vary':'Weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'BAD'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- });
-
- it('Irrelevant headers ignored', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'moon-phase'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'moon-phase': 'full'}}));
- });
-
- it('Absence is meaningful', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'moon-phase, weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'moon-phase': ''}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('All values must match', function() {
- const policy = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather, sun'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'bad'}}));
- });
-
- it('Whitespace is OK', function() {
- const policy = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':' weather , sun '}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining'}}));
- });
-
- it('Order is irrelevant', function() {
- const policy1 = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather, sun'}});
- const policy2 = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'sun, weather'}});
-
- assert(policy1.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'sun': 'shining'}}));
- assert(policy1.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(policy2.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'sun': 'shining'}}));
- assert(policy2.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- });
-});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore
deleted file mode 100644
index c12f3a80c1..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/?.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
index 805d3d50d2..6ce862c6f6 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
@@ -8,6 +8,7 @@ node_js:
- "6"
- "7"
- "8"
+ - "9"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
index a81fb17a97..80c88dc401 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,18 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
+4.1.2 / 2017-11-20
+==================
+
+ * test Node 9 on Travis
+ * ensure that `https.get()` uses the patched `https.request()`
+
4.1.1 / 2017-07-20
==================
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAA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CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,I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AE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAA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;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B,MAAM;MACL,aAAa,EAAE,CAAC;KACjB;GACF;CACF,CAAC;;AAEF,AA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G,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,C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;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KA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C,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gB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CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,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R;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index b916c33b9c..8dfc433a94 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/npm-profile/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
index aa876e8bfc..3c209294e6 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@4",
- "_id": "agent-base@4.1.1",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-yWGUUmCZD/33IRjG2It94PzixT8lX+47Uq8fjmd0cgQWITCMrJuXFaVIMnGDmDnZGGKAGdwTx8UGeU8lMR2urA==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/npm-profile/make-fetch-happen/http-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/http-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz",
- "_shasum": "92d8a4fc2524a3b09b3666a33b6c97960f23d6a4",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@4",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.1"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
index a3f7bc6160..47d26a72b0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
@@ -24,3 +23,15 @@ https.request = (function(request) {
return request.call(https, options, cb);
};
})(https.request);
+
+/**
+ * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
+ * patched `https.request()`.
+ *
+ * Ref: https://github.com/nodejs/node/commit/5118f31
+ */
+https.get = function(options, cb) {
+ const req = https.request(options, cb);
+ req.end();
+ return req;
+};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore
deleted file mode 100644
index c12f3a80c1..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/?.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
index c0b5cef88b..ae7c0eb702 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
@@ -1,4 +1,9 @@
+2.1.1 / 2017-11-28
+==================
+
+ * Update `debug` - Security Problems with Previous Version (#38)
+
2.1.0 / 2017-08-08
==================
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore
deleted file mode 100644
index c12f3a80c1..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/?.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
index 805d3d50d2..6ce862c6f6 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
@@ -8,6 +8,7 @@ node_js:
- "6"
- "7"
- "8"
+ - "9"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
index a81fb17a97..80c88dc401 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,18 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
+4.1.2 / 2017-11-20
+==================
+
+ * test Node 9 on Travis
+ * ensure that `https.get()` uses the patched `https.request()`
+
4.1.1 / 2017-07-20
==================
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B,MAAM;MACL,aAAa,EAAE,CAAC;KACjB;GACF;CACF,CAAC;;AAEF,AAEA,SAAS,YAAY,CAAC,UAAU,EAAE;EACh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pC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;GACrC;CACF;;ACtXD;AACA,AAEA,AACA,AACA,SAASO,UAAQ,GAAG;IAChB,IAAI,KAAK,GAAG,SAAS,CAAC;;IAEtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,KAAK,GAAG,MAAM,CAAC;KAClB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACpC,KAAK,GAAG,IAAI,CAAC;KAChB,MAAM;QACH,IAAI;YACA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;SACrC,CAAC,OAAO,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC/F;KACJ;;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,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Ee,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,G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O,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC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/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,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;;;;;;;;;EAmMpB,IAAI,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BV,OAAO,EAAE,SAAS,MAAM,CAAC,WAAW,EAAE;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;GACrC;CACF;;ACtXD;AACA,AAEA,AACA,AACA,SAASO,UAAQ,GAAG;IAChB,IAAI,KAAK,GAAG,SAAS,CAAC;;IAEtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,KAAK,GAAG,MAAM,CAAC;KAClB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACpC,KAAK,GAAG,IAAI,CAAC;KAChB,MAAM;QACH,IAAI;YACA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;SACrC,CAAC,OAAO,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC/F;KACJ;;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,G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;ACxYpB;AACA,AAEe,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B,MAAM;MACL,a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;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BV,OAAO,EAAE,SAAS,MAAM,CAAC,WAAW,EAAE;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;GACrC;CACF;;ACtXD;AACA,AAEA,AACA,AACA,SAASO,UAAQ,GAAG;IAChB,IAAI,KAAK,GAAG,SAAS,CAAC;;IAEtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,KAAK,GAAG,MAAM,CAAC;KAClB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACpC,KAAK,GAAG,IAAI,CAAC;KAChB,MAAM;QACH,IAAI;YACA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;SACrC,CAAC,OAAO,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC/F;KACJ;;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,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AAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index e2c2d2e623..74a57f53a8 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/npm-profile/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
index 4c8f49cf9e..462ecdd546 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@^4.1.0",
- "_id": "agent-base@4.1.1",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-yWGUUmCZD/33IRjG2It94PzixT8lX+47Uq8fjmd0cgQWITCMrJuXFaVIMnGDmDnZGGKAGdwTx8UGeU8lMR2urA==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/npm-profile/make-fetch-happen/https-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/https-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz",
- "_shasum": "92d8a4fc2524a3b09b3666a33b6c97960f23d6a4",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@^4.1.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.1"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
index a3f7bc6160..47d26a72b0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
@@ -24,3 +23,15 @@ https.request = (function(request) {
return request.call(https, options, cb);
};
})(https.request);
+
+/**
+ * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
+ * patched `https.request()`.
+ *
+ * Ref: https://github.com/nodejs/node/commit/5118f31
+ */
+https.get = function(options, cb) {
+ const req = https.request(options, cb);
+ req.end();
+ return req;
+};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
index 6c6090c3b0..a764300377 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
@@ -1,14 +1,20 @@
+sudo: false
language: node_js
+
node_js:
- - "6"
- - "5"
- "4"
+ - "6"
+ - "8"
install:
- - make node_modules
+ - make install
script:
- make lint
- make test
- - make coveralls
+
+matrix:
+ include:
+ - node_js: '8'
+ env: BROWSER=1
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
index 553da1585e..609591bbbf 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
@@ -1,4 +1,37 @@
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
2.6.9 / 2017-09-22
==================
@@ -27,7 +60,7 @@
2.6.4 / 2017-04-20
==================
- * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
index 584da8bf93..3ddd1360e6 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
@@ -15,36 +15,44 @@ YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
-.FORCE:
-
install: node_modules
+browser: dist/debug.js
+
node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules
-lint: .FORCE
- eslint browser.js debug.js index.js node.js
-
-test-node: .FORCE
- istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
-
-test-browser: .FORCE
- mkdir -p dist
-
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
- karma start --single-run
- rimraf dist
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
-test: .FORCE
- concurrently \
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
"make test-node" \
"make test-browser"
-coveralls:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
-.PHONY: all install clean distclean
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
index bc59ae86e8..8e754d17b1 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
@@ -2,11 +2,10 @@
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-A tiny node.js debugging utility modelled after node core's debugging technique.
-
-**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
## Installation
@@ -18,7 +17,7 @@ $ npm install debug
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
-Example _app.js_:
+Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
@@ -27,7 +26,7 @@ var debug = require('debug')('http')
// fake app
-debug('booting %s', name);
+debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
@@ -41,81 +40,128 @@ http.createServer(function(req, res){
require('./worker');
```
-Example _worker.js_:
+Example [_worker.js_](./examples/node/worker.js):
```js
-var debug = require('debug')('worker');
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
-setInterval(function(){
- debug('doing some work');
-}, 1000);
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
```
- The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
- ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+Here are some examples:
- ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows note
- On Windows the environment variable is set using the `set` command.
+On Windows the environment variable is set using the `set` command.
- ```cmd
- set DEBUG=*,-not_this
- ```
+```cmd
+set DEBUG=*,-not_this
+```
- Note that PowerShell uses different syntax to set environment variables.
+Note that PowerShell uses different syntax to set environment variables.
- ```cmd
- $env:DEBUG = "*,-not_this"
- ```
+```cmd
+$env:DEBUG = "*,-not_this"
+```
Then, run the program to be debugged as usual.
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
## Millisecond diff
- When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
- ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
- When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
- ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
## Conventions
- If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
- The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
- You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
## Environment Variables
- When running through Node.js, you can set a few environment variables that will
- change the behavior of the debug logging:
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
-| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
- __Note:__ The environment variables beginning with `DEBUG_` end up being
- converted into an Options object that gets used with `%o`/`%O` formatters.
- See the Node.js documentation for
- [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
- for the complete list.
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
## Formatters
-
- Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
@@ -126,9 +172,12 @@ Then, run the program to be debugged as usual.
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
### Custom formatters
- You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
```js
const createDebug = require('debug')
@@ -142,14 +191,16 @@ debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
-## Browser support
- You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
- or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
- if you don't want to build it yourself.
- Debug's enable state is currently persisted by `localStorage`.
- Consider the situation shown below where you have `worker:a` and `worker:b`,
- and wish to debug both. You can enable this using `localStorage.debug`:
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
@@ -170,23 +221,12 @@ setInterval(function(){
}, 1200);
```
-#### Web Inspector Colors
-
- Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
- option. These are WebKit web inspectors, Firefox ([since version
- 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
- and the Firebug plugin for Firefox (any version).
-
- Colored output looks something like:
-
- ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
-
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
-Example _stdout.js_:
+Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
@@ -208,6 +248,22 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
## Authors
@@ -290,7 +346,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
(The MIT License)
-Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json
deleted file mode 100644
index 9de26410f0..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "debug",
- "repo": "visionmedia/debug",
- "description": "small debugging utility",
- "version": "2.6.9",
- "keywords": [
- "debug",
- "log",
- "debugger"
- ],
- "main": "src/browser.js",
- "scripts": [
- "src/browser.js",
- "src/debug.js"
- ],
- "dependencies": {
- "rauchg/ms.js": "0.7.1"
- }
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
index 00d343572d..f4953b4362 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
@@ -1,26 +1,26 @@
{
- "_from": "debug@^2.4.1",
- "_id": "debug@2.6.9",
+ "_from": "debug@^3.1.0",
+ "_id": "debug@3.1.0",
"_inBundle": false,
- "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"_location": "/npm-profile/make-fetch-happen/https-proxy-agent/debug",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "debug@^2.4.1",
+ "raw": "debug@^3.1.0",
"name": "debug",
"escapedName": "debug",
- "rawSpec": "^2.4.1",
+ "rawSpec": "^3.1.0",
"saveSpec": null,
- "fetchSpec": "^2.4.1"
+ "fetchSpec": "^3.1.0"
},
"_requiredBy": [
"/npm-profile/make-fetch-happen/https-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
- "_spec": "debug@^2.4.1",
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@^3.1.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent",
"author": {
"name": "TJ Holowaychuk",
@@ -31,12 +31,6 @@
"url": "https://github.com/visionmedia/debug/issues"
},
"bundleDependencies": false,
- "component": {
- "scripts": {
- "debug/index.js": "browser.js",
- "debug/debug.js": "debug.js"
- }
- },
"contributors": [
{
"name": "Nathan Rajlich",
@@ -54,7 +48,7 @@
"deprecated": false,
"description": "small debugging utility",
"devDependencies": {
- "browserify": "9.0.3",
+ "browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^2.11.15",
@@ -84,5 +78,5 @@
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
- "version": "2.6.9"
+ "version": "3.1.0"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
index 7106924934..f5149ff529 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
@@ -20,12 +20,17 @@ exports.storage = 'undefined' != typeof chrome
*/
exports.colors = [
- 'lightseagreen',
- 'forestgreen',
- 'goldenrod',
- 'dodgerblue',
- 'darkorchid',
- 'crimson'
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
];
/**
@@ -44,6 +49,11 @@ function useColors() {
return true;
}
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
// is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
index 6a5e3fc94c..77e6384a33 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
@@ -14,6 +14,11 @@ exports.enabled = enabled;
exports.humanize = require('ms');
/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
* The currently active debug mode names, and names to skip.
*/
@@ -29,12 +34,6 @@ exports.skips = [];
exports.formatters = {};
/**
- * Previous log timestamp.
- */
-
-var prevTime;
-
-/**
* Select a color.
* @param {String} namespace
* @return {Number}
@@ -62,6 +61,8 @@ function selectColor(namespace) {
function createDebug(namespace) {
+ var prevTime;
+
function debug() {
// disabled?
if (!debug.enabled) return;
@@ -118,15 +119,28 @@ function createDebug(namespace) {
debug.enabled = exports.enabled(namespace);
debug.useColors = exports.useColors();
debug.color = selectColor(namespace);
+ debug.destroy = destroy;
// env-specific initialization logic for debug instances
if ('function' === typeof exports.init) {
exports.init(debug);
}
+ exports.instances.push(debug);
+
return debug;
}
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
@@ -141,10 +155,11 @@ function enable(namespaces) {
exports.names = [];
exports.skips = [];
+ var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
- for (var i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
@@ -153,6 +168,11 @@ function enable(namespaces) {
exports.names.push(new RegExp('^' + namespaces + '$'));
}
}
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
}
/**
@@ -174,6 +194,9 @@ function disable() {
*/
function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
if (exports.skips[i].test(name)) {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
index e12cf4d58c..cabcbcda13 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
@@ -3,7 +3,7 @@
* treat as a browser.
*/
-if (typeof process !== 'undefined' && process.type === 'renderer') {
+if (typeof process === 'undefined' || process.type === 'renderer') {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js
deleted file mode 100644
index 60ea6c04aa..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = inspectorLog;
-
-// black hole
-const nullStream = new (require('stream').Writable)();
-nullStream._write = () => {};
-
-/**
- * Outputs a `console.log()` to the Node.js Inspector console *only*.
- */
-function inspectorLog() {
- const stdout = console._stdout;
- console._stdout = nullStream;
- console.log.apply(console, arguments);
- console._stdout = stdout;
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
index b15109c905..d666fb9c00 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
@@ -23,7 +23,22 @@ exports.useColors = useColors;
* Colors.
*/
-exports.colors = [6, 2, 3, 4, 5, 1];
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
/**
* Build up the default `inspectOpts` object from the environment variables.
@@ -52,30 +67,13 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
}, {});
/**
- * The file descriptor to write the `debug()` calls to.
- * Set the `DEBUG_FD` env variable to override with another value. i.e.:
- *
- * $ DEBUG_FD=3 node script.js 3>debug.log
- */
-
-var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
-
-if (1 !== fd && 2 !== fd) {
- util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
-}
-
-var stream = 1 === fd ? process.stdout :
- 2 === fd ? process.stderr :
- createWritableStdioStream(fd);
-
-/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts
? Boolean(exports.inspectOpts.colors)
- : tty.isatty(fd);
+ : tty.isatty(process.stderr.fd);
}
/**
@@ -111,22 +109,30 @@ function formatArgs(args) {
if (useColors) {
var c = this.color;
- var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+ var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
} else {
- args[0] = new Date().toUTCString()
- + ' ' + name + ' ' + args[0];
+ return new Date().toISOString() + ' ';
}
}
/**
- * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
- return stream.write(util.format.apply(util, arguments) + '\n');
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
@@ -158,74 +164,6 @@ function load() {
}
/**
- * Copied from `node/src/node.js`.
- *
- * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
- * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
- */
-
-function createWritableStdioStream (fd) {
- var stream;
- var tty_wrap = process.binding('tty_wrap');
-
- // Note stream._type is used for test-module-load-list.js
-
- switch (tty_wrap.guessHandleType(fd)) {
- case 'TTY':
- stream = new tty.WriteStream(fd);
- stream._type = 'tty';
-
- // Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- case 'FILE':
- var fs = require('fs');
- stream = new fs.SyncWriteStream(fd, { autoClose: false });
- stream._type = 'fs';
- break;
-
- case 'PIPE':
- case 'TCP':
- var net = require('net');
- stream = new net.Socket({
- fd: fd,
- readable: false,
- writable: true
- });
-
- // FIXME Should probably have an option in net.Socket to create a
- // stream from an existing fd which is writable only. But for now
- // we'll just add this hack and set the `readable` member to false.
- // Test: ./node test/fixtures/echo.js < /etc/passwd
- stream.readable = false;
- stream.read = null;
- stream._type = 'pipe';
-
- // FIXME Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- default:
- // Probably an error on in uv_guess_handle()
- throw new Error('Implement me. Unknown stream file type!');
- }
-
- // For supporting legacy API we put the FD here.
- stream.fd = fd;
-
- stream._isStdio = true;
-
- return stream;
-}
-
-/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
index 36272a6f94..6c031fd86e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
@@ -1,26 +1,26 @@
{
- "_from": "https-proxy-agent@^2.0.0",
- "_id": "https-proxy-agent@2.1.0",
+ "_from": "https-proxy-agent@^2.1.0",
+ "_id": "https-proxy-agent@2.1.1",
"_inBundle": false,
- "_integrity": "sha512-/DTVSUCbRc6AiyOV4DBRvPDpKKCJh4qQJNaCgypX0T41quD9hp/PB5iUyx/60XobuMPQa9ce1jNV9UOUq6PnTg==",
+ "_integrity": "sha512-LK6tQUR/VOkTI6ygAfWUKKP95I+e6M1h7N3PncGu1CATHCnex+CAv9ttR0lbHu1Uk2PXm/WoAHFo6JCGwMjVMw==",
"_location": "/npm-profile/make-fetch-happen/https-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "https-proxy-agent@^2.0.0",
+ "raw": "https-proxy-agent@^2.1.0",
"name": "https-proxy-agent",
"escapedName": "https-proxy-agent",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^2.1.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^2.1.0"
},
"_requiredBy": [
"/npm-profile/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.1.0.tgz",
- "_shasum": "1391bee7fd66aeabc0df2a1fa90f58954f43e443",
- "_spec": "https-proxy-agent@^2.0.0",
+ "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz",
+ "_shasum": "a7ce4382a1ba8266ee848578778122d491260fd9",
+ "_spec": "https-proxy-agent@^2.1.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
@@ -33,7 +33,7 @@
"bundleDependencies": false,
"dependencies": {
"agent-base": "^4.1.0",
- "debug": "^2.4.1"
+ "debug": "^3.1.0"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
@@ -58,5 +58,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.0"
+ "version": "2.1.1"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/index.js
new file mode 100644
index 0000000000..d635b29c56
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/index.js
@@ -0,0 +1,10 @@
+module.exports.pipe = require('pump')
+module.exports.each = require('stream-each')
+module.exports.pipeline = require('pumpify')
+module.exports.duplex = require('duplexify')
+module.exports.through = require('through2')
+module.exports.concat = require('concat-stream')
+module.exports.finished = require('end-of-stream')
+module.exports.from = require('from2')
+module.exports.to = require('flush-write-stream')
+module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000000..1e836b4760
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js
new file mode 100644
index 0000000000..b16ad1343f
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js
@@ -0,0 +1,143 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
+ } else {
+ strings.push(new Buffer(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = new Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
new file mode 100644
index 0000000000..cc4dba29d9
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000000..11adfaec9e
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
new file mode 100644
index 0000000000..8423d7c9b1
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
@@ -0,0 +1,4 @@
+var Uint8Array = require('../').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
new file mode 100644
index 0000000000..5e540841f4
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
new file mode 100644
index 0000000000..e78d290339
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "typedarray@^0.0.6",
+ "_id": "typedarray@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/concat-stream/typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray@^0.0.6",
+ "name": "typedarray",
+ "escapedName": "typedarray",
+ "rawSpec": "^0.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^0.0.6"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777",
+ "_spec": "typedarray@^0.0.6",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "TypedArray polyfill for old browsers",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "0.0.6"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000000..d18f6f7197
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
new file mode 100644
index 0000000000..e57dabdceb
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var vm = require('vm');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8');
+
+test('u8a without globals', function (t) {
+ var c = {
+ module: { exports: {} },
+ };
+ c.exports = c.module.exports;
+ vm.runInNewContext(src, c);
+ var TA = c.module.exports;
+ var ua = new(TA.Uint8Array)(5);
+
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
new file mode 100644
index 0000000000..df596a34f2
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
@@ -0,0 +1,10 @@
+var TA = require('../');
+var test = require('tape');
+
+test('tiny u8a test', function (t) {
+ var ua = new(TA.Uint8Array)(5);
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json
new file mode 100644
index 0000000000..96d51c9ff3
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "concat-stream@^1.5.0",
+ "_id": "concat-stream@1.6.0",
+ "_inBundle": false,
+ "_integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/concat-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "concat-stream@^1.5.0",
+ "name": "concat-stream",
+ "escapedName": "concat-stream",
+ "rawSpec": "^1.5.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
+ "_shasum": "0aac662fd52be78964d5532f694784e70110acf7",
+ "_spec": "concat-stream@^1.5.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Max Ogden",
+ "email": "max@maxogden.com"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "deprecated": false,
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "1.6.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000000..9478721990
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md
new file mode 100644
index 0000000000..8352900fc6
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md
@@ -0,0 +1,97 @@
+# duplexify
+
+Turn a writeable and readable stream into a single streams2 duplex stream.
+
+Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input
+and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)`
+
+```
+npm install duplexify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify)
+
+## Usage
+
+Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream)
+
+``` js
+var duplexify = require('duplexify')
+
+// turn writableStream and readableStream into a single duplex stream
+var dup = duplexify(writableStream, readableStream)
+
+dup.write('hello world') // will write to writableStream
+dup.on('data', function(data) {
+ // will read from readableStream
+})
+```
+
+You can also set the readable and writable parts asynchronously
+
+``` js
+var dup = duplexify()
+
+dup.write('hello world') // write will buffer until the writable
+ // part has been set
+
+// wait a bit ...
+dup.setReadable(readableStream)
+
+// maybe wait some more?
+dup.setWritable(writableStream)
+```
+
+If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream.
+To disable the readable or writable part call `setReadable` or `setWritable` with `null`.
+
+If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.
+You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
+error object as argument, in which case the error is emitted as part of the `error` event.
+
+``` js
+dup.on('error', function(err) {
+ console.log('readable or writable emitted an error - close will follow')
+})
+
+dup.on('close', function() {
+ console.log('the duplex stream is destroyed')
+})
+
+dup.destroy() // calls destroy on the readable and writable part (if present)
+```
+
+## HTTP request example
+
+Turn a node core http request into a duplex stream is as easy as
+
+``` js
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
+```
+
+## License
+
+MIT
+
+## Related
+
+`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js
new file mode 100644
index 0000000000..5585c19756
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js
@@ -0,0 +1,21 @@
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify()
+ dup.setWritable(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js
new file mode 100644
index 0000000000..84bb5e122a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js
@@ -0,0 +1,239 @@
+var stream = require('readable-stream')
+var eos = require('end-of-stream')
+var inherits = require('inherits')
+var shift = require('stream-shift')
+
+var SIGNAL_FLUSH = new Buffer([0])
+
+var onuncork = function(self, fn) {
+ if (self._corked) self.once('uncork', fn)
+ else fn()
+}
+
+var destroyer = function(self, end) {
+ return function(err) {
+ if (err) self._destroyInterval(err)
+ else if (end && !self._ended) self.end()
+ }
+}
+
+var end = function(ws, fn) {
+ if (!ws) return fn()
+ if (ws._writableState && ws._writableState.finished) return fn()
+ if (ws._writableState) return ws.end(fn)
+ ws.end()
+ fn()
+}
+
+var toStreams2 = function(rs) {
+ return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)
+}
+
+var Duplexify = function(writable, readable, opts) {
+ if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)
+ stream.Duplex.call(this, opts)
+
+ this._writable = null
+ this._readable = null
+ this._readable2 = null
+
+ this._forwardDestroy = !opts || opts.destroy !== false
+ this._forwardEnd = !opts || opts.end !== false
+ this._corked = 1 // start corked
+ this._ondrain = null
+ this._drained = false
+ this._forwarding = false
+ this._unwrite = null
+ this._unread = null
+ this._ended = false
+ this._error = null
+ this._preferError = false
+
+ this.destroyed = false
+
+ if (writable) this.setWritable(writable)
+ if (readable) this.setReadable(readable)
+}
+
+inherits(Duplexify, stream.Duplex)
+
+Duplexify.obj = function(writable, readable, opts) {
+ if (!opts) opts = {}
+ opts.objectMode = true
+ opts.highWaterMark = 16
+ return new Duplexify(writable, readable, opts)
+}
+
+Duplexify.prototype.cork = function() {
+ if (++this._corked === 1) this.emit('cork')
+}
+
+Duplexify.prototype.uncork = function() {
+ if (this._corked && --this._corked === 0) this.emit('uncork')
+}
+
+Duplexify.prototype.setWritable = function(writable) {
+ if (this._unwrite) this._unwrite()
+
+ if (this.destroyed) {
+ if (writable && writable.destroy) writable.destroy()
+ return
+ }
+
+ if (writable === null || writable === false) {
+ this.end()
+ return
+ }
+
+ var self = this
+ var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))
+
+ var ondrain = function() {
+ var ondrain = self._ondrain
+ self._ondrain = null
+ if (ondrain) ondrain()
+ }
+
+ var clear = function() {
+ self._writable.removeListener('drain', ondrain)
+ unend()
+ }
+
+ if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks
+
+ this._writable = writable
+ this._writable.on('drain', ondrain)
+ this._unwrite = clear
+
+ this.uncork() // always uncork setWritable
+}
+
+Duplexify.prototype.setReadable = function(readable) {
+ if (this._unread) this._unread()
+
+ if (this.destroyed) {
+ if (readable && readable.destroy) readable.destroy()
+ return
+ }
+
+ if (readable === null || readable === false) {
+ this.push(null)
+ this.resume()
+ return
+ }
+
+ var self = this
+ var unend = eos(readable, {writable:false, readable:true}, destroyer(this))
+
+ var onreadable = function() {
+ self._forward()
+ }
+
+ var onend = function() {
+ self.push(null)
+ }
+
+ var clear = function() {
+ self._readable2.removeListener('readable', onreadable)
+ self._readable2.removeListener('end', onend)
+ unend()
+ }
+
+ this._drained = true
+ this._readable = readable
+ this._readable2 = readable._readableState ? readable : toStreams2(readable)
+ this._readable2.on('readable', onreadable)
+ this._readable2.on('end', onend)
+ this._unread = clear
+
+ this._forward()
+}
+
+Duplexify.prototype._read = function() {
+ this._drained = true
+ this._forward()
+}
+
+Duplexify.prototype._forward = function() {
+ if (this._forwarding || !this._readable2 || !this._drained) return
+ this._forwarding = true
+
+ var data
+
+ while (this._drained && (data = shift(this._readable2)) !== null) {
+ if (this.destroyed) continue
+ this._drained = this.push(data)
+ }
+
+ this._forwarding = false
+}
+
+Duplexify.prototype.destroy = function(err) {
+ if (this._preferError && !this._error && err) this._error = err
+
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ self._destroy(self._preferError ? self._error : err)
+ })
+}
+
+Duplexify.prototype._destroyInterval = function(err) {
+ if (this.destroyed) return
+ if (err.message !== 'premature close') return this.destroy(err)
+ this._preferError = true
+ this.destroy(null)
+}
+
+Duplexify.prototype._destroy = function(err) {
+ if (err) {
+ var ondrain = this._ondrain
+ this._ondrain = null
+ if (ondrain) ondrain(err)
+ else this.emit('error', err)
+ }
+
+ if (this._forwardDestroy) {
+ if (this._readable && this._readable.destroy) this._readable.destroy()
+ if (this._writable && this._writable.destroy) this._writable.destroy()
+ }
+
+ this.emit('close')
+}
+
+Duplexify.prototype._write = function(data, enc, cb) {
+ if (this.destroyed) return cb()
+ if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))
+ if (data === SIGNAL_FLUSH) return this._finish(cb)
+ if (!this._writable) return cb()
+
+ if (this._writable.write(data) === false) this._ondrain = cb
+ else cb()
+}
+
+
+Duplexify.prototype._finish = function(cb) {
+ var self = this
+ this.emit('preend')
+ onuncork(this, function() {
+ end(self._forwardEnd && self._writable, function() {
+ // haxx to not emit prefinish twice
+ if (self._writableState.prefinished === false) self._writableState.prefinished = true
+ self.emit('prefinish')
+ onuncork(self, cb)
+ })
+ })
+}
+
+Duplexify.prototype.end = function(data, enc, cb) {
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ this._ended = true
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+module.exports = Duplexify
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..504872bf63
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/duplexify/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/duplexify"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json
new file mode 100644
index 0000000000..61bdc63d2f
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "duplexify@^3.4.2",
+ "_id": "duplexify@3.5.3",
+ "_inBundle": false,
+ "_integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/duplexify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "duplexify@^3.4.2",
+ "name": "duplexify",
+ "escapedName": "duplexify",
+ "rawSpec": "^3.4.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.4.2"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi",
+ "/npm-profile/make-fetch-happen/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz",
+ "_shasum": "8b5818800df92fd0125b27ab896491912858243e",
+ "_spec": "duplexify@^3.4.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/duplexify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
+ "devDependencies": {
+ "concat-stream": "^1.5.2",
+ "tape": "^4.0.0",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/duplexify",
+ "keywords": [
+ "duplex",
+ "streams2",
+ "streams",
+ "stream",
+ "writable",
+ "readable",
+ "async"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "duplexify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/duplexify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "3.5.3"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js
new file mode 100644
index 0000000000..4330e93cf0
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js
@@ -0,0 +1,291 @@
+var tape = require('tape')
+var through = require('through2')
+var concat = require('concat-stream')
+var net = require('net')
+var duplexify = require('./')
+
+tape('passthrough', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('passthrough + double end', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('async passthrough + end', function(t) {
+ t.plan(2)
+
+ var pt = through.obj({highWaterMark:1}, function(data, enc, cb) {
+ setTimeout(function() {
+ cb(null, data)
+ }, 100)
+ })
+
+ var dup = duplexify(pt, pt)
+
+ dup.write('hello ')
+ dup.write('world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('duplex', function(t) {
+ var readExpected = ['read-a', 'read-b', 'read-c']
+ var writeExpected = ['write-a', 'write-b', 'write-c']
+
+ t.plan(readExpected.length+writeExpected.length+2)
+
+ var readable = through.obj()
+ var writable = through.obj(function(data, enc, cb) {
+ t.same(data, writeExpected.shift(), 'onwrite should match')
+ cb()
+ })
+
+ var dup = duplexify.obj(writable, readable)
+
+ readExpected.slice().forEach(function(data) {
+ readable.write(data)
+ })
+ readable.end()
+
+ writeExpected.slice().forEach(function(data) {
+ dup.write(data)
+ })
+ dup.end()
+
+ dup.on('data', function(data) {
+ t.same(data, readExpected.shift(), 'ondata should match')
+ })
+ dup.on('end', function() {
+ t.ok(true, 'should end')
+ })
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+})
+
+tape('async', function(t) {
+ var dup = duplexify()
+ var pt = through()
+
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'i was async', 'same in as out')
+ t.end()
+ }))
+
+ dup.write('i')
+ dup.write(' was ')
+ dup.end('async')
+
+ setTimeout(function() {
+ dup.setWritable(pt)
+ setTimeout(function() {
+ dup.setReadable(pt)
+ }, 50)
+ }, 50)
+})
+
+tape('destroy', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('destroy both', function(t) {
+ t.plan(3)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ read.destroy = function() {
+ t.ok(true, 'read destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('bubble read errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'read-error', 'received read error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ read.emit('error', new Error('read-error'))
+ write.emit('error', new Error('write-error')) // only emit first error
+})
+
+tape('bubble write errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'write-error', 'received write error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ write.emit('error', new Error('write-error'))
+ read.emit('error', new Error('read-error')) // only emit first error
+})
+
+tape('reset writable / readable', function(t) {
+ t.plan(3)
+
+ var toUpperCase = function(data, enc, cb) {
+ cb(null, data.toString().toUpperCase())
+ }
+
+ var passthrough = through()
+ var upper = through(toUpperCase)
+ var dup = duplexify(passthrough, passthrough)
+
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'hello')
+ dup.setWritable(upper)
+ dup.setReadable(upper)
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HI')
+ t.end()
+ })
+ })
+ dup.write('hello')
+ dup.write('hi')
+ })
+ dup.write('hello')
+})
+
+tape('cork', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var ok = false
+
+ dup.on('prefinish', function() {
+ dup.cork()
+ setTimeout(function() {
+ ok = true
+ dup.uncork()
+ }, 100)
+ })
+ dup.on('finish', function() {
+ t.ok(ok)
+ t.end()
+ })
+ dup.end()
+})
+
+tape('prefinish not twice', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var prefinished = false
+
+ dup.on('prefinish', function() {
+ t.ok(!prefinished, 'only prefinish once')
+ prefinished = true
+ })
+
+ dup.on('finish', function() {
+ t.end()
+ })
+
+ dup.end()
+})
+
+tape('close', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+
+ passthrough.emit('close')
+ dup.on('close', function() {
+ t.ok(true, 'should forward close')
+ t.end()
+ })
+})
+
+tape('works with node native streams (net)', function(t) {
+ t.plan(1)
+
+ var server = net.createServer(function(socket) {
+ var dup = duplexify(socket, socket)
+
+ dup.once('data', function(chunk) {
+ t.same(chunk, Buffer('hello world'))
+ server.close()
+ socket.end()
+ t.end()
+ })
+ })
+
+ server.listen(0, function () {
+ var socket = net.connect(server.address().port)
+ var dup = duplexify(socket, socket)
+
+ dup.write(Buffer('hello world'))
+ })
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md
new file mode 100644
index 0000000000..f2560c939d
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md
@@ -0,0 +1,52 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams, streams2 and stream3 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ // this will be set to the stream instance
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended', this === readableStream);
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished', this === writableStream);
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished', this === duplexStream);
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished but might still be readable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js
new file mode 100644
index 0000000000..be426c227c
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js
@@ -0,0 +1,87 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function() {
+ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+
+ return function() {
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json
new file mode 100644
index 0000000000..d43f409867
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "end-of-stream@^1.1.0",
+ "_id": "end-of-stream@1.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/end-of-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "end-of-stream@^1.1.0",
+ "name": "end-of-stream",
+ "escapedName": "end-of-stream",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi",
+ "/npm-profile/make-fetch-happen/mississippi/duplexify",
+ "/npm-profile/make-fetch-happen/mississippi/pump",
+ "/npm-profile/make-fetch-happen/mississippi/pumpify/pump",
+ "/npm-profile/make-fetch-happen/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43",
+ "_spec": "end-of-stream@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "once": "^1.4.0"
+ },
+ "deprecated": false,
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "keywords": [
+ "stream",
+ "streams",
+ "callback",
+ "finish",
+ "close",
+ "end",
+ "wait"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "end-of-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.4.1"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
new file mode 100644
index 0000000000..3e70011a19
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+bundle.js
+test.html
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
new file mode 100644
index 0000000000..c042821703
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - '4.0'
+ - '5.0'
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md
new file mode 100644
index 0000000000..7ea7b699b8
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md
@@ -0,0 +1,59 @@
+# flush-write-stream
+
+A write stream constructor that supports a flush function that is called before `finish` is emitted
+
+```
+npm install flush-write-stream
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream)
+
+## Usage
+
+``` js
+var writer = require('flush-write-stream')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+## API
+
+#### `var ws = writer([options], write, [flush])`
+
+Create a new writable stream. Options are forwarded to the stream constructor.
+
+#### `var ws = writer.obj([options], write, [flush])`
+
+Same as the above except `objectMode` is set to `true` per default.
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js
new file mode 100644
index 0000000000..fa6b5dab25
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js
@@ -0,0 +1,22 @@
+var writer = require('./')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js
new file mode 100644
index 0000000000..e82e126126
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js
@@ -0,0 +1,52 @@
+var stream = require('readable-stream')
+var inherits = require('inherits')
+
+var SIGNAL_FLUSH = new Buffer([0])
+
+module.exports = WriteStream
+
+function WriteStream (opts, write, flush) {
+ if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush)
+
+ if (typeof opts === 'function') {
+ flush = write
+ write = opts
+ opts = {}
+ }
+
+ stream.Writable.call(this, opts)
+
+ this.destroyed = false
+ this._worker = write || null
+ this._flush = flush || null
+}
+
+inherits(WriteStream, stream.Writable)
+
+WriteStream.obj = function (opts, worker, flush) {
+ if (typeof opts === 'function') return WriteStream.obj(null, opts, worker)
+ if (!opts) opts = {}
+ opts.objectMode = true
+ return new WriteStream(opts, worker, flush)
+}
+
+WriteStream.prototype._write = function (data, enc, cb) {
+ if (SIGNAL_FLUSH === data) this._flush(cb)
+ else this._worker(data, enc, cb)
+}
+
+WriteStream.prototype.end = function (data, enc, cb) {
+ if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments)
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+WriteStream.prototype.destroy = function (err) {
+ if (this.destroyed) return
+ this.destroyed = true
+ if (err) this.emit('error', err)
+ this.emit('close')
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json
new file mode 100644
index 0000000000..dd469e50a6
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "flush-write-stream@^1.0.0",
+ "_id": "flush-write-stream@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/flush-write-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "flush-write-stream@^1.0.0",
+ "name": "flush-write-stream",
+ "escapedName": "flush-write-stream",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+ "_shasum": "c81b90d8746766f1a609a46809946c45dd8ae417",
+ "_spec": "flush-write-stream@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/flush-write-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.4"
+ },
+ "deprecated": false,
+ "description": "A write stream constructor that supports a flush function that is called before finish is emitted",
+ "devDependencies": {
+ "tape": "^4.2.2"
+ },
+ "homepage": "https://github.com/mafintosh/flush-write-stream",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "flush-write-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/flush-write-stream.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js
new file mode 100644
index 0000000000..6cd0c20e1f
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js
@@ -0,0 +1,85 @@
+var tape = require('tape')
+var writer = require('./')
+
+tape('is a write stream', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var ws = writer.obj(write)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+})
+
+tape('is flushable', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer.obj(write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('can pass options', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer({objectMode: true}, write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('emits error on destroy', function (t) {
+ var expected = new Error()
+
+ var ws = writer({objectMode: true}, function () {})
+
+ ws.on('error', function (err) {
+ t.equal(err, expected)
+ })
+ ws.on('close', t.end)
+
+ ws.destroy(expected)
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml
new file mode 100644
index 0000000000..b03ffabcab
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+before_install:
+ - npm install -g npm
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+ - "iojs"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md
new file mode 100644
index 0000000000..146cb32a7d
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md
@@ -0,0 +1,21 @@
+## The MIT License (MIT) ##
+
+Copyright (c) 2014 Hugh Kennedy
+
+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/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md
new file mode 100644
index 0000000000..3e041a412a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md
@@ -0,0 +1,70 @@
+# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
+
+`from2` is a high-level module for creating readable streams that properly handle backpressure.
+
+Convience wrapper for
+[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
+base class, with an API lifted from
+[from](http://github.com/dominictarr/from) and
+[through2](http://github.com/rvagg/through2).
+
+## Usage ##
+
+[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
+
+### `stream = from2([opts], read)` ###
+
+Where `opts` are the options to pass on to the `ReadableStream` constructor,
+and `read(size, next)` is called when data is requested from the stream.
+
+* `size` is the recommended amount of data (in bytes) to retrieve.
+* `next(err)` should be called when you're ready to emit more data.
+
+For example, here's a readable stream that emits the contents of a given
+string:
+
+``` javascript
+var from = require('from2')
+
+function fromString(string) {
+ return from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### `stream = from2.obj([opts], read)` ###
+
+Shorthand for `from2({ objectMode: true }, read)`.
+
+### `createStream = from2.ctor([opts], read)` ###
+
+If you're creating similar streams in quick succession you can improve
+performance by generating a stream **constructor** that you can reuse instead
+of creating one-off streams on each call.
+
+Takes the same options as `from2`, instead returning a constructor which you
+can use to create new streams.
+
+### See Also
+
+- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values.
+- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2.
+
+## License ##
+
+MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js
new file mode 100644
index 0000000000..cb200c610a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js
@@ -0,0 +1,103 @@
+var Readable = require('readable-stream').Readable
+var inherits = require('inherits')
+
+module.exports = from2
+
+from2.ctor = ctor
+from2.obj = obj
+
+var Proto = ctor()
+
+function toFunction(list) {
+ list = list.slice()
+ return function (_, cb) {
+ var err = null
+ var item = list.length ? list.shift() : null
+ if (item instanceof Error) {
+ err = item
+ item = null
+ }
+
+ cb(err, item)
+ }
+}
+
+function from2(opts, read) {
+ if (typeof opts !== 'object' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ var rs = new Proto(opts)
+ rs._from = Array.isArray(read) ? toFunction(read) : (read || noop)
+ return rs
+}
+
+function ctor(opts, read) {
+ if (typeof opts === 'function') {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+
+ inherits(Class, Readable)
+ function Class(override) {
+ if (!(this instanceof Class)) return new Class(override)
+ this._reading = false
+ this._callback = check
+ this.destroyed = false
+ Readable.call(this, override || opts)
+
+ var self = this
+ var hwm = this._readableState.highWaterMark
+
+ function check(err, data) {
+ if (self.destroyed) return
+ if (err) return self.destroy(err)
+ if (data === null) return self.push(null)
+ self._reading = false
+ if (self.push(data)) self._read(hwm)
+ }
+ }
+
+ Class.prototype._from = read || noop
+ Class.prototype._read = function(size) {
+ if (this._reading || this.destroyed) return
+ this._reading = true
+ this._from(size, this._callback)
+ }
+
+ Class.prototype.destroy = function(err) {
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err) self.emit('error', err)
+ self.emit('close')
+ })
+ }
+
+ return Class
+}
+
+function obj(opts, read) {
+ if (typeof opts === 'function' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+ opts.objectMode = true
+ opts.highWaterMark = 16
+
+ return from2(opts, read)
+}
+
+function noop () {}
+
+function defaults(opts) {
+ opts = opts || {}
+ return opts
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json
new file mode 100644
index 0000000000..9bc6992e65
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "from2@^2.1.0",
+ "_id": "from2@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/from2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "from2@^2.1.0",
+ "name": "from2",
+ "escapedName": "from2",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+ "_shasum": "8bfb5502bde4a4d36cfdeea007fcca21d7e382af",
+ "_spec": "from2@^2.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Hugh Kennedy",
+ "email": "hughskennedy@gmail.com",
+ "url": "http://hughsk.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/hughsk/from2/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
+ "devDependencies": {
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/hughsk/from2",
+ "keywords": [
+ "from",
+ "stream",
+ "readable",
+ "pull",
+ "convenience",
+ "wrapper"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "from2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hughsk/from2.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "version": "2.3.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js
new file mode 100644
index 0000000000..150429b0f7
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js
@@ -0,0 +1,121 @@
+var test = require('tape')
+var path = require('path')
+var from = require('./')
+var fs = require('fs')
+
+var tmp = path.resolve(
+ __dirname, 'tmp.txt'
+)
+
+function fromString(string) {
+ return from(function(size, next) {
+ if (string.length <= 0) return next(null, null)
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+ next(null, chunk)
+ })
+}
+
+test('from2', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+
+ stream
+ .pipe(fs.createWriteStream(tmp))
+ .on('close', function() {
+ t.equal(fs.readFileSync(tmp, 'utf8'), contents)
+ fs.unlinkSync(tmp)
+ t.end()
+ })
+})
+
+test('old mode', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+ var buffer = ''
+
+ stream.on('data', function(data) {
+ buffer += data
+ }).on('end', function() {
+ t.equal(buffer, contents)
+ t.end()
+ })
+})
+
+test('destroy', function(t) {
+ var stream = from(function(size, next) {
+ process.nextTick(function() {
+ next(null, 'no')
+ })
+ })
+
+ stream.on('data', function(data) {
+ t.ok(false)
+ }).on('close', function() {
+ t.ok(true)
+ t.end()
+ })
+
+ stream.destroy()
+})
+
+test('arrays', function (t) {
+ var input = ['a', 'b', 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+test('obj arrays', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+
+test('arrays can emit errors', function (t) {
+ var input = ['a', 'b', new Error('ooops'), 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('error', function(e){
+ t.deepEqual(['a', 'b'], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
+
+test('obj arrays can emit errors', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('error', function(e){
+ t.deepEqual([{foo:'a'}, {foo:'b'}], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE
new file mode 100644
index 0000000000..4b30ed5d95
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md
new file mode 100644
index 0000000000..f53e130849
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md
@@ -0,0 +1,54 @@
+# parallel-transform
+
+[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms
+in parallel without changing the order of the output.
+
+ npm install parallel-transform
+
+It is easy to use
+
+``` js
+var transform = require('parallel-transform');
+
+var stream = transform(10, function(data, callback) { // 10 is the parallism level
+ setTimeout(function() {
+ callback(null, data);
+ }, Math.random() * 1000);
+});
+
+for (var i = 0; i < 10; i++) {
+ stream.write(''+i);
+}
+stream.end();
+
+stream.on('data', function(data) {
+ console.log(data); // prints 0,1,2,...
+});
+stream.on('end', function() {
+ console.log('stream has ended');
+});
+```
+
+If you run the above example you'll notice that it runs in parallel
+(does not take ~1 second between each print) and that the order is preserved
+
+## Stream options
+
+All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`.
+If you want to use your own stream options pass them as the second parameter
+
+``` js
+var stream = transform(10, {objectMode:false}, function(data, callback) {
+ // data is now a buffer
+ callback(null, data);
+});
+
+fs.createReadStream('filename').pipe(stream).pipe(process.stdout);
+```
+
+### Unordered
+Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order.
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js
new file mode 100644
index 0000000000..77329e4ccf
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js
@@ -0,0 +1,105 @@
+var Transform = require('readable-stream').Transform;
+var inherits = require('inherits');
+var cyclist = require('cyclist');
+var util = require('util');
+
+var ParallelTransform = function(maxParallel, opts, ontransform) {
+ if (!(this instanceof ParallelTransform)) return new ParallelTransform(maxParallel, opts, ontransform);
+
+ if (typeof maxParallel === 'function') {
+ ontransform = maxParallel;
+ opts = null;
+ maxParallel = 1;
+ }
+ if (typeof opts === 'function') {
+ ontransform = opts;
+ opts = null;
+ }
+
+ if (!opts) opts = {};
+ if (!opts.highWaterMark) opts.highWaterMark = Math.max(maxParallel, 16);
+ if (opts.objectMode !== false) opts.objectMode = true;
+
+ Transform.call(this, opts);
+
+ this._maxParallel = maxParallel;
+ this._ontransform = ontransform;
+ this._destroyed = false;
+ this._flushed = false;
+ this._ordered = opts.ordered !== false;
+ this._buffer = this._ordered ? cyclist(maxParallel) : [];
+ this._top = 0;
+ this._bottom = 0;
+ this._ondrain = null;
+};
+
+inherits(ParallelTransform, Transform);
+
+ParallelTransform.prototype.destroy = function() {
+ if (this._destroyed) return;
+ this._destroyed = true;
+ this.emit('close');
+};
+
+ParallelTransform.prototype._transform = function(chunk, enc, callback) {
+ var self = this;
+ var pos = this._top++;
+
+ this._ontransform(chunk, function(err, data) {
+ if (self._destroyed) return;
+ if (err) {
+ self.emit('error', err);
+ self.push(null);
+ self.destroy();
+ return;
+ }
+ if (self._ordered) {
+ self._buffer.put(pos, (data === undefined || data === null) ? null : data);
+ }
+ else {
+ self._buffer.push(data);
+ }
+ self._drain();
+ });
+
+ if (this._top - this._bottom < this._maxParallel) return callback();
+ this._ondrain = callback;
+};
+
+ParallelTransform.prototype._flush = function(callback) {
+ this._flushed = true;
+ this._ondrain = callback;
+ this._drain();
+};
+
+ParallelTransform.prototype._drain = function() {
+ if (this._ordered) {
+ while (this._buffer.get(this._bottom) !== undefined) {
+ var data = this._buffer.del(this._bottom++);
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+ else {
+ while (this._buffer.length > 0) {
+ var data = this._buffer.pop();
+ this._bottom++;
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+
+
+ if (!this._drained() || !this._ondrain) return;
+
+ var ondrain = this._ondrain;
+ this._ondrain = null;
+ ondrain();
+};
+
+ParallelTransform.prototype._drained = function() {
+ var diff = this._top - this._bottom;
+ return this._flushed ? !diff : diff < this._maxParallel;
+};
+
+module.exports = ParallelTransform;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
new file mode 100644
index 0000000000..ba99195bae
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
@@ -0,0 +1 @@
+bench
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
new file mode 100644
index 0000000000..50c35cc5fd
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
@@ -0,0 +1,39 @@
+# Cyclist
+
+Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.
+It is available through npm
+
+ npm install cyclist
+
+## What?
+
+Cyclist allows you to create a list of fixed size that is cyclic.
+In a cyclist list the element following the last one is the first one.
+This property can be really useful when for example trying to order data
+packets that can arrive out of order over a network stream.
+
+## Usage
+
+``` js
+var cyclist = require('cyclist');
+var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2
+ // this buffer can now hold 4 elements in total
+
+list.put(42, 'hello 42'); // store something and index 42
+list.put(43, 'hello 43'); // store something and index 43
+
+console.log(list.get(42)); // prints hello 42
+console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size
+```
+
+## API
+
+* `cyclist(size)` creates a new buffer
+* `cyclist#get(index)` get an object stored in the buffer
+* `cyclist#put(index,value)` insert an object into the buffer
+* `cyclist#del(index)` delete an object from an index
+* `cyclist#size` property containing current size of buffer
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
new file mode 100644
index 0000000000..baf710c3a9
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
@@ -0,0 +1,33 @@
+var ensureTwoPower = function(n) {
+ if (n && !(n & (n - 1))) return n;
+ var p = 1;
+ while (p < n) p <<= 1;
+ return p;
+};
+
+var Cyclist = function(size) {
+ if (!(this instanceof Cyclist)) return new Cyclist(size);
+ size = ensureTwoPower(size);
+ this.mask = size-1;
+ this.size = size;
+ this.values = new Array(size);
+};
+
+Cyclist.prototype.put = function(index, val) {
+ var pos = index & this.mask;
+ this.values[pos] = val;
+ return pos;
+};
+
+Cyclist.prototype.get = function(index) {
+ return this.values[index & this.mask];
+};
+
+Cyclist.prototype.del = function(index) {
+ var pos = index & this.mask;
+ var val = this.values[pos];
+ this.values[pos] = undefined;
+ return val;
+};
+
+module.exports = Cyclist; \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
new file mode 100644
index 0000000000..c973403905
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "cyclist@~0.2.2",
+ "_id": "cyclist@0.2.2",
+ "_inBundle": false,
+ "_integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/parallel-transform/cyclist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cyclist@~0.2.2",
+ "name": "cyclist",
+ "escapedName": "cyclist",
+ "rawSpec": "~0.2.2",
+ "saveSpec": null,
+ "fetchSpec": "~0.2.2"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/parallel-transform"
+ ],
+ "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+ "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640",
+ "_spec": "cyclist@~0.2.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/cyclist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Cyclist is an efficient cyclic list implemention.",
+ "homepage": "https://github.com/mafintosh/cyclist#readme",
+ "keywords": [
+ "circular",
+ "buffer",
+ "ring",
+ "cyclic",
+ "data"
+ ],
+ "name": "cyclist",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/cyclist.git"
+ },
+ "version": "0.2.2"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json
new file mode 100644
index 0000000000..3cee8c65cb
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "parallel-transform@^1.1.0",
+ "_id": "parallel-transform@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/parallel-transform",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "parallel-transform@^1.1.0",
+ "name": "parallel-transform",
+ "escapedName": "parallel-transform",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+ "_shasum": "d410f065b05da23081fcd10f28854c29bda33b06",
+ "_spec": "parallel-transform@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/parallel-transform/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "cyclist": "~0.2.2",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.1.5"
+ },
+ "deprecated": false,
+ "description": "Transform stream that allows you to run your transforms in parallel without changing the order",
+ "homepage": "https://github.com/mafintosh/parallel-transform#readme",
+ "keywords": [
+ "transform",
+ "stream",
+ "parallel",
+ "preserve",
+ "order"
+ ],
+ "license": "MIT",
+ "name": "parallel-transform",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/parallel-transform.git"
+ },
+ "version": "1.1.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js
new file mode 100644
index 0000000000..f0c639a8c8
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js
@@ -0,0 +1,80 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ return streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json
new file mode 100644
index 0000000000..2a5e629729
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "pump@^1.0.0",
+ "_id": "pump@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^1.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
+ "_shasum": "5dfe8311c33bbf6fc18261f9f34702c47c08a954",
+ "_spec": "pump@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..80e852c7dc
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js
@@ -0,0 +1,58 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) console.log('done')
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+setTimeout(function () {
+ if (!check()) throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/mississippi/node_modules/pump/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js
index 64e772ca5b..64e772ca5b 100644
--- a/deps/npm/node_modules/mississippi/node_modules/pump/test.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml
new file mode 100644
index 0000000000..32e71a6b55
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+
+node_js:
+ - "0.10"
+ - "4"
+ - "5"
+
+sudo: false
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
new file mode 100644
index 0000000000..4988f7b126
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
@@ -0,0 +1,56 @@
+# pumpify
+
+Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).
+If one of the streams closes/errors all streams in the pipeline will be destroyed.
+
+```
+npm install pumpify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)
+
+## Usage
+
+Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`.
+`pipeline` is a duplex stream that writes to the first streams and reads from the last one.
+Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes
+all streams will be destroyed.
+
+``` js
+var pumpify = require('pumpify')
+var tar = require('tar-fs')
+var zlib = require('zlib')
+var fs = require('fs')
+
+var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))
+// you can also pass an array instead
+// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.
+Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).
+
+### Using `setPipeline(s1, s2, ...)`
+
+Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`
+
+``` js
+var untar = pumpify()
+
+setTimeout(function() {
+ // will start draining the input now
+ untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))
+}, 1000)
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+## License
+
+MIT
+
+## Related
+
+`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js
new file mode 100644
index 0000000000..45bb987e85
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js
@@ -0,0 +1,56 @@
+var pump = require('pump')
+var inherits = require('inherits')
+var Duplexify = require('duplexify')
+
+var toArray = function(args) {
+ if (!args.length) return []
+ return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args)
+}
+
+var define = function(opts) {
+ var Pumpify = function() {
+ var streams = toArray(arguments)
+ if (!(this instanceof Pumpify)) return new Pumpify(streams)
+ Duplexify.call(this, null, null, opts)
+ if (streams.length) this.setPipeline(streams)
+ }
+
+ inherits(Pumpify, Duplexify)
+
+ Pumpify.prototype.setPipeline = function() {
+ var streams = toArray(arguments)
+ var self = this
+ var ended = false
+ var w = streams[0]
+ var r = streams[streams.length-1]
+
+ r = r.readable ? r : null
+ w = w.writable ? w : null
+
+ var onclose = function() {
+ streams[0].emit('error', new Error('stream was destroyed'))
+ }
+
+ this.on('close', onclose)
+ this.on('prefinish', function() {
+ if (!ended) self.cork()
+ })
+
+ pump(streams, function(err) {
+ self.removeListener('close', onclose)
+ if (err) return self.destroy(err)
+ ended = true
+ self.uncork()
+ })
+
+ if (this.destroyed) return onclose()
+ this.setWritable(w)
+ this.setReadable(r)
+ }
+
+ return Pumpify
+}
+
+module.exports = define({destroy:false})
+module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16})
+module.exports.ctor = define
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
new file mode 100644
index 0000000000..d9ca0335cb
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
new file mode 100644
index 0000000000..50380d4b58
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "pump@^2.0.0",
+ "_id": "pump@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/pumpify/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^2.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
+ "_spec": "pump@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "2.0.1"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..75ea4a292e
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
@@ -0,0 +1,62 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..034a65414d
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res) {
+ process.exit(1)
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json
new file mode 100644
index 0000000000..f4a1caffb5
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "pumpify@^1.3.3",
+ "_id": "pumpify@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/pumpify",
+ "_phantomChildren": {
+ "end-of-stream": "1.4.1",
+ "once": "1.4.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pumpify@^1.3.3",
+ "name": "pumpify",
+ "escapedName": "pumpify",
+ "rawSpec": "^1.3.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.3"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+ "_shasum": "80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb",
+ "_spec": "pumpify@^1.3.3",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pumpify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "duplexify": "^3.5.3",
+ "inherits": "^2.0.3",
+ "pump": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Combine an array of streams into a single duplex stream using pump and duplexify",
+ "devDependencies": {
+ "tape": "^4.8.0",
+ "through2": "^2.0.3"
+ },
+ "homepage": "https://github.com/mafintosh/pumpify",
+ "keywords": [
+ "pump",
+ "duplexify",
+ "duplex",
+ "streams",
+ "stream",
+ "pipeline",
+ "combine"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "pumpify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pumpify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js
new file mode 100644
index 0000000000..de6b16e346
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js
@@ -0,0 +1,181 @@
+var tape = require('tape')
+var through = require('through2')
+var pumpify = require('./')
+var stream = require('stream')
+
+tape('basic', function(t) {
+ t.plan(3)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'hello')
+ t.end()
+ })
+})
+
+tape('3 times', function(t) {
+ t.plan(4)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+})
+
+tape('destroy', function(t) {
+ var test = through()
+ test.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify(through(), test)
+
+ pipeline.destroy()
+})
+
+tape('close', function(t) {
+ var test = through()
+ var pipeline = pumpify(through(), test)
+
+ pipeline.on('error', function(err) {
+ t.same(err.message, 'lol')
+ t.end()
+ })
+
+ test.emit('error', new Error('lol'))
+})
+
+tape('end waits for last one', function(t) {
+ var ran = false
+
+ var a = through()
+ var b = through()
+ var c = through(function(data, enc, cb) {
+ setTimeout(function() {
+ ran = true
+ cb()
+ }, 100)
+ })
+
+ var pipeline = pumpify(a, b, c)
+
+ pipeline.write('foo')
+ pipeline.end(function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ t.ok(!ran)
+})
+
+tape('always wait for finish', function(t) {
+ var a = new stream.Readable()
+ a._read = function() {}
+ a.push('hello')
+
+ var pipeline = pumpify(a, through(), through())
+ var ran = false
+
+ pipeline.on('finish', function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ setTimeout(function() {
+ ran = true
+ a.push(null)
+ }, 100)
+})
+
+tape('async', function(t) {
+ var pipeline = pumpify()
+
+ t.plan(4)
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+
+ setTimeout(function() {
+ pipeline.setPipeline(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+ }, 100)
+})
+
+tape('early destroy', function(t) {
+ var a = through()
+ var b = through()
+ var c = through()
+
+ b.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify()
+
+ pipeline.destroy()
+ setTimeout(function() {
+ pipeline.setPipeline(a, b, c)
+ }, 100)
+})
+
+tape('preserves error', function (t) {
+ var a = through()
+ var b = through(function (data, enc, cb) {
+ cb(new Error('stop'))
+ })
+ var c = through()
+ var s = pumpify()
+
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ s.setPipeline(a, b, c)
+ s.resume()
+ s.write('hi')
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml
new file mode 100644
index 0000000000..aa89858a8a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'stable'
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md
new file mode 100644
index 0000000000..e0832d55bd
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md
@@ -0,0 +1,41 @@
+# stream-each
+
+Iterate all the data in a stream
+
+```
+npm install stream-each
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)
+
+## Usage
+
+``` js
+var each = require('stream-each')
+
+each(stream, function (data, next) {
+ console.log('data from stream', data)
+ // when ready to consume next chunk
+ next()
+}, function (err) {
+ console.log('no more data')
+})
+```
+
+## API
+
+#### `each(stream, iterator, cb)`
+
+Iterate the data in the stream by calling the iterator function with `(data, next)`
+where data is a data chunk and next is a callback. Call next when you are ready to
+consume the next chunk. Optionally you can call next with an error to destroy the stream
+
+When the stream ends/errors the callback is called if provided
+
+## License
+
+MIT
+
+## Related
+
+`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md
new file mode 100644
index 0000000000..fc16de25f9
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md
@@ -0,0 +1,7 @@
+## Collaborators
+
+stream-each is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+</tbody></table>
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js
new file mode 100644
index 0000000000..7e67f7337a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js
@@ -0,0 +1,58 @@
+var eos = require('end-of-stream')
+var shift = require('stream-shift')
+
+module.exports = each
+
+function each (stream, fn, cb) {
+ var want = true
+ var error = null
+ var ended = false
+ var running = false
+ var calling = false
+
+ stream.on('readable', onreadable)
+ onreadable()
+
+ if (cb) eos(stream, {readable: true, writable: false}, done)
+ return stream
+
+ function done (err) {
+ if (!error) error = err
+ ended = true
+ if (!running) cb(error)
+ }
+
+ function onreadable () {
+ if (want) read()
+ }
+
+ function afterRead (err) {
+ running = false
+
+ if (err) {
+ error = err
+ if (ended) return cb(error)
+ stream.destroy(err)
+ return
+ }
+ if (ended) return cb(error)
+ if (!calling) read()
+ }
+
+ function read () {
+ while (!running && !ended) {
+ want = false
+
+ var data = shift(stream)
+ if (data === null) {
+ want = true
+ return
+ }
+
+ running = true
+ calling = true
+ fn(data, afterRead)
+ calling = false
+ }
+ }
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..65033786c5
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/stream-each/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json
new file mode 100644
index 0000000000..376fd9d235
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "stream-each@^1.1.0",
+ "_id": "stream-each@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/stream-each",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-each@^1.1.0",
+ "name": "stream-each",
+ "escapedName": "stream-each",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+ "_shasum": "8e8c463f91da8991778765873fe4d960d8f616bd",
+ "_spec": "stream-each@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-each/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Iterate all the data in a stream",
+ "devDependencies": {
+ "standard": "^5.3.1",
+ "tape": "^4.2.1",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/stream-each",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-each",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-each.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.2.2"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js
new file mode 100644
index 0000000000..277634cd05
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js
@@ -0,0 +1,122 @@
+var tape = require('tape')
+var through = require('through2')
+var each = require('./')
+
+tape('each', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+})
+
+tape('each and callback', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.end()
+ })
+})
+
+tape('each (write after)', function (t) {
+ var s = through.obj()
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+
+ setTimeout(function () {
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+ }, 100)
+})
+
+tape('each error', function (t) {
+ var s = through.obj()
+ s.write('hello')
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ })
+})
+
+tape('each error and callback', function (t) {
+ var s = through.obj()
+ s.write('hello')
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ }, function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+})
+
+tape('each with falsey values', function (t) {
+ var s = through.obj()
+ s.write(0)
+ s.write(false)
+ s.write(undefined)
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = [0, false]
+ var count = 0
+ each(s, function (data, next) {
+ count++
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.same(count, 2)
+ })
+})
+
+tape('huge stack', function (t) {
+ var s = through.obj()
+
+ for (var i = 0; i < 5000; i++) {
+ s.write('foo')
+ }
+
+ s.end()
+
+ each(s, function (data, cb) {
+ if (data !== 'foo') t.fail('bad data')
+ cb()
+ }, function (err) {
+ t.error(err, 'no error')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore
new file mode 100644
index 0000000000..1e1dcab34c
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore
@@ -0,0 +1,3 @@
+test
+.jshintrc
+.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html
new file mode 100644
index 0000000000..ac478189ea
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html
@@ -0,0 +1,336 @@
+<!doctype html>
+<!-- Created with GFM2HTML: https://github.com/rvagg/gfm2html -->
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title></title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="created-with" content="https://github.com/rvagg/gfm2html">
+
+ <style type="text/css">
+/* most of normalize.css */
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}[hidden],template{display:none;}html{font-family:sans-serif;/*1*/-ms-text-size-adjust:100%;/*2*/-webkit-text-size-adjust:100%;/*2*/}body{margin:0;}a{background:transparent;}a:focus{outline:thindotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em0;}abbr[title]{border-bottom:1pxdotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C""\201D""\2018""\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}table{border-collapse:collapse;border-spacing:0;}
+
+html {
+ font: 14px 'Helvetica Neue', Helvetica, arial, freesans, clean, sans-serif;
+}
+
+.container {
+ line-height: 1.6;
+ color: #333;
+ background: #eee;
+ border-radius: 3px;
+ padding: 3px;
+ width: 790px;
+ margin: 10px auto;
+}
+
+.body-content {
+ background-color: #fff;
+ border: 1px solid #CACACA;
+ padding: 30px;
+}
+
+.body-content > *:first-child {
+ margin-top: 0 !important;
+}
+
+a, a:visited {
+ color: #4183c4;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+p, blockquote, ul, ol, dl, table, pre {
+ margin: 15px 0;
+}
+
+ .markdown-body h1
+, .markdown-body h2
+, .markdown-body h3
+, .markdown-body h4
+, .markdown-body h5
+, .markdown-body h6 {
+ margin: 20px 0 10px;
+ padding: 0;
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 2.5em;
+ color: #000;
+ border-bottom: 1px solid #ddd;
+}
+
+h2 {
+ font-size: 2em;
+ border-bottom: 1px solid #eee;
+ color: #000;
+}
+
+img {
+ max-width: 100%;
+}
+
+hr {
+ background: transparent url("/img/hr.png") repeat-x 0 0;
+ border: 0 none;
+ color: #ccc;
+ height: 4px;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr:nth-child(2n) {
+ background-color: #f8f8f8;
+}
+
+.markdown-body tr {
+ border-top: 1px solid #ccc;
+ background-color: #fff;
+}
+
+td, th {
+ border: 1px solid #ccc;
+ padding: 6px 13px;
+}
+
+th {
+ font-weight: bold;
+}
+
+blockquote {
+ border-left: 4px solid #ddd;
+ padding: 0 15px;
+ color: #777;
+}
+
+blockquote > :last-child, blockquote > :first-child {
+ margin-bottom: 0px;
+}
+
+pre, code {
+ font-size: 13px;
+ font-family: 'UbuntuMono', monospace;
+ white-space: nowrap;
+ margin: 0 2px;
+ padding: 0px 5px;
+ border: 1px solid #eaeaea;
+ background-color: #f8f8f8;
+ border-radius: 3px;
+}
+
+pre > code {
+ white-space: pre;
+}
+
+pre {
+ overflow-x: auto;
+ white-space: pre;
+ padding: 10px;
+ line-height: 150%;
+ background-color: #f8f8f8;
+ border-color: #ccc;
+}
+
+pre code, pre tt {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: transparent;
+ border: none;
+}
+
+ .highlight .c
+, .highlight .cm
+, .highlight .cp
+, .highlight .c1 {
+ color:#999988;
+ font-style:italic;
+}
+
+.highlight .err {
+ color:#a61717;
+ background-color:#e3d2d2
+}
+
+ .highlight .o
+, .highlight .gs
+, .highlight .kc
+, .highlight .kd
+, .highlight .kn
+, .highlight .kp
+, .highlight .kr {
+ font-weight:bold
+}
+
+.highlight .cs {
+ color:#999999;
+ font-weight:bold;
+ font-style:italic
+}
+
+.highlight .gd {
+ color:#000000;
+ background-color:#ffdddd
+}
+
+.highlight .gd .x {
+ color:#000000;
+ background-color:#ffaaaa
+}
+
+.highlight .ge {
+ font-style:italic
+}
+
+ .highlight .gr
+, .highlight .gt {
+ color:#aa0000
+}
+
+ .highlight .gh
+, .highlight .bp {
+ color:#999999
+}
+
+.highlight .gi {
+ color:#000000;
+ background-color:#ddffdd
+}
+
+.highlight .gi .x {
+ color:#000000;
+ background-color:#aaffaa
+}
+
+.highlight .go {
+ color:#888888
+}
+
+ .highlight .gp
+, .highlight .nn {
+ color:#555555
+}
+
+
+.highlight .gu {
+ color:#800080;
+ font-weight:bold
+}
+
+
+.highlight .kt {
+ color:#445588;
+ font-weight:bold
+}
+
+ .highlight .m
+, .highlight .mf
+, .highlight .mh
+, .highlight .mi
+, .highlight .mo
+, .highlight .il {
+ color:#009999
+}
+
+ .highlight .s
+, .highlight .sb
+, .highlight .sc
+, .highlight .sd
+, .highlight .s2
+, .highlight .se
+, .highlight .sh
+, .highlight .si
+, .highlight .sx
+, .highlight .s1 {
+ color:#d14
+}
+
+.highlight .n {
+ color:#333333
+}
+
+ .highlight .na
+, .highlight .no
+, .highlight .nv
+, .highlight .vc
+, .highlight .vg
+, .highlight .vi
+, .highlight .nb {
+ color:#0086B3
+}
+
+.highlight .nc {
+ color:#445588;
+ font-weight:bold
+}
+
+.highlight .ni {
+ color:#800080
+}
+
+ .highlight .ne
+, .highlight .nf {
+ color:#990000;
+ font-weight:bold
+}
+
+.highlight .nt {
+ color:#000080
+}
+
+.highlight .ow {
+ font-weight:bold
+}
+
+.highlight .w {
+ color:#bbbbbb
+}
+
+.highlight .sr {
+ color:#009926
+}
+
+.highlight .ss {
+ color:#990073
+}
+
+.highlight .gc {
+ color:#999;
+ background-color:#EAF2F5
+}
+
+@media print {
+ .container {
+ background: transparent;
+ border-radius: 0;
+ padding: 0;
+ }
+
+ .body-content {
+ border: none;
+ }
+}
+</style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="body-content"><h1 id="the-mit-license-mit-">The MIT License (MIT)</h1>
+<p><strong>Copyright (c) 2016 Rod Vagg (the &quot;Original Author&quot;) and additional contributors</strong></p>
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.</p>
+</div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md
new file mode 100644
index 0000000000..7f0b93daaa
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md
@@ -0,0 +1,9 @@
+# The MIT License (MIT)
+
+**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md
new file mode 100644
index 0000000000..a916f15ef5
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md
@@ -0,0 +1,136 @@
+# through2
+
+[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+
+ this.push(chunk)
+
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+ .on('finish', function () {
+ doSomethingSpecial()
+ })
+```
+
+Or object streams:
+
+```js
+var all = []
+
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2.obj(function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
+
+## API
+
+<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false },
+ function (chunk, enc, cb) {
+ cb(null, 'wut?') // note we can use the second argument on the callback
+ // to provide data as an alternative to this.push('wut?')
+ }
+ )
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
+
+If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2(
+ function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
+ function (cb) { // flush function
+ this.push('tacking on an extra buffer to the end');
+ cb();
+ }
+ ))
+ .pipe(fs.createWriteStream('/tmp/wut.txt'));
+```
+
+<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit == "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+```
+
+## See Also
+
+ - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
+ - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
+ - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
+ - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
+ - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. 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/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
new file mode 100644
index 0000000000..b9d12f7b28
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "xtend@~4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/through2/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@~4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "~4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~4.0.1"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@~4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
new file mode 100644
index 0000000000..093a2b061e
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
@@ -0,0 +1,83 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
+
+test("null prototype", function(assert) {
+ var a = { a: "foo" }
+ var b = Object.create(null)
+ b.b = "bar";
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("null prototype mutable", function (assert) {
+ var a = { foo: "bar" }
+ var b = Object.create(null)
+ b.bar = "baz";
+
+ mutableExtend(a, b)
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json
new file mode 100644
index 0000000000..5d6541fa4a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "through2@^2.0.0",
+ "_id": "through2@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "_location": "/npm-profile/make-fetch-happen/mississippi/through2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "through2@^2.0.0",
+ "name": "through2",
+ "escapedName": "through2",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
+ "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be",
+ "_spec": "through2@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "r@va.gg",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/through2/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "readable-stream": "^2.1.5",
+ "xtend": "~4.0.1"
+ },
+ "deprecated": false,
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "devDependencies": {
+ "bl": "~1.1.2",
+ "faucet": "0.0.1",
+ "stream-spigot": "~3.0.5",
+ "tape": "~4.6.2"
+ },
+ "homepage": "https://github.com/rvagg/through2#readme",
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "license": "MIT",
+ "main": "through2.js",
+ "name": "through2",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/through2.git"
+ },
+ "scripts": {
+ "test": "node test/test.js | faucet",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "2.0.3"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js
new file mode 100644
index 0000000000..ef13980d7b
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js
@@ -0,0 +1,96 @@
+var Transform = require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function DestroyableTransform(opts) {
+ Transform.call(this, opts)
+ this._destroyed = false
+}
+
+inherits(DestroyableTransform, Transform)
+
+DestroyableTransform.prototype.destroy = function(err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err)
+ self.emit('error', err)
+ self.emit('close')
+ })
+}
+
+// a noop _transform function
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+
+// create a new export function, used by both the main export and
+// the .ctor export, contains common logic for dealing with arguments
+function through2 (construct) {
+ return function (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ if (typeof flush != 'function')
+ flush = null
+
+ return construct(options, transform, flush)
+ }
+}
+
+
+// main export, just make me a transform stream!
+module.exports = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(options)
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
+
+
+// make me a reusable prototype that I can `new`, or implicitly `new`
+// with a constructor call
+module.exports.ctor = through2(function (options, transform, flush) {
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+
+ DestroyableTransform.call(this, this.options)
+ }
+
+ inherits(Through2, DestroyableTransform)
+
+ Through2.prototype._transform = transform
+
+ if (flush)
+ Through2.prototype._flush = flush
+
+ return Through2
+})
+
+
+module.exports.obj = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/package.json
new file mode 100644
index 0000000000..1d98db313a
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/package.json
@@ -0,0 +1,64 @@
+{
+ "_from": "mississippi@^1.2.0",
+ "_id": "mississippi@1.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg==",
+ "_location": "/npm-profile/make-fetch-happen/mississippi",
+ "_phantomChildren": {
+ "inherits": "2.0.3",
+ "once": "1.4.0",
+ "readable-stream": "2.3.3"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mississippi@^1.2.0",
+ "name": "mississippi",
+ "escapedName": "mississippi",
+ "rawSpec": "^1.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.0"
+ },
+ "_requiredBy": [
+ "/npm-profile/make-fetch-happen",
+ "/npm-profile/make-fetch-happen/cacache"
+ ],
+ "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.1.tgz",
+ "_shasum": "2a8bb465e86550ac8b36a7b6f45599171d78671e",
+ "_spec": "mississippi@^1.2.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
+ "author": {
+ "name": "max ogden"
+ },
+ "bugs": {
+ "url": "https://github.com/maxogden/mississippi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "concat-stream": "^1.5.0",
+ "duplexify": "^3.4.2",
+ "end-of-stream": "^1.1.0",
+ "flush-write-stream": "^1.0.0",
+ "from2": "^2.1.0",
+ "parallel-transform": "^1.1.0",
+ "pump": "^1.0.0",
+ "pumpify": "^1.3.3",
+ "stream-each": "^1.1.0",
+ "through2": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "a collection of useful streams",
+ "devDependencies": {},
+ "homepage": "https://github.com/maxogden/mississippi#readme",
+ "license": "BSD-2-Clause",
+ "main": "index.js",
+ "name": "mississippi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/maxogden/mississippi.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.3.1"
+}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/readme.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/readme.md
new file mode 100644
index 0000000000..ed71403a86
--- /dev/null
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/mississippi/readme.md
@@ -0,0 +1,399 @@
+# mississippi
+
+a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
+
+the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
+
+## usage
+
+```js
+var miss = require('mississippi')
+```
+
+## methods
+
+- [pipe](#pipe)
+- [each](#each)
+- [pipeline](#pipeline)
+- [duplex](#duplex)
+- [through](#through)
+- [from](#from)
+- [to](#to)
+- [concat](#concat)
+- [finished](#finished)
+- [parallel](#parallel)
+
+### pipe
+
+##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
+
+Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
+
+When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
+
+`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
+
+#### original module
+
+`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
+
+#### example
+
+```js
+// lets do a simple file copy
+var fs = require('fs')
+
+var read = fs.createReadStream('./original.zip')
+var write = fs.createWriteStream('./copy.zip')
+
+// use miss.pipe instead of read.pipe(write)
+miss.pipe(read, write, function (err) {
+ if (err) return console.error('Copy error!', err)
+ console.log('Copied successfully')
+})
+```
+
+### each
+
+##### `miss.each(stream, each, [done])`
+
+Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
+
+Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
+
+#### original module
+
+`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
+
+#### example
+
+```js
+var fs = require('fs')
+var split = require('split2')
+
+var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
+
+var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
+miss.each(pipeline, eachLine, done)
+var sum = 0
+
+function eachLine (line, next) {
+ sum += parseInt(line.toString())
+ next()
+}
+
+function done (err) {
+ if (err) throw err
+ console.log('sum is', sum)
+}
+```
+
+### pipeline
+
+##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
+
+Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
+
+If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
+
+#### original module
+
+`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
+
+#### example
+
+```js
+// first create some transform streams (note: these two modules are fictional)
+var imageResize = require('image-resizer-stream')({width: 400})
+var pngOptimizer = require('png-optimizer-stream')({quality: 60})
+
+// instead of doing a.pipe(b), use pipelin
+var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
+// `resizeAndOptimize` is a transform stream. when you write to it, it writes
+// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
+// it handles piping all the streams together for you
+
+// use it like any other transform stream
+var fs = require('fs')
+
+var read = fs.createReadStream('./image.png')
+var write = fs.createWriteStream('./resized-and-optimized.png')
+
+miss.pipe(read, resizeAndOptimize, write, function (err) {
+ if (err) return console.error('Image processing error!', err)
+ console.log('Image processed successfully')
+})
+```
+
+### duplex
+
+##### `var duplex = miss.duplex([writable, readable, opts])`
+
+Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
+
+The returned stream will emit data from the readable. When you write to it it writes to the writable.
+
+You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
+
+#### original module
+
+`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
+
+#### example
+
+```js
+// lets spawn a process and take its stdout and stdin and combine them into 1 stream
+var child = require('child_process')
+
+// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
+var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
+
+// duplexCurl will write to stdin and read from stdout
+var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
+```
+
+### through
+
+##### `var transformer = miss.through([options, transformFunction, flushFunction])`
+
+Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
+
+The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
+
+The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
+
+The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
+
+#### original module
+
+`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var read = fs.createReadStream('./boring_lowercase.txt')
+var write = fs.createWriteStream('./AWESOMECASE.TXT')
+
+// Leaving out the options object
+var uppercaser = miss.through(
+ function (chunk, enc, cb) {
+ cb(null, chunk.toString().toUpperCase())
+ },
+ function (cb) {
+ cb(null, 'ONE LAST BIT OF UPPERCASE')
+ }
+)
+
+miss.pipe(read, uppercaser, write, function (err) {
+ if (err) return console.error('Trouble uppercasing!')
+ console.log('Splendid uppercasing!')
+})
+```
+
+### from
+
+##### `miss.from([opts], read)`
+
+Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
+
+`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
+
+Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
+
+- `size` is the recommended amount of data (in bytes) to retrieve.
+- `next(err, chunk)` should be called when you're ready to emit more data.
+
+#### original module
+
+`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
+
+#### example
+
+```js
+
+
+function fromString(string) {
+ return miss.from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### to
+
+##### `miss.to([options], write, [flush])`
+
+Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
+
+`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
+
+Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
+
+- `data` is the received data to write the destination.
+- `enc` encoding of the piece of data received.
+- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
+
+`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
+
+#### original module
+
+`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
+
+#### example
+
+```js
+var ws = miss.to(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+### concat
+
+##### `var concat = miss.concat(cb)`
+
+Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
+
+Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
+
+Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
+
+#### original module
+
+`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = miss.concat(gotPicture)
+
+function callback (err) {
+ if (err) {
+ console.error(err)
+ process.exit(1)
+ }
+}
+
+miss.pipe(readStream, concatStream, callback)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+```
+
+### finished
+
+##### `miss.finished(stream, cb)`
+
+Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
+
+This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
+
+#### original module
+
+`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
+
+#### example
+
+```js
+var copySource = fs.createReadStream('./movie.mp4')
+var copyDest = fs.createWriteStream('./movie-copy.mp4')
+
+copySource.pipe(copyDest)
+
+miss.finished(copyDest, function(err) {
+ if (err) return console.log('write failed', err)
+ console.log('write success')
+})
+```
+
+### parallel
+
+##### `miss.parallel(concurrency, each)`
+
+This works like `through` except you can process items in parallel, while still preserving the original input order.
+
+This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
+
+Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
+
+#### original module
+
+`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
+
+#### example
+
+This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
+
+```js
+function getResponse (item, cb) {
+ var r = request(item.url)
+ r.on('error', function (err) {
+ cb(err)
+ })
+ r.on('response', function (re) {
+ cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
+ r.abort()
+ })
+}
+
+miss.pipe(
+ fs.createReadStream('./urls.txt'), // one url per line
+ split(),
+ miss.parallel(5, getResponse),
+ miss.through(function (row, enc, next) {
+ console.log(JSON.stringify(row))
+ next()
+ })
+)
+```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore
deleted file mode 100644
index c12f3a80c1..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/?.js
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
index 805d3d50d2..6ce862c6f6 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
@@ -8,6 +8,7 @@ node_js:
- "6"
- "7"
- "8"
+ - "9"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
index a81fb17a97..80c88dc401 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,18 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
+4.1.2 / 2017-11-20
+==================
+
+ * test Node 9 on Travis
+ * ensure that `https.get()` uses the patched `https.request()`
+
4.1.1 / 2017-07-20
==================
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/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,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI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EX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG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AO,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC/F;KACJ;;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AAE/B,AAAO,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,C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,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B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AG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,g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;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UA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;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;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,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index bc23134773..20d95d07b1 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/npm-profile/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
index 57e7645705..6d6d0ab03d 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@^4.1.0",
- "_id": "agent-base@4.1.1",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-yWGUUmCZD/33IRjG2It94PzixT8lX+47Uq8fjmd0cgQWITCMrJuXFaVIMnGDmDnZGGKAGdwTx8UGeU8lMR2urA==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/npm-profile/make-fetch-happen/socks-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/npm-profile/make-fetch-happen/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz",
- "_shasum": "92d8a4fc2524a3b09b3666a33b6c97960f23d6a4",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@^4.1.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.1"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
index a3f7bc6160..47d26a72b0 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
@@ -24,3 +23,15 @@ https.request = (function(request) {
return request.call(https, options, cb);
};
})(https.request);
+
+/**
+ * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
+ * patched `https.request()`.
+ *
+ * Ref: https://github.com/nodejs/node/commit/5118f31
+ */
+https.get = function(options, cb) {
+ const req = https.request(options, cb);
+ req.end();
+ return req;
+};
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index c1136092e3..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,175 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="4.1.6"></a>
-## [4.1.6](https://github.com/zkat/ssri/compare/v4.1.5...v4.1.6) (2017-06-07)
-
-
-### Bug Fixes
-
-* **checkStream:** make sure to pass all opts through ([0b1bcbe](https://github.com/zkat/ssri/commit/0b1bcbe))
-
-
-
-<a name="4.1.5"></a>
-## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05)
-
-
-### Bug Fixes
-
-* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e))
-
-
-
-<a name="4.1.4"></a>
-## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
-
-
-
-<a name="4.1.3"></a>
-## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **check:** handle various bad hash corner cases better ([c2c262b](https://github.com/zkat/ssri/commit/c2c262b))
-
-
-
-<a name="4.1.2"></a>
-## [4.1.2](https://github.com/zkat/ssri/compare/v4.1.1...v4.1.2) (2017-04-18)
-
-
-### Bug Fixes
-
-* **stream:** _flush can be called multiple times. use on("end") ([b1c4805](https://github.com/zkat/ssri/commit/b1c4805))
-
-
-
-<a name="4.1.1"></a>
-## [4.1.1](https://github.com/zkat/ssri/compare/v4.1.0...v4.1.1) (2017-04-12)
-
-
-### Bug Fixes
-
-* **pickAlgorithm:** error if pickAlgorithm() is used in an empty Integrity ([fab470e](https://github.com/zkat/ssri/commit/fab470e))
-
-
-
-<a name="4.1.0"></a>
-# [4.1.0](https://github.com/zkat/ssri/compare/v4.0.0...v4.1.0) (2017-04-07)
-
-
-### Features
-
-* adding ssri.create for a crypto style interface (#2) ([96f52ad](https://github.com/zkat/ssri/commit/96f52ad))
-
-
-
-<a name="4.0.0"></a>
-# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa))
-
-
-### BREAKING CHANGES
-
-* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors
-
-
-
-<a name="3.0.2"></a>
-## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03)
-
-
-
-<a name="3.0.1"></a>
-## [3.0.1](https://github.com/zkat/ssri/compare/v3.0.0...v3.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **package.json:** really should have these in the keywords because search ([a6ac6d0](https://github.com/zkat/ssri/commit/a6ac6d0))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/ssri/compare/v2.0.0...v3.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/zkat/ssri/commit/d04aa1f))
-
-
-### Features
-
-* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/zkat/ssri/commit/2301e74))
-* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/zkat/ssri/commit/049b89e))
-* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/zkat/ssri/commit/a9f021c))
-* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/zkat/ssri/commit/85208ba))
-* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/zkat/ssri/commit/1b29e6f))
-* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/zkat/ssri/commit/fd23e1b))
-* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/zkat/ssri/commit/c8ddf48))
-* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/zkat/ssri/commit/b97a796))
-* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/zkat/ssri/commit/02ed1ad))
-
-
-### BREAKING CHANGES
-
-* **hashes:** `.isIntegrityMetadata` is now `.isHash`. Also, any references to `IntegrityMetadata` now refer to `Hash`.
-* **integrityStream:** createCheckerStream has been removed and replaced with a general-purpose integrityStream.
-
-To convert existing createCheckerStream code, move the `sri` argument into `opts.integrity` in integrityStream. All other options should be the same.
-* **check:** `checkData`, `checkStream`, and `createCheckerStream` now yield a whole IntegrityMetadata instance representing the first successful hash match.
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/ssri/compare/v1.0.0...v2.0.0) (2017-03-24)
-
-
-### Bug Fixes
-
-* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/zkat/ssri/commit/122a32c))
-
-
-### Features
-
-* **api:** added serialize alias for unparse ([999b421](https://github.com/zkat/ssri/commit/999b421))
-* **concat:** add Integrity#concat() ([cae12c7](https://github.com/zkat/ssri/commit/cae12c7))
-* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/zkat/ssri/commit/58c18f7))
-* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/zkat/ssri/commit/3f0b64c))
-* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/zkat/ssri/commit/4acad30))
-* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/zkat/ssri/commit/f72e658))
-
-
-### BREAKING CHANGES
-
-* **pickAlgo:** ssri will prioritize specific hashes now
-* **stringify:** serialize and unparse have been removed. Use ssri.stringify instead.
-* **strict-mode:** functions that accepted an optional `sep` argument now expect `opts.sep`.
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-03-23)
-
-
-### Features
-
-* **api:** implemented initial api ([4fbb16b](https://github.com/zkat/ssri/commit/4fbb16b))
-
-
-### BREAKING CHANGES
-
-* **api:** Initial API established.
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/LICENSE.md
deleted file mode 100644
index c05cb09586..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/LICENSE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project.
-
-For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/README.md b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/README.md
deleted file mode 100644
index f2fc035da5..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/README.md
+++ /dev/null
@@ -1,462 +0,0 @@
-# ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest)
-
-[`ssri`](https://github.com/zkat/ssri), short for Standard Subresource
-Integrity, is a Node.js utility for parsing, manipulating, serializing,
-generating, and verifying [Subresource
-Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
-
-## Install
-
-`$ npm install --save ssri`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * Parsing & Serializing
- * [`parse`](#parse)
- * [`stringify`](#stringify)
- * [`Integrity#concat`](#integrity-concat)
- * [`Integrity#toString`](#integrity-to-string)
- * [`Integrity#toJSON`](#integrity-to-json)
- * [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
- * [`Integrity#hexDigest`](#integrity-hex-digest)
- * Integrity Generation
- * [`fromHex`](#from-hex)
- * [`fromData`](#from-data)
- * [`fromStream`](#from-stream)
- * [`create`](#create)
- * Integrity Verification
- * [`checkData`](#check-data)
- * [`checkStream`](#check-stream)
- * [`integrityStream`](#integrity-stream)
-
-### Example
-
-```javascript
-const ssri = require('ssri')
-
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Parsing and serializing
-const parsed = ssri.parse(integrity)
-ssri.stringify(parsed) // === integrity (works on non-Integrity objects)
-parsed.toString() // === integrity
-
-// Async stream functions
-ssri.checkStream(fs.createReadStream('./my-file'), integrity).then(...)
-ssri.fromStream(fs.createReadStream('./my-file')).then(sri => {
- sri.toString() === integrity
-})
-fs.createReadStream('./my-file').pipe(ssri.createCheckerStream(sri))
-
-// Sync data functions
-ssri.fromData(fs.readFileSync('./my-file')) // === parsed
-ssri.checkData(fs.readFileSync('./my-file'), integrity) // => 'sha512'
-```
-
-### Features
-
-* Parses and stringifies SRI strings.
-* Generates SRI strings from raw data or Streams.
-* Strict standard compliance.
-* `?foo` metadata option support.
-* Multiple entries for the same algorithm.
-* Object-based integrity hash manipulation.
-* Small footprint: no dependencies, concise implementation.
-* Full test coverage.
-* Customizable algorithm picker.
-
-### Contributing
-
-The ssri team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="parse"></a> `> ssri.parse(sri, [opts]) -> Integrity`
-
-Parses `sri` into an `Integrity` data structure. `sri` can be an integrity
-string, an `Hash`-like with `digest` and `algorithm` fields and an optional
-`options` field, or an `Integrity`-like object. The resulting object will be an
-`Integrity` instance that has this shape:
-
-```javascript
-{
- 'sha1': [{algorithm: 'sha1', digest: 'deadbeef', options: []}],
- 'sha512': [
- {algorithm: 'sha512', digest: 'c0ffee', options: []},
- {algorithm: 'sha512', digest: 'bad1dea', options: ['foo']}
- ],
-}
-```
-
-If `opts.single` is truthy, a single `Hash` object will be returned. That is, a
-single object that looks like `{algorithm, digest, options}`, as opposed to a
-larger object with multiple of these.
-
-If `opts.strict` is truthy, the resulting object will be filtered such that
-it strictly follows the Subresource Integrity spec, throwing away any entries
-with any invalid components. This also means a restricted set of algorithms
-will be used -- the spec limits them to `sha256`, `sha384`, and `sha512`.
-
-Strict mode is recommended if the integrity strings are intended for use in
-browsers, or in other situations where strict adherence to the spec is needed.
-
-##### Example
-
-```javascript
-ssri.parse('sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo') // -> Integrity object
-```
-
-#### <a name="stringify"></a> `> ssri.stringify(sri, [opts]) -> String`
-
-This function is identical to [`Integrity#toString()`](#integrity-to-string),
-except it can be used on _any_ object that [`parse`](#parse) can handle -- that
-is, a string, an `Hash`-like, or an `Integrity`-like.
-
-The `opts.sep` option defines the string to use when joining multiple entries
-together. To be spec-compliant, this _must_ be whitespace. The default is a
-single space (`' '`).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// Useful for cleaning up input SRI strings:
-ssri.stringify('\n\rsha512-foo\n\t\tsha384-bar')
-// -> 'sha512-foo sha384-bar'
-
-// Hash-like: only a single entry.
-ssri.stringify({
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Integrity-like: full multi-entry syntax. Similar to output of `ssri.parse`
-ssri.stringify({
- 'sha512': [
- {
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
- }
- ]
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-```
-
-#### <a name="integrity-concat"></a> `> Integrity#concat(otherIntegrity, [opts]) -> Integrity`
-
-Concatenates an `Integrity` object with another IntegrityLike, or an integrity
-string.
-
-This is functionally equivalent to concatenating the string format of both
-integrity arguments, and calling [`ssri.parse`](#ssri-parse) on the new string.
-
-If `opts.strict` is true, the new `Integrity` will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// This will combine the integrity checks for two different versions of
-// your index.js file so you can use a single integrity string and serve
-// either of these to clients, from a single `<script>` tag.
-const desktopIntegrity = ssri.fromData(fs.readFileSync('./index.desktop.js'))
-const mobileIntegrity = ssri.fromData(fs.readFileSync('./index.mobile.js'))
-
-// Note that browsers (and ssri) will succeed as long as ONE of the entries
-// for the *prioritized* algorithm succeeds. That is, in order for this fallback
-// to work, both desktop and mobile *must* use the same `algorithm` values.
-desktopIntegrity.concat(mobileIntegrity)
-```
-
-#### <a name="integrity-to-string"></a> `> Integrity#toString([opts]) -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `opts.sep`, which defaults to `' '`.
-
-If you want to serialize an object that didn't from from an `ssri` function,
-use [`ssri.stringify()`](#stringify).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-ssri.parse(integrity).toString() === integrity
-```
-
-#### <a name="integrity-to-json"></a> `> Integrity#toJSON() -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `' '`.
-
-This is a convenience method so you can pass an `Integrity` object directly to `JSON.stringify`.
-For more info check out [toJSON() behavior on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior).
-
-##### Example
-
-```javascript
-const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo"'
-
-JSON.stringify(ssri.parse(integrity)) === integrity
-```
-
-#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
-
-Returns the "best" algorithm from those available in the integrity object.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-WEakDigEST sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1').pickAlgorithm() // sha512
-```
-
-#### <a name="integrity-hex-digest"></a> `> Integrity#hexDigest() -> String`
-
-`Integrity` is assumed to be either a single-hash `Integrity` instance, or a
-`Hash` instance. Returns its `digest`, converted to a hex representation of the
-base64 data.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-deadbeef').hexDigest() // '75e69d6de79f'
-```
-
-#### <a name="from-hex"></a> `> ssri.fromHex(hexDigest, algorithm, [opts]) -> Integrity`
-
-Creates an `Integrity` object with a single entry, based on a hex-formatted
-hash. This is a utility function to help convert existing shasums to the
-Integrity format, and is roughly equivalent to something like:
-
-```javascript
-algorithm + '-' + Buffer.from(hexDigest, 'hex').toString('base64')
-```
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-If `opts.single` is true, a single `Hash` object will be returned.
-
-##### Example
-
-```javascript
-ssri.fromHex('75e69d6de79f', 'sha1').toString() // 'sha1-deadbeef'
-```
-
-#### <a name="from-data"></a> `> ssri.fromData(data, [opts]) -> Integrity`
-
-Creates an `Integrity` object from either string or `Buffer` data, calculating
-all the requested hashes and adding any specified options to the object.
-
-`opts.algorithms` determines which algorithms to generate hashes for. All
-results will be included in a single `Integrity` object. The default value for
-`opts.algorithms` is `['sha512']`. All algorithm strings must be hashes listed
-in `crypto.getHashes()` for the host Node.js platform.
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrityObj = ssri.fromData('foobarbaz', {
- algorithms: ['sha256', 'sha384', 'sha512']
-})
-integrity.toString('\n')
-// ->
-// sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0=
-// sha384-irnCxQ0CfQhYGlVAUdwTPC9bF3+YWLxlaDGM4xbYminxpbXEq+D+2GCEBTxcjES9
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="from-stream"></a> `> ssri.fromStream(stream, [opts]) -> Promise<Integrity>`
-
-Returns a Promise of an Integrity object calculated by reading data from
-a given `stream`.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-Additionally, `opts.Promise` may be passed in to inject a Promise library of
-choice. By default, ssri will use Node's built-in Promises.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-ssri.fromStream(fs.createReadStream('index.js'), {
- algorithms: ['sha1', 'sha512']
-}).then(integrity => {
- return ssri.checkStream(fs.createReadStream('index.js'), integrity)
-}) // succeeds
-```
-
-#### <a name="create"></a> `> ssri.create([opts]) -> <Hash>`
-
-Returns a Hash object with `update(<Buffer or string>[,enc])` and `digest()` methods.
-
-
-The Hash object provides the same methods as [crypto class Hash](https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_hash).
-`digest()` accepts no arguments and returns an Integrity object calculated by reading data from
-calls to update.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = ssri.create().update('foobarbaz').digest()
-integrity.toString()
-// ->
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="check-data"></a> `> ssri.checkData(data, sri, [opts]) -> Hash|false`
-
-Verifies `data` integrity against an `sri` argument. `data` may be either a
-`String` or a `Buffer`, and `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-If verification succeeds, `checkData` will return the name of the algorithm that
-was used for verification (a truthy value). Otherwise, it will return `false`.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const data = fs.readFileSync('index.js')
-ssri.checkData(data, ssri.fromData(data)) // -> 'sha512'
-ssri.checkData(data, 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0')
-ssri.checkData(data, 'sha1-BaDDigEST') // -> false
-```
-
-#### <a name="check-stream"></a> `> ssri.checkStream(stream, sri, [opts]) -> Promise<Hash>`
-
-Verifies the contents of `stream` against an `sri` argument. `stream` will be
-consumed in its entirety by this process. `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-`checkStream` will return a Promise that either resolves to the
-`Hash` that succeeded verification, or, if the verification fails
-or an error happens with `stream`, the Promise will be rejected.
-
-If the Promise is rejected because verification failed, the returned error will
-have `err.code` as `EINTEGRITY`.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be returned by a rejection if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- integrity
-)
-// ->
-// Promise<{
-// algorithm: 'sha512',
-// digest: 'sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1'
-// }>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0'
-) // -> Promise<Hash>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha1-BaDDigEST'
-) // -> Promise<Error<{code: 'EINTEGRITY'}>>
-```
-
-#### <a name="integrity-stream"></a> `> integrityStream(sri, [opts]) -> IntegrityStream`
-
-Returns a `Transform` stream that data can be piped through in order to generate
-and optionally check data integrity for piped data. When the stream completes
-successfully, it emits `size` and `integrity` events, containing the total
-number of bytes processed and a calculated `Integrity` instance based on stream
-data, respectively.
-
-If `opts.algorithms` is passed in, the listed algorithms will be calculated when
-generating the final `Integrity` instance. The default is `['sha512']`.
-
-If `opts.single` is passed in, a single `Hash` instance will be returned.
-
-If `opts.integrity` is passed in, it should be an `integrity` value understood
-by [`parse`](#parse) that the stream will check the data against. If
-verification succeeds, the integrity stream will emit a `verified` event whose
-value is a single `Hash` object that is the one that succeeded verification. If
-verification fails, the stream will error with an `EINTEGRITY` error code.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be emitted by the stream if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-fs.createReadStream('index.js')
-.pipe(ssri.checkStream(integrity))
-```
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/index.js b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/index.js
deleted file mode 100644
index 8ece662ba6..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/index.js
+++ /dev/null
@@ -1,334 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const Transform = require('stream').Transform
-
-const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
-
-const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
-const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/]+(?:=?=?))([?\x21-\x7E]*)$/
-const VCHAR_REGEX = /^[\x21-\x7E]+$/
-
-class Hash {
- get isHash () { return true }
- constructor (hash, opts) {
- const strict = !!(opts && opts.strict)
- this.source = hash.trim()
- // 3.1. Integrity metadata (called "Hash" by ssri)
- // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
- const match = this.source.match(
- strict
- ? STRICT_SRI_REGEX
- : SRI_REGEX
- )
- if (!match) { return }
- if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return }
- this.algorithm = match[1]
- this.digest = match[2]
-
- const rawOpts = match[3]
- this.options = rawOpts ? rawOpts.slice(1).split('?') : []
- }
- hexDigest () {
- return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
- }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- if (opts && opts.strict) {
- // Strict mode enforces the standard as close to the foot of the
- // letter as it can.
- if (!(
- // The spec has very restricted productions for algorithms.
- // https://www.w3.org/TR/CSP2/#source-list-syntax
- SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
- // Usually, if someone insists on using a "different" base64, we
- // leave it as-is, since there's multiple standards, and the
- // specified is not a URL-safe variant.
- // https://www.w3.org/TR/CSP2/#base64_value
- this.digest.match(BASE64_REGEX) &&
- // Option syntax is strictly visual chars.
- // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
- // https://tools.ietf.org/html/rfc5234#appendix-B.1
- (this.options || []).every(opt => opt.match(VCHAR_REGEX))
- )) {
- return ''
- }
- }
- const options = this.options && this.options.length
- ? `?${this.options.join('?')}`
- : ''
- return `${this.algorithm}-${this.digest}${options}`
- }
-}
-
-class Integrity {
- get isIntegrity () { return true }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- opts = opts || {}
- let sep = opts.sep || ' '
- if (opts.strict) {
- // Entries must be separated by whitespace, according to spec.
- sep = sep.replace(/\S+/g, ' ')
- }
- return Object.keys(this).map(k => {
- return this[k].map(hash => {
- return Hash.prototype.toString.call(hash, opts)
- }).filter(x => x.length).join(sep)
- }).filter(x => x.length).join(sep)
- }
- concat (integrity, opts) {
- const other = typeof integrity === 'string'
- ? integrity
- : stringify(integrity, opts)
- return parse(`${this.toString(opts)} ${other}`, opts)
- }
- hexDigest () {
- return parse(this, {single: true}).hexDigest()
- }
- pickAlgorithm (opts) {
- const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
- const keys = Object.keys(this)
- if (!keys.length) {
- throw new Error(`No algorithms available for ${
- JSON.stringify(this.toString())
- }`)
- }
- return keys.reduce((acc, algo) => {
- return pickAlgorithm(acc, algo) || acc
- })
- }
-}
-
-module.exports.parse = parse
-function parse (sri, opts) {
- opts = opts || {}
- if (typeof sri === 'string') {
- return _parse(sri, opts)
- } else if (sri.algorithm && sri.digest) {
- const fullSri = new Integrity()
- fullSri[sri.algorithm] = [sri]
- return _parse(stringify(fullSri, opts), opts)
- } else {
- return _parse(stringify(sri, opts), opts)
- }
-}
-
-function _parse (integrity, opts) {
- // 3.4.3. Parse metadata
- // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
- if (opts.single) {
- return new Hash(integrity, opts)
- }
- return integrity.trim().split(/\s+/).reduce((acc, string) => {
- const hash = new Hash(string, opts)
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.stringify = stringify
-function stringify (obj, opts) {
- if (obj.algorithm && obj.digest) {
- return Hash.prototype.toString.call(obj, opts)
- } else if (typeof obj === 'string') {
- return stringify(parse(obj, opts), opts)
- } else {
- return Integrity.prototype.toString.call(obj, opts)
- }
-}
-
-module.exports.fromHex = fromHex
-function fromHex (hexDigest, algorithm, opts) {
- const optString = (opts && opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- return parse(
- `${algorithm}-${
- Buffer.from(hexDigest, 'hex').toString('base64')
- }${optString}`, opts
- )
-}
-
-module.exports.fromData = fromData
-function fromData (data, opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
- return algorithms.reduce((acc, algo) => {
- const digest = crypto.createHash(algo).update(data).digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.fromStream = fromStream
-function fromStream (stream, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const istream = integrityStream(opts)
- return new P((resolve, reject) => {
- stream.pipe(istream)
- stream.on('error', reject)
- istream.on('error', reject)
- let sri
- istream.on('integrity', s => { sri = s })
- istream.on('end', () => resolve(sri))
- istream.on('data', () => {})
- })
-}
-
-module.exports.checkData = checkData
-function checkData (data, sri, opts) {
- opts = opts || {}
- sri = parse(sri, opts)
- if (!Object.keys(sri).length) { return false }
- const algorithm = sri.pickAlgorithm(opts)
- const digests = sri[algorithm] || []
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- return digests.find(hash => hash.digest === digest) || false
-}
-
-module.exports.checkStream = checkStream
-function checkStream (stream, sri, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const checker = integrityStream(Object.assign({}, opts, {
- integrity: sri
- }))
- return new P((resolve, reject) => {
- stream.pipe(checker)
- stream.on('error', reject)
- checker.on('error', reject)
- let sri
- checker.on('verified', s => { sri = s })
- checker.on('end', () => resolve(sri))
- checker.on('data', () => {})
- })
-}
-
-module.exports.integrityStream = integrityStream
-function integrityStream (opts) {
- opts = opts || {}
- // For verification
- const sri = opts.integrity && parse(opts.integrity, opts)
- const goodSri = sri && Object.keys(sri).length
- const algorithm = goodSri && sri.pickAlgorithm(opts)
- const digests = goodSri && sri[algorithm]
- // Calculating stream
- const algorithms = opts.algorithms || [algorithm || 'sha512']
- const hashes = algorithms.map(crypto.createHash)
- let streamSize = 0
- const stream = new Transform({
- transform (chunk, enc, cb) {
- streamSize += chunk.length
- hashes.forEach(h => h.update(chunk, enc))
- cb(null, chunk, enc)
- }
- }).on('end', () => {
- const optString = (opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- const newSri = parse(hashes.map((h, i) => {
- return `${algorithms[i]}-${h.digest('base64')}${optString}`
- }).join(' '), opts)
- const match = (
- // Integrity verification mode
- opts.integrity &&
- newSri[algorithm] &&
- digests &&
- digests.find(hash => {
- return newSri[algorithm].find(newhash => {
- return hash.digest === newhash.digest
- })
- })
- )
- if (typeof opts.size === 'number' && streamSize !== opts.size) {
- const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
- err.code = 'EBADSIZE'
- err.found = streamSize
- err.expected = opts.size
- err.sri = sri
- stream.emit('error', err)
- } else if (opts.integrity && !match) {
- const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = digests
- err.algorithm = algorithm
- err.sri = sri
- stream.emit('error', err)
- } else {
- stream.emit('size', streamSize)
- stream.emit('integrity', newSri)
- match && stream.emit('verified', match)
- }
- })
- return stream
-}
-
-module.exports.create = createIntegrity
-function createIntegrity (opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
-
- const hashes = algorithms.map(crypto.createHash)
-
- return {
- update: function (chunk, enc) {
- hashes.forEach(h => h.update(chunk, enc))
- return this
- },
- digest: function (enc) {
- const integrity = algorithms.reduce((acc, algo) => {
- const digest = hashes.shift().digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-
- return integrity
- }
- }
-}
-
-// This is a Best Effortā„¢ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'
-]
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/package.json
deleted file mode 100644
index 8bc38753dc..0000000000
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/ssri/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "_from": "ssri@^4.1.6",
- "_id": "ssri@4.1.6",
- "_inBundle": false,
- "_integrity": "sha512-WUbCdgSAMQjTFZRWvSPpauryvREEA+Krn19rx67UlJEJx/M192ZHxMmJXjZ4tkdFm+Sb0SXGlENeQVlA5wY7kA==",
- "_location": "/npm-profile/make-fetch-happen/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^4.1.6",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^4.1.6",
- "saveSpec": null,
- "fetchSpec": "^4.1.6"
- },
- "_requiredBy": [
- "/npm-profile/make-fetch-happen",
- "/npm-profile/make-fetch-happen/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-4.1.6.tgz",
- "_shasum": "0cb49b6ac84457e7bdd466cb730c3cb623e9a25b",
- "_spec": "ssri@^4.1.6",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-profile/node_modules/make-fetch-happen",
- "author": {
- "name": "Kat MarchƔn",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/ssri/issues"
- },
- "bundleDependencies": false,
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "dependencies": {
- "safe-buffer": "^5.1.0"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "devDependencies": {
- "nyc": "^10.3.2",
- "standard": "^9.0.2",
- "standard-version": "^4.1.0",
- "tap": "^10.3.3",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js"
- ],
- "homepage": "https://github.com/zkat/ssri#readme",
- "keywords": [
- "w3c",
- "web",
- "security",
- "integrity",
- "checksum",
- "hashing",
- "subresource integrity",
- "sri",
- "sri hash",
- "sri string",
- "sri generator",
- "html"
- ],
- "license": "CC0-1.0",
- "main": "index.js",
- "name": "ssri",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/ssri.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "4.1.6"
-}
diff --git a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json
index 6bc2c05add..c207e2ded5 100644
--- a/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json
+++ b/deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json
@@ -1,10 +1,13 @@
{
"_from": "make-fetch-happen@^2.5.0",
- "_id": "make-fetch-happen@2.5.0",
+ "_id": "make-fetch-happen@2.6.0",
"_inBundle": false,
- "_integrity": "sha512-JPD5R43T02wIkcxjcmZuR7D06nB20fMR8aC9VEyYsSBXvJa5hOR/QhCxKY+5SXhy3uU5OUY/r+A6r+fJ2mFndA==",
+ "_integrity": "sha512-FFq0lNI0ax+n9IWzWpH8A4JdgYiAp2DDYIZ3rsaav8JDe8I+72CzK6PQW/oom15YDZpV5bYW/9INd6nIJ2ZfZw==",
"_location": "/npm-profile/make-fetch-happen",
"_phantomChildren": {
+ "inherits": "2.0.3",
+ "once": "1.4.0",
+ "readable-stream": "2.3.4",
"retry": "0.10.1",
"safe-buffer": "5.1.1"
},
@@ -21,8 +24,8 @@
"_requiredBy": [
"/npm-profile"
],
- "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.5.0.tgz",
- "_shasum": "08c22d499f4f30111addba79fe87c98cf01b6bc8",
+ "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz",
+ "_shasum": "8474aa52198f6b1ae4f3094c04e8370d35ea8a38",
"_spec": "make-fetch-happen@^2.5.0",
"_where": "/Users/rebecca/code/npm/node_modules/npm-profile",
"author": {
@@ -35,16 +38,16 @@
"bundleDependencies": false,
"dependencies": {
"agentkeepalive": "^3.3.0",
- "cacache": "^9.2.9",
- "http-cache-semantics": "^3.7.3",
+ "cacache": "^10.0.0",
+ "http-cache-semantics": "^3.8.0",
"http-proxy-agent": "^2.0.0",
- "https-proxy-agent": "^2.0.0",
+ "https-proxy-agent": "^2.1.0",
"lru-cache": "^4.1.1",
"mississippi": "^1.2.0",
- "node-fetch-npm": "^2.0.1",
+ "node-fetch-npm": "^2.0.2",
"promise-retry": "^1.1.1",
- "socks-proxy-agent": "^3.0.0",
- "ssri": "^4.1.6"
+ "socks-proxy-agent": "^3.0.1",
+ "ssri": "^5.0.0"
},
"deprecated": false,
"description": "Opinionated, caching, retrying fetch client",
@@ -94,5 +97,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "2.5.0"
+ "version": "2.6.0"
}
diff --git a/deps/npm/node_modules/npm-profile/package.json b/deps/npm/node_modules/npm-profile/package.json
index e698111270..cfc4fa7eda 100644
--- a/deps/npm/node_modules/npm-profile/package.json
+++ b/deps/npm/node_modules/npm-profile/package.json
@@ -1,35 +1,37 @@
{
- "_from": "npm-profile@2.0.5",
- "_id": "npm-profile@2.0.5",
+ "_from": "npm-profile@3.0.1",
+ "_id": "npm-profile@3.0.1",
"_inBundle": false,
- "_integrity": "sha512-tLmpDUCV72f/1/oXoyb+VwsZjOlsanp34pZeIZS0mxDoQUOX4Ld1hgPeOqoX4XggE88m7W47DHET2v+qd6sihg==",
+ "_integrity": "sha512-U/jvnERvBRYgIdHkPURsa8mjLCOiImdA8fw1FzzCF//PKro4w1QANCmXiQex8f/Id1h939lqOiUT+ywKL0AG4Q==",
"_location": "/npm-profile",
"_phantomChildren": {
- "cacache": "9.2.9",
+ "cacache": "10.0.4",
+ "inherits": "2.0.3",
"lru-cache": "4.1.1",
- "mississippi": "1.3.0",
+ "once": "1.4.0",
+ "readable-stream": "2.3.4",
"retry": "0.10.1",
"safe-buffer": "5.1.1",
- "ssri": "4.1.6"
+ "ssri": "5.2.4"
},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-profile@2.0.5",
+ "raw": "npm-profile@3.0.1",
"name": "npm-profile",
"escapedName": "npm-profile",
- "rawSpec": "2.0.5",
+ "rawSpec": "3.0.1",
"saveSpec": null,
- "fetchSpec": "2.0.5"
+ "fetchSpec": "3.0.1"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-2.0.5.tgz",
- "_shasum": "0e61b8f1611bd19d1eeff5e3d5c82e557da3b9d7",
- "_spec": "npm-profile@2.0.5",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-3.0.1.tgz",
+ "_shasum": "65a1018340f14399a086b5d0a9bd0d13145d8e57",
+ "_spec": "npm-profile@3.0.1",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -46,6 +48,7 @@
"deprecated": false,
"description": "Library for updating an npmjs.com profile",
"files": [
+ "CHANGELOG.md",
"index.js"
],
"homepage": "https://github.com/npm/npm-profile/tree/latest/lib#readme",
@@ -57,5 +60,5 @@
"type": "git",
"url": "git+https://github.com/npm/npm-profile.git"
},
- "version": "2.0.5"
+ "version": "3.0.1"
}
diff --git a/deps/npm/node_modules/npm-registry-client/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/CHANGELOG.md
new file mode 100644
index 0000000000..bc74d3f0e8
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="8.5.1"></a>
+## [8.5.1](https://github.com/npm/npm-registry-client/compare/v8.5.0...v8.5.1) (2018-03-08)
+
+
+### Bug Fixes
+
+* **error:** improve `User not found` publish message ([#167](https://github.com/npm/npm-registry-client/issues/167)) ([5ebcffc](https://github.com/npm/npm-registry-client/commit/5ebcffc))
diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js
index b33d8973f3..d8d65a9442 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/access.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/access.js
@@ -93,7 +93,7 @@ function apiUri (registryUri) {
function accessAssertions (subcommand, uri, params, cb) {
assert(subcommands.hasOwnProperty(subcommand),
- 'access subcommand must be one of ' +
+ 'access subcommand must be one of ' +
Object.keys(subcommands).join(', '))
typeChecks({
'uri': [uri, 'string'],
@@ -106,7 +106,7 @@ function accessAssertions (subcommand, uri, params, cb) {
], subcommand)) {
typeChecks({ 'package': [params.package, 'string'] })
assert(!!npa(params.package).scope,
- 'access commands are only accessible for scoped packages')
+ 'access commands are only accessible for scoped packages')
}
if (contains(['grant', 'revoke', 'ls-packages'], subcommand)) {
typeChecks({ 'scope': [params.scope, 'string'] })
@@ -118,7 +118,7 @@ function accessAssertions (subcommand, uri, params, cb) {
typeChecks({ 'permissions': [params.permissions, 'string'] })
assert(params.permissions === 'read-only' ||
params.permissions === 'read-write',
- 'permissions must be either read-only or read-write')
+ 'permissions must be either read-only or read-write')
}
}
@@ -127,7 +127,7 @@ function typeChecks (specs) {
var checks = specs[key]
/* eslint valid-typeof:0 */
assert(typeof checks[0] === checks[1],
- key + ' is required and must be of type ' + checks[1])
+ key + ' is required and must be of type ' + checks[1])
})
}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js
index 0dd517d946..a31d5b0333 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js
@@ -2,7 +2,6 @@ module.exports = adduser
var url = require('url')
var assert = require('assert')
-var extend = Object.assign || require('util')._extend
function adduser (uri, params, cb) {
assert(typeof uri === 'string', 'must pass registry URI to adduser')
@@ -68,7 +67,7 @@ function adduser (uri, params, cb) {
}
this.request(
uri,
- extend({}, options),
+ Object.assign({}, options),
function (error, data, json, response) {
if (!error || !response || response.statusCode !== 409) {
return cb(error, data, json, response)
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
index 558e2cf829..69a126d1f4 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
@@ -11,7 +11,7 @@ function fetch (uri, params, cb) {
params && typeof params === 'object',
'must pass params to distTags.fetch'
)
- assert(typeof cb === 'function', 'muss pass callback to distTags.fetch')
+ assert(typeof cb === 'function', 'must pass callback to distTags.fetch')
assert(
typeof params.package === 'string',
diff --git a/deps/npm/node_modules/npm-registry-client/lib/org.js b/deps/npm/node_modules/npm-registry-client/lib/org.js
index 7c73caf7da..3072b3817a 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/org.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/org.js
@@ -50,7 +50,7 @@ function apiUri (registryUri) {
function orgAssertions (subcommand, uri, params, cb) {
assert(subcommand, 'subcommand is required')
assert(subcommands.hasOwnProperty(subcommand),
- 'org subcommand must be one of ' + Object.keys(subcommands))
+ 'org subcommand must be one of ' + Object.keys(subcommands))
assert(typeof uri === 'string', 'registry URI is required')
assert(typeof params === 'object', 'params are required')
assert(typeof params.auth === 'object', 'auth is required')
diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js
index ecf593a4ac..fd3adce126 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/publish.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js
@@ -95,7 +95,7 @@ function putFirst (registry, data, tarbuffer, access, auth, cb) {
// Legacy shasum support
data.dist.shasum = integrity['sha1'][0].hexDigest()
data.dist.tarball = url.resolve(registry, tbURI)
- .replace(/^https:\/\//, 'http://')
+ .replace(/^https:\/\//, 'http://')
root._attachments = {}
root._attachments[ tbName ] = {
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 1b769c3e4f..471546c1d2 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/request.js
@@ -298,6 +298,8 @@ function requestDone (method, where, cb) {
)
} else if (name && parsed.error === 'not_found') {
er = makeError('404 Not Found: ' + name, name, response.statusCode)
+ } else if (name && parsed.error === 'User not found') {
+ er = makeError('User not found. Check `npm whoami` and make sure you have a NPM account.', name, response.statusCode)
} else {
er = makeError(
parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w),
diff --git a/deps/npm/node_modules/npm-registry-client/lib/team.js b/deps/npm/node_modules/npm-registry-client/lib/team.js
index 3e3794e047..327fa9cd5a 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/team.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/team.js
@@ -85,7 +85,7 @@ function apiUri (registryUri) {
function teamAssertions (subcommand, uri, params, cb) {
assert(subcommand, 'subcommand is required')
assert(subcommands.hasOwnProperty(subcommand),
- 'team subcommand must be one of ' + Object.keys(subcommands))
+ 'team subcommand must be one of ' + Object.keys(subcommands))
assert(typeof uri === 'string', 'registry URI is required')
assert(typeof params === 'object', 'params are required')
assert(typeof params.auth === 'object', 'auth is required')
@@ -100,6 +100,6 @@ function teamAssertions (subcommand, uri, params, cb) {
if (subcommand === 'edit') {
assert(typeof params.users === 'object' &&
params.users.length != null,
- 'users is required')
+ 'users is required')
}
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
index a215056dab..c26b388289 100644
--- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/package.json
@@ -1,7 +1,8 @@
{
"_from": "concat-stream@^1.5.2",
- "_id": "concat-stream@1.6.0",
- "_integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
+ "_id": "concat-stream@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
"_location": "/npm-registry-client/concat-stream",
"_phantomChildren": {},
"_requested": {
@@ -17,16 +18,14 @@
"_requiredBy": [
"/npm-registry-client"
],
- "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
- "_shasum": "0aac662fd52be78964d5532f694784e70110acf7",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+ "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26",
"_spec": "concat-stream@^1.5.2",
"_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client",
"author": {
"name": "Max Ogden",
"email": "max@maxogden.com"
},
- "bin": null,
"bugs": {
"url": "http://github.com/maxogden/concat-stream/issues"
},
@@ -51,8 +50,6 @@
"license": "MIT",
"main": "index.js",
"name": "concat-stream",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/maxogden/concat-stream.git"
@@ -82,5 +79,5 @@
"android-browser/4.2..latest"
]
},
- "version": "1.6.0"
+ "version": "1.6.1"
}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE
deleted file mode 100644
index 05eeeb88c2..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md
deleted file mode 100644
index d45032dc74..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# npm-package-arg
-
-Parses package name and specifier passed to commands like `npm install` or
-`npm cache add`, or as found in `package.json` dependency sections.
-
-## EXAMPLES
-
-```javascript
-var assert = require("assert")
-var npa = require("npm-package-arg")
-
-// Pass in the descriptor, and it'll return an object
-try {
- var parsed = npa("@bar/foo@1.2")
-} catch (ex) {
- ā€¦
-}
-```
-
-## USING
-
-`var npa = require('npm-package-arg')`
-
-### var result = npa(*arg*[, *where*])
-
-* *arg* - a string that you might pass to `npm install`, like:
-`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,
-`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`,
-`../foo/bar/` or `bar`. If the *arg* you provide doesn't have a specifier
-part, eg `foo` then the specifier will default to `latest`.
-* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`
-
-**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.
-
-### var result = npa.resolve(*name*, *spec*[, *where*])
-
-* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`.
-* *spec* - The specifier indicating where and how you can get this module. Something like:
-`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`,
-`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`. If not
-included then the default is `latest`.
-* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`
-
-**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.
-
-## RESULT OBJECT
-
-The objects that are returned by npm-package-arg contain the following
-keys:
-
-* `type` - One of the following strings:
- * `git` - A git repo
- * `tag` - A tagged version, like `"foo@latest"`
- * `version` - A specific version number, like `"foo@1.2.3"`
- * `range` - A version range, like `"foo@2.x"`
- * `file` - A local `.tar.gz`, `.tar` or `.tgz` file.
- * `directory` - A local directory.
- * `remote` - An http url (presumably to a tgz)
-* `registry` - If true this specifier refers to a resource hosted on a
- registry. This is true for `tag`, `version` and `range` types.
-* `name` - If known, the `name` field expected in the resulting pkg.
-* `scope` - If a name is something like `@org/module` then the `scope`
- field will be set to `@org`. If it doesn't have a scoped name, then
- scope is `null`.
-* `escapedName` - A version of `name` escaped to match the npm scoped packages
- specification. Mostly used when making requests against a registry. When
- `name` is `null`, `escapedName` will also be `null`.
-* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`,
- or the value of `spec` in calls to `npa.resolve(name, spec).
-* `saveSpec` - The normalized specifier, for saving to package.json files.
- `null` for registry dependencies.
-* `fetchSpec` - The version of the specifier to be used to fetch this
- resource. `null` for shortcuts to hosted git dependencies as there isn't
- just one URL to try with them.
-* `gitRange` - If set, this is a semver specifier to match against git tags with
-* `gitCommittish` - If set, this is the specific committish to use with a git dependency.
-* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info`
- object. This property is not included when serializing the object as
- JSON.
-* `raw` - The original un-modified string that was provided. If called as
- `npa.resolve(name, spec)` then this will be `name + '@' + spec`.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js
deleted file mode 100644
index a61c057429..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js
+++ /dev/null
@@ -1,270 +0,0 @@
-'use strict'
-module.exports = npa
-module.exports.resolve = resolve
-module.exports.Result = Result
-
-let url
-let HostedGit
-let semver
-let path
-let validatePackageName
-let osenv
-
-const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS
-const hasSlashes = isWindows ? /\\|[/]/ : /[/]/
-const isURL = /^(?:git[+])?[a-z]+:/i
-const isFilename = /[.](?:tgz|tar.gz|tar)$/i
-
-function npa (arg, where) {
- let name
- let spec
- const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@')
- const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg
- if (isURL.test(arg)) {
- spec = arg
- } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) {
- spec = arg
- } else if (nameEndsAt > 0) {
- name = namePart
- spec = arg.slice(nameEndsAt + 1)
- } else {
- if (!validatePackageName) validatePackageName = require('validate-npm-package-name')
- const valid = validatePackageName(arg)
- if (valid.validForOldPackages) {
- name = arg
- } else {
- spec = arg
- }
- }
- return resolve(name, spec, where, arg)
-}
-
-const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/
-
-function resolve (name, spec, where, arg) {
- const res = new Result({
- raw: arg,
- name: name,
- rawSpec: spec,
- fromArgument: arg != null
- })
-
- if (name) res.setName(name)
-
- if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) {
- return fromFile(res, where)
- }
- if (!HostedGit) HostedGit = require('hosted-git-info')
- const hosted = HostedGit.fromUrl(spec, {noGitPlus: true, noCommittish: true})
- if (hosted) {
- return fromHostedGit(res, hosted)
- } else if (spec && isURL.test(spec)) {
- return fromURL(res)
- } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) {
- return fromFile(res, where)
- } else {
- return fromRegistry(res)
- }
-}
-
-function invalidPackageName (name, valid) {
- const err = new Error(`Invalid package name "${name}": ${valid.errors.join('; ')}`)
- err.code = 'EINVALIDPACKAGENAME'
- return err
-}
-function invalidTagName (name) {
- const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`)
- err.code = 'EINVALIDTAGNAME'
- return err
-}
-
-function Result (opts) {
- this.type = opts.type
- this.registry = opts.registry
- this.where = opts.where
- if (opts.raw == null) {
- this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec
- } else {
- this.raw = opts.raw
- }
- this.name = undefined
- this.escapedName = undefined
- this.scope = undefined
- this.rawSpec = opts.rawSpec == null ? '' : opts.rawSpec
- this.saveSpec = opts.saveSpec
- this.fetchSpec = opts.fetchSpec
- if (opts.name) this.setName(opts.name)
- this.gitRange = opts.gitRange
- this.gitCommittish = opts.gitCommittish
- this.hosted = opts.hosted
-}
-Result.prototype = {}
-
-Result.prototype.setName = function (name) {
- if (!validatePackageName) validatePackageName = require('validate-npm-package-name')
- const valid = validatePackageName(name)
- if (!valid.validForOldPackages) {
- throw invalidPackageName(name, valid)
- }
- this.name = name
- this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined
- // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar
- this.escapedName = name.replace('/', '%2f')
- return this
-}
-
-Result.prototype.toString = function () {
- const full = []
- if (this.name != null && this.name !== '') full.push(this.name)
- const spec = this.saveSpec || this.fetchSpec || this.rawSpec
- if (spec != null && spec !== '') full.push(spec)
- return full.length ? full.join('@') : this.raw
-}
-
-Result.prototype.toJSON = function () {
- const result = Object.assign({}, this)
- delete result.hosted
- return result
-}
-
-function setGitCommittish (res, committish) {
- if (committish != null && committish.length >= 7 && committish.slice(0, 7) === 'semver:') {
- res.gitRange = decodeURIComponent(committish.slice(7))
- res.gitCommittish = null
- } else if (committish == null || committish === '') {
- res.gitCommittish = 'master'
- } else {
- res.gitCommittish = committish
- }
- return res
-}
-
-const isAbsolutePath = /^[/]|^[A-Za-z]:/
-
-function resolvePath (where, spec) {
- if (isAbsolutePath.test(spec)) return spec
- if (!path) path = require('path')
- return path.resolve(where, spec)
-}
-
-function isAbsolute (dir) {
- if (dir[0] === '/') return true
- if (/^[A-Za-z]:/.test(dir)) return true
- return false
-}
-
-function fromFile (res, where) {
- if (!where) where = process.cwd()
- res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory'
- res.where = where
-
- const spec = res.rawSpec.replace(/\\/g, '/')
- .replace(/^file:[/]*([A-Za-z]:)/, '$1') // drive name paths on windows
- .replace(/^file:(?:[/]*([~./]))?/, '$1')
- if (/^~[/]/.test(spec)) {
- // this is needed for windows and for file:~/foo/bar
- if (!osenv) osenv = require('osenv')
- res.fetchSpec = resolvePath(osenv.home(), spec.slice(2))
- res.saveSpec = 'file:' + spec
- } else {
- res.fetchSpec = resolvePath(where, spec)
- if (isAbsolute(spec)) {
- res.saveSpec = 'file:' + spec
- } else {
- if (!path) path = require('path')
- res.saveSpec = 'file:' + path.relative(where, res.fetchSpec)
- }
- }
- return res
-}
-
-function fromHostedGit (res, hosted) {
- res.type = 'git'
- res.hosted = hosted
- res.saveSpec = hosted.toString({noGitPlus: false, noCommittish: false})
- res.fetchSpec = hosted.getDefaultRepresentation() === 'shortcut' ? null : hosted.toString()
- return setGitCommittish(res, hosted.committish)
-}
-
-function unsupportedURLType (protocol, spec) {
- const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`)
- err.code = 'EUNSUPPORTEDPROTOCOL'
- return err
-}
-
-function matchGitScp (spec) {
- // git ssh specifiers are overloaded to also use scp-style git
- // specifiers, so we have to parse those out and treat them special.
- // They are NOT true URIs, so we can't hand them to `url.parse`.
- //
- // This regex looks for things that look like:
- // git+ssh://git@my.custom.git.com:username/project.git#deadbeef
- //
- // ...and various combinations. The username in the beginning is *required*.
- const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i)
- return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && {
- fetchSpec: matched[1],
- gitCommittish: matched[2] || 'master'
- }
-}
-
-function fromURL (res) {
- if (!url) url = require('url')
- const urlparse = url.parse(res.rawSpec)
- res.saveSpec = res.rawSpec
- // check the protocol, and then see if it's git or not
- switch (urlparse.protocol) {
- case 'git:':
- case 'git+http:':
- case 'git+https:':
- case 'git+rsync:':
- case 'git+ftp:':
- case 'git+file:':
- case 'git+ssh:':
- res.type = 'git'
- const match = urlparse.protocol === 'git+ssh:' && matchGitScp(res.rawSpec)
- if (match) {
- res.fetchSpec = match.fetchSpec
- res.gitCommittish = match.gitCommittish
- } else {
- setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : '')
- urlparse.protocol = urlparse.protocol.replace(/^git[+]/, '')
- delete urlparse.hash
- res.fetchSpec = url.format(urlparse)
- }
- break
- case 'http:':
- case 'https:':
- res.type = 'remote'
- res.fetchSpec = res.saveSpec
- break
-
- default:
- throw unsupportedURLType(urlparse.protocol, res.rawSpec)
- }
-
- return res
-}
-
-function fromRegistry (res) {
- res.registry = true
- const spec = res.rawSpec === '' ? 'latest' : res.rawSpec
- // no save spec for registry components as we save based on the fetched
- // version, not on the argument so this can't compute that.
- res.saveSpec = null
- res.fetchSpec = spec
- if (!semver) semver = require('semver')
- const version = semver.valid(spec, true)
- const range = semver.validRange(spec, true)
- if (version) {
- res.type = 'version'
- } else if (range) {
- res.type = 'range'
- } else {
- if (encodeURIComponent(spec) !== spec) {
- throw invalidTagName(spec)
- }
- res.type = 'tag'
- }
- return res
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json
deleted file mode 100644
index 75f30d1258..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "_from": "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0",
- "_id": "npm-package-arg@5.1.2",
- "_inBundle": false,
- "_integrity": "sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA==",
- "_location": "/npm-registry-client/npm-package-arg",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0",
- "name": "npm-package-arg",
- "escapedName": "npm-package-arg",
- "rawSpec": "^3.0.0 || ^4.0.0 || ^5.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0 || ^4.0.0 || ^5.0.0"
- },
- "_requiredBy": [
- "/npm-registry-client"
- ],
- "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.2.tgz",
- "_shasum": "fb18d17bb61e60900d6312619919bd753755ab37",
- "_spec": "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/npm-package-arg/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "hosted-git-info": "^2.4.2",
- "osenv": "^0.1.4",
- "semver": "^5.1.0",
- "validate-npm-package-name": "^3.0.0"
- },
- "deprecated": false,
- "description": "Parse the things that can be arguments to `npm install`",
- "devDependencies": {
- "standard": "9.0.2",
- "tap": "^10.3.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "npa.js"
- ],
- "homepage": "https://github.com/npm/npm-package-arg",
- "license": "ISC",
- "main": "npa.js",
- "name": "npm-package-arg",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/npm-package-arg.git"
- },
- "scripts": {
- "test": "standard && tap -J --coverage test/*.js"
- },
- "version": "5.1.2"
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md
deleted file mode 100644
index c1136092e3..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/CHANGELOG.md
+++ /dev/null
@@ -1,175 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="4.1.6"></a>
-## [4.1.6](https://github.com/zkat/ssri/compare/v4.1.5...v4.1.6) (2017-06-07)
-
-
-### Bug Fixes
-
-* **checkStream:** make sure to pass all opts through ([0b1bcbe](https://github.com/zkat/ssri/commit/0b1bcbe))
-
-
-
-<a name="4.1.5"></a>
-## [4.1.5](https://github.com/zkat/ssri/compare/v4.1.4...v4.1.5) (2017-06-05)
-
-
-### Bug Fixes
-
-* **integrityStream:** stop crashing if opts.algorithms and opts.integrity have an algo mismatch ([fb1293e](https://github.com/zkat/ssri/commit/fb1293e))
-
-
-
-<a name="4.1.4"></a>
-## [4.1.4](https://github.com/zkat/ssri/compare/v4.1.3...v4.1.4) (2017-05-31)
-
-
-### Bug Fixes
-
-* **node:** older versions of node[@4](https://github.com/4) do not support base64buffer string parsing ([513df4e](https://github.com/zkat/ssri/commit/513df4e))
-
-
-
-<a name="4.1.3"></a>
-## [4.1.3](https://github.com/zkat/ssri/compare/v4.1.2...v4.1.3) (2017-05-24)
-
-
-### Bug Fixes
-
-* **check:** handle various bad hash corner cases better ([c2c262b](https://github.com/zkat/ssri/commit/c2c262b))
-
-
-
-<a name="4.1.2"></a>
-## [4.1.2](https://github.com/zkat/ssri/compare/v4.1.1...v4.1.2) (2017-04-18)
-
-
-### Bug Fixes
-
-* **stream:** _flush can be called multiple times. use on("end") ([b1c4805](https://github.com/zkat/ssri/commit/b1c4805))
-
-
-
-<a name="4.1.1"></a>
-## [4.1.1](https://github.com/zkat/ssri/compare/v4.1.0...v4.1.1) (2017-04-12)
-
-
-### Bug Fixes
-
-* **pickAlgorithm:** error if pickAlgorithm() is used in an empty Integrity ([fab470e](https://github.com/zkat/ssri/commit/fab470e))
-
-
-
-<a name="4.1.0"></a>
-# [4.1.0](https://github.com/zkat/ssri/compare/v4.0.0...v4.1.0) (2017-04-07)
-
-
-### Features
-
-* adding ssri.create for a crypto style interface (#2) ([96f52ad](https://github.com/zkat/ssri/commit/96f52ad))
-
-
-
-<a name="4.0.0"></a>
-# [4.0.0](https://github.com/zkat/ssri/compare/v3.0.2...v4.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **integrity:** should have changed the error code before. oops ([8381afa](https://github.com/zkat/ssri/commit/8381afa))
-
-
-### BREAKING CHANGES
-
-* **integrity:** EBADCHECKSUM -> EINTEGRITY for verification errors
-
-
-
-<a name="3.0.2"></a>
-## [3.0.2](https://github.com/zkat/ssri/compare/v3.0.1...v3.0.2) (2017-04-03)
-
-
-
-<a name="3.0.1"></a>
-## [3.0.1](https://github.com/zkat/ssri/compare/v3.0.0...v3.0.1) (2017-04-03)
-
-
-### Bug Fixes
-
-* **package.json:** really should have these in the keywords because search ([a6ac6d0](https://github.com/zkat/ssri/commit/a6ac6d0))
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/zkat/ssri/compare/v2.0.0...v3.0.0) (2017-04-03)
-
-
-### Bug Fixes
-
-* **hashes:** IntegrityMetadata -> Hash ([d04aa1f](https://github.com/zkat/ssri/commit/d04aa1f))
-
-
-### Features
-
-* **check:** return IntegrityMetadata on check success ([2301e74](https://github.com/zkat/ssri/commit/2301e74))
-* **fromHex:** ssri.fromHex to make it easier to generate them from hex valus ([049b89e](https://github.com/zkat/ssri/commit/049b89e))
-* **hex:** utility function for getting hex version of digest ([a9f021c](https://github.com/zkat/ssri/commit/a9f021c))
-* **hexDigest:** added hexDigest method to Integrity objects too ([85208ba](https://github.com/zkat/ssri/commit/85208ba))
-* **integrity:** add .isIntegrity and .isIntegrityMetadata ([1b29e6f](https://github.com/zkat/ssri/commit/1b29e6f))
-* **integrityStream:** new stream that can both generate and check streamed data ([fd23e1b](https://github.com/zkat/ssri/commit/fd23e1b))
-* **parse:** allow parsing straight into a single IntegrityMetadata object ([c8ddf48](https://github.com/zkat/ssri/commit/c8ddf48))
-* **pickAlgorithm:** Intergrity#pickAlgorithm() added ([b97a796](https://github.com/zkat/ssri/commit/b97a796))
-* **size:** calculate and update stream sizes ([02ed1ad](https://github.com/zkat/ssri/commit/02ed1ad))
-
-
-### BREAKING CHANGES
-
-* **hashes:** `.isIntegrityMetadata` is now `.isHash`. Also, any references to `IntegrityMetadata` now refer to `Hash`.
-* **integrityStream:** createCheckerStream has been removed and replaced with a general-purpose integrityStream.
-
-To convert existing createCheckerStream code, move the `sri` argument into `opts.integrity` in integrityStream. All other options should be the same.
-* **check:** `checkData`, `checkStream`, and `createCheckerStream` now yield a whole IntegrityMetadata instance representing the first successful hash match.
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/zkat/ssri/compare/v1.0.0...v2.0.0) (2017-03-24)
-
-
-### Bug Fixes
-
-* **strict-mode:** make regexes more rigid ([122a32c](https://github.com/zkat/ssri/commit/122a32c))
-
-
-### Features
-
-* **api:** added serialize alias for unparse ([999b421](https://github.com/zkat/ssri/commit/999b421))
-* **concat:** add Integrity#concat() ([cae12c7](https://github.com/zkat/ssri/commit/cae12c7))
-* **pickAlgo:** pick the strongest algorithm provided, by default ([58c18f7](https://github.com/zkat/ssri/commit/58c18f7))
-* **strict-mode:** strict SRI support ([3f0b64c](https://github.com/zkat/ssri/commit/3f0b64c))
-* **stringify:** replaced unparse/serialize with stringify ([4acad30](https://github.com/zkat/ssri/commit/4acad30))
-* **verification:** add opts.pickAlgorithm ([f72e658](https://github.com/zkat/ssri/commit/f72e658))
-
-
-### BREAKING CHANGES
-
-* **pickAlgo:** ssri will prioritize specific hashes now
-* **stringify:** serialize and unparse have been removed. Use ssri.stringify instead.
-* **strict-mode:** functions that accepted an optional `sep` argument now expect `opts.sep`.
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-03-23)
-
-
-### Features
-
-* **api:** implemented initial api ([4fbb16b](https://github.com/zkat/ssri/commit/4fbb16b))
-
-
-### BREAKING CHANGES
-
-* **api:** Initial API established.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md
deleted file mode 100644
index c05cb09586..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/LICENSE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-To the extent possible under law, maintainers for this project have waived all copyright and related or neighboring rights to this project.
-
-For more information on this waiver, see: https://creativecommons.org/publicdomain/zero/1.0/
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md
deleted file mode 100644
index f2fc035da5..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/README.md
+++ /dev/null
@@ -1,462 +0,0 @@
-# ssri [![npm version](https://img.shields.io/npm/v/ssri.svg)](https://npm.im/ssri) [![license](https://img.shields.io/npm/l/ssri.svg)](https://npm.im/ssri) [![Travis](https://img.shields.io/travis/zkat/ssri.svg)](https://travis-ci.org/zkat/ssri) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/ssri?svg=true)](https://ci.appveyor.com/project/zkat/ssri) [![Coverage Status](https://coveralls.io/repos/github/zkat/ssri/badge.svg?branch=latest)](https://coveralls.io/github/zkat/ssri?branch=latest)
-
-[`ssri`](https://github.com/zkat/ssri), short for Standard Subresource
-Integrity, is a Node.js utility for parsing, manipulating, serializing,
-generating, and verifying [Subresource
-Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
-
-## Install
-
-`$ npm install --save ssri`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * Parsing & Serializing
- * [`parse`](#parse)
- * [`stringify`](#stringify)
- * [`Integrity#concat`](#integrity-concat)
- * [`Integrity#toString`](#integrity-to-string)
- * [`Integrity#toJSON`](#integrity-to-json)
- * [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
- * [`Integrity#hexDigest`](#integrity-hex-digest)
- * Integrity Generation
- * [`fromHex`](#from-hex)
- * [`fromData`](#from-data)
- * [`fromStream`](#from-stream)
- * [`create`](#create)
- * Integrity Verification
- * [`checkData`](#check-data)
- * [`checkStream`](#check-stream)
- * [`integrityStream`](#integrity-stream)
-
-### Example
-
-```javascript
-const ssri = require('ssri')
-
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Parsing and serializing
-const parsed = ssri.parse(integrity)
-ssri.stringify(parsed) // === integrity (works on non-Integrity objects)
-parsed.toString() // === integrity
-
-// Async stream functions
-ssri.checkStream(fs.createReadStream('./my-file'), integrity).then(...)
-ssri.fromStream(fs.createReadStream('./my-file')).then(sri => {
- sri.toString() === integrity
-})
-fs.createReadStream('./my-file').pipe(ssri.createCheckerStream(sri))
-
-// Sync data functions
-ssri.fromData(fs.readFileSync('./my-file')) // === parsed
-ssri.checkData(fs.readFileSync('./my-file'), integrity) // => 'sha512'
-```
-
-### Features
-
-* Parses and stringifies SRI strings.
-* Generates SRI strings from raw data or Streams.
-* Strict standard compliance.
-* `?foo` metadata option support.
-* Multiple entries for the same algorithm.
-* Object-based integrity hash manipulation.
-* Small footprint: no dependencies, concise implementation.
-* Full test coverage.
-* Customizable algorithm picker.
-
-### Contributing
-
-The ssri team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="parse"></a> `> ssri.parse(sri, [opts]) -> Integrity`
-
-Parses `sri` into an `Integrity` data structure. `sri` can be an integrity
-string, an `Hash`-like with `digest` and `algorithm` fields and an optional
-`options` field, or an `Integrity`-like object. The resulting object will be an
-`Integrity` instance that has this shape:
-
-```javascript
-{
- 'sha1': [{algorithm: 'sha1', digest: 'deadbeef', options: []}],
- 'sha512': [
- {algorithm: 'sha512', digest: 'c0ffee', options: []},
- {algorithm: 'sha512', digest: 'bad1dea', options: ['foo']}
- ],
-}
-```
-
-If `opts.single` is truthy, a single `Hash` object will be returned. That is, a
-single object that looks like `{algorithm, digest, options}`, as opposed to a
-larger object with multiple of these.
-
-If `opts.strict` is truthy, the resulting object will be filtered such that
-it strictly follows the Subresource Integrity spec, throwing away any entries
-with any invalid components. This also means a restricted set of algorithms
-will be used -- the spec limits them to `sha256`, `sha384`, and `sha512`.
-
-Strict mode is recommended if the integrity strings are intended for use in
-browsers, or in other situations where strict adherence to the spec is needed.
-
-##### Example
-
-```javascript
-ssri.parse('sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo') // -> Integrity object
-```
-
-#### <a name="stringify"></a> `> ssri.stringify(sri, [opts]) -> String`
-
-This function is identical to [`Integrity#toString()`](#integrity-to-string),
-except it can be used on _any_ object that [`parse`](#parse) can handle -- that
-is, a string, an `Hash`-like, or an `Integrity`-like.
-
-The `opts.sep` option defines the string to use when joining multiple entries
-together. To be spec-compliant, this _must_ be whitespace. The default is a
-single space (`' '`).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// Useful for cleaning up input SRI strings:
-ssri.stringify('\n\rsha512-foo\n\t\tsha384-bar')
-// -> 'sha512-foo sha384-bar'
-
-// Hash-like: only a single entry.
-ssri.stringify({
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-// Integrity-like: full multi-entry syntax. Similar to output of `ssri.parse`
-ssri.stringify({
- 'sha512': [
- {
- algorithm: 'sha512',
- digest:'9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==',
- options: ['foo']
- }
- ]
-})
-// ->
-// 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-```
-
-#### <a name="integrity-concat"></a> `> Integrity#concat(otherIntegrity, [opts]) -> Integrity`
-
-Concatenates an `Integrity` object with another IntegrityLike, or an integrity
-string.
-
-This is functionally equivalent to concatenating the string format of both
-integrity arguments, and calling [`ssri.parse`](#ssri-parse) on the new string.
-
-If `opts.strict` is true, the new `Integrity` will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-// This will combine the integrity checks for two different versions of
-// your index.js file so you can use a single integrity string and serve
-// either of these to clients, from a single `<script>` tag.
-const desktopIntegrity = ssri.fromData(fs.readFileSync('./index.desktop.js'))
-const mobileIntegrity = ssri.fromData(fs.readFileSync('./index.mobile.js'))
-
-// Note that browsers (and ssri) will succeed as long as ONE of the entries
-// for the *prioritized* algorithm succeeds. That is, in order for this fallback
-// to work, both desktop and mobile *must* use the same `algorithm` values.
-desktopIntegrity.concat(mobileIntegrity)
-```
-
-#### <a name="integrity-to-string"></a> `> Integrity#toString([opts]) -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `opts.sep`, which defaults to `' '`.
-
-If you want to serialize an object that didn't from from an `ssri` function,
-use [`ssri.stringify()`](#stringify).
-
-If `opts.strict` is true, the integrity string will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo'
-
-ssri.parse(integrity).toString() === integrity
-```
-
-#### <a name="integrity-to-json"></a> `> Integrity#toJSON() -> String`
-
-Returns the string representation of an `Integrity` object. All hash entries
-will be concatenated in the string by `' '`.
-
-This is a convenience method so you can pass an `Integrity` object directly to `JSON.stringify`.
-For more info check out [toJSON() behavior on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior).
-
-##### Example
-
-```javascript
-const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A==?foo"'
-
-JSON.stringify(ssri.parse(integrity)) === integrity
-```
-
-#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
-
-Returns the "best" algorithm from those available in the integrity object.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-WEakDigEST sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1').pickAlgorithm() // sha512
-```
-
-#### <a name="integrity-hex-digest"></a> `> Integrity#hexDigest() -> String`
-
-`Integrity` is assumed to be either a single-hash `Integrity` instance, or a
-`Hash` instance. Returns its `digest`, converted to a hex representation of the
-base64 data.
-
-##### Example
-
-```javascript
-ssri.parse('sha1-deadbeef').hexDigest() // '75e69d6de79f'
-```
-
-#### <a name="from-hex"></a> `> ssri.fromHex(hexDigest, algorithm, [opts]) -> Integrity`
-
-Creates an `Integrity` object with a single entry, based on a hex-formatted
-hash. This is a utility function to help convert existing shasums to the
-Integrity format, and is roughly equivalent to something like:
-
-```javascript
-algorithm + '-' + Buffer.from(hexDigest, 'hex').toString('base64')
-```
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-If `opts.single` is true, a single `Hash` object will be returned.
-
-##### Example
-
-```javascript
-ssri.fromHex('75e69d6de79f', 'sha1').toString() // 'sha1-deadbeef'
-```
-
-#### <a name="from-data"></a> `> ssri.fromData(data, [opts]) -> Integrity`
-
-Creates an `Integrity` object from either string or `Buffer` data, calculating
-all the requested hashes and adding any specified options to the object.
-
-`opts.algorithms` determines which algorithms to generate hashes for. All
-results will be included in a single `Integrity` object. The default value for
-`opts.algorithms` is `['sha512']`. All algorithm strings must be hashes listed
-in `crypto.getHashes()` for the host Node.js platform.
-
-`opts.options` may optionally be passed in: it must be an array of option
-strings that will be added to all generated integrity hashes generated by
-`fromData`. This is a loosely-specified feature of SRIs, and currently has no
-specified semantics besides being `?`-separated. Use at your own risk, and
-probably avoid if your integrity strings are meant to be used with browsers.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrityObj = ssri.fromData('foobarbaz', {
- algorithms: ['sha256', 'sha384', 'sha512']
-})
-integrity.toString('\n')
-// ->
-// sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0=
-// sha384-irnCxQ0CfQhYGlVAUdwTPC9bF3+YWLxlaDGM4xbYminxpbXEq+D+2GCEBTxcjES9
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="from-stream"></a> `> ssri.fromStream(stream, [opts]) -> Promise<Integrity>`
-
-Returns a Promise of an Integrity object calculated by reading data from
-a given `stream`.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-Additionally, `opts.Promise` may be passed in to inject a Promise library of
-choice. By default, ssri will use Node's built-in Promises.
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-ssri.fromStream(fs.createReadStream('index.js'), {
- algorithms: ['sha1', 'sha512']
-}).then(integrity => {
- return ssri.checkStream(fs.createReadStream('index.js'), integrity)
-}) // succeeds
-```
-
-#### <a name="create"></a> `> ssri.create([opts]) -> <Hash>`
-
-Returns a Hash object with `update(<Buffer or string>[,enc])` and `digest()` methods.
-
-
-The Hash object provides the same methods as [crypto class Hash](https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_class_hash).
-`digest()` accepts no arguments and returns an Integrity object calculated by reading data from
-calls to update.
-
-It accepts both `opts.algorithms` and `opts.options`, which are documented as
-part of [`ssri.fromData`](#from-data).
-
-If `opts.strict` is true, the integrity object will be created using strict
-parsing rules. See [`ssri.parse`](#parse).
-
-##### Example
-
-```javascript
-const integrity = ssri.create().update('foobarbaz').digest()
-integrity.toString()
-// ->
-// sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1+9vBnypkYWg==
-```
-
-#### <a name="check-data"></a> `> ssri.checkData(data, sri, [opts]) -> Hash|false`
-
-Verifies `data` integrity against an `sri` argument. `data` may be either a
-`String` or a `Buffer`, and `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-If verification succeeds, `checkData` will return the name of the algorithm that
-was used for verification (a truthy value). Otherwise, it will return `false`.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const data = fs.readFileSync('index.js')
-ssri.checkData(data, ssri.fromData(data)) // -> 'sha512'
-ssri.checkData(data, 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0')
-ssri.checkData(data, 'sha1-BaDDigEST') // -> false
-```
-
-#### <a name="check-stream"></a> `> ssri.checkStream(stream, sri, [opts]) -> Promise<Hash>`
-
-Verifies the contents of `stream` against an `sri` argument. `stream` will be
-consumed in its entirety by this process. `sri` can be any subresource integrity
-representation that [`ssri.parse`](#parse) can handle.
-
-`checkStream` will return a Promise that either resolves to the
-`Hash` that succeeded verification, or, if the verification fails
-or an error happens with `stream`, the Promise will be rejected.
-
-If the Promise is rejected because verification failed, the returned error will
-have `err.code` as `EINTEGRITY`.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be returned by a rejection if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be used by
-[`Integrity#pickAlgorithm`](#integrity-pick-algorithm) when deciding which of
-the available digests to match against.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- integrity
-)
-// ->
-// Promise<{
-// algorithm: 'sha512',
-// digest: 'sha512-yzd8ELD1piyANiWnmdnpCL5F52f10UfUdEkHywVZeqTt0ymgrxR63Qz0GB7TKPoeeZQmWCaz7T1'
-// }>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha256-l981iLWj8kurw4UbNy8Lpxqdzd7UOxS50Glhv8FwfZ0'
-) // -> Promise<Hash>
-
-ssri.checkStream(
- fs.createReadStream('index.js'),
- 'sha1-BaDDigEST'
-) // -> Promise<Error<{code: 'EINTEGRITY'}>>
-```
-
-#### <a name="integrity-stream"></a> `> integrityStream(sri, [opts]) -> IntegrityStream`
-
-Returns a `Transform` stream that data can be piped through in order to generate
-and optionally check data integrity for piped data. When the stream completes
-successfully, it emits `size` and `integrity` events, containing the total
-number of bytes processed and a calculated `Integrity` instance based on stream
-data, respectively.
-
-If `opts.algorithms` is passed in, the listed algorithms will be calculated when
-generating the final `Integrity` instance. The default is `['sha512']`.
-
-If `opts.single` is passed in, a single `Hash` instance will be returned.
-
-If `opts.integrity` is passed in, it should be an `integrity` value understood
-by [`parse`](#parse) that the stream will check the data against. If
-verification succeeds, the integrity stream will emit a `verified` event whose
-value is a single `Hash` object that is the one that succeeded verification. If
-verification fails, the stream will error with an `EINTEGRITY` error code.
-
-If `opts.size` is given, it will be matched against the stream size. An error
-with `err.code` `EBADSIZE` will be emitted by the stream if the expected size
-and actual size fail to match.
-
-If `opts.pickAlgorithm` is provided, it will be passed two algorithms as
-arguments. ssri will prioritize whichever of the two algorithms is returned by
-this function. Note that the function may be called multiple times, and it
-**must** return one of the two algorithms provided. By default, ssri will make
-a best-effort to pick the strongest/most reliable of the given algorithms. It
-may intentionally deprioritize algorithms with known vulnerabilities.
-
-##### Example
-
-```javascript
-const integrity = ssri.fromData(fs.readFileSync('index.js'))
-fs.createReadStream('index.js')
-.pipe(ssri.checkStream(integrity))
-```
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js
deleted file mode 100644
index 8ece662ba6..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/index.js
+++ /dev/null
@@ -1,334 +0,0 @@
-'use strict'
-
-const Buffer = require('safe-buffer').Buffer
-
-const crypto = require('crypto')
-const Transform = require('stream').Transform
-
-const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
-
-const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
-const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/]+(?:=?=?))([?\x21-\x7E]*)$/
-const VCHAR_REGEX = /^[\x21-\x7E]+$/
-
-class Hash {
- get isHash () { return true }
- constructor (hash, opts) {
- const strict = !!(opts && opts.strict)
- this.source = hash.trim()
- // 3.1. Integrity metadata (called "Hash" by ssri)
- // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
- const match = this.source.match(
- strict
- ? STRICT_SRI_REGEX
- : SRI_REGEX
- )
- if (!match) { return }
- if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return }
- this.algorithm = match[1]
- this.digest = match[2]
-
- const rawOpts = match[3]
- this.options = rawOpts ? rawOpts.slice(1).split('?') : []
- }
- hexDigest () {
- return this.digest && Buffer.from(this.digest, 'base64').toString('hex')
- }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- if (opts && opts.strict) {
- // Strict mode enforces the standard as close to the foot of the
- // letter as it can.
- if (!(
- // The spec has very restricted productions for algorithms.
- // https://www.w3.org/TR/CSP2/#source-list-syntax
- SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
- // Usually, if someone insists on using a "different" base64, we
- // leave it as-is, since there's multiple standards, and the
- // specified is not a URL-safe variant.
- // https://www.w3.org/TR/CSP2/#base64_value
- this.digest.match(BASE64_REGEX) &&
- // Option syntax is strictly visual chars.
- // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
- // https://tools.ietf.org/html/rfc5234#appendix-B.1
- (this.options || []).every(opt => opt.match(VCHAR_REGEX))
- )) {
- return ''
- }
- }
- const options = this.options && this.options.length
- ? `?${this.options.join('?')}`
- : ''
- return `${this.algorithm}-${this.digest}${options}`
- }
-}
-
-class Integrity {
- get isIntegrity () { return true }
- toJSON () {
- return this.toString()
- }
- toString (opts) {
- opts = opts || {}
- let sep = opts.sep || ' '
- if (opts.strict) {
- // Entries must be separated by whitespace, according to spec.
- sep = sep.replace(/\S+/g, ' ')
- }
- return Object.keys(this).map(k => {
- return this[k].map(hash => {
- return Hash.prototype.toString.call(hash, opts)
- }).filter(x => x.length).join(sep)
- }).filter(x => x.length).join(sep)
- }
- concat (integrity, opts) {
- const other = typeof integrity === 'string'
- ? integrity
- : stringify(integrity, opts)
- return parse(`${this.toString(opts)} ${other}`, opts)
- }
- hexDigest () {
- return parse(this, {single: true}).hexDigest()
- }
- pickAlgorithm (opts) {
- const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
- const keys = Object.keys(this)
- if (!keys.length) {
- throw new Error(`No algorithms available for ${
- JSON.stringify(this.toString())
- }`)
- }
- return keys.reduce((acc, algo) => {
- return pickAlgorithm(acc, algo) || acc
- })
- }
-}
-
-module.exports.parse = parse
-function parse (sri, opts) {
- opts = opts || {}
- if (typeof sri === 'string') {
- return _parse(sri, opts)
- } else if (sri.algorithm && sri.digest) {
- const fullSri = new Integrity()
- fullSri[sri.algorithm] = [sri]
- return _parse(stringify(fullSri, opts), opts)
- } else {
- return _parse(stringify(sri, opts), opts)
- }
-}
-
-function _parse (integrity, opts) {
- // 3.4.3. Parse metadata
- // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
- if (opts.single) {
- return new Hash(integrity, opts)
- }
- return integrity.trim().split(/\s+/).reduce((acc, string) => {
- const hash = new Hash(string, opts)
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.stringify = stringify
-function stringify (obj, opts) {
- if (obj.algorithm && obj.digest) {
- return Hash.prototype.toString.call(obj, opts)
- } else if (typeof obj === 'string') {
- return stringify(parse(obj, opts), opts)
- } else {
- return Integrity.prototype.toString.call(obj, opts)
- }
-}
-
-module.exports.fromHex = fromHex
-function fromHex (hexDigest, algorithm, opts) {
- const optString = (opts && opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- return parse(
- `${algorithm}-${
- Buffer.from(hexDigest, 'hex').toString('base64')
- }${optString}`, opts
- )
-}
-
-module.exports.fromData = fromData
-function fromData (data, opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
- return algorithms.reduce((acc, algo) => {
- const digest = crypto.createHash(algo).update(data).digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-}
-
-module.exports.fromStream = fromStream
-function fromStream (stream, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const istream = integrityStream(opts)
- return new P((resolve, reject) => {
- stream.pipe(istream)
- stream.on('error', reject)
- istream.on('error', reject)
- let sri
- istream.on('integrity', s => { sri = s })
- istream.on('end', () => resolve(sri))
- istream.on('data', () => {})
- })
-}
-
-module.exports.checkData = checkData
-function checkData (data, sri, opts) {
- opts = opts || {}
- sri = parse(sri, opts)
- if (!Object.keys(sri).length) { return false }
- const algorithm = sri.pickAlgorithm(opts)
- const digests = sri[algorithm] || []
- const digest = crypto.createHash(algorithm).update(data).digest('base64')
- return digests.find(hash => hash.digest === digest) || false
-}
-
-module.exports.checkStream = checkStream
-function checkStream (stream, sri, opts) {
- opts = opts || {}
- const P = opts.Promise || Promise
- const checker = integrityStream(Object.assign({}, opts, {
- integrity: sri
- }))
- return new P((resolve, reject) => {
- stream.pipe(checker)
- stream.on('error', reject)
- checker.on('error', reject)
- let sri
- checker.on('verified', s => { sri = s })
- checker.on('end', () => resolve(sri))
- checker.on('data', () => {})
- })
-}
-
-module.exports.integrityStream = integrityStream
-function integrityStream (opts) {
- opts = opts || {}
- // For verification
- const sri = opts.integrity && parse(opts.integrity, opts)
- const goodSri = sri && Object.keys(sri).length
- const algorithm = goodSri && sri.pickAlgorithm(opts)
- const digests = goodSri && sri[algorithm]
- // Calculating stream
- const algorithms = opts.algorithms || [algorithm || 'sha512']
- const hashes = algorithms.map(crypto.createHash)
- let streamSize = 0
- const stream = new Transform({
- transform (chunk, enc, cb) {
- streamSize += chunk.length
- hashes.forEach(h => h.update(chunk, enc))
- cb(null, chunk, enc)
- }
- }).on('end', () => {
- const optString = (opts.options && opts.options.length)
- ? `?${opts.options.join('?')}`
- : ''
- const newSri = parse(hashes.map((h, i) => {
- return `${algorithms[i]}-${h.digest('base64')}${optString}`
- }).join(' '), opts)
- const match = (
- // Integrity verification mode
- opts.integrity &&
- newSri[algorithm] &&
- digests &&
- digests.find(hash => {
- return newSri[algorithm].find(newhash => {
- return hash.digest === newhash.digest
- })
- })
- )
- if (typeof opts.size === 'number' && streamSize !== opts.size) {
- const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
- err.code = 'EBADSIZE'
- err.found = streamSize
- err.expected = opts.size
- err.sri = sri
- stream.emit('error', err)
- } else if (opts.integrity && !match) {
- const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`)
- err.code = 'EINTEGRITY'
- err.found = newSri
- err.expected = digests
- err.algorithm = algorithm
- err.sri = sri
- stream.emit('error', err)
- } else {
- stream.emit('size', streamSize)
- stream.emit('integrity', newSri)
- match && stream.emit('verified', match)
- }
- })
- return stream
-}
-
-module.exports.create = createIntegrity
-function createIntegrity (opts) {
- opts = opts || {}
- const algorithms = opts.algorithms || ['sha512']
- const optString = opts.options && opts.options.length
- ? `?${opts.options.join('?')}`
- : ''
-
- const hashes = algorithms.map(crypto.createHash)
-
- return {
- update: function (chunk, enc) {
- hashes.forEach(h => h.update(chunk, enc))
- return this
- },
- digest: function (enc) {
- const integrity = algorithms.reduce((acc, algo) => {
- const digest = hashes.shift().digest('base64')
- const hash = new Hash(
- `${algo}-${digest}${optString}`,
- opts
- )
- if (hash.algorithm && hash.digest) {
- const algo = hash.algorithm
- if (!acc[algo]) { acc[algo] = [] }
- acc[algo].push(hash)
- }
- return acc
- }, new Integrity())
-
- return integrity
- }
- }
-}
-
-// This is a Best Effortā„¢ at a reasonable priority for hash algos
-const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'
-]
-function getPrioritizedHash (algo1, algo2) {
- return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
- ? algo1
- : algo2
-}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json
deleted file mode 100644
index ad7949d03e..0000000000
--- a/deps/npm/node_modules/npm-registry-client/node_modules/ssri/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "_from": "ssri@^4.1.2",
- "_id": "ssri@4.1.6",
- "_inBundle": false,
- "_integrity": "sha512-WUbCdgSAMQjTFZRWvSPpauryvREEA+Krn19rx67UlJEJx/M192ZHxMmJXjZ4tkdFm+Sb0SXGlENeQVlA5wY7kA==",
- "_location": "/npm-registry-client/ssri",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "ssri@^4.1.2",
- "name": "ssri",
- "escapedName": "ssri",
- "rawSpec": "^4.1.2",
- "saveSpec": null,
- "fetchSpec": "^4.1.2"
- },
- "_requiredBy": [
- "/npm-registry-client"
- ],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-4.1.6.tgz",
- "_shasum": "0cb49b6ac84457e7bdd466cb730c3cb623e9a25b",
- "_spec": "ssri@^4.1.2",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/npm-registry-client",
- "author": {
- "name": "Kat MarchƔn",
- "email": "kzm@sykosomatic.org"
- },
- "bugs": {
- "url": "https://github.com/zkat/ssri/issues"
- },
- "bundleDependencies": false,
- "config": {
- "nyc": {
- "exclude": [
- "node_modules/**",
- "test/**"
- ]
- }
- },
- "dependencies": {
- "safe-buffer": "^5.1.0"
- },
- "deprecated": false,
- "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
- "devDependencies": {
- "nyc": "^10.3.2",
- "standard": "^9.0.2",
- "standard-version": "^4.1.0",
- "tap": "^10.3.3",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "*.js"
- ],
- "homepage": "https://github.com/zkat/ssri#readme",
- "keywords": [
- "w3c",
- "web",
- "security",
- "integrity",
- "checksum",
- "hashing",
- "subresource integrity",
- "sri",
- "sri hash",
- "sri string",
- "sri generator",
- "html"
- ],
- "license": "CC0-1.0",
- "main": "index.js",
- "name": "ssri",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zkat/ssri.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "test": "tap -J --coverage test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "4.1.6"
-}
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 619940a5e6..2a605c105a 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -1,31 +1,31 @@
{
- "_from": "npm-registry-client@latest",
- "_id": "npm-registry-client@8.5.0",
+ "_from": "npm-registry-client@8.5.1",
+ "_id": "npm-registry-client@8.5.1",
"_inBundle": false,
- "_integrity": "sha512-Nkcw24bfECKFNt0FLDQ+PjVqSlKxMggcboXiUBIvjbCnA15xjRO4kCwRDluGNXZjHFLx/vPjN4+ESXyVjpXLbQ==",
+ "_integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==",
"_location": "/npm-registry-client",
"_phantomChildren": {
"inherits": "2.0.3",
- "readable-stream": "2.3.3"
+ "readable-stream": "2.3.4"
},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "npm-registry-client@latest",
+ "raw": "npm-registry-client@8.5.1",
"name": "npm-registry-client",
"escapedName": "npm-registry-client",
- "rawSpec": "latest",
+ "rawSpec": "8.5.1",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "8.5.1"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.0.tgz",
- "_shasum": "4878fb6fa1f18a5dc08ae83acf94d0d0112d7ed0",
- "_spec": "npm-registry-client@latest",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.5.1.tgz",
+ "_shasum": "8115809c0a4b40938b8a109b8ea74d26c6f5d7f1",
+ "_spec": "npm-registry-client@8.5.1",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -39,14 +39,15 @@
"concat-stream": "^1.5.2",
"graceful-fs": "^4.1.6",
"normalize-package-data": "~1.0.1 || ^2.0.0",
- "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0",
+ "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
"npmlog": "2 || ^3.1.0 || ^4.0.0",
"once": "^1.3.3",
"request": "^2.74.0",
"retry": "^0.10.0",
+ "safe-buffer": "^5.1.1",
"semver": "2 >=2.2.1 || 3.x || 4 || 5",
"slide": "^1.1.3",
- "ssri": "^4.1.2"
+ "ssri": "^5.2.4"
},
"deprecated": false,
"description": "Client for the npm registry",
@@ -56,8 +57,9 @@
"readable-stream": "^2.1.5",
"require-inject": "^1.4.0",
"rimraf": "^2.5.4",
- "standard": "^9.0.0",
- "tap": "^10.3.0"
+ "standard": "^11.0.0",
+ "standard-version": "^4.3.0",
+ "tap": "^11.1.2"
},
"files": [
"lib",
@@ -74,7 +76,11 @@
"url": "git+https://github.com/npm/npm-registry-client.git"
},
"scripts": {
- "test": "standard && tap test/*.js"
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap --nyc-arg=--all --coverage test/*.js"
},
- "version": "8.5.0"
+ "version": "8.5.1"
}
diff --git a/deps/npm/node_modules/osenv/.npmignore b/deps/npm/node_modules/osenv/.npmignore
deleted file mode 100644
index 8c23deeb34..0000000000
--- a/deps/npm/node_modules/osenv/.npmignore
+++ /dev/null
@@ -1,13 +0,0 @@
-*.swp
-.*.swp
-
-.DS_Store
-*~
-.project
-.settings
-npm-debug.log
-coverage.html
-.idea
-lib-cov
-
-node_modules
diff --git a/deps/npm/node_modules/osenv/.travis.yml b/deps/npm/node_modules/osenv/.travis.yml
deleted file mode 100644
index 99f2bbf506..0000000000
--- a/deps/npm/node_modules/osenv/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-language: node_js
-node_js:
- - '0.8'
- - '0.10'
- - '0.12'
- - 'iojs'
-before_install:
- - npm install -g npm@latest
diff --git a/deps/npm/node_modules/osenv/package.json b/deps/npm/node_modules/osenv/package.json
index 469278d21d..76bedcc397 100644
--- a/deps/npm/node_modules/osenv/package.json
+++ b/deps/npm/node_modules/osenv/package.json
@@ -1,37 +1,41 @@
{
- "_from": "osenv@~0.1.4",
- "_id": "osenv@0.1.4",
- "_integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=",
+ "_from": "osenv@0.1.5",
+ "_id": "osenv@0.1.5",
+ "_inBundle": false,
+ "_integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"_location": "/osenv",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "osenv@~0.1.4",
+ "raw": "osenv@0.1.5",
"name": "osenv",
"escapedName": "osenv",
- "rawSpec": "~0.1.4",
+ "rawSpec": "0.1.5",
"saveSpec": null,
- "fetchSpec": "~0.1.4"
+ "fetchSpec": "0.1.5"
},
"_requiredBy": [
+ "#USER",
"/",
+ "/init-package-json/npm-package-arg",
+ "/libcipm/lock-verify/npm-package-arg",
+ "/libnpx/npm-package-arg",
"/node-gyp",
"/nopt",
"/npm-package-arg",
+ "/npm-registry-client/npm-package-arg",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz",
- "_shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644",
- "_shrinkwrap": null,
- "_spec": "osenv@~0.1.4",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+ "_shasum": "85cdfafaeb28e8677f416e287592b5f3f49ea410",
+ "_spec": "osenv@0.1.5",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "bin": null,
"bugs": {
"url": "https://github.com/npm/osenv/issues"
},
@@ -43,11 +47,14 @@
"deprecated": false,
"description": "Look up environment settings specific to different operating systems",
"devDependencies": {
- "tap": "^8.0.1"
+ "tap": "^11.1.0"
},
"directories": {
"test": "test"
},
+ "files": [
+ "osenv.js"
+ ],
"homepage": "https://github.com/npm/osenv#readme",
"keywords": [
"environment",
@@ -61,14 +68,15 @@
"license": "ISC",
"main": "osenv.js",
"name": "osenv",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/npm/osenv.git"
},
"scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
"test": "tap test/*.js"
},
- "version": "0.1.4"
+ "version": "0.1.5"
}
diff --git a/deps/npm/node_modules/osenv/test/unix.js b/deps/npm/node_modules/osenv/test/unix.js
deleted file mode 100644
index 94d4aaafb4..0000000000
--- a/deps/npm/node_modules/osenv/test/unix.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// only run this test on windows
-// pretending to be another platform is too hacky, since it breaks
-// how the underlying system looks up module paths and runs
-// child processes, and all that stuff is cached.
-var tap = require('tap')
-
-
-if (process.platform === 'win32') {
- tap.plan(0, 'Skip unix tests, this is not unix')
- process.exit(0)
-}
-
-// like unix, but funny
-process.env.USER = 'sirUser'
-process.env.HOME = '/home/sirUser'
-process.env.HOSTNAME = 'my-machine'
-process.env.TMPDIR = '/tmpdir'
-process.env.TMP = '/tmp'
-process.env.TEMP = '/temp'
-process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin'
-process.env.PS1 = '(o_o) $ '
-process.env.EDITOR = 'edit'
-process.env.VISUAL = 'visualedit'
-process.env.SHELL = 'zsh'
-
-tap.test('basic unix sanity test', function (t) {
- var osenv = require('../osenv.js')
-
- t.equal(osenv.user(), process.env.USER)
- t.equal(osenv.home(), process.env.HOME)
- t.equal(osenv.hostname(), process.env.HOSTNAME)
- t.same(osenv.path(), process.env.PATH.split(':'))
- t.equal(osenv.prompt(), process.env.PS1)
- t.equal(osenv.tmpdir(), process.env.TMPDIR)
-
- // mildly evil, but it's for a test.
- process.env.TMPDIR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TMP)
-
- process.env.TMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TEMP)
-
- process.env.TEMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- osenv.home = function () { return null }
- t.equal(osenv.tmpdir(), '/tmp')
-
- t.equal(osenv.editor(), 'edit')
- process.env.EDITOR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'visualedit')
-
- process.env.VISUAL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'vi')
-
- t.equal(osenv.shell(), 'zsh')
- process.env.SHELL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.shell(), 'bash')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/osenv/test/windows.js b/deps/npm/node_modules/osenv/test/windows.js
deleted file mode 100644
index c9d837a32d..0000000000
--- a/deps/npm/node_modules/osenv/test/windows.js
+++ /dev/null
@@ -1,74 +0,0 @@
-// only run this test on windows
-// pretending to be another platform is too hacky, since it breaks
-// how the underlying system looks up module paths and runs
-// child processes, and all that stuff is cached.
-if (process.platform !== 'win32') {
- console.log('TAP version 13\n' +
- '1..0 # Skip windows tests, this is not windows\n')
- return
-}
-
-// load this before clubbing the platform name.
-var tap = require('tap')
-
-process.env.windir = 'c:\\windows'
-process.env.USERDOMAIN = 'some-domain'
-process.env.USERNAME = 'sirUser'
-process.env.USERPROFILE = 'C:\\Users\\sirUser'
-process.env.COMPUTERNAME = 'my-machine'
-process.env.TMPDIR = 'C:\\tmpdir'
-process.env.TMP = 'C:\\tmp'
-process.env.TEMP = 'C:\\temp'
-process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin'
-process.env.PROMPT = '(o_o) $ '
-process.env.EDITOR = 'edit'
-process.env.VISUAL = 'visualedit'
-process.env.ComSpec = 'some-com'
-
-tap.test('basic windows sanity test', function (t) {
- var osenv = require('../osenv.js')
-
- t.equal(osenv.user(),
- process.env.USERDOMAIN + '\\' + process.env.USERNAME)
- t.equal(osenv.home(), process.env.USERPROFILE)
- t.equal(osenv.hostname(), process.env.COMPUTERNAME)
- t.same(osenv.path(), process.env.Path.split(';'))
- t.equal(osenv.prompt(), process.env.PROMPT)
- t.equal(osenv.tmpdir(), process.env.TMPDIR)
-
- // mildly evil, but it's for a test.
- process.env.TMPDIR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TMP)
-
- process.env.TMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.tmpdir(), process.env.TEMP)
-
- process.env.TEMP = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- osenv.home = function () { return null }
- t.equal(osenv.tmpdir(), 'c:\\windows\\temp')
-
- t.equal(osenv.editor(), 'edit')
- process.env.EDITOR = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'visualedit')
-
- process.env.VISUAL = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.editor(), 'notepad.exe')
-
- t.equal(osenv.shell(), 'some-com')
- process.env.ComSpec = ''
- delete require.cache[require.resolve('../osenv.js')]
- var osenv = require('../osenv.js')
- t.equal(osenv.shell(), 'cmd')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/osenv/x.tap b/deps/npm/node_modules/osenv/x.tap
deleted file mode 100644
index 90d8472087..0000000000
--- a/deps/npm/node_modules/osenv/x.tap
+++ /dev/null
@@ -1,39 +0,0 @@
-TAP version 13
- # Subtest: test/unix.js
- TAP version 13
- # Subtest: basic unix sanity test
- ok 1 - should be equal
- ok 2 - should be equal
- ok 3 - should be equal
- ok 4 - should be equivalent
- ok 5 - should be equal
- ok 6 - should be equal
- ok 7 - should be equal
- ok 8 - should be equal
- ok 9 - should be equal
- ok 10 - should be equal
- ok 11 - should be equal
- ok 12 - should be equal
- ok 13 - should be equal
- ok 14 - should be equal
- 1..14
- ok 1 - basic unix sanity test # time=10.712ms
-
- 1..1
- # time=18.422ms
-ok 1 - test/unix.js # time=169.827ms
-
- # Subtest: test/windows.js
- TAP version 13
- 1..0 # Skip windows tests, this is not windows
-
-ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows
-
- # Subtest: test/nada.js
- TAP version 13
- 1..0
-
-ok 2 - test/nada.js
-
-1..3
-# time=274.247ms
diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md
index 140e861cd7..0bf881062d 100644
--- a/deps/npm/node_modules/pacote/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/CHANGELOG.md
@@ -2,6 +2,176 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="7.6.1"></a>
+## [7.6.1](https://github.com/zkat/pacote/compare/v7.6.0...v7.6.1) (2018-03-08)
+
+
+### Bug Fixes
+
+* **standard:** update to new standard rules ([bb52d02](https://github.com/zkat/pacote/commit/bb52d02))
+
+
+
+<a name="7.6.0"></a>
+# [7.6.0](https://github.com/zkat/pacote/compare/v7.5.3...v7.6.0) (2018-03-08)
+
+
+### Features
+
+* **git:** added retry logic for all git operations. ([#136](https://github.com/zkat/pacote/issues/136)) ([425c58d](https://github.com/zkat/pacote/commit/425c58d))
+
+
+
+<a name="7.5.3"></a>
+## [7.5.3](https://github.com/zkat/pacote/compare/v7.5.2...v7.5.3) (2018-03-02)
+
+
+### Bug Fixes
+
+* **tarball:** stop dropping stream errors on the floor ([3db03c2](https://github.com/zkat/pacote/commit/3db03c2))
+
+
+
+<a name="7.5.2"></a>
+## [7.5.2](https://github.com/zkat/pacote/compare/v7.5.1...v7.5.2) (2018-03-02)
+
+
+### Bug Fixes
+
+* **console:** remove spurious debugging console.log :< ([5b8b509](https://github.com/zkat/pacote/commit/5b8b509))
+
+
+
+<a name="7.5.1"></a>
+## [7.5.1](https://github.com/zkat/pacote/compare/v7.5.0...v7.5.1) (2018-03-01)
+
+
+### Bug Fixes
+
+* **tarball:** catch errors thrown from stream handler ([bdd6628](https://github.com/zkat/pacote/commit/bdd6628))
+
+
+
+<a name="7.5.0"></a>
+# [7.5.0](https://github.com/zkat/pacote/compare/v7.4.2...v7.5.0) (2018-03-01)
+
+
+### Features
+
+* **logging:** let users know when file: resolved packages fail integrity check ([0fb8037](https://github.com/zkat/pacote/commit/0fb8037))
+
+
+
+<a name="7.4.2"></a>
+## [7.4.2](https://github.com/zkat/pacote/compare/v7.4.1...v7.4.2) (2018-02-23)
+
+
+### Bug Fixes
+
+* **deps:** move mkdirp and rimraf to dependencies ([#140](https://github.com/zkat/pacote/issues/140)) ([bba20c8](https://github.com/zkat/pacote/commit/bba20c8)), closes [#128](https://github.com/zkat/pacote/issues/128)
+
+
+
+<a name="7.4.1"></a>
+## [7.4.1](https://github.com/zkat/pacote/compare/v7.4.0...v7.4.1) (2018-02-23)
+
+
+### Bug Fixes
+
+* **tarball:** fix spurious errors from tarball.stream() ([0286ba5](https://github.com/zkat/pacote/commit/0286ba5))
+
+
+
+<a name="7.4.0"></a>
+# [7.4.0](https://github.com/zkat/pacote/compare/v7.3.3...v7.4.0) (2018-02-17)
+
+
+### Features
+
+* **tarball:** support file: opts.resolved shortcut ([a6cf279](https://github.com/zkat/pacote/commit/a6cf279))
+
+
+
+<a name="7.3.3"></a>
+## [7.3.3](https://github.com/zkat/pacote/compare/v7.3.2...v7.3.3) (2018-02-15)
+
+
+### Bug Fixes
+
+* **tarball:** another attempt at fixing opts.resolved ([aff3b6a](https://github.com/zkat/pacote/commit/aff3b6a))
+
+
+
+<a name="7.3.2"></a>
+## [7.3.2](https://github.com/zkat/pacote/compare/v7.3.1...v7.3.2) (2018-02-15)
+
+
+### Bug Fixes
+
+* **tarball:** opts.resolved impl was triggering extra registry lookups ([0a4729d](https://github.com/zkat/pacote/commit/0a4729d))
+
+
+
+<a name="7.3.1"></a>
+## [7.3.1](https://github.com/zkat/pacote/compare/v7.3.0...v7.3.1) (2018-02-14)
+
+
+### Bug Fixes
+
+* **tarball:** stop using mississippi.pipe() in tarball.js and extract.js ([f5c1da9](https://github.com/zkat/pacote/commit/f5c1da9))
+
+
+
+<a name="7.3.0"></a>
+# [7.3.0](https://github.com/zkat/pacote/compare/v7.2.0...v7.3.0) (2018-02-07)
+
+
+### Bug Fixes
+
+* **git:** fix resolution of prerelease versions ([#130](https://github.com/zkat/pacote/issues/130)) ([83be46b](https://github.com/zkat/pacote/commit/83be46b)), closes [#129](https://github.com/zkat/pacote/issues/129)
+
+
+### Features
+
+* **extract:** append _resolved and _integrity automatically ([#134](https://github.com/zkat/pacote/issues/134)) ([6886b65](https://github.com/zkat/pacote/commit/6886b65))
+
+
+
+<a name="7.2.0"></a>
+# [7.2.0](https://github.com/zkat/pacote/compare/v7.1.1...v7.2.0) (2018-01-19)
+
+
+### Features
+
+* **resolved:** tarball shortcut when opts.resolved is provided ([46a2f58](https://github.com/zkat/pacote/commit/46a2f58))
+
+
+
+<a name="7.1.1"></a>
+## [7.1.1](https://github.com/zkat/pacote/compare/v7.1.0...v7.1.1) (2018-01-08)
+
+
+### Bug Fixes
+
+* **publish:** a spurious file was included in the previous release ([296741a](https://github.com/zkat/pacote/commit/296741a))
+
+
+
+<a name="7.1.0"></a>
+# [7.1.0](https://github.com/zkat/pacote/compare/v7.0.2...v7.1.0) (2018-01-07)
+
+
+### Bug Fixes
+
+* **security:** deep-update debug due to vulnerabilities ([ff16da7](https://github.com/zkat/pacote/commit/ff16da7))
+
+
+### Features
+
+* **resolved:** add opts.resolved for cache stuff ([#131](https://github.com/zkat/pacote/issues/131)) ([149a4b5](https://github.com/zkat/pacote/commit/149a4b5))
+
+
+
<a name="7.0.2"></a>
## [7.0.2](https://github.com/zkat/pacote/compare/v7.0.1...v7.0.2) (2017-11-28)
diff --git a/deps/npm/node_modules/pacote/extract.js b/deps/npm/node_modules/pacote/extract.js
index 941c46848b..d2ab47deba 100644
--- a/deps/npm/node_modules/pacote/extract.js
+++ b/deps/npm/node_modules/pacote/extract.js
@@ -2,99 +2,69 @@
const BB = require('bluebird')
-const cacache = require('cacache')
-const extractStream = require('./lib/extract-stream')
+const extractStream = require('./lib/extract-stream.js')
+const fs = require('fs')
const mkdirp = BB.promisify(require('mkdirp'))
const npa = require('npm-package-arg')
-const optCheck = require('./lib/util/opt-check')
-const retry = require('promise-retry')
+const optCheck = require('./lib/util/opt-check.js')
+const path = require('path')
const rimraf = BB.promisify(require('rimraf'))
+const withTarballStream = require('./lib/with-tarball-stream.js')
+
+const truncateAsync = BB.promisify(fs.truncate)
+const readFileAsync = BB.promisify(fs.readFile)
+const appendFileAsync = BB.promisify(fs.appendFile)
module.exports = extract
function extract (spec, dest, opts) {
opts = optCheck(opts)
spec = npa(spec, opts.where)
const startTime = Date.now()
- if (opts.integrity && opts.cache && !opts.preferOnline) {
- opts.log.silly('pacote', `trying ${spec} by hash: ${opts.integrity}`)
- return extractByDigest(
- startTime, spec, dest, opts
- ).catch(err => {
- if (err.code === 'ENOENT') {
- opts.log.silly('pacote', `data for ${opts.integrity} not present. Using manifest.`)
- return extractByManifest(startTime, spec, dest, opts)
- }
- if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
- opts.log.warn('pacote', `cached data for ${spec} (${opts.integrity}) seems to be corrupted. Refreshing cache.`)
+ return withTarballStream(spec, opts, stream => {
+ return tryExtract(spec, stream, dest, opts)
+ })
+ .then(() => {
+ if (!opts.resolved) {
+ const pjson = path.join(dest, 'package.json')
+ return readFileAsync(pjson, 'utf8')
+ .then(str => truncateAsync(pjson)
+ .then(() => appendFileAsync(pjson, str.replace(
+ /}\s*$/,
+ `\n,"_resolved": ${
+ JSON.stringify(opts.resolved || '')
+ }\n,"_integrity": ${
+ JSON.stringify(opts.integrity || '')
+ }\n,"_from": ${
+ JSON.stringify(spec.toString())
+ }\n}`
+ ))))
}
- return cleanUpCached(
- dest, opts.cache, opts.integrity, opts
- ).then(() => {
- return extractByManifest(startTime, spec, dest, opts)
- })
})
- } else {
- opts.log.silly('pacote', 'no tarball hash provided for', spec.name, '- extracting by manifest')
- return BB.resolve(retry((tryAgain, attemptNum) => {
- return extractByManifest(
- startTime, spec, dest, opts
- ).catch(err => {
- // Retry once if we have a cache, to clear up any weird conditions.
- // Don't retry network errors, though -- make-fetch-happen has already
- // taken care of making sure we're all set on that front.
- if (opts.cache && !err.code.match(/^E\d{3}$/)) {
- if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
- opts.log.warn('pacote', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`)
- }
- return cleanUpCached(
- dest, opts.cache, err.sri, opts
- ).then(() => tryAgain(err))
- } else {
- throw err
- }
- })
- }, {retries: 1}))
- }
+ .then(() => opts.log.silly(
+ 'extract',
+ `${spec} extracted to ${dest} (${Date.now() - startTime}ms)`
+ ))
}
-function extractByDigest (start, spec, dest, opts) {
- return mkdirp(dest).then(() => {
- const xtractor = extractStream(dest, opts)
- const cached = cacache.get.stream.byDigest(opts.cache, opts.integrity, opts)
- cached.pipe(xtractor)
- return new BB((resolve, reject) => {
- cached.on('error', reject)
- xtractor.on('error', reject)
- xtractor.on('close', resolve)
- })
- }).then(() => {
- opts.log.silly('pacote', `${spec} extracted to ${dest} by content address ${Date.now() - start}ms`)
+function tryExtract (spec, tarStream, dest, opts) {
+ return new BB((resolve, reject) => {
+ tarStream.on('error', reject)
+ setImmediate(resolve)
})
-}
-
-let fetch
-function extractByManifest (start, spec, dest, opts) {
- return mkdirp(dest).then(() => {
- const xtractor = extractStream(dest, opts)
- if (!fetch) {
- fetch = require('./lib/fetch')
- }
- const tardata = fetch.tarball(spec, opts)
- tardata.pipe(xtractor)
- return new BB((resolve, reject) => {
- tardata.on('error', reject)
+ .then(() => rimraf(dest))
+ .then(() => mkdirp(dest))
+ .then(() => new BB((resolve, reject) => {
+ const xtractor = extractStream(spec, dest, opts)
+ tarStream.on('error', reject)
xtractor.on('error', reject)
xtractor.on('close', resolve)
+ tarStream.pipe(xtractor)
+ }))
+ .catch(err => {
+ if (err.code === 'EINTEGRITY') {
+ err.message = `Verification failed while extracting ${spec}:\n${err.message}`
+ }
+ throw err
})
- }).then(() => {
- opts.log.silly('pacote', `${spec} extracted in ${Date.now() - start}ms`)
- })
-}
-
-function cleanUpCached (dest, cachePath, integrity, opts) {
- return BB.join(
- rimraf(dest),
- cacache.rm.content(cachePath, integrity, opts)
- )
}
diff --git a/deps/npm/node_modules/pacote/lib/extract-stream.js b/deps/npm/node_modules/pacote/lib/extract-stream.js
index b3c720b07f..b7694876ba 100644
--- a/deps/npm/node_modules/pacote/lib/extract-stream.js
+++ b/deps/npm/node_modules/pacote/lib/extract-stream.js
@@ -1,5 +1,6 @@
'use strict'
+const PassThrough = require('stream').PassThrough
const path = require('path')
const tar = require('tar')
@@ -10,7 +11,29 @@ function computeMode (fileMode, optMode, umask) {
return (fileMode | optMode) & ~(umask || 0)
}
-function extractStream (dest, opts) {
+function pkgJsonTransform (spec, opts) {
+ return entry => {
+ if (entry.path === 'package.json') {
+ const transformed = new PassThrough()
+ let str = ''
+ entry.on('end', () => transformed.end(str.replace(
+ /}\s*$/,
+ `\n,"_resolved": ${
+ JSON.stringify(opts.resolved || '')
+ }\n,"_integrity": ${
+ JSON.stringify(opts.integrity || '')
+ }\n,"_from": ${
+ JSON.stringify(spec.toString())
+ }\n}`
+ )))
+ entry.on('error', e => transformed.emit('error'))
+ entry.on('data', d => { str += d })
+ return transformed
+ }
+ }
+}
+
+function extractStream (spec, dest, opts) {
opts = opts || {}
const sawIgnores = new Set()
return tar.x({
@@ -20,6 +43,7 @@ function extractStream (dest, opts) {
onwarn: msg => opts.log && opts.log.warn('tar', msg),
uid: opts.uid,
gid: opts.gid,
+ transform: opts.resolved && pkgJsonTransform(spec, opts),
onentry (entry) {
if (entry.type.toLowerCase() === 'file') {
entry.mode = computeMode(entry.mode, opts.fmode, opts.umask)
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/file.js b/deps/npm/node_modules/pacote/lib/fetchers/file.js
index 48bec0c2d8..5688cd1bdd 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/file.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/file.js
@@ -52,13 +52,13 @@ Fetcher.impl(fetchFile, {
} else {
let integrity
const cacheWriter = !opts.cache
- ? BB.resolve(null)
- : (pipe(
- fs.createReadStream(src),
- cacache.put.stream(opts.cache, `pacote:tarball:${src}`, {
- integrity: opts.integrity
- }).on('integrity', d => { integrity = d })
- ))
+ ? BB.resolve(null)
+ : (pipe(
+ fs.createReadStream(src),
+ cacache.put.stream(opts.cache, `pacote:tarball:${src}`, {
+ integrity: opts.integrity
+ }).on('integrity', d => { integrity = d })
+ ))
return cacheWriter.then(() => {
if (integrity) { stream.emit('integrity', integrity) }
return pipe(fs.createReadStream(src), stream)
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/git.js b/deps/npm/node_modules/pacote/lib/fetchers/git.js
index 11b5695255..6ce966ae5d 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/git.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/git.js
@@ -135,16 +135,16 @@ function resolve (url, spec, name, opts) {
const isSemver = !!spec.gitRange
return git.revs(url, opts).then(remoteRefs => {
return isSemver
- ? pickManifest({
- versions: remoteRefs.versions,
- 'dist-tags': remoteRefs['dist-tags'],
- name: name
- }, spec.gitRange, opts)
- : remoteRefs
- ? BB.resolve(
- remoteRefs.refs[spec.gitCommittish] || remoteRefs.refs[remoteRefs.shas[spec.gitCommittish]]
- )
- : null
+ ? pickManifest({
+ versions: remoteRefs.versions,
+ 'dist-tags': remoteRefs['dist-tags'],
+ name: name
+ }, spec.gitRange, opts)
+ : remoteRefs
+ ? BB.resolve(
+ remoteRefs.refs[spec.gitCommittish] || remoteRefs.refs[remoteRefs.shas[spec.gitCommittish]]
+ )
+ : null
})
}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
index a947ccea55..3a2a4a5a77 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/fetch.js
@@ -68,12 +68,12 @@ function logRequest (uri, res, startTime, opts) {
function getCacheMode (opts) {
return opts.offline
- ? 'only-if-cached'
- : opts.preferOffline
- ? 'force-cache'
- : opts.preferOnline
- ? 'no-cache'
- : 'default'
+ ? 'only-if-cached'
+ : opts.preferOffline
+ ? 'force-cache'
+ : opts.preferOnline
+ ? 'no-cache'
+ : 'default'
}
function getHeaders (uri, registry, opts) {
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
index 4488ddb4c7..4e5a8010e2 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/manifest.js
@@ -28,8 +28,8 @@ function manifest (spec, opts) {
function metadataUrl (registry, name) {
const normalized = registry.slice(-1) !== '/'
- ? registry + '/'
- : registry
+ ? registry + '/'
+ : registry
return url.resolve(normalized, name)
}
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
index 2c63872e7f..89158d3929 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
@@ -7,22 +7,40 @@ const manifest = require('./manifest')
const optCheck = require('../../util/opt-check')
const PassThrough = require('stream').PassThrough
const pickRegistry = require('./pick-registry')
-const pipe = BB.promisify(require('mississippi').pipe)
const ssri = require('ssri')
const url = require('url')
module.exports = tarball
function tarball (spec, opts) {
opts = optCheck(opts)
+ const registry = pickRegistry(spec, opts)
const stream = new PassThrough()
- manifest(spec, opts).then(manifest => {
- stream.emit('manifest', manifest)
- return pipe(
- fromManifest(manifest, spec, opts).on(
- 'integrity', i => stream.emit('integrity', i)
- ),
- stream
+ let mani
+ if (
+ opts.resolved &&
+ // spec.type === 'version' &&
+ opts.resolved.indexOf(registry) === 0
+ ) {
+ // fakeChild is a shortcut to avoid looking up a manifest!
+ mani = BB.resolve({
+ name: spec.name,
+ version: spec.fetchSpec,
+ _integrity: opts.integrity,
+ _resolved: opts.resolved,
+ _fakeChild: true
+ })
+ } else {
+ // We can't trust opts.resolved if it's going to a separate host.
+ mani = manifest(spec, opts)
+ }
+
+ mani.then(mani => {
+ !mani._fakeChild && stream.emit('manifest', mani)
+ const fetchStream = fromManifest(mani, spec, opts).on(
+ 'integrity', i => stream.emit('integrity', i)
)
+ fetchStream.on('error', err => stream.emit('error', err))
+ fetchStream.pipe(stream)
}).catch(err => stream.emit('error', err))
return stream
}
@@ -33,45 +51,43 @@ function fromManifest (manifest, spec, opts) {
opts.scope = spec.scope || opts.scope
const stream = new PassThrough()
const registry = pickRegistry(spec, opts)
- const uri = getTarballUrl(registry, manifest)
+ const uri = getTarballUrl(spec, registry, manifest, opts)
fetch(uri, registry, Object.assign({
headers: {
'pacote-req-type': 'tarball',
- 'pacote-pkg-id': `registry:${
- spec.type === 'remote'
- ? spec
- : `${manifest.name}@${manifest.version}`
- }`
+ 'pacote-pkg-id': `registry:${manifest.name}@${uri}`
},
integrity: manifest._integrity,
algorithms: [
manifest._integrity
- ? ssri.parse(manifest._integrity).pickAlgorithm()
- : 'sha1'
+ ? ssri.parse(manifest._integrity).pickAlgorithm()
+ : 'sha1'
],
spec
- }, opts)).then(res => {
- const hash = res.headers.get('x-local-cache-hash')
- if (hash) {
- stream.emit('integrity', decodeURIComponent(hash))
- }
- res.body.on('error', err => stream.emit('error', err))
- res.body.pipe(stream)
- }).catch(err => stream.emit('error', err))
+ }, opts))
+ .then(res => {
+ const hash = res.headers.get('x-local-cache-hash')
+ if (hash) {
+ stream.emit('integrity', decodeURIComponent(hash))
+ }
+ res.body.on('error', err => stream.emit('error', err))
+ res.body.pipe(stream)
+ })
+ .catch(err => stream.emit('error', err))
return stream
}
-function getTarballUrl (registry, manifest) {
+function getTarballUrl (spec, registry, mani, opts) {
+ const reg = url.parse(registry)
+ const tarball = url.parse(mani._resolved)
// https://github.com/npm/npm/pull/9471
//
- // TL;DR: Some alternative registries host tarballs on http and packuments on
- // https, and vice-versa. There's also a case where people who can't use SSL
- // to access the npm registry, for example, might use
- // `--registry=http://registry.npmjs.org/`. In this case, we need to rewrite
- // `tarball` to match the protocol.
+ // TL;DR: Some alternative registries host tarballs on http and packuments
+ // on https, and vice-versa. There's also a case where people who can't use
+ // SSL to access the npm registry, for example, might use
+ // `--registry=http://registry.npmjs.org/`. In this case, we need to
+ // rewrite `tarball` to match the protocol.
//
- const reg = url.parse(registry)
- const tarball = url.parse(manifest._resolved)
if (reg.hostname === tarball.hostname && reg.protocol !== tarball.protocol) {
tarball.protocol = reg.protocol
// Ports might be same host different protocol!
diff --git a/deps/npm/node_modules/pacote/lib/finalize-manifest.js b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
index 86b273b215..a5ec7a7348 100644
--- a/deps/npm/node_modules/pacote/lib/finalize-manifest.js
+++ b/deps/npm/node_modules/pacote/lib/finalize-manifest.js
@@ -38,8 +38,8 @@ function finalizeManifest (pkg, spec, opts) {
opts = optCheck(opts)
const cachedManifest = (opts.cache && key && !opts.preferOnline && !opts.fullMetadata)
- ? cacache.get.info(opts.cache, key, opts)
- : BB.resolve(null)
+ ? cacache.get.info(opts.cache, key, opts)
+ : BB.resolve(null)
return cachedManifest.then(cached => {
if (cached && cached.metadata.manifest) {
@@ -47,8 +47,8 @@ function finalizeManifest (pkg, spec, opts) {
} else {
return tarballedProps(pkg, spec, opts).then(props => {
return pkg && pkg.name
- ? new Manifest(pkg, props, opts.fullMetadata)
- : new Manifest(props, null, opts.fullMetadata)
+ ? new Manifest(pkg, props, opts.fullMetadata)
+ : new Manifest(props, null, opts.fullMetadata)
}).then(manifest => {
const cacheKey = key || finalKey(manifest, spec)
if (!opts.cache || !cacheKey) {
@@ -169,8 +169,8 @@ function tarballedProps (pkg, spec, opts) {
// to add to bin
if (paths && paths.length) {
const dirBin = mani
- ? (mani && mani.directories && mani.directories.bin)
- : (pkg && pkg.directories && pkg.directories.bin)
+ ? (mani && mani.directories && mani.directories.bin)
+ : (pkg && pkg.directories && pkg.directories.bin)
if (dirBin) {
extraProps.bin = {}
paths.forEach(filePath => {
diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js
index a6162ceeba..b854208ef9 100644
--- a/deps/npm/node_modules/pacote/lib/util/git.js
+++ b/deps/npm/node_modules/pacote/lib/util/git.js
@@ -12,8 +12,10 @@ const optCheck = require('./opt-check')
const osenv = require('osenv')
const path = require('path')
const pinflight = require('promise-inflight')
+const promiseRetry = require('promise-retry')
const uniqueFilename = require('unique-filename')
const which = BB.promisify(require('which'))
+const semver = require('semver')
const GOOD_ENV_VARS = new Set([
'GIT_ASKPASS',
@@ -25,6 +27,23 @@ const GOOD_ENV_VARS = new Set([
'GIT_SSL_NO_VERIFY'
])
+const GIT_TRANSIENT_ERRORS = [
+ 'remote error: Internal Server Error',
+ 'The remote end hung up unexpectedly',
+ 'Connection timed out',
+ 'Operation timed out',
+ 'Failed to connect to .* Timed out',
+ 'Connection reset by peer',
+ 'SSL_ERROR_SYSCALL',
+ 'The requested URL returned error: 503'
+].join('|')
+
+const GIT_TRANSIENT_ERROR_RE = new RegExp(GIT_TRANSIENT_ERRORS)
+
+function shouldRetry (error) {
+ return GIT_TRANSIENT_ERROR_RE.test(error)
+}
+
const GIT_ = 'GIT_'
let GITENV
function gitEnv () {
@@ -113,57 +132,51 @@ function revs (repo, opts) {
return pinflight(`ls-remote:${repo}`, () => {
return spawnGit(['ls-remote', '-h', '-t', repo], {
env: gitEnv()
- }, opts).then(child => {
- let stdout = ''
- let stderr = ''
- child.stdout.on('data', d => { stdout += d })
- child.stderr.on('data', d => { stderr += d })
- return finished(child).catch(err => {
- err.message = `Error while executing:\n${GITPATH} ls-remote -h -t ${repo}\n\n${stderr}\n${err.message}`
- throw err
- }).then(() => {
- return stdout.split('\n').reduce((revs, line) => {
- const split = line.split(/\s+/, 2)
- if (split.length < 2) { return revs }
- const sha = split[0].trim()
- const ref = split[1].trim().match(/(?:refs\/[^/]+\/)?(.*)/)[1]
- if (!ref) { return revs } // ???
- if (ref.endsWith(CARET_BRACES)) { return revs } // refs/tags/x^{} crap
- const type = refType(line)
- const doc = {sha, ref, type}
-
- revs.refs[ref] = doc
- // We can check out shallow clones on specific SHAs if we have a ref
- if (revs.shas[sha]) {
- revs.shas[sha].push(ref)
- } else {
- revs.shas[sha] = [ref]
- }
+ }, opts).then((stdout) => {
+ return stdout.split('\n').reduce((revs, line) => {
+ const split = line.split(/\s+/, 2)
+ if (split.length < 2) { return revs }
+ const sha = split[0].trim()
+ const ref = split[1].trim().match(/(?:refs\/[^/]+\/)?(.*)/)[1]
+ if (!ref) { return revs } // ???
+ if (ref.endsWith(CARET_BRACES)) { return revs } // refs/tags/x^{} crap
+ const type = refType(line)
+ const doc = {sha, ref, type}
- if (type === 'tag') {
- const match = ref.match(/v?(\d+\.\d+\.\d+)$/)
- if (match) {
- revs.versions[match[1]] = doc
- }
- }
+ revs.refs[ref] = doc
+ // We can check out shallow clones on specific SHAs if we have a ref
+ if (revs.shas[sha]) {
+ revs.shas[sha].push(ref)
+ } else {
+ revs.shas[sha] = [ref]
+ }
- return revs
- }, {versions: {}, 'dist-tags': {}, refs: {}, shas: {}})
- }).then(revs => {
- if (revs.refs.HEAD) {
- const HEAD = revs.refs.HEAD
- Object.keys(revs.versions).forEach(v => {
- if (v.sha === HEAD.sha) {
- revs['dist-tags'].HEAD = v
- if (!revs.refs.latest) {
- revs['dist-tags'].latest = revs.refs.HEAD
- }
- }
- })
+ if (type === 'tag') {
+ const match = ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/)
+ if (match && semver.valid(match[1], true)) {
+ revs.versions[semver.clean(match[1], true)] = doc
+ }
}
- REVS.set(repo, revs)
+
return revs
- })
+ }, {versions: {}, 'dist-tags': {}, refs: {}, shas: {}})
+ }, err => {
+ err.message = `Error while executing:\n${GITPATH} ls-remote -h -t ${repo}\n\n${err.stderr}\n${err.message}`
+ throw err
+ }).then(revs => {
+ if (revs.refs.HEAD) {
+ const HEAD = revs.refs.HEAD
+ Object.keys(revs.versions).forEach(v => {
+ if (v.sha === HEAD.sha) {
+ revs['dist-tags'].HEAD = v
+ if (!revs.refs.latest) {
+ revs['dist-tags'].latest = revs.refs.HEAD
+ }
+ }
+ })
+ }
+ REVS.set(repo, revs)
+ return revs
})
})
}
@@ -172,7 +185,18 @@ module.exports._exec = execGit
function execGit (gitArgs, gitOpts, opts) {
opts = optCheck(opts)
return checkGit().then(gitPath => {
- return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts))
+ return promiseRetry((retry, number) => {
+ if (number !== 1) {
+ opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number)
+ }
+ return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts)).catch((err) => {
+ if (shouldRetry(err)) {
+ retry(err)
+ } else {
+ throw err
+ }
+ })
+ }, opts.retry)
})
}
@@ -180,7 +204,28 @@ module.exports._spawn = spawnGit
function spawnGit (gitArgs, gitOpts, opts) {
opts = optCheck(opts)
return checkGit().then(gitPath => {
- return cp.spawn(gitPath, gitArgs, mkOpts(gitOpts, opts))
+ return promiseRetry((retry, number) => {
+ if (number !== 1) {
+ opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number)
+ }
+ const child = cp.spawn(gitPath, gitArgs, mkOpts(gitOpts, opts))
+
+ let stdout = ''
+ let stderr = ''
+ child.stdout.on('data', d => { stdout += d })
+ child.stderr.on('data', d => { stderr += d })
+
+ return finished(child).catch(err => {
+ if (shouldRetry(stderr)) {
+ retry(err)
+ } else {
+ err.stderr = stderr
+ throw err
+ }
+ }).then(() => {
+ return stdout
+ })
+ }, opts.retry)
})
}
@@ -213,10 +258,10 @@ const REFS_HEADS = 'refs/heads/'
const HEAD = 'HEAD'
function refType (ref) {
return ref.indexOf(REFS_TAGS) !== -1
- ? 'tag'
- : ref.indexOf(REFS_HEADS) !== -1
- ? 'branch'
- : ref.endsWith(HEAD)
- ? 'head'
- : 'other'
+ ? 'tag'
+ : ref.indexOf(REFS_HEADS) !== -1
+ ? 'branch'
+ : ref.endsWith(HEAD)
+ ? 'head'
+ : 'other'
}
diff --git a/deps/npm/node_modules/pacote/lib/util/gunzip-maybe.js b/deps/npm/node_modules/pacote/lib/util/gunzip-maybe.js
deleted file mode 100644
index 055de2921a..0000000000
--- a/deps/npm/node_modules/pacote/lib/util/gunzip-maybe.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict'
-
-const duplex = require('mississippi').duplex
-const through = require('mississippi').through
-const zlib = require('zlib')
-
-function hasGzipHeader (c) {
- return c[0] === 0x1F && c[1] === 0x8B && c[2] === 0x08
-}
-
-module.exports = gunzip
-function gunzip () {
- const stream = duplex()
- const peeker = through((chunk, enc, cb) => {
- const newStream = hasGzipHeader(chunk)
- ? zlib.createGunzip()
- : through()
- stream.setReadable(newStream)
- stream.setWritable(newStream)
- stream.write(chunk)
- })
- stream.setWritable(peeker)
- return stream
-}
diff --git a/deps/npm/node_modules/pacote/lib/util/opt-check.js b/deps/npm/node_modules/pacote/lib/util/opt-check.js
index 711f46c91a..d13a69e4dc 100644
--- a/deps/npm/node_modules/pacote/lib/util/opt-check.js
+++ b/deps/npm/node_modules/pacote/lib/util/opt-check.js
@@ -25,6 +25,7 @@ function PacoteOptions (opts) {
this.proxy = opts.proxy
this.noProxy = opts.noProxy
this.registry = opts.registry || 'https://registry.npmjs.org'
+ this.resolved = opts.resolved
this.retry = opts.retry // for npm-registry-client
this.scope = opts.scope
this.userAgent = opts.userAgent || `${pkg.name}@${pkg.version}/node@${process.version}+${process.arch} (${process.platform})`
@@ -44,8 +45,8 @@ function PacoteOptions (opts) {
this.fullMetadata = opts.fullMetadata
this.alwaysAuth = opts.alwaysAuth
this.includeDeprecated = opts.includeDeprecated == null
- ? true
- : opts.includeDeprecated
+ ? true
+ : opts.includeDeprecated
this.dirPacker = opts.dirPacker || null
diff --git a/deps/npm/node_modules/pacote/lib/util/pack-dir.js b/deps/npm/node_modules/pacote/lib/util/pack-dir.js
index 7625f4faf8..62776692e1 100644
--- a/deps/npm/node_modules/pacote/lib/util/pack-dir.js
+++ b/deps/npm/node_modules/pacote/lib/util/pack-dir.js
@@ -14,8 +14,8 @@ function packDir (manifest, label, dir, target, opts) {
opts = optCheck(opts)
const packer = opts.dirPacker
- ? BB.resolve(opts.dirPacker(manifest, dir))
- : mkPacker(dir)
+ ? BB.resolve(opts.dirPacker(manifest, dir))
+ : mkPacker(dir)
if (!opts.cache) {
return packer.then(packer => pipe(packer, target))
diff --git a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
new file mode 100644
index 0000000000..653a4a688a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
@@ -0,0 +1,135 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const cacache = require('cacache')
+const fetch = require('./fetch.js')
+const fs = require('fs')
+const npa = require('npm-package-arg')
+const optCheck = require('./util/opt-check.js')
+const path = require('path')
+const ssri = require('ssri')
+const retry = require('promise-retry')
+
+const statAsync = BB.promisify(fs.stat)
+
+const RETRIABLE_ERRORS = new Set(['ENOENT', 'EINTEGRITY', 'Z_DATA_ERROR'])
+
+module.exports = withTarballStream
+function withTarballStream (spec, opts, streamHandler) {
+ opts = optCheck(opts)
+ spec = npa(spec, opts.where)
+
+ // First, we check for a file: resolved shortcut
+ const tryFile = (
+ !opts.preferOnline &&
+ opts.integrity &&
+ opts.resolved &&
+ opts.resolved.startsWith('file:')
+ )
+ ? BB.try(() => {
+ // NOTE - this is a special shortcut! Packages installed as files do not
+ // have a `resolved` field -- this specific case only occurs when you have,
+ // say, a git dependency or a registry dependency that you've packaged into
+ // a local file, and put that file: spec in the `resolved` field.
+ opts.log.silly('pacote', `trying ${spec} by local file: ${opts.resolved}`)
+ const file = path.resolve(opts.where || '.', opts.resolved.substr(5))
+ return statAsync(file)
+ .then(() => {
+ const verifier = ssri.integrityStream({integrity: opts.integrity})
+ const stream = fs.createReadStream(file)
+ .on('error', err => verifier.emit('error', err))
+ .pipe(verifier)
+ return streamHandler(stream)
+ })
+ .catch(err => {
+ if (err.code === 'EINTEGRITY') {
+ opts.log.warn('pacote', `EINTEGRITY while extracting ${spec} from ${file}.You will have to recreate the file.`)
+ opts.log.verbose('pacote', `EINTEGRITY for ${spec}: ${err.message}`)
+ }
+ throw err
+ })
+ })
+ : BB.reject(Object.assign(new Error('no file!'), {code: 'ENOENT'}))
+
+ const tryDigest = tryFile
+ .catch(err => {
+ if (
+ opts.preferOnline ||
+ !opts.cache ||
+ !opts.integrity ||
+ !RETRIABLE_ERRORS.has(err.code)
+ ) {
+ throw err
+ } else {
+ opts.log.silly('tarball', `trying ${spec} by hash: ${opts.integrity}`)
+ const stream = cacache.get.stream.byDigest(
+ opts.cache, opts.integrity, opts
+ )
+ stream.once('error', err => stream.on('newListener', (ev, l) => {
+ if (ev === 'error') { l(err) }
+ }))
+ return streamHandler(stream)
+ .catch(err => {
+ if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
+ opts.log.warn('tarball', `cached data for ${spec} (${opts.integrity}) seems to be corrupted. Refreshing cache.`)
+ return cleanUpCached(opts.cache, opts.integrity, opts)
+ .then(() => { throw err })
+ } else {
+ throw err
+ }
+ })
+ }
+ })
+
+ const trySpec = tryDigest
+ .catch(err => {
+ if (!RETRIABLE_ERRORS.has(err.code)) {
+ // If it's not one of our retriable errors, bail out and give up.
+ throw err
+ } else {
+ opts.log.silly(
+ 'tarball',
+ `no local data for ${spec}. Extracting by manifest.`
+ )
+ return BB.resolve(retry((tryAgain, attemptNum) => {
+ const tardata = fetch.tarball(spec, opts)
+ if (!opts.resolved) {
+ tardata.on('manifest', m => {
+ opts.resolved = m._resolved
+ })
+ tardata.on('integrity', i => {
+ opts.integrity = i
+ })
+ }
+ return BB.try(() => streamHandler(tardata))
+ .catch(err => {
+ // Retry once if we have a cache, to clear up any weird conditions.
+ // Don't retry network errors, though -- make-fetch-happen has already
+ // taken care of making sure we're all set on that front.
+ if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) {
+ if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
+ opts.log.warn('tarball', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`)
+ }
+ return cleanUpCached(opts.cache, err.sri, opts)
+ .then(() => tryAgain(err))
+ } else {
+ throw err
+ }
+ })
+ }, {retries: 1}))
+ }
+ })
+
+ return trySpec
+ .catch(err => {
+ if (err.code === 'EINTEGRITY') {
+ err.message = `Verification failed while extracting ${spec}:\n${err.message}`
+ }
+ throw err
+ })
+}
+
+function cleanUpCached (cachePath, integrity, opts) {
+ return cacache.rm.content(cachePath, integrity, opts)
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
index e62374ef13..b37e513885 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
@@ -1,4 +1,13 @@
+3.4.0 / 2018-02-27
+==================
+
+**features**
+ * [[`bc7cadb`](http://github.com/node-modules/agentkeepalive/commit/bc7cadb30ecd2071e2b341ac53ae1a2b8155c43d)] - feat: use socket custom freeSocketKeepAliveTimeout first (#59) (fengmk2 <<fengmk2@gmail.com>>)
+
+**others**
+ * [[`138eda8`](http://github.com/node-modules/agentkeepalive/commit/138eda81e10b632aaa87bea0cb66d8667124c4e8)] - doc: fix `keepAliveMsecs` params description (#55) (Hongcai Deng <<admin@dhchouse.com>>)
+
3.3.0 / 2017-06-20
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
index c8d8d2f3be..ce067f10c7 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
@@ -44,8 +44,8 @@ $ npm install agentkeepalive --save
Can have the following fields:
* `keepAlive` {Boolean} Keep sockets around in a pool to be used by
other requests in the future. Default = `true`.
- * `keepAliveMsecs` {Number} When using HTTP KeepAlive, how often
- to send TCP KeepAlive packets over sockets being kept alive.
+ * `keepAliveMsecs` {Number} When using the keepAlive option, specifies the initial delay
+ for TCP Keep-Alive packets. Ignored when the keepAlive option is false or undefined. Defaults to 1000.
Default = `1000`. Only relevant if `keepAlive` is set to `true`.
* `freeSocketKeepAliveTimeout`: {Number} Sets the free socket to timeout
after `freeSocketKeepAliveTimeout` milliseconds of inactivity on the free socket.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
index 57723d9c98..604a884fd4 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
@@ -119,7 +119,10 @@ function Agent(options) {
socket.once('error', freeSocketErrorListener);
}
// set free keepalive timer
- socket.setTimeout(self.freeSocketKeepAliveTimeout);
+ // try to use socket custom freeSocketKeepAliveTimeout first
+ const freeSocketKeepAliveTimeout = socket.freeSocketKeepAliveTimeout || self.freeSocketKeepAliveTimeout;
+ socket.setTimeout(freeSocketKeepAliveTimeout);
+ debug(`push to free socket queue and wait for ${freeSocketKeepAliveTimeout}ms`);
// [patch end]
}
} else {
@@ -179,13 +182,14 @@ function handleSocketCreation(req) {
}
// [patch end]
-Agent.prototype.addRequest = function addRequest(req, options) {
+Agent.prototype.addRequest = function addRequest(req, options, port/*legacy*/,
+ localAddress/*legacy*/) {
// Legacy API: addRequest(req, host, port, localAddress)
if (typeof options === 'string') {
options = {
host: options,
- port: arguments[2],
- localAddress: arguments[3]
+ port,
+ localAddress
};
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
index 6a522b16b3..72297501f9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
@@ -6,6 +6,7 @@ var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
+var w = d * 7;
var y = d * 365.25;
/**
@@ -49,7 +50,7 @@ function parse(str) {
if (str.length > 100) {
return;
}
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
@@ -64,6 +65,10 @@ function parse(str) {
case 'yr':
case 'y':
return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
case 'days':
case 'day':
case 'd':
@@ -106,16 +111,17 @@ function parse(str) {
*/
function fmtShort(ms) {
- if (ms >= d) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
return Math.round(ms / d) + 'd';
}
- if (ms >= h) {
+ if (msAbs >= h) {
return Math.round(ms / h) + 'h';
}
- if (ms >= m) {
+ if (msAbs >= m) {
return Math.round(ms / m) + 'm';
}
- if (ms >= s) {
+ if (msAbs >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
@@ -130,23 +136,27 @@ function fmtShort(ms) {
*/
function fmtLong(ms) {
- return plural(ms, d, 'day') ||
- plural(ms, h, 'hour') ||
- plural(ms, m, 'minute') ||
- plural(ms, s, 'second') ||
- ms + ' ms';
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
}
/**
* Pluralization helper.
*/
-function plural(ms, n, name) {
- if (ms < n) {
- return;
- }
- if (ms < n * 1.5) {
- return Math.floor(ms / n) + ' ' + name;
- }
- return Math.ceil(ms / n) + ' ' + name + 's';
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
index 5bf17fa25e..550a885cd6 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
@@ -1,8 +1,8 @@
{
"_from": "ms@^2.0.0",
- "_id": "ms@2.0.0",
+ "_id": "ms@2.1.1",
"_inBundle": false,
- "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"_location": "/pacote/make-fetch-happen/agentkeepalive/humanize-ms/ms",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/agentkeepalive/humanize-ms"
],
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a",
"_spec": "ms@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms",
"bugs": {
@@ -27,13 +27,13 @@
},
"bundleDependencies": false,
"deprecated": false,
- "description": "Tiny milisecond conversion utility",
+ "description": "Tiny millisecond conversion utility",
"devDependencies": {
- "eslint": "3.19.0",
+ "eslint": "4.12.1",
"expect.js": "0.3.1",
- "husky": "0.13.3",
- "lint-staged": "3.4.1",
- "mocha": "3.4.1"
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
},
"eslintConfig": {
"extends": "eslint:recommended",
@@ -65,5 +65,5 @@
"precommit": "lint-staged",
"test": "mocha tests.js"
},
- "version": "2.0.0"
+ "version": "2.1.1"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
index 84a9974ccc..bb767293ac 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
@@ -17,35 +17,44 @@ ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
```
-### Convert from milliseconds
+### Convert from Milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
ms(ms('10 hours')) // "10h"
```
-### Time format written-out
+### Time Format Written-Out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
-- Works both in [node](https://nodejs.org) and in the browser.
-- If a number is supplied to `ms`, a string with a unit is returned.
-- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
-- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
-## Caught a bug?
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
-3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
As always, you can run the tests using: `npm test`
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
index a9f0b55de0..cfae50952e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
@@ -1,8 +1,8 @@
{
"_from": "agentkeepalive@^3.3.0",
- "_id": "agentkeepalive@3.3.0",
+ "_id": "agentkeepalive@3.4.0",
"_inBundle": false,
- "_integrity": "sha512-9yhcpXti2ZQE7bxuCsjjWNIZoQOd9sZ1ZBovHG0YeCRohFv73SLvcm73PC9T3olM4GyozaQb+4MGdQpcD8m7NQ==",
+ "_integrity": "sha512-RypT3apziwtLsJTtab5kzqADuzWaYVqFPQo7X8QSYuteaw9GGNPsB5fTy8BVcCVish3cD9yLroR7oUVlZybhpQ==",
"_location": "/pacote/make-fetch-happen/agentkeepalive",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.3.0.tgz",
- "_shasum": "6d5de5829afd3be2712201a39275fd11c651857c",
+ "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.0.tgz",
+ "_shasum": "92487926ec1a93100a89a8a46a6b2d82513543ce",
"_spec": "agentkeepalive@^3.3.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
@@ -33,7 +33,7 @@
},
"bundleDependencies": false,
"ci": {
- "version": "4.3.2, 4, 6, 7, 8"
+ "version": "4.3.2, 4, 6, 8, 9"
},
"dependencies": {
"humanize-ms": "^1.2.1"
@@ -78,5 +78,5 @@
"lint": "eslint lib test index.js",
"test": "egg-bin test"
},
- "version": "3.3.0"
+ "version": "3.4.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
index 5dc07ac58c..99069fc8d7 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md
@@ -155,6 +155,10 @@ if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
![satisfiesWithoutRevalidation](fresh.jpg)
+## Used by
+
+* [ImageOptim API](https://imageoptim.com/api), [make-fetch-happen](https://github.com/zkat/make-fetch-happen), [cacheable-request](https://www.npmjs.com/package/cacheable-request), [npm/registry-fetch](https://github.com/npm/registry-fetch), [etc.](https://github.com/pornel/http-cache-semantics/network/dependents)
+
## Implemented
* `Cache-Control` response header with all the quirks.
@@ -169,5 +173,5 @@ if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
## Unimplemented
-* Range requests, If-Range
+* Merging of range requests, If-Range (but correctly supports them as non-cacheable)
* Revalidation of multiple representations
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js
deleted file mode 100644
index 8a5bcab597..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js
+++ /dev/null
@@ -1,497 +0,0 @@
-'use strict';
-// rfc7231 6.1
-const statusCodeCacheableByDefault = [200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501];
-
-// This implementation does not understand partial responses (206)
-const understoodStatuses = [200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501];
-
-const hopByHopHeaders = {'connection':true, 'keep-alive':true, 'proxy-authenticate':true, 'proxy-authorization':true, 'te':true, 'trailer':true, 'transfer-encoding':true, 'upgrade':true};
-const excludedFromRevalidationUpdate = {
- // Since the old body is reused, it doesn't make sense to change properties of the body
- 'content-length': true, 'content-encoding': true, 'transfer-encoding': true,
- 'content-range': true,
-};
-
-function parseCacheControl(header) {
- const cc = {};
- if (!header) return cc;
-
- // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives),
- // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale
- const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing
- for(const part of parts) {
- const [k,v] = part.split(/\s*=\s*/, 2);
- cc[k] = (v === undefined) ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting
- }
-
- return cc;
-}
-
-function formatCacheControl(cc) {
- let parts = [];
- for(const k in cc) {
- const v = cc[k];
- parts.push(v === true ? k : k + '=' + v);
- }
- if (!parts.length) {
- return undefined;
- }
- return parts.join(', ');
-}
-
-module.exports = class CachePolicy {
- constructor(req, res, {shared, cacheHeuristic, immutableMinTimeToLive, ignoreCargoCult, _fromObject} = {}) {
- if (_fromObject) {
- this._fromObject(_fromObject);
- return;
- }
-
- if (!res || !res.headers) {
- throw Error("Response headers missing");
- }
- this._assertRequestHasHeaders(req);
-
- this._responseTime = this.now();
- this._isShared = shared !== false;
- this._cacheHeuristic = undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE
- this._immutableMinTtl = undefined !== immutableMinTimeToLive ? immutableMinTimeToLive : 24*3600*1000;
-
- this._status = 'status' in res ? res.status : 200;
- this._resHeaders = res.headers;
- this._rescc = parseCacheControl(res.headers['cache-control']);
- this._method = 'method' in req ? req.method : 'GET';
- this._url = req.url;
- this._host = req.headers.host;
- this._noAuthorization = !req.headers.authorization;
- this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used
- this._reqcc = parseCacheControl(req.headers['cache-control']);
-
- // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching,
- // so there's no point stricly adhering to the blindly copy&pasted directives.
- if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) {
- delete this._rescc['pre-check'];
- delete this._rescc['post-check'];
- delete this._rescc['no-cache'];
- delete this._rescc['no-store'];
- delete this._rescc['must-revalidate'];
- this._resHeaders = Object.assign({}, this._resHeaders, {'cache-control': formatCacheControl(this._rescc)});
- delete this._resHeaders.expires;
- delete this._resHeaders.pragma;
- }
-
- // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive
- // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1).
- if (!res.headers['cache-control'] && /no-cache/.test(res.headers.pragma)) {
- this._rescc['no-cache'] = true;
- }
- }
-
- now() {
- return Date.now();
- }
-
- storable() {
- // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it.
- return !!(!this._reqcc['no-store'] &&
- // A cache MUST NOT store a response to any request, unless:
- // The request method is understood by the cache and defined as being cacheable, and
- ('GET' === this._method || 'HEAD' === this._method || ('POST' === this._method && this._hasExplicitExpiration())) &&
- // the response status code is understood by the cache, and
- understoodStatuses.indexOf(this._status) !== -1 &&
- // the "no-store" cache directive does not appear in request or response header fields, and
- !this._rescc['no-store'] &&
- // the "private" response directive does not appear in the response, if the cache is shared, and
- (!this._isShared || !this._rescc.private) &&
- // the Authorization header field does not appear in the request, if the cache is shared,
- (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) &&
- // the response either:
- (
- // contains an Expires header field, or
- this._resHeaders.expires ||
- // contains a max-age response directive, or
- // contains a s-maxage response directive and the cache is shared, or
- // contains a public response directive.
- this._rescc.public || this._rescc['max-age'] || this._rescc['s-maxage'] ||
- // has a status code that is defined as cacheable by default
- statusCodeCacheableByDefault.indexOf(this._status) !== -1
- ));
- }
-
- _hasExplicitExpiration() {
- // 4.2.1 Calculating Freshness Lifetime
- return (this._isShared && this._rescc['s-maxage']) ||
- this._rescc['max-age'] ||
- this._resHeaders.expires;
- }
-
- _assertRequestHasHeaders(req) {
- if (!req || !req.headers) {
- throw Error("Request headers missing");
- }
- }
-
- satisfiesWithoutRevalidation(req) {
- this._assertRequestHasHeaders(req);
-
- // When presented with a request, a cache MUST NOT reuse a stored response, unless:
- // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive,
- // unless the stored response is successfully validated (Section 4.3), and
- const requestCC = parseCacheControl(req.headers['cache-control']);
- if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {
- return false;
- }
-
- if (requestCC['max-age'] && this.age() > requestCC['max-age']) {
- return false;
- }
-
- if (requestCC['min-fresh'] && this.timeToLive() < 1000*requestCC['min-fresh']) {
- return false;
- }
-
- // the stored response is either:
- // fresh, or allowed to be served stale
- if (this.stale()) {
- const allowsStale = requestCC['max-stale'] && !this._rescc['must-revalidate'] && (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge());
- if (!allowsStale) {
- return false;
- }
- }
-
- return this._requestMatches(req, false);
- }
-
- _requestMatches(req, allowHeadMethod) {
- // The presented effective request URI and that of the stored response match, and
- return (!this._url || this._url === req.url) &&
- (this._host === req.headers.host) &&
- // the request method associated with the stored response allows it to be used for the presented request, and
- (!req.method || this._method === req.method || (allowHeadMethod && 'HEAD' === req.method)) &&
- // selecting header fields nominated by the stored response (if any) match those presented, and
- this._varyMatches(req);
- }
-
- _allowsStoringAuthenticated() {
- // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.
- return this._rescc['must-revalidate'] || this._rescc.public || this._rescc['s-maxage'];
- }
-
- _varyMatches(req) {
- if (!this._resHeaders.vary) {
- return true;
- }
-
- // A Vary header field-value of "*" always fails to match
- if (this._resHeaders.vary === '*') {
- return false;
- }
-
- const fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
- for(const name of fields) {
- if (req.headers[name] !== this._reqHeaders[name]) return false;
- }
- return true;
- }
-
- _copyWithoutHopByHopHeaders(inHeaders) {
- const headers = {};
- for(const name in inHeaders) {
- if (hopByHopHeaders[name]) continue;
- headers[name] = inHeaders[name];
- }
- // 9.1. Connection
- if (inHeaders.connection) {
- const tokens = inHeaders.connection.trim().split(/\s*,\s*/);
- for(const name of tokens) {
- delete headers[name];
- }
- }
- if (headers.warning) {
- const warnings = headers.warning.split(/,/).filter(warning => {
- return !/^\s*1[0-9][0-9]/.test(warning);
- });
- if (!warnings.length) {
- delete headers.warning;
- } else {
- headers.warning = warnings.join(',').trim();
- }
- }
- return headers;
- }
-
- responseHeaders() {
- const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);
- const age = this.age();
-
- // A cache SHOULD generate 113 warning if it heuristically chose a freshness
- // lifetime greater than 24 hours and the response's age is greater than 24 hours.
- if (age > 3600*24 && !this._hasExplicitExpiration() && this.maxAge() > 3600*24) {
- headers.warning = (headers.warning ? `${headers.warning}, ` : '') + '113 - "rfc7234 5.5.4"';
- }
- headers.age = `${Math.round(age)}`;
- return headers;
- }
-
- /**
- * Value of the Date response header or current time if Date was demed invalid
- * @return timestamp
- */
- date() {
- const dateValue = Date.parse(this._resHeaders.date)
- const maxClockDrift = 8*3600*1000;
- if (Number.isNaN(dateValue) || dateValue < this._responseTime-maxClockDrift || dateValue > this._responseTime+maxClockDrift) {
- return this._responseTime;
- }
- return dateValue;
- }
-
- /**
- * Value of the Age header, in seconds, updated for the current time.
- * May be fractional.
- *
- * @return Number
- */
- age() {
- let age = Math.max(0, (this._responseTime - this.date())/1000);
- if (this._resHeaders.age) {
- let ageValue = this._ageValue();
- if (ageValue > age) age = ageValue;
- }
-
- const residentTime = (this.now() - this._responseTime)/1000;
- return age + residentTime;
- }
-
- _ageValue() {
- const ageValue = parseInt(this._resHeaders.age);
- return isFinite(ageValue) ? ageValue : 0;
- }
-
- /**
- * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
- *
- * For an up-to-date value, see `timeToLive()`.
- *
- * @return Number
- */
- maxAge() {
- if (!this.storable() || this._rescc['no-cache']) {
- return 0;
- }
-
- // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default
- // so this implementation requires explicit opt-in via public header
- if (this._isShared && (this._resHeaders['set-cookie'] && !this._rescc.public && !this._rescc.immutable)) {
- return 0;
- }
-
- if (this._resHeaders.vary === '*') {
- return 0;
- }
-
- if (this._isShared) {
- if (this._rescc['proxy-revalidate']) {
- return 0;
- }
- // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.
- if (this._rescc['s-maxage']) {
- return parseInt(this._rescc['s-maxage'], 10);
- }
- }
-
- // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.
- if (this._rescc['max-age']) {
- return parseInt(this._rescc['max-age'], 10);
- }
-
- const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;
-
- const dateValue = this.date();
- if (this._resHeaders.expires) {
- const expires = Date.parse(this._resHeaders.expires);
- // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired").
- if (Number.isNaN(expires) || expires < dateValue) {
- return 0;
- }
- return Math.max(defaultMinTtl, (expires - dateValue)/1000);
- }
-
- if (this._resHeaders['last-modified']) {
- const lastModified = Date.parse(this._resHeaders['last-modified']);
- if (isFinite(lastModified) && dateValue > lastModified) {
- return Math.max(defaultMinTtl, (dateValue - lastModified)/1000 * this._cacheHeuristic);
- }
- }
-
- return defaultMinTtl;
- }
-
- timeToLive() {
- return Math.max(0, this.maxAge() - this.age())*1000;
- }
-
- stale() {
- return this.maxAge() <= this.age();
- }
-
- static fromObject(obj) {
- return new this(undefined, undefined, {_fromObject:obj});
- }
-
- _fromObject(obj) {
- if (this._responseTime) throw Error("Reinitialized");
- if (!obj || obj.v !== 1) throw Error("Invalid serialization");
-
- this._responseTime = obj.t;
- this._isShared = obj.sh;
- this._cacheHeuristic = obj.ch;
- this._immutableMinTtl = obj.imm !== undefined ? obj.imm : 24*3600*1000;
- this._status = obj.st;
- this._resHeaders = obj.resh;
- this._rescc = obj.rescc;
- this._method = obj.m;
- this._url = obj.u;
- this._host = obj.h;
- this._noAuthorization = obj.a;
- this._reqHeaders = obj.reqh;
- this._reqcc = obj.reqcc;
- }
-
- toObject() {
- return {
- v:1,
- t: this._responseTime,
- sh: this._isShared,
- ch: this._cacheHeuristic,
- imm: this._immutableMinTtl,
- st: this._status,
- resh: this._resHeaders,
- rescc: this._rescc,
- m: this._method,
- u: this._url,
- h: this._host,
- a: this._noAuthorization,
- reqh: this._reqHeaders,
- reqcc: this._reqcc,
- };
- }
-
- /**
- * Headers for sending to the origin server to revalidate stale response.
- * Allows server to return 304 to allow reuse of the previous response.
- *
- * Hop by hop headers are always stripped.
- * Revalidation headers may be added or removed, depending on request.
- */
- revalidationHeaders(incomingReq) {
- this._assertRequestHasHeaders(incomingReq);
- const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
-
- // This implementation does not understand range requests
- delete headers['if-range'];
-
- if (!this._requestMatches(incomingReq, true) || !this.storable()) { // revalidation allowed via HEAD
- // not for the same resource, or wasn't allowed to be cached anyway
- delete headers['if-none-match'];
- delete headers['if-modified-since'];
- return headers;
- }
-
- /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */
- if (this._resHeaders.etag) {
- headers['if-none-match'] = headers['if-none-match'] ? `${headers['if-none-match']}, ${this._resHeaders.etag}` : this._resHeaders.etag;
- }
-
- // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request.
- const forbidsWeakValidators = headers['accept-ranges'] || headers['if-match'] || headers['if-unmodified-since'] || (this._method && this._method != 'GET');
-
- /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server.
- Note: This implementation does not understand partial responses (206) */
- if (forbidsWeakValidators) {
- delete headers['if-modified-since'];
-
- if (headers['if-none-match']) {
- const etags = headers['if-none-match'].split(/,/).filter(etag => {
- return !/^\s*W\//.test(etag);
- });
- if (!etags.length) {
- delete headers['if-none-match'];
- } else {
- headers['if-none-match'] = etags.join(',').trim();
- }
- }
- } else if (this._resHeaders['last-modified'] && !headers['if-modified-since']) {
- headers['if-modified-since'] = this._resHeaders['last-modified'];
- }
-
- return headers;
- }
-
- /**
- * Creates new CachePolicy with information combined from the previews response,
- * and the new revalidation response.
- *
- * Returns {policy, modified} where modified is a boolean indicating
- * whether the response body has been modified, and old cached body can't be used.
- *
- * @return {Object} {policy: CachePolicy, modified: Boolean}
- */
- revalidatedPolicy(request, response) {
- this._assertRequestHasHeaders(request);
- if (!response || !response.headers) {
- throw Error("Response headers missing");
- }
-
- // These aren't going to be supported exactly, since one CachePolicy object
- // doesn't know about all the other cached objects.
- let matches = false;
- if (response.status !== undefined && response.status != 304) {
- matches = false;
- } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) {
- // "All of the stored responses with the same strong validator are selected.
- // If none of the stored responses contain the same strong validator,
- // then the cache MUST NOT use the new response to update any stored responses."
- matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//,'') === response.headers.etag;
- } else if (this._resHeaders.etag && response.headers.etag) {
- // "If the new response contains a weak validator and that validator corresponds
- // to one of the cache's stored responses,
- // then the most recent of those matching stored responses is selected for update."
- matches = this._resHeaders.etag.replace(/^\s*W\//,'') === response.headers.etag.replace(/^\s*W\//,'');
- } else if (this._resHeaders['last-modified']) {
- matches = this._resHeaders['last-modified'] === response.headers['last-modified'];
- } else {
- // If the new response does not include any form of validator (such as in the case where
- // a client generates an If-Modified-Since request from a source other than the Last-Modified
- // response header field), and there is only one stored response, and that stored response also
- // lacks a validator, then that stored response is selected for update.
- if (!this._resHeaders.etag && !this._resHeaders['last-modified'] &&
- !response.headers.etag && !response.headers['last-modified']) {
- matches = true;
- }
- }
-
- if (!matches) {
- return {
- policy: new this.constructor(request, response),
- modified: true,
- }
- }
-
- // use other header fields provided in the 304 (Not Modified) response to replace all instances
- // of the corresponding header fields in the stored response.
- const headers = {};
- for(const k in this._resHeaders) {
- headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k];
- }
-
- const newResponse = Object.assign({}, response, {
- status: this._status,
- method: this._method,
- headers,
- });
- return {
- policy: new this.constructor(request, newResponse),
- modified: false,
- };
- }
-};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
index af46309985..bd6d4dbe86 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json
@@ -1,26 +1,26 @@
{
- "_from": "http-cache-semantics@^3.7.3",
- "_id": "http-cache-semantics@3.8.0",
+ "_from": "http-cache-semantics@^3.8.0",
+ "_id": "http-cache-semantics@3.8.1",
"_inBundle": false,
- "_integrity": "sha512-HGQFfBdru2fj/dwPn1oLx1fy6QMPeTAD1yzKcxD4l5biw+5QVaui/ehCqxaitoKJC/vHMLKv3Yd+nTlxboOJig==",
+ "_integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==",
"_location": "/pacote/make-fetch-happen/http-cache-semantics",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "http-cache-semantics@^3.7.3",
+ "raw": "http-cache-semantics@^3.8.0",
"name": "http-cache-semantics",
"escapedName": "http-cache-semantics",
- "rawSpec": "^3.7.3",
+ "rawSpec": "^3.8.0",
"saveSpec": null,
- "fetchSpec": "^3.7.3"
+ "fetchSpec": "^3.8.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.0.tgz",
- "_shasum": "1e3ce248730e189ac692a6697b9e3fdea2ff8da3",
- "_spec": "http-cache-semantics@^3.7.3",
+ "_resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
+ "_shasum": "39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2",
+ "_spec": "http-cache-semantics@^3.8.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "Kornel Lesiński",
@@ -35,13 +35,11 @@
"description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies",
"devDependencies": {
"babel-cli": "^6.24.1",
- "babel-preset-env": "^1.5.2",
+ "babel-preset-env": "^1.6.1",
"mocha": "^3.4.2"
},
"files": [
- "node4/index.js",
- "index.js",
- "test"
+ "node4/index.js"
],
"homepage": "https://github.com/pornel/http-cache-semantics#readme",
"license": "BSD-2-Clause",
@@ -56,5 +54,5 @@
"prepublish": "npm run compile",
"test": "npm run compile; mocha node4/test"
},
- "version": "3.8.0"
+ "version": "3.8.1"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js
deleted file mode 100644
index 643567d962..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-
-describe('Other', function() {
- it('Thaw wrong object', function() {
- assert.throws(() => {
- CachePolicy.fromObject({});
- });
- });
-
- it('Missing headers', function() {
- assert.throws(() => {
- new CachePolicy({});
- });
- assert.throws(() => {
- new CachePolicy({headers:{}}, {});
- });
-
- const cache = new CachePolicy({headers:{}}, {headers:{}});
- assert.throws(() => {
- cache.satisfiesWithoutRevalidation({});
- });
- assert.throws(() => {
- cache.revalidatedPolicy({});
- });
- assert.throws(() => {
- cache.revalidatedPolicy({headers:{}}, {});
- });
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js
deleted file mode 100644
index 315f114ae8..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js
+++ /dev/null
@@ -1,301 +0,0 @@
-'use strict';
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('okhttp tests', function(){
- it('responseCachingByResponseCode', function(){
- // Test each documented HTTP/1.1 code, plus the first unused value in each range.
- // http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
-
- assertCached(false, 100);
- assertCached(false, 101);
- assertCached(false, 102);
- assertCached(true, 200);
- assertCached(false, 201);
- assertCached(false, 202);
- assertCached(true, 203);
- assertCached(true, 204);
- assertCached(false, 205);
- assertCached(false, 206); //Electing to not cache partial responses
- assertCached(false, 207);
- assertCached(true, 300);
- assertCached(true, 301);
- assertCached(true, 302);
- // assertCached(false, 303);
- assertCached(false, 304);
- assertCached(false, 305);
- assertCached(false, 306);
- assertCached(true, 307);
- assertCached(true, 308);
- assertCached(false, 400);
- assertCached(false, 401);
- assertCached(false, 402);
- assertCached(false, 403);
- assertCached(true, 404);
- assertCached(true, 405);
- assertCached(false, 406);
- assertCached(false, 408);
- assertCached(false, 409);
- // the HTTP spec permits caching 410s, but the RI doesn't.
- assertCached(true, 410);
- assertCached(false, 411);
- assertCached(false, 412);
- assertCached(false, 413);
- assertCached(true, 414);
- assertCached(false, 415);
- assertCached(false, 416);
- assertCached(false, 417);
- assertCached(false, 418);
- assertCached(false, 429);
-
- assertCached(false, 500);
- assertCached(true, 501);
- assertCached(false, 502);
- assertCached(false, 503);
- assertCached(false, 504);
- assertCached(false, 505);
- assertCached(false, 506);
- });
-
- function assertCached(shouldPut, responseCode) {
- let expectedResponseCode = responseCode;
-
- const mockResponse = {headers:{
- "last-modified": formatDate(-1, 3600),
- "expires": formatDate(1, 3600),
- "www-authenticate": "challenge",
- },
- status: responseCode,
- body: "ABCDE",
- };
- if (responseCode == 407) {
- mockResponse.headers["proxy-authenticate"] = "Basic realm=\"protected area\"";
- } else if (responseCode == 401) {
- mockResponse.headers["www-authenticate"] = "Basic realm=\"protected area\"";
- } else if (responseCode == 204 || responseCode == 205) {
- mockResponse.body = ""; // We forbid bodies for 204 and 205.
- }
-
- const request = {url: "/", headers:{}};
-
- const cache = new CachePolicy(request, mockResponse, {shared:false});
-
- assert.equal(shouldPut, cache.storable());
- }
-
-
- it('defaultExpirationDateFullyCachedForLessThan24Hours', function() {
- // last modified: 105 seconds ago
- // served: 5 seconds ago
- // default lifetime: (105 - 5) / 10 = 10 seconds
- // expires: 10 seconds from served date = 5 seconds from now
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-105, 1),
- "date": formatDate(-5, 1),
- },
- body: "A"}, {shared:false});
-
- assert(cache.timeToLive() > 4000);
- });
-
- it('defaultExpirationDateFullyCachedForMoreThan24Hours', function() {
- // last modified: 105 days ago
- // served: 5 days ago
- // default lifetime: (105 - 5) / 10 = 10 days
- // expires: 10 days from served date = 5 days from now
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-105, 3600*24),
- "date": formatDate(-5, 3600*24),
- },
- body: "A"}, {shared:false});
-
- assert(cache.maxAge() >= 10*3600*24);
- assert(cache.timeToLive()+1000 >= 5*3600*24);
- });
-
- it('maxAgeInThePastWithDateHeaderButNoLastModifiedHeader', function() {
- // Chrome interprets max-age relative to the local clock. Both our cache
- // and Firefox both use the earlier of the local and server's clock.
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-120, 1),
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(cache.stale());
- });
-
- it('maxAgePreferredOverLowerSharedMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-2, 60),
- "cache-control": "s-maxage=60, max-age=180",
- }}, {shared:false});
-
- assert.equal(cache.maxAge(), 180);
- });
-
- it('maxAgePreferredOverHigherMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "date": formatDate(-3, 60),
- "cache-control": "s-maxage=60, max-age=180",
- }}, {shared:false});
-
- assert(cache.stale());
- });
-
- it('requestMethodOptionsIsNotCached', function() {
- testRequestMethodNotCached("OPTIONS");
- });
-
- it('requestMethodPutIsNotCached', function() {
- testRequestMethodNotCached("PUT");
- });
-
- it('requestMethodDeleteIsNotCached', function() {
- testRequestMethodNotCached("DELETE");
- });
-
- it('requestMethodTraceIsNotCached', function() {
- testRequestMethodNotCached("TRACE");
- });
-
- function testRequestMethodNotCached(method) {
- // 1. seed the cache (potentially)
- // 2. expect a cache hit or miss
- const cache = new CachePolicy({method, headers:{}}, {headers:{
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(cache.stale());
- }
-
- it('etagAndExpirationDateInTheFuture', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "etag": "v1",
- "last-modified": formatDate(-2, 3600),
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(cache.timeToLive() > 0);
- });
-
- it('clientSideNoStore', function() {
- const cache = new CachePolicy({headers:{
- "cache-control": "no-store",
- }}, {headers:{
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(!cache.storable());
- });
-
- it('requestMaxAge', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "last-modified": formatDate(-2, 3600),
- "date": formatDate(-1, 60),
- "expires": formatDate(1, 3600),
- }}, {shared:false});
-
- assert(!cache.stale());
- assert(cache.age() >= 60);
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-age=90",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-age=30",
- }}));
- });
-
- it('requestMinFresh', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=60",
- }}, {shared:false});
-
- assert(!cache.stale());
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "min-fresh=120",
- }}));
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "min-fresh=10",
- }}));
- });
-
- it('requestMaxStale', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=120",
- "date": formatDate(-4, 60),
- }}, {shared:false});
-
- assert(cache.stale());
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=180",
- }}));
-
- assert(cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=10",
- }}));
- });
-
- it('requestMaxStaleNotHonoredWithMustRevalidate', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "cache-control": "max-age=120, must-revalidate",
- "date": formatDate(-4, 60),
- }}, {shared:false});
-
- assert(cache.stale());
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale=180",
- }}));
-
- assert(!cache.satisfiesWithoutRevalidation({headers:{
- "cache-control": "max-stale",
- }}));
- });
-
- it('getHeadersDeletesCached100LevelWarnings', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "warning": "199 test danger, 200 ok ok",
- }});
-
- assert.equal("200 ok ok", cache.responseHeaders().warning);
- });
-
- it('doNotCachePartialResponse', function() {
- const cache = new CachePolicy({headers:{}}, {
- status: 206,
- headers:{
- "content-range": "bytes 100-100/200",
- "cache-control": "max-age=60",
- }});
- assert(!cache.storable());
- });
-
- function formatDate(delta, unit) {
- return new Date(Date.now() + delta*unit*1000).toUTCString();
- }
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js
deleted file mode 100644
index f668556ff8..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const publicCacheableResponse = {headers:{'cache-control': 'public, max-age=222'}};
-const cacheableResponse = {headers:{'cache-control': 'max-age=111'}};
-
-describe('Request properties', function() {
- it('No store kills cache', function() {
- const cache = new CachePolicy({method:'GET',headers:{'cache-control':'no-store'}}, publicCacheableResponse);
- assert(cache.stale());
- assert(!cache.storable());
- });
-
- it('POST not cacheable by default', function() {
- const cache = new CachePolicy({method:'POST',headers:{}}, {headers:{'cache-control': 'public'}});
- assert(cache.stale());
- assert(!cache.storable());
- });
-
- it('POST cacheable explicitly', function() {
- const cache = new CachePolicy({method:'POST',headers:{}}, publicCacheableResponse);
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Public cacheable auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, publicCacheableResponse);
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Proxy cacheable auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, {headers:{'cache-control':'max-age=0,s-maxage=12'}});
- assert(!cache.stale());
- assert(cache.storable());
-
- const cache2 = CachePolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof CachePolicy);
- assert(!cache2.stale());
- assert(cache2.storable());
- });
-
- it('Private auth is OK', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, cacheableResponse, {shared:false});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Revalidated auth is OK', function() {
- const cache = new CachePolicy({headers:{'authorization': 'test'}}, {headers:{'cache-control':'max-age=88,must-revalidate'}});
- assert(cache.storable());
- });
-
- it('Auth prevents caching by default', function() {
- const cache = new CachePolicy({method:'GET',headers:{'authorization': 'test'}}, cacheableResponse);
- assert(cache.stale());
- assert(!cache.storable());
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js
deleted file mode 100644
index 763910b82c..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js
+++ /dev/null
@@ -1,385 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const req = {method:'GET', headers:{}};
-
-describe('Response headers', function() {
- it('simple miss', function() {
- const cache = new CachePolicy(req, {headers:{}});
- assert(cache.stale());
- });
-
- it('simple hit', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'public, max-age=999999'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 999999);
- });
-
- it('weird syntax', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': ',,,,max-age = 456 ,'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 456);
-
- const cache2 = CachePolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof CachePolicy);
- assert(!cache2.stale());
- assert.equal(cache2.maxAge(), 456);
- });
-
- it('quoted syntax', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': ' max-age = "678" '}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 678);
- });
-
- it('IIS', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'private, public, max-age=259200'}}, {shared:false});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 259200);
- });
-
- it('pre-check tolerated', function() {
- const cc = 'pre-check=0, post-check=0, no-store, no-cache, max-age=100';
- const cache = new CachePolicy(req, {headers:{'cache-control': cc}});
- assert(cache.stale());
- assert(!cache.storable());
- assert.equal(cache.maxAge(), 0);
- assert.equal(cache.responseHeaders()['cache-control'], cc);
- });
-
- it('pre-check poison', function() {
- const origCC = 'pre-check=0, post-check=0, no-cache, no-store, max-age=100, custom, foo=bar';
- const res = {headers:{'cache-control': origCC, pragma: 'no-cache'}};
- const cache = new CachePolicy(req, res, {ignoreCargoCult:true});
- assert(!cache.stale());
- assert(cache.storable());
- assert.equal(cache.maxAge(), 100);
-
- const cc = cache.responseHeaders()['cache-control'];
- assert(!/pre-check/.test(cc), cc);
- assert(!/post-check/.test(cc), cc);
- assert(!/no-store/.test(cc), cc);
-
- assert(/max-age=100/.test(cc));
- assert(/custom(,|$)/.test(cc));
- assert(/foo=bar/.test(cc));
-
- assert.equal(res.headers['cache-control'], origCC);
- assert(res.headers['pragma']);
- assert(!cache.responseHeaders()['pragma']);
- });
-
- it('pre-check poison undefined header', function() {
- const origCC = 'pre-check=0, post-check=0, no-cache, no-store';
- const res = {headers:{'cache-control': origCC, expires: 'yesterday!'}};
- const cache = new CachePolicy(req, res, {ignoreCargoCult:true});
- assert(cache.stale());
- assert(cache.storable());
- assert.equal(cache.maxAge(), 0);
-
- const cc = cache.responseHeaders()['cache-control'];
- assert(!cc);
-
- assert(res.headers['expires']);
- assert(!cache.responseHeaders()['expires']);
- });
-
- it('cache with expires', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'expires': new Date(Date.now() + 2000).toGMTString(),
- }});
- assert(!cache.stale());
- assert.equal(2, cache.maxAge());
- });
-
- it('cache expires no date', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public',
- 'expires': new Date(Date.now()+3600*1000).toGMTString(),
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 3595);
- assert(cache.maxAge() < 3605);
- });
-
- it('Ages', function() {
- let now = 1000;
- class TimeTravellingPolicy extends CachePolicy {
- now() {
- return now;
- }
- }
- const cache = new TimeTravellingPolicy(req, {headers:{
- 'cache-control':'max-age=100',
- 'age': '50',
- }});
- assert(cache.storable());
-
- assert.equal(50*1000, cache.timeToLive());
- assert(!cache.stale());
- now += 48*1000;
- assert.equal(2*1000, cache.timeToLive());
- assert(!cache.stale());
- now += 5*1000;
- assert(cache.stale());
- assert.equal(0, cache.timeToLive());
- });
-
- it('Age can make stale', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=100',
- 'age': '101',
- }});
- assert(cache.stale());
- assert(cache.storable());
- });
-
- it('Age not always stale', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=20',
- 'age': '15',
- }});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('Bogus age ignored', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control':'max-age=20',
- 'age': 'golden',
- }});
- assert(!cache.stale());
- assert(cache.storable());
- });
-
- it('cache old files', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 100);
- });
-
- it('immutable simple hit', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'immutable, max-age=999999'}});
- assert(!cache.stale());
- assert.equal(cache.maxAge(), 999999);
- });
-
- it('immutable can expire', function() {
- const cache = new CachePolicy(req, {headers:{'cache-control': 'immutable, max-age=0'}});
- assert(cache.stale());
- assert.equal(cache.maxAge(), 0);
- });
-
- it('cache immutable files', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'cache-control':'immutable',
- 'last-modified': new Date().toGMTString(),
- }});
- assert(!cache.stale());
- assert(cache.maxAge() > 100);
- });
-
- it('immutable can be off', function() {
- const cache = new CachePolicy(req, {headers:{
- 'date': new Date().toGMTString(),
- 'cache-control':'immutable',
- 'last-modified': new Date().toGMTString(),
- }}, {immutableMinTimeToLive: 0});
- assert(cache.stale());
- assert.equal(cache.maxAge(), 0);
- });
-
- it('pragma: no-cache', function() {
- const cache = new CachePolicy(req, {headers:{
- 'pragma': 'no-cache',
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(cache.stale());
- });
-
- it('no-store', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'no-store, public, max-age=1',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('observe private cache', function() {
- const privateHeader = {
- 'cache-control': 'private, max-age=1234',
- };
- const proxyCache = new CachePolicy(req, {headers:privateHeader});
- assert(proxyCache.stale());
- assert.equal(0, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:privateHeader}, {shared:false});
- assert(!uaCache.stale());
- assert.equal(1234, uaCache.maxAge());
- });
-
- it('don\'t share cookies', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'max-age=99',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(proxyCache.stale());
- assert.equal(0, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:cookieHeader}, {shared:false});
- assert(!uaCache.stale());
- assert.equal(99, uaCache.maxAge());
- });
-
- it('do share cookies if immutable', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'immutable, max-age=99',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(!proxyCache.stale());
- assert.equal(99, proxyCache.maxAge());
- });
-
- it('cache explicitly public cookie', function() {
- const cookieHeader = {
- 'set-cookie': 'foo=bar',
- 'cache-control': 'max-age=5, public',
- };
- const proxyCache = new CachePolicy(req, {headers:cookieHeader}, {shared:true});
- assert(!proxyCache.stale());
- assert.equal(5, proxyCache.maxAge());
- });
-
- it('miss max-age=0', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=0',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('uncacheable 503', function() {
- const cache = new CachePolicy(req, {
- status: 503,
- headers:{
- 'cache-control': 'public, max-age=1000',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('cacheable 301', function() {
- const cache = new CachePolicy(req, {
- status: 301,
- headers:{
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(!cache.stale());
- });
-
- it('uncacheable 303', function() {
- const cache = new CachePolicy(req, {
- status: 303,
- headers:{
- 'last-modified': 'Mon, 07 Mar 2016 11:52:56 GMT',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('cacheable 303', function() {
- const cache = new CachePolicy(req, {
- status: 303,
- headers:{
- 'cache-control': 'max-age=1000',
- }});
- assert(!cache.stale());
- });
-
- it('uncacheable 412', function() {
- const cache = new CachePolicy(req, {
- status: 412,
- headers:{
- 'cache-control': 'public, max-age=1000',
- }});
- assert(cache.stale());
- assert.equal(0, cache.maxAge());
- });
-
- it('expired expires cached with max-age', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=9999',
- 'expires': 'Sat, 07 May 2016 15:35:18 GMT',
- }});
- assert(!cache.stale());
- assert.equal(9999, cache.maxAge());
- });
-
- it('expired expires cached with s-maxage', function() {
- const sMaxAgeHeaders = {
- 'cache-control': 'public, s-maxage=9999',
- 'expires': 'Sat, 07 May 2016 15:35:18 GMT',
- };
- const proxyCache = new CachePolicy(req, {headers:sMaxAgeHeaders});
- assert(!proxyCache.stale());
- assert.equal(9999, proxyCache.maxAge());
-
- const uaCache = new CachePolicy(req, {headers:sMaxAgeHeaders}, {shared:false});
- assert(uaCache.stale());
- assert.equal(0, uaCache.maxAge());
- });
-
- it('max-age wins over future expires', function() {
- const cache = new CachePolicy(req, {headers:{
- 'cache-control': 'public, max-age=333',
- 'expires': new Date(Date.now()+3600*1000).toGMTString(),
- }});
- assert(!cache.stale());
- assert.equal(333, cache.maxAge());
- });
-
- it('remove hop headers', function() {
- let now = 10000;
- class TimeTravellingPolicy extends CachePolicy {
- now() {
- return now;
- }
- }
-
- const res = {headers:{
- 'te': 'deflate',
- 'date': 'now',
- 'custom': 'header',
- 'oompa': 'lumpa',
- 'connection': 'close, oompa, header',
- 'age': '10',
- 'cache-control': 'public, max-age=333',
- }};
- const cache = new TimeTravellingPolicy(req, res);
-
- now += 1005;
- const h = cache.responseHeaders();
- assert(!h.connection);
- assert(!h.te);
- assert(!h.oompa);
- assert.equal(h['cache-control'], 'public, max-age=333');
- assert.equal(h.date, 'now', "date must stay the same for expires, age, etc");
- assert.equal(h.custom, 'header');
- assert.equal(h.age, '11');
- assert.equal(res.headers.age, '10');
-
- const cache2 = TimeTravellingPolicy.fromObject(JSON.parse(JSON.stringify(cache.toObject())));
- assert(cache2 instanceof TimeTravellingPolicy);
- const h2 = cache2.responseHeaders();
- assert.deepEqual(h, h2);
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js
deleted file mode 100644
index 9dc737718d..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js
+++ /dev/null
@@ -1,181 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const simpleRequest = {
- method:'GET',
- headers:{
- host:'www.w3c.org',
- connection: 'close',
- 'x-custom': 'yes',
- },
- url:'/Protocols/rfc2616/rfc2616-sec14.html',
-};
-function simpleRequestBut(overrides) {
- return Object.assign({}, simpleRequest, overrides);
-}
-
-const cacheableResponse = {headers:{'cache-control':'max-age=111'}};
-const etaggedResponse = {headers:Object.assign({'etag':'"123456789"'},cacheableResponse.headers)};
-const lastModifiedResponse = {headers:Object.assign({'last-modified':'Tue, 15 Nov 1994 12:45:26 GMT'},cacheableResponse.headers)};
-const multiValidatorResponse = {headers:Object.assign({},etaggedResponse.headers,lastModifiedResponse.headers)};
-const alwaysVariableResponse = {headers:Object.assign({'vary':'*'},cacheableResponse.headers)};
-
-function assertHeadersPassed(headers) {
- assert.strictEqual(headers.connection, undefined);
- assert.strictEqual(headers['x-custom'], 'yes');
-}
-function assertNoValidators(headers) {
- assert.strictEqual(headers['if-none-match'], undefined);
- assert.strictEqual(headers['if-modified-since'], undefined);
-}
-
-describe('Can be revalidated?', function() {
- it('ok if method changes to HEAD', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const headers = cache.revalidationHeaders(simpleRequestBut({method:'HEAD'}));
- assertHeadersPassed(headers);
- assert.equal(headers['if-none-match'], '"123456789"');
- });
-
- it('not if method mismatch (other than HEAD)', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({method:'POST'});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('not if url mismatch', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({url:'/yomomma'});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('not if host mismatch', function(){
- const cache = new CachePolicy(simpleRequest,etaggedResponse);
- const incomingRequest = simpleRequestBut({headers:{host:'www.w4c.org'}});
- const headers = cache.revalidationHeaders(incomingRequest);
- assertNoValidators(headers);
- assert.strictEqual(headers['x-custom'], undefined);
- });
-
- it('not if vary fields prevent', function(){
- const cache = new CachePolicy(simpleRequest,alwaysVariableResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- });
-
- it('when entity tag validator is present', function() {
- const cache = new CachePolicy(simpleRequest, etaggedResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assert.equal(headers['if-none-match'], '"123456789"');
- });
-
- it('skips weak validtors on post', function() {
- const postReq = simpleRequestBut({method:'POST', headers:{'if-none-match': 'W/"weak", "strong", W/"weak2"'}});
- const cache = new CachePolicy(postReq, multiValidatorResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.equal(headers['if-none-match'], '"strong", "123456789"');
- assert.strictEqual(undefined, headers['if-modified-since']);
- });
-
- it('skips weak validtors on post 2', function() {
- const postReq = simpleRequestBut({method:'POST', headers:{'if-none-match': 'W/"weak"'}});
- const cache = new CachePolicy(postReq, lastModifiedResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.strictEqual(undefined, headers['if-none-match']);
- assert.strictEqual(undefined, headers['if-modified-since']);
- });
-
- it('merges validtors', function() {
- const postReq = simpleRequestBut({headers:{'if-none-match': 'W/"weak", "strong", W/"weak2"'}});
- const cache = new CachePolicy(postReq, multiValidatorResponse);
- const headers = cache.revalidationHeaders(postReq);
- assert.equal(headers['if-none-match'], 'W/"weak", "strong", W/"weak2", "123456789"');
- assert.equal('Tue, 15 Nov 1994 12:45:26 GMT', headers['if-modified-since']);
- });
-
- it('when last-modified validator is present', function() {
- const cache = new CachePolicy(simpleRequest, lastModifiedResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assert.equal(headers['if-modified-since'], 'Tue, 15 Nov 1994 12:45:26 GMT');
- assert(!/113/.test(headers.warning));
- });
-
- it('not without validators', function() {
- const cache = new CachePolicy(simpleRequest, cacheableResponse);
- const headers = cache.revalidationHeaders(simpleRequest);
- assertHeadersPassed(headers);
- assertNoValidators(headers);
- assert(!/113/.test(headers.warning));
- })
-
- it('113 added', function() {
- const veryOldResponse = {
- headers: {
- age: 3600*72,
- 'last-modified': 'Tue, 15 Nov 1994 12:45:26 GMT',
- },
- };
-
- const cache = new CachePolicy(simpleRequest, veryOldResponse);
- const headers = cache.responseHeaders(simpleRequest);
- assert(/113/.test(headers.warning));
- })
-
-});
-
-describe('Validation request', function(){
- it('removes warnings', function() {
- const cache = new CachePolicy({headers:{}}, {headers:{
- "warning": "199 test danger",
- }});
-
- assert.strictEqual(undefined, cache.responseHeaders().warning);
- });
-
- it('must contain any etag', function(){
- const cache = new CachePolicy(simpleRequest,multiValidatorResponse);
- const expected = multiValidatorResponse.headers.etag;
- const actual = cache.revalidationHeaders(simpleRequest)['if-none-match'];
- assert.equal(actual,expected);
- });
-
- it('merges etags', function(){
- const cache = new CachePolicy(simpleRequest, etaggedResponse);
- const expected = `"foo", "bar", ${etaggedResponse.headers.etag}`;
- const headers = cache.revalidationHeaders(simpleRequestBut({headers:{
- host:'www.w3c.org',
- 'if-none-match': '"foo", "bar"',
- }}));
- assert.equal(headers['if-none-match'],expected);
- });
-
- it('should send the Last-Modified value', function(){
- const cache = new CachePolicy(simpleRequest,multiValidatorResponse);
- const expected = multiValidatorResponse.headers['last-modified'];
- const actual = cache.revalidationHeaders(simpleRequest)['if-modified-since'];
- assert.equal(actual,expected);
- });
-
- it('should not send the Last-Modified value for POST', function(){
- const postReq = {method:'POST', headers:{'if-modified-since':'yesterday'}};
- const cache = new CachePolicy(postReq, lastModifiedResponse);
- const actual = cache.revalidationHeaders(postReq)['if-modified-since'];
- assert.equal(actual, undefined);
- });
-
- it('should not send the Last-Modified value for range requests', function(){
- const rangeReq = {method:'GET', headers:{'accept-ranges':'1-3', 'if-modified-since':'yesterday'}};
- const cache = new CachePolicy(rangeReq, lastModifiedResponse);
- const actual = cache.revalidationHeaders(rangeReq)['if-modified-since'];
- assert.equal(actual, undefined);
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js
deleted file mode 100644
index 3131ee73d0..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('Satisfies', function() {
- it('when URLs match', function() {
- const policy = new CachePolicy({url:'/',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({url:'/',headers:{}}));
- });
-
- it('when expires is present', function() {
- const policy = new CachePolicy({headers:{}}, {status:302,headers:{'expires':new Date(Date.now()+2000).toGMTString()}});
- assert(policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('not when URLs mismatch', function() {
- const policy = new CachePolicy({url:'/foo',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({url:'/foo?bar',headers:{}}));
- });
-
- it('when methods match', function() {
- const policy = new CachePolicy({method:'GET',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when hosts mismatch', function() {
- const policy = new CachePolicy({headers:{'host':'foo'}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({headers:{'host':'foo'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'host':'foofoo'}}));
- });
-
- it('when methods match HEAD', function() {
- const policy = new CachePolicy({method:'HEAD',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({method:'HEAD',headers:{}}));
- });
-
- it('not when methods mismatch', function() {
- const policy = new CachePolicy({method:'POST',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when methods mismatch HEAD', function() {
- const policy = new CachePolicy({method:'HEAD',headers:{}}, {status:200,headers:{'cache-control':'max-age=2'}});
- assert(!policy.satisfiesWithoutRevalidation({method:'GET',headers:{}}));
- });
-
- it('not when proxy revalidating', function() {
- const policy = new CachePolicy({headers:{}}, {status:200,headers:{'cache-control':'max-age=2, proxy-revalidate '}});
- assert(!policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('when not a proxy revalidating', function() {
- const policy = new CachePolicy({headers:{}}, {status:200,headers:{'cache-control':'max-age=2, proxy-revalidate '}}, {shared:false});
- assert(policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('not when no-cache requesting', function() {
- const policy = new CachePolicy({headers:{}}, {headers:{'cache-control':'max-age=2'}});
- assert(policy.satisfiesWithoutRevalidation({headers:{'cache-control':'fine'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'cache-control':'no-cache'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'pragma':'no-cache'}}));
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js
deleted file mode 100644
index 6d498c86e3..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-const simpleRequest = {
- method:'GET',
- headers:{
- host:'www.w3c.org',
- connection: 'close',
- },
- url:'/Protocols/rfc2616/rfc2616-sec14.html',
-};
-function withHeaders(request, headers) {
- return Object.assign({}, request, {
- headers: Object.assign({}, request.headers, headers),
- });
-}
-
-const cacheableResponse = {headers:{'cache-control':'max-age=111'}};
-const etaggedResponse = {headers:Object.assign({'etag':'"123456789"'},cacheableResponse.headers)};
-const weakTaggedResponse = {headers:Object.assign({'etag':'W/"123456789"'},cacheableResponse.headers)};
-const lastModifiedResponse = {headers:Object.assign({'last-modified':'Tue, 15 Nov 1994 12:45:26 GMT'},cacheableResponse.headers)};
-const multiValidatorResponse = {headers:Object.assign({},etaggedResponse.headers,lastModifiedResponse.headers)};
-
-function notModifiedResponseHeaders(firstRequest, firstResponse, secondRequest, secondResponse) {
- const cache = new CachePolicy(firstRequest, firstResponse);
- const headers = cache.revalidationHeaders(secondRequest);
- const {policy:newCache, modified} = cache.revalidatedPolicy({headers}, secondResponse);
- if (modified) {
- return false;
- }
- return newCache.responseHeaders();
-}
-
-function assertUpdates(firstRequest, firstResponse, secondRequest, secondResponse) {
- const headers = notModifiedResponseHeaders(firstRequest, withHeaders(firstResponse, {'foo': 'original', 'x-other':'original'}),
- secondRequest, withHeaders(secondResponse, {'foo': 'updated', 'x-ignore-new':'ignoreme'}));
- assert(headers);
- assert.equal(headers['foo'], 'updated');
- assert.equal(headers['x-other'], 'original');
- assert.strictEqual(headers['x-ignore-new'], undefined);
- assert.strictEqual(headers['etag'], secondResponse.headers.etag);
-}
-
-describe('Update revalidated', function() {
- it('Matching etags are updated', function(){
- assertUpdates(simpleRequest, etaggedResponse, simpleRequest, etaggedResponse);
- });
-
- it('Matching weak etags are updated', function(){
- assertUpdates(simpleRequest, weakTaggedResponse, simpleRequest, weakTaggedResponse);
- });
-
- it('Matching lastmod are updated', function(){
- assertUpdates(simpleRequest, lastModifiedResponse, simpleRequest, lastModifiedResponse);
- });
-
- it('Both matching are updated', function(){
- assertUpdates(simpleRequest, multiValidatorResponse, simpleRequest, multiValidatorResponse);
- });
-
- it('Checks status', function(){
- const response304 = Object.assign({}, multiValidatorResponse, {status:304});
- const response200 = Object.assign({}, multiValidatorResponse, {status:200});
- assertUpdates(simpleRequest, multiValidatorResponse, simpleRequest, response304);
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, response200));
- });
-
- it('Last-mod ignored if etag is wrong', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, withHeaders(multiValidatorResponse, {'etag':'bad'})));
- assert(!notModifiedResponseHeaders(simpleRequest, multiValidatorResponse, simpleRequest, withHeaders(multiValidatorResponse, {'etag':'W/bad'})));
- });
-
- it('Ignored if validator is missing', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, cacheableResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, weakTaggedResponse, simpleRequest, cacheableResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, cacheableResponse));
- });
-
- it('Skips update of content-length', function(){
- const etaggedResponseWithLenght1 = withHeaders(etaggedResponse, {'content-length':1});
- const etaggedResponseWithLenght2 = withHeaders(etaggedResponse, {'content-length':2});
- const headers = notModifiedResponseHeaders(simpleRequest, etaggedResponseWithLenght1, simpleRequest, etaggedResponseWithLenght2);
- assert.equal(1, headers['content-length']);
- });
-
- it('Ignored if validator is different', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, etaggedResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, weakTaggedResponse));
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, lastModifiedResponse));
- });
-
- it('Ignored if validator doesn\'t match', function(){
- assert(!notModifiedResponseHeaders(simpleRequest, etaggedResponse, simpleRequest, withHeaders(etaggedResponse, {etag:'"other"'})), "bad etag");
- assert(!notModifiedResponseHeaders(simpleRequest, lastModifiedResponse, simpleRequest, withHeaders(lastModifiedResponse, {'last-modified':'dunno'})), "bad lastmod");
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js
deleted file mode 100644
index 9d5cfb2325..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const CachePolicy = require('..');
-
-describe('Vary', function() {
- it('Basic', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- });
-
- it("* doesn't match", function() {
- const policy = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'max-age=5','vary':'*'}});
-
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'ok'}}));
- });
-
- it("* is stale", function() {
- const policy1 = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'public,max-age=99', 'vary':'*'}});
- const policy2 = new CachePolicy({headers:{'weather': 'ok'}}, {headers:{'cache-control':'public,max-age=99', 'vary':'weather'}});
-
- assert(policy1.stale());
- assert(!policy2.stale());
- });
-
- it('Values are case-sensitive', function() {
- const policy = new CachePolicy({headers:{'weather': 'BAD'}}, {headers:{'cache-control':'max-age=5','vary':'Weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'BAD'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- });
-
- it('Irrelevant headers ignored', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'moon-phase'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'bad'}}));
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'moon-phase': 'full'}}));
- });
-
- it('Absence is meaningful', function() {
- const policy = new CachePolicy({headers:{'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'moon-phase, weather'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'moon-phase': ''}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{}}));
- });
-
- it('All values must match', function() {
- const policy = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather, sun'}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'bad'}}));
- });
-
- it('Whitespace is OK', function() {
- const policy = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':' weather , sun '}});
-
- assert(policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'weather': 'nice'}}));
- assert(!policy.satisfiesWithoutRevalidation({headers:{'sun': 'shining'}}));
- });
-
- it('Order is irrelevant', function() {
- const policy1 = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'weather, sun'}});
- const policy2 = new CachePolicy({headers:{'sun': 'shining', 'weather': 'nice'}}, {headers:{'cache-control':'max-age=5','vary':'sun, weather'}});
-
- assert(policy1.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'sun': 'shining'}}));
- assert(policy1.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- assert(policy2.satisfiesWithoutRevalidation({headers:{'weather': 'nice', 'sun': 'shining'}}));
- assert(policy2.satisfiesWithoutRevalidation({headers:{'sun': 'shining', 'weather': 'nice'}}));
- });
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.npmignore
deleted file mode 100644
index 07e6e472cc..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md
index 5dabbc6950..7e3e1e7836 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md
@@ -1,4 +1,11 @@
+2.1.0 / 2018-03-03
+==================
+
+ * Add "engines" to package.json
+ * Use `Buffer.from()`
+ * Update package.json - outdated debug version (#7)
+
2.0.0 / 2017-06-27
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js
index 4bc9704a10..f90a5297ca 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js
@@ -75,9 +75,11 @@ HttpProxyAgent.prototype.callback = function connect (req, opts, fn) {
req.path = absolute;
// inject the `Proxy-Authorization` header if necessary
- var auth = proxy.auth;
- if (auth) {
- req.setHeader('Proxy-Authorization', 'Basic ' + new Buffer(auth).toString('base64'));
+ if (proxy.auth) {
+ req.setHeader(
+ 'Proxy-Authorization',
+ 'Basic ' + Buffer.from(proxy.auth).toString('base64')
+ );
}
// create a socket connection to the proxy server
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
index e12180e423..80c88dc401 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,12 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
4.1.2 / 2017-11-20
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT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,AACnB,;;,;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GA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/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;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nD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAA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C,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAA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,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,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AAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC,EAAE;;;;IAIb,IAAI,iBAAiB,EAAE;MACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;KAC1B,MAAM;MACL,aAAa,EAAE,CAAC;KACjB;GACF;CACF,CAAC;;AAEF,AAEA,SAAS,YAAY,CAAC,UAAU,EA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AAE;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;GACrC;CACF;;ACtXD;AACA,AAEA,AACA,AACA,SAASO,UAAQ,GAAG;IAChB,IAAI,KAAK,GAAG,SAAS,CAAC;;IAEtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,KAAK,GAAG,MAAM,CAAC;KAClB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACpC,KAAK,GAAG,IAAI,CAAC;KAChB,MAAM;QACH,IAAI;YACA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;SACrC,CAAC,OAAO,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;SAC/F;KACJ;;IAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,AAAO,IAAI,OAAO,GAAG,QAAQ;;ACtB7B,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;AACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;;AA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,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index 26008ffa00..282a0c1fff 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
index 952a19a778..ad442f3a17 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@4",
- "_id": "agent-base@4.1.2",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/http-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.2.tgz",
- "_shasum": "80fa6cde440f4dcf9af2617cf246099b5d99f0c8",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@4",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.2"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
index 3891c13a8b..47d26a72b0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml
index 6c6090c3b0..a764300377 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml
@@ -1,14 +1,20 @@
+sudo: false
language: node_js
+
node_js:
- - "6"
- - "5"
- "4"
+ - "6"
+ - "8"
install:
- - make node_modules
+ - make install
script:
- make lint
- make test
- - make coveralls
+
+matrix:
+ include:
+ - node_js: '8'
+ env: BROWSER=1
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md
index 553da1585e..609591bbbf 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md
@@ -1,4 +1,37 @@
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
2.6.9 / 2017-09-22
==================
@@ -27,7 +60,7 @@
2.6.4 / 2017-04-20
==================
- * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile
index 584da8bf93..3ddd1360e6 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile
@@ -15,36 +15,44 @@ YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
-.FORCE:
-
install: node_modules
+browser: dist/debug.js
+
node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules
-lint: .FORCE
- eslint browser.js debug.js index.js node.js
-
-test-node: .FORCE
- istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
-
-test-browser: .FORCE
- mkdir -p dist
-
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
- karma start --single-run
- rimraf dist
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
-test: .FORCE
- concurrently \
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
"make test-node" \
"make test-browser"
-coveralls:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
-.PHONY: all install clean distclean
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md
index bc59ae86e8..8e754d17b1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md
@@ -2,11 +2,10 @@
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-A tiny node.js debugging utility modelled after node core's debugging technique.
-
-**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
## Installation
@@ -18,7 +17,7 @@ $ npm install debug
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
-Example _app.js_:
+Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
@@ -27,7 +26,7 @@ var debug = require('debug')('http')
// fake app
-debug('booting %s', name);
+debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
@@ -41,81 +40,128 @@ http.createServer(function(req, res){
require('./worker');
```
-Example _worker.js_:
+Example [_worker.js_](./examples/node/worker.js):
```js
-var debug = require('debug')('worker');
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
-setInterval(function(){
- debug('doing some work');
-}, 1000);
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
```
- The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
- ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+Here are some examples:
- ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows note
- On Windows the environment variable is set using the `set` command.
+On Windows the environment variable is set using the `set` command.
- ```cmd
- set DEBUG=*,-not_this
- ```
+```cmd
+set DEBUG=*,-not_this
+```
- Note that PowerShell uses different syntax to set environment variables.
+Note that PowerShell uses different syntax to set environment variables.
- ```cmd
- $env:DEBUG = "*,-not_this"
- ```
+```cmd
+$env:DEBUG = "*,-not_this"
+```
Then, run the program to be debugged as usual.
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
## Millisecond diff
- When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
- ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
- When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
- ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
## Conventions
- If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
- The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
- You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
## Environment Variables
- When running through Node.js, you can set a few environment variables that will
- change the behavior of the debug logging:
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
-| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
- __Note:__ The environment variables beginning with `DEBUG_` end up being
- converted into an Options object that gets used with `%o`/`%O` formatters.
- See the Node.js documentation for
- [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
- for the complete list.
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
## Formatters
-
- Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
@@ -126,9 +172,12 @@ Then, run the program to be debugged as usual.
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
### Custom formatters
- You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
```js
const createDebug = require('debug')
@@ -142,14 +191,16 @@ debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
-## Browser support
- You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
- or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
- if you don't want to build it yourself.
- Debug's enable state is currently persisted by `localStorage`.
- Consider the situation shown below where you have `worker:a` and `worker:b`,
- and wish to debug both. You can enable this using `localStorage.debug`:
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
@@ -170,23 +221,12 @@ setInterval(function(){
}, 1200);
```
-#### Web Inspector Colors
-
- Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
- option. These are WebKit web inspectors, Firefox ([since version
- 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
- and the Firebug plugin for Firefox (any version).
-
- Colored output looks something like:
-
- ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
-
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
-Example _stdout.js_:
+Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
@@ -208,6 +248,22 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
## Authors
@@ -290,7 +346,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
(The MIT License)
-Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json
deleted file mode 100644
index 9de26410f0..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "debug",
- "repo": "visionmedia/debug",
- "description": "small debugging utility",
- "version": "2.6.9",
- "keywords": [
- "debug",
- "log",
- "debugger"
- ],
- "main": "src/browser.js",
- "scripts": [
- "src/browser.js",
- "src/debug.js"
- ],
- "dependencies": {
- "rauchg/ms.js": "0.7.1"
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json
index 3ec58fe84b..8c7a527f19 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json
@@ -1,26 +1,26 @@
{
- "_from": "debug@2",
- "_id": "debug@2.6.9",
+ "_from": "debug@3.1.0",
+ "_id": "debug@3.1.0",
"_inBundle": false,
- "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"_location": "/pacote/make-fetch-happen/http-proxy-agent/debug",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "debug@2",
+ "raw": "debug@3.1.0",
"name": "debug",
"escapedName": "debug",
- "rawSpec": "2",
+ "rawSpec": "3.1.0",
"saveSpec": null,
- "fetchSpec": "2"
+ "fetchSpec": "3.1.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen/http-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
- "_spec": "debug@2",
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@3.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent",
"author": {
"name": "TJ Holowaychuk",
@@ -31,12 +31,6 @@
"url": "https://github.com/visionmedia/debug/issues"
},
"bundleDependencies": false,
- "component": {
- "scripts": {
- "debug/index.js": "browser.js",
- "debug/debug.js": "debug.js"
- }
- },
"contributors": [
{
"name": "Nathan Rajlich",
@@ -54,7 +48,7 @@
"deprecated": false,
"description": "small debugging utility",
"devDependencies": {
- "browserify": "9.0.3",
+ "browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^2.11.15",
@@ -84,5 +78,5 @@
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
- "version": "2.6.9"
+ "version": "3.1.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js
index 7106924934..f5149ff529 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js
@@ -20,12 +20,17 @@ exports.storage = 'undefined' != typeof chrome
*/
exports.colors = [
- 'lightseagreen',
- 'forestgreen',
- 'goldenrod',
- 'dodgerblue',
- 'darkorchid',
- 'crimson'
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
];
/**
@@ -44,6 +49,11 @@ function useColors() {
return true;
}
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
// is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js
index 6a5e3fc94c..77e6384a33 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js
@@ -14,6 +14,11 @@ exports.enabled = enabled;
exports.humanize = require('ms');
/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
* The currently active debug mode names, and names to skip.
*/
@@ -29,12 +34,6 @@ exports.skips = [];
exports.formatters = {};
/**
- * Previous log timestamp.
- */
-
-var prevTime;
-
-/**
* Select a color.
* @param {String} namespace
* @return {Number}
@@ -62,6 +61,8 @@ function selectColor(namespace) {
function createDebug(namespace) {
+ var prevTime;
+
function debug() {
// disabled?
if (!debug.enabled) return;
@@ -118,15 +119,28 @@ function createDebug(namespace) {
debug.enabled = exports.enabled(namespace);
debug.useColors = exports.useColors();
debug.color = selectColor(namespace);
+ debug.destroy = destroy;
// env-specific initialization logic for debug instances
if ('function' === typeof exports.init) {
exports.init(debug);
}
+ exports.instances.push(debug);
+
return debug;
}
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
@@ -141,10 +155,11 @@ function enable(namespaces) {
exports.names = [];
exports.skips = [];
+ var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
- for (var i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
@@ -153,6 +168,11 @@ function enable(namespaces) {
exports.names.push(new RegExp('^' + namespaces + '$'));
}
}
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
}
/**
@@ -174,6 +194,9 @@ function disable() {
*/
function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
if (exports.skips[i].test(name)) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js
index e12cf4d58c..cabcbcda13 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js
@@ -3,7 +3,7 @@
* treat as a browser.
*/
-if (typeof process !== 'undefined' && process.type === 'renderer') {
+if (typeof process === 'undefined' || process.type === 'renderer') {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/inspector-log.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/inspector-log.js
deleted file mode 100644
index 60ea6c04aa..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/inspector-log.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = inspectorLog;
-
-// black hole
-const nullStream = new (require('stream').Writable)();
-nullStream._write = () => {};
-
-/**
- * Outputs a `console.log()` to the Node.js Inspector console *only*.
- */
-function inspectorLog() {
- const stdout = console._stdout;
- console._stdout = nullStream;
- console.log.apply(console, arguments);
- console._stdout = stdout;
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js
index b15109c905..d666fb9c00 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js
@@ -23,7 +23,22 @@ exports.useColors = useColors;
* Colors.
*/
-exports.colors = [6, 2, 3, 4, 5, 1];
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
/**
* Build up the default `inspectOpts` object from the environment variables.
@@ -52,30 +67,13 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
}, {});
/**
- * The file descriptor to write the `debug()` calls to.
- * Set the `DEBUG_FD` env variable to override with another value. i.e.:
- *
- * $ DEBUG_FD=3 node script.js 3>debug.log
- */
-
-var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
-
-if (1 !== fd && 2 !== fd) {
- util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
-}
-
-var stream = 1 === fd ? process.stdout :
- 2 === fd ? process.stderr :
- createWritableStdioStream(fd);
-
-/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts
? Boolean(exports.inspectOpts.colors)
- : tty.isatty(fd);
+ : tty.isatty(process.stderr.fd);
}
/**
@@ -111,22 +109,30 @@ function formatArgs(args) {
if (useColors) {
var c = this.color;
- var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+ var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
} else {
- args[0] = new Date().toUTCString()
- + ' ' + name + ' ' + args[0];
+ return new Date().toISOString() + ' ';
}
}
/**
- * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
- return stream.write(util.format.apply(util, arguments) + '\n');
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
@@ -158,74 +164,6 @@ function load() {
}
/**
- * Copied from `node/src/node.js`.
- *
- * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
- * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
- */
-
-function createWritableStdioStream (fd) {
- var stream;
- var tty_wrap = process.binding('tty_wrap');
-
- // Note stream._type is used for test-module-load-list.js
-
- switch (tty_wrap.guessHandleType(fd)) {
- case 'TTY':
- stream = new tty.WriteStream(fd);
- stream._type = 'tty';
-
- // Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- case 'FILE':
- var fs = require('fs');
- stream = new fs.SyncWriteStream(fd, { autoClose: false });
- stream._type = 'fs';
- break;
-
- case 'PIPE':
- case 'TCP':
- var net = require('net');
- stream = new net.Socket({
- fd: fd,
- readable: false,
- writable: true
- });
-
- // FIXME Should probably have an option in net.Socket to create a
- // stream from an existing fd which is writable only. But for now
- // we'll just add this hack and set the `readable` member to false.
- // Test: ./node test/fixtures/echo.js < /etc/passwd
- stream.readable = false;
- stream.read = null;
- stream._type = 'pipe';
-
- // FIXME Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- default:
- // Probably an error on in uv_guess_handle()
- throw new Error('Implement me. Unknown stream file type!');
- }
-
- // For supporting legacy API we put the FD here.
- stream.fd = fd;
-
- stream._isStdio = true;
-
- return stream;
-}
-
-/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json
index 38010f35e5..230dbb6ec2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json
@@ -1,8 +1,8 @@
{
"_from": "http-proxy-agent@^2.0.0",
- "_id": "http-proxy-agent@2.0.0",
+ "_id": "http-proxy-agent@2.1.0",
"_inBundle": false,
- "_integrity": "sha1-RkgqLwUjpNYIJVFwn0acs+SoX/Q=",
+ "_integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
"_location": "/pacote/make-fetch-happen/http-proxy-agent",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.0.0.tgz",
- "_shasum": "46482a2f0523a4d6082551709f469cb3e4a85ff4",
+ "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
+ "_shasum": "e4821beef5b2142a2026bd73926fe537631c5405",
"_spec": "http-proxy-agent@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
@@ -33,7 +33,7 @@
"bundleDependencies": false,
"dependencies": {
"agent-base": "4",
- "debug": "2"
+ "debug": "3.1.0"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTP",
@@ -41,6 +41,9 @@
"mocha": "3",
"proxy": "~0.2.3"
},
+ "engines": {
+ "node": ">= 4.5.0"
+ },
"homepage": "https://github.com/TooTallNate/node-http-proxy-agent#readme",
"keywords": [
"http",
@@ -58,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.0.0"
+ "version": "2.1.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore
deleted file mode 100644
index c12f3a80c1..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/?.js
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
index c0b5cef88b..f723812312 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md
@@ -1,4 +1,15 @@
+2.2.0 / 2018-03-03
+==================
+
+ * Add "engines" to package.json - requires Node.js >= 4.5.0
+ * Use `Buffer.from()`
+
+2.1.1 / 2017-11-28
+==================
+
+ * Update `debug` - Security Problems with Previous Version (#38)
+
2.1.0 / 2017-08-08
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js
index 699857804e..4e00712897 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js
@@ -204,7 +204,7 @@ HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) {
var headers = Object.assign({}, proxy.headers);
if (proxy.auth) {
headers['Proxy-Authorization'] =
- 'Basic ' + new Buffer(proxy.auth).toString('base64');
+ 'Basic ' + Buffer.from(proxy.auth).toString('base64');
}
// the Host header should only include the port
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
index e12180e423..80c88dc401 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,12 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
4.1.2 / 2017-11-20
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;EACT,IAAI,GAAG,KAAK,CAAC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promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IAC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AAO,CAAC,MAAM,GAAGI,QAAM,CAAC;AACxBJ,SAAO,CAAC,aAAa,GAAG,YAAY,CAAC;AACrCA,SAAO,CAAC,QAAQ,GAAG,OAAO,CAAC;AAC3BA,SAAO,CAAC,KAAK,GAAG,IAAI;;ACxYpB;AACA,AAEe,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG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ED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CA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AAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAA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A,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,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I,QAAM,CAAC;AACxBJ,SAAO,CAAC,aAAa,GAAG,YAAY,CAAC;AACrCA,SAAO,CAAC,QAAQ,GAAG,OAAO,CAAC;AAC3BA,SAAO,CAAC,KAAK,GAAG,IAAI;;ACxYpB;AACA,AAEe,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,IAAI,SAAS,GAAG,SAAS,CAAC;AAC1B,IAAI,iBAAiB,GAAG,SAAS,CAAC;;AAElC,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;EACtC,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;EACtB,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;EACrB,GAAG,IAAI,CAAC,CAAC;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of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UAAU,CAAC,CAAC,EAAE;EAC5B,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAEC;;AAED,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;AACtB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK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AAC;AACrCA,SAAO,CAAC,QAAQ,GAAG,OAAO,CAAC;AAC3BA,SAAO,CAAC,KAAK,GAAG,IAAI;;ACxYpB;AACA,AAEe,SAAS,QAAQ,GAAG;EACjC,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;EAEnB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,KAAK,GAAG,MAAM,CAAC;GAChB,MAAM,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;IACtC,KAAK,GAAG,IAAI,CAAC;GACd,MAAM;IACL,IAAI;MACF,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;KACnC,CAAC,OAAO,CAAC,EAAE;MACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;GACF;;EAED,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;;EAEtB,IAAI,CAAC,EAAE;IACL,IAAI,eAAe,GAAG,IAAI,CAAC;IAC3B,IAAI;MACF,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index 5ed6cbbf62..89d44ab102 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
index 51056e94b3..fc28b4d913 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@^4.1.0",
- "_id": "agent-base@4.1.2",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/https-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.2.tgz",
- "_shasum": "80fa6cde440f4dcf9af2617cf246099b5d99f0c8",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@^4.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.2"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
index 3891c13a8b..47d26a72b0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
index 6c6090c3b0..a764300377 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml
@@ -1,14 +1,20 @@
+sudo: false
language: node_js
+
node_js:
- - "6"
- - "5"
- "4"
+ - "6"
+ - "8"
install:
- - make node_modules
+ - make install
script:
- make lint
- make test
- - make coveralls
+
+matrix:
+ include:
+ - node_js: '8'
+ env: BROWSER=1
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
index 553da1585e..609591bbbf 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md
@@ -1,4 +1,37 @@
+3.1.0 / 2017-09-26
+==================
+
+ * Add `DEBUG_HIDE_DATE` env var (#486)
+ * Remove ReDoS regexp in %o formatter (#504)
+ * Remove "component" from package.json
+ * Remove `component.json`
+ * Ignore package-lock.json
+ * Examples: fix colors printout
+ * Fix: browser detection
+ * Fix: spelling mistake (#496, @EdwardBetts)
+
+3.0.1 / 2017-08-24
+==================
+
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
+
+3.0.0 / 2017-08-08
+==================
+
+ * Breaking: Remove DEBUG_FD (#406)
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
+ * Addition: document `enabled` flag (#465)
+ * Addition: add 256 colors mode (#481)
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
+ * Update: component: update "ms" to v2.0.0
+ * Update: separate the Node and Browser tests in Travis-CI
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
+ * Update: separate Node.js and web browser examples for organization
+ * Update: update "browserify" to v14.4.0
+ * Fix: fix Readme typo (#473)
+
2.6.9 / 2017-09-22
==================
@@ -27,7 +60,7 @@
2.6.4 / 2017-04-20
==================
- * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
* Misc: update "ms" to v0.7.3 (@tootallnate)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
index 584da8bf93..3ddd1360e6 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile
@@ -15,36 +15,44 @@ YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
-.FORCE:
-
install: node_modules
+browser: dist/debug.js
+
node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules
-lint: .FORCE
- eslint browser.js debug.js index.js node.js
-
-test-node: .FORCE
- istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
-
-test-browser: .FORCE
- mkdir -p dist
-
+dist/debug.js: src/*.js node_modules
+ @mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
- karma start --single-run
- rimraf dist
+lint:
+ @eslint *.js src/*.js
+
+test-node:
+ @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+ @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
-test: .FORCE
- concurrently \
+test-browser:
+ @$(MAKE) browser
+ @karma start --single-run
+
+test-all:
+ @concurrently \
"make test-node" \
"make test-browser"
-coveralls:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+test:
+ @if [ "x$(BROWSER)" = "x" ]; then \
+ $(MAKE) test-node; \
+ else \
+ $(MAKE) test-browser; \
+ fi
+
+clean:
+ rimraf dist coverage
-.PHONY: all install clean distclean
+.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
index bc59ae86e8..8e754d17b1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md
@@ -2,11 +2,10 @@
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-A tiny node.js debugging utility modelled after node core's debugging technique.
-
-**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
## Installation
@@ -18,7 +17,7 @@ $ npm install debug
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
-Example _app.js_:
+Example [_app.js_](./examples/node/app.js):
```js
var debug = require('debug')('http')
@@ -27,7 +26,7 @@ var debug = require('debug')('http')
// fake app
-debug('booting %s', name);
+debug('booting %o', name);
http.createServer(function(req, res){
debug(req.method + ' ' + req.url);
@@ -41,81 +40,128 @@ http.createServer(function(req, res){
require('./worker');
```
-Example _worker.js_:
+Example [_worker.js_](./examples/node/worker.js):
```js
-var debug = require('debug')('worker');
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
-setInterval(function(){
- debug('doing some work');
-}, 1000);
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
```
- The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
- ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
+Here are some examples:
- ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
+<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
+<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
#### Windows note
- On Windows the environment variable is set using the `set` command.
+On Windows the environment variable is set using the `set` command.
- ```cmd
- set DEBUG=*,-not_this
- ```
+```cmd
+set DEBUG=*,-not_this
+```
- Note that PowerShell uses different syntax to set environment variables.
+Note that PowerShell uses different syntax to set environment variables.
- ```cmd
- $env:DEBUG = "*,-not_this"
- ```
+```cmd
+$env:DEBUG = "*,-not_this"
+```
Then, run the program to be debugged as usual.
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
+
+
## Millisecond diff
- When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
- ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
- When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
- ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
## Conventions
- If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
## Wildcards
- The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
- You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
## Environment Variables
- When running through Node.js, you can set a few environment variables that will
- change the behavior of the debug logging:
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
| Name | Purpose |
|-----------|-------------------------------------------------|
| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
-| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_DEPTH` | Object inspection depth. |
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
- __Note:__ The environment variables beginning with `DEBUG_` end up being
- converted into an Options object that gets used with `%o`/`%O` formatters.
- See the Node.js documentation for
- [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
- for the complete list.
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
## Formatters
-
- Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
| Formatter | Representation |
|-----------|----------------|
@@ -126,9 +172,12 @@ Then, run the program to be debugged as usual.
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
### Custom formatters
- You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
```js
const createDebug = require('debug')
@@ -142,14 +191,16 @@ debug('this is hex: %h', new Buffer('hello world'))
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
```
-## Browser support
- You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
- or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
- if you don't want to build it yourself.
- Debug's enable state is currently persisted by `localStorage`.
- Consider the situation shown below where you have `worker:a` and `worker:b`,
- and wish to debug both. You can enable this using `localStorage.debug`:
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
```js
localStorage.debug = 'worker:*'
@@ -170,23 +221,12 @@ setInterval(function(){
}, 1200);
```
-#### Web Inspector Colors
-
- Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
- option. These are WebKit web inspectors, Firefox ([since version
- 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
- and the Firebug plugin for Firefox (any version).
-
- Colored output looks something like:
-
- ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
-
## Output streams
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
-Example _stdout.js_:
+Example [_stdout.js_](./examples/node/stdout.js):
```js
var debug = require('debug');
@@ -208,6 +248,22 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
## Authors
@@ -290,7 +346,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
(The MIT License)
-Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json
deleted file mode 100644
index 9de26410f0..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "debug",
- "repo": "visionmedia/debug",
- "description": "small debugging utility",
- "version": "2.6.9",
- "keywords": [
- "debug",
- "log",
- "debugger"
- ],
- "main": "src/browser.js",
- "scripts": [
- "src/browser.js",
- "src/debug.js"
- ],
- "dependencies": {
- "rauchg/ms.js": "0.7.1"
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
index 72abce8970..83035cab4d 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json
@@ -1,26 +1,26 @@
{
- "_from": "debug@^2.4.1",
- "_id": "debug@2.6.9",
+ "_from": "debug@^3.1.0",
+ "_id": "debug@3.1.0",
"_inBundle": false,
- "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"_location": "/pacote/make-fetch-happen/https-proxy-agent/debug",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "debug@^2.4.1",
+ "raw": "debug@^3.1.0",
"name": "debug",
"escapedName": "debug",
- "rawSpec": "^2.4.1",
+ "rawSpec": "^3.1.0",
"saveSpec": null,
- "fetchSpec": "^2.4.1"
+ "fetchSpec": "^3.1.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen/https-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
- "_spec": "debug@^2.4.1",
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "_shasum": "5bb5a0672628b64149566ba16819e61518c67261",
+ "_spec": "debug@^3.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent",
"author": {
"name": "TJ Holowaychuk",
@@ -31,12 +31,6 @@
"url": "https://github.com/visionmedia/debug/issues"
},
"bundleDependencies": false,
- "component": {
- "scripts": {
- "debug/index.js": "browser.js",
- "debug/debug.js": "debug.js"
- }
- },
"contributors": [
{
"name": "Nathan Rajlich",
@@ -54,7 +48,7 @@
"deprecated": false,
"description": "small debugging utility",
"devDependencies": {
- "browserify": "9.0.3",
+ "browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^2.11.15",
@@ -84,5 +78,5 @@
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
- "version": "2.6.9"
+ "version": "3.1.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
index 7106924934..f5149ff529 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js
@@ -20,12 +20,17 @@ exports.storage = 'undefined' != typeof chrome
*/
exports.colors = [
- 'lightseagreen',
- 'forestgreen',
- 'goldenrod',
- 'dodgerblue',
- 'darkorchid',
- 'crimson'
+ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+ '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+ '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+ '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+ '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+ '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+ '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+ '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+ '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+ '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+ '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
];
/**
@@ -44,6 +49,11 @@ function useColors() {
return true;
}
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
// is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
index 6a5e3fc94c..77e6384a33 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js
@@ -14,6 +14,11 @@ exports.enabled = enabled;
exports.humanize = require('ms');
/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
* The currently active debug mode names, and names to skip.
*/
@@ -29,12 +34,6 @@ exports.skips = [];
exports.formatters = {};
/**
- * Previous log timestamp.
- */
-
-var prevTime;
-
-/**
* Select a color.
* @param {String} namespace
* @return {Number}
@@ -62,6 +61,8 @@ function selectColor(namespace) {
function createDebug(namespace) {
+ var prevTime;
+
function debug() {
// disabled?
if (!debug.enabled) return;
@@ -118,15 +119,28 @@ function createDebug(namespace) {
debug.enabled = exports.enabled(namespace);
debug.useColors = exports.useColors();
debug.color = selectColor(namespace);
+ debug.destroy = destroy;
// env-specific initialization logic for debug instances
if ('function' === typeof exports.init) {
exports.init(debug);
}
+ exports.instances.push(debug);
+
return debug;
}
+function destroy () {
+ var index = exports.instances.indexOf(this);
+ if (index !== -1) {
+ exports.instances.splice(index, 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
@@ -141,10 +155,11 @@ function enable(namespaces) {
exports.names = [];
exports.skips = [];
+ var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
- for (var i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
if (!split[i]) continue; // ignore empty strings
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
@@ -153,6 +168,11 @@ function enable(namespaces) {
exports.names.push(new RegExp('^' + namespaces + '$'));
}
}
+
+ for (i = 0; i < exports.instances.length; i++) {
+ var instance = exports.instances[i];
+ instance.enabled = exports.enabled(instance.namespace);
+ }
}
/**
@@ -174,6 +194,9 @@ function disable() {
*/
function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
if (exports.skips[i].test(name)) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
index e12cf4d58c..cabcbcda13 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js
@@ -3,7 +3,7 @@
* treat as a browser.
*/
-if (typeof process !== 'undefined' && process.type === 'renderer') {
+if (typeof process === 'undefined' || process.type === 'renderer') {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js
deleted file mode 100644
index 60ea6c04aa..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = inspectorLog;
-
-// black hole
-const nullStream = new (require('stream').Writable)();
-nullStream._write = () => {};
-
-/**
- * Outputs a `console.log()` to the Node.js Inspector console *only*.
- */
-function inspectorLog() {
- const stdout = console._stdout;
- console._stdout = nullStream;
- console.log.apply(console, arguments);
- console._stdout = stdout;
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
index b15109c905..d666fb9c00 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js
@@ -23,7 +23,22 @@ exports.useColors = useColors;
* Colors.
*/
-exports.colors = [6, 2, 3, 4, 5, 1];
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+ var supportsColor = require('supports-color');
+ if (supportsColor && supportsColor.level >= 2) {
+ exports.colors = [
+ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+ 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+ 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 214, 215, 220, 221
+ ];
+ }
+} catch (err) {
+ // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
/**
* Build up the default `inspectOpts` object from the environment variables.
@@ -52,30 +67,13 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
}, {});
/**
- * The file descriptor to write the `debug()` calls to.
- * Set the `DEBUG_FD` env variable to override with another value. i.e.:
- *
- * $ DEBUG_FD=3 node script.js 3>debug.log
- */
-
-var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
-
-if (1 !== fd && 2 !== fd) {
- util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
-}
-
-var stream = 1 === fd ? process.stdout :
- 2 === fd ? process.stderr :
- createWritableStdioStream(fd);
-
-/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts
? Boolean(exports.inspectOpts.colors)
- : tty.isatty(fd);
+ : tty.isatty(process.stderr.fd);
}
/**
@@ -111,22 +109,30 @@ function formatArgs(args) {
if (useColors) {
var c = this.color;
- var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
+ var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+ var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
} else {
- args[0] = new Date().toUTCString()
- + ' ' + name + ' ' + args[0];
+ return new Date().toISOString() + ' ';
}
}
/**
- * Invokes `util.format()` with the specified arguments and writes to `stream`.
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log() {
- return stream.write(util.format.apply(util, arguments) + '\n');
+ return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
/**
@@ -158,74 +164,6 @@ function load() {
}
/**
- * Copied from `node/src/node.js`.
- *
- * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
- * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
- */
-
-function createWritableStdioStream (fd) {
- var stream;
- var tty_wrap = process.binding('tty_wrap');
-
- // Note stream._type is used for test-module-load-list.js
-
- switch (tty_wrap.guessHandleType(fd)) {
- case 'TTY':
- stream = new tty.WriteStream(fd);
- stream._type = 'tty';
-
- // Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- case 'FILE':
- var fs = require('fs');
- stream = new fs.SyncWriteStream(fd, { autoClose: false });
- stream._type = 'fs';
- break;
-
- case 'PIPE':
- case 'TCP':
- var net = require('net');
- stream = new net.Socket({
- fd: fd,
- readable: false,
- writable: true
- });
-
- // FIXME Should probably have an option in net.Socket to create a
- // stream from an existing fd which is writable only. But for now
- // we'll just add this hack and set the `readable` member to false.
- // Test: ./node test/fixtures/echo.js < /etc/passwd
- stream.readable = false;
- stream.read = null;
- stream._type = 'pipe';
-
- // FIXME Hack to have stream not keep the event loop alive.
- // See https://github.com/joyent/node/issues/1726
- if (stream._handle && stream._handle.unref) {
- stream._handle.unref();
- }
- break;
-
- default:
- // Probably an error on in uv_guess_handle()
- throw new Error('Implement me. Unknown stream file type!');
- }
-
- // For supporting legacy API we put the FD here.
- stream.fd = fd;
-
- stream._isStdio = true;
-
- return stream;
-}
-
-/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
index 85a8f5b0e5..bcea6b3499 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json
@@ -1,26 +1,26 @@
{
- "_from": "https-proxy-agent@^2.0.0",
- "_id": "https-proxy-agent@2.1.0",
+ "_from": "https-proxy-agent@^2.1.0",
+ "_id": "https-proxy-agent@2.2.0",
"_inBundle": false,
- "_integrity": "sha512-/DTVSUCbRc6AiyOV4DBRvPDpKKCJh4qQJNaCgypX0T41quD9hp/PB5iUyx/60XobuMPQa9ce1jNV9UOUq6PnTg==",
+ "_integrity": "sha512-uUWcfXHvy/dwfM9bqa6AozvAjS32dZSTUYd/4SEpYKRg6LEcPLshksnQYRudM9AyNvUARMfAg5TLjUDyX/K4vA==",
"_location": "/pacote/make-fetch-happen/https-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "https-proxy-agent@^2.0.0",
+ "raw": "https-proxy-agent@^2.1.0",
"name": "https-proxy-agent",
"escapedName": "https-proxy-agent",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^2.1.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^2.1.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.1.0.tgz",
- "_shasum": "1391bee7fd66aeabc0df2a1fa90f58954f43e443",
- "_spec": "https-proxy-agent@^2.0.0",
+ "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.0.tgz",
+ "_shasum": "7fbba856be8cd677986f42ebd3664f6317257887",
+ "_spec": "https-proxy-agent@^2.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
@@ -33,7 +33,7 @@
"bundleDependencies": false,
"dependencies": {
"agent-base": "^4.1.0",
- "debug": "^2.4.1"
+ "debug": "^3.1.0"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
@@ -41,6 +41,9 @@
"mocha": "^3.4.2",
"proxy": "^0.2.4"
},
+ "engines": {
+ "node": ">= 4.5.0"
+ },
"homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme",
"keywords": [
"https",
@@ -58,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.0"
+ "version": "2.2.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/index.js
new file mode 100644
index 0000000000..d635b29c56
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/index.js
@@ -0,0 +1,10 @@
+module.exports.pipe = require('pump')
+module.exports.each = require('stream-each')
+module.exports.pipeline = require('pumpify')
+module.exports.duplex = require('duplexify')
+module.exports.through = require('through2')
+module.exports.concat = require('concat-stream')
+module.exports.finished = require('end-of-stream')
+module.exports.from = require('from2')
+module.exports.to = require('flush-write-stream')
+module.exports.parallel = require('parallel-transform')
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE
new file mode 100644
index 0000000000..1e836b4760
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/LICENSE
@@ -0,0 +1,24 @@
+The MIT License
+
+Copyright (c) 2013 Max Ogden
+
+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/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js
new file mode 100644
index 0000000000..b16ad1343f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/index.js
@@ -0,0 +1,143 @@
+var Writable = require('readable-stream').Writable
+var inherits = require('inherits')
+
+if (typeof Uint8Array === 'undefined') {
+ var U8 = require('typedarray').Uint8Array
+} else {
+ var U8 = Uint8Array
+}
+
+function ConcatStream(opts, cb) {
+ if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
+
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+ if (!opts) opts = {}
+
+ var encoding = opts.encoding
+ var shouldInferEncoding = false
+
+ if (!encoding) {
+ shouldInferEncoding = true
+ } else {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'u8' || encoding === 'uint8') {
+ encoding = 'uint8array'
+ }
+ }
+
+ Writable.call(this, { objectMode: true })
+
+ this.encoding = encoding
+ this.shouldInferEncoding = shouldInferEncoding
+
+ if (cb) this.on('finish', function () { cb(this.getBody()) })
+ this.body = []
+}
+
+module.exports = ConcatStream
+inherits(ConcatStream, Writable)
+
+ConcatStream.prototype._write = function(chunk, enc, next) {
+ this.body.push(chunk)
+ next()
+}
+
+ConcatStream.prototype.inferEncoding = function (buff) {
+ var firstBuffer = buff === undefined ? this.body[0] : buff;
+ if (Buffer.isBuffer(firstBuffer)) return 'buffer'
+ if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
+ if (Array.isArray(firstBuffer)) return 'array'
+ if (typeof firstBuffer === 'string') return 'string'
+ if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
+ return 'buffer'
+}
+
+ConcatStream.prototype.getBody = function () {
+ if (!this.encoding && this.body.length === 0) return []
+ if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
+ if (this.encoding === 'array') return arrayConcat(this.body)
+ if (this.encoding === 'string') return stringConcat(this.body)
+ if (this.encoding === 'buffer') return bufferConcat(this.body)
+ if (this.encoding === 'uint8array') return u8Concat(this.body)
+ return this.body
+}
+
+var isArray = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]'
+}
+
+function isArrayish (arr) {
+ return /Array\]$/.test(Object.prototype.toString.call(arr))
+}
+
+function isBufferish (p) {
+ return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
+}
+
+function stringConcat (parts) {
+ var strings = []
+ var needsToString = false
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (typeof p === 'string') {
+ strings.push(p)
+ } else if (Buffer.isBuffer(p)) {
+ strings.push(p)
+ } else if (isBufferish(p)) {
+ strings.push(new Buffer(p))
+ } else {
+ strings.push(new Buffer(String(p)))
+ }
+ }
+ if (Buffer.isBuffer(parts[0])) {
+ strings = Buffer.concat(strings)
+ strings = strings.toString('utf8')
+ } else {
+ strings = strings.join('')
+ }
+ return strings
+}
+
+function bufferConcat (parts) {
+ var bufs = []
+ for (var i = 0; i < parts.length; i++) {
+ var p = parts[i]
+ if (Buffer.isBuffer(p)) {
+ bufs.push(p)
+ } else if (isBufferish(p)) {
+ bufs.push(new Buffer(p))
+ } else {
+ bufs.push(new Buffer(String(p)))
+ }
+ }
+ return Buffer.concat(bufs)
+}
+
+function arrayConcat (parts) {
+ var res = []
+ for (var i = 0; i < parts.length; i++) {
+ res.push.apply(res, parts[i])
+ }
+ return res
+}
+
+function u8Concat (parts) {
+ var len = 0
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof parts[i] === 'string') {
+ parts[i] = new Buffer(parts[i])
+ }
+ len += parts[i].length
+ }
+ var u8 = new U8(len)
+ for (var i = 0, offset = 0; i < parts.length; i++) {
+ var part = parts[i]
+ for (var j = 0; j < part.length; j++) {
+ u8[offset++] = part[j]
+ }
+ }
+ return u8
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
new file mode 100644
index 0000000000..cc4dba29d9
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
new file mode 100644
index 0000000000..11adfaec9e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/LICENSE
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2010, Linden Research, Inc.
+ Copyright (c) 2012, Joshua Bell
+
+ 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.
+ $/LicenseInfo$
+ */
+
+// Original can be found at:
+// https://bitbucket.org/lindenlab/llsd
+// Modifications by Joshua Bell inexorabletash@gmail.com
+// https://github.com/inexorabletash/polyfill
+
+// ES3/ES5 implementation of the Krhonos Typed Array Specification
+// Ref: http://www.khronos.org/registry/typedarray/specs/latest/
+// Date: 2011-02-01
+//
+// Variations:
+// * Allows typed_array.get/set() as alias for subscripts (typed_array[])
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
new file mode 100644
index 0000000000..8423d7c9b1
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/example/tarray.js
@@ -0,0 +1,4 @@
+var Uint8Array = require('../').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
new file mode 100644
index 0000000000..5e540841f4
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/index.js
@@ -0,0 +1,630 @@
+var undefined = (void 0); // Paranoia
+
+// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
+// create, and consume so much memory, that the browser appears frozen.
+var MAX_ARRAY_LENGTH = 1e5;
+
+// Approximations of internal ECMAScript conversion functions
+var ECMAScript = (function() {
+ // Stash a copy in case other scripts modify these
+ var opts = Object.prototype.toString,
+ ophop = Object.prototype.hasOwnProperty;
+
+ return {
+ // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
+ Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
+ HasProperty: function(o, p) { return p in o; },
+ HasOwnProperty: function(o, p) { return ophop.call(o, p); },
+ IsCallable: function(o) { return typeof o === 'function'; },
+ ToInt32: function(v) { return v >> 0; },
+ ToUint32: function(v) { return v >>> 0; }
+ };
+}());
+
+// Snapshot intrinsics
+var LN2 = Math.LN2,
+ abs = Math.abs,
+ floor = Math.floor,
+ log = Math.log,
+ min = Math.min,
+ pow = Math.pow,
+ round = Math.round;
+
+// ES5: lock down object properties
+function configureProperties(obj) {
+ if (getOwnPropNames && defineProp) {
+ var props = getOwnPropNames(obj), i;
+ for (i = 0; i < props.length; i += 1) {
+ defineProp(obj, props[i], {
+ value: obj[props[i]],
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ }
+ }
+}
+
+// emulate ES5 getter/setter API using legacy APIs
+// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
+// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
+// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
+var defineProp
+if (Object.defineProperty && (function() {
+ try {
+ Object.defineProperty({}, 'x', {});
+ return true;
+ } catch (e) {
+ return false;
+ }
+ })()) {
+ defineProp = Object.defineProperty;
+} else {
+ defineProp = function(o, p, desc) {
+ if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
+ if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
+ if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
+ if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
+ return o;
+ };
+}
+
+var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
+ if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
+ var props = [], p;
+ for (p in o) {
+ if (ECMAScript.HasOwnProperty(o, p)) {
+ props.push(p);
+ }
+ }
+ return props;
+};
+
+// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
+// for index in 0 ... obj.length
+function makeArrayAccessors(obj) {
+ if (!defineProp) { return; }
+
+ if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
+
+ function makeArrayAccessor(index) {
+ defineProp(obj, index, {
+ 'get': function() { return obj._getter(index); },
+ 'set': function(v) { obj._setter(index, v); },
+ enumerable: true,
+ configurable: false
+ });
+ }
+
+ var i;
+ for (i = 0; i < obj.length; i += 1) {
+ makeArrayAccessor(i);
+ }
+}
+
+// Internal conversion functions:
+// pack<Type>() - take a number (interpreted as Type), output a byte array
+// unpack<Type>() - take a byte array, output a Type-like number
+
+function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
+function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
+
+function packI8(n) { return [n & 0xff]; }
+function unpackI8(bytes) { return as_signed(bytes[0], 8); }
+
+function packU8(n) { return [n & 0xff]; }
+function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
+
+function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
+
+function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
+
+function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
+function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
+
+function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
+function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
+
+function packIEEE754(v, ebits, fbits) {
+
+ var bias = (1 << (ebits - 1)) - 1,
+ s, e, f, ln,
+ i, bits, str, bytes;
+
+ function roundToEven(n) {
+ var w = floor(n), f = n - w;
+ if (f < 0.5)
+ return w;
+ if (f > 0.5)
+ return w + 1;
+ return w % 2 ? w + 1 : w;
+ }
+
+ // Compute sign, exponent, fraction
+ if (v !== v) {
+ // NaN
+ // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
+ e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
+ } else if (v === Infinity || v === -Infinity) {
+ e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
+ } else if (v === 0) {
+ e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
+ } else {
+ s = v < 0;
+ v = abs(v);
+
+ if (v >= pow(2, 1 - bias)) {
+ e = min(floor(log(v) / LN2), 1023);
+ f = roundToEven(v / pow(2, e) * pow(2, fbits));
+ if (f / pow(2, fbits) >= 2) {
+ e = e + 1;
+ f = 1;
+ }
+ if (e > bias) {
+ // Overflow
+ e = (1 << ebits) - 1;
+ f = 0;
+ } else {
+ // Normalized
+ e = e + bias;
+ f = f - pow(2, fbits);
+ }
+ } else {
+ // Denormalized
+ e = 0;
+ f = roundToEven(v / pow(2, 1 - bias - fbits));
+ }
+ }
+
+ // Pack sign, exponent, fraction
+ bits = [];
+ for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
+ for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
+ bits.push(s ? 1 : 0);
+ bits.reverse();
+ str = bits.join('');
+
+ // Bits to bytes
+ bytes = [];
+ while (str.length) {
+ bytes.push(parseInt(str.substring(0, 8), 2));
+ str = str.substring(8);
+ }
+ return bytes;
+}
+
+function unpackIEEE754(bytes, ebits, fbits) {
+
+ // Bytes to bits
+ var bits = [], i, j, b, str,
+ bias, s, e, f;
+
+ for (i = bytes.length; i; i -= 1) {
+ b = bytes[i - 1];
+ for (j = 8; j; j -= 1) {
+ bits.push(b % 2 ? 1 : 0); b = b >> 1;
+ }
+ }
+ bits.reverse();
+ str = bits.join('');
+
+ // Unpack sign, exponent, fraction
+ bias = (1 << (ebits - 1)) - 1;
+ s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
+ e = parseInt(str.substring(1, 1 + ebits), 2);
+ f = parseInt(str.substring(1 + ebits), 2);
+
+ // Produce number
+ if (e === (1 << ebits) - 1) {
+ return f !== 0 ? NaN : s * Infinity;
+ } else if (e > 0) {
+ // Normalized
+ return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
+ } else if (f !== 0) {
+ // Denormalized
+ return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
+ } else {
+ return s < 0 ? -0 : 0;
+ }
+}
+
+function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
+function packF64(v) { return packIEEE754(v, 11, 52); }
+function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
+function packF32(v) { return packIEEE754(v, 8, 23); }
+
+
+//
+// 3 The ArrayBuffer Type
+//
+
+(function() {
+
+ /** @constructor */
+ var ArrayBuffer = function ArrayBuffer(length) {
+ length = ECMAScript.ToInt32(length);
+ if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
+
+ this.byteLength = length;
+ this._bytes = [];
+ this._bytes.length = length;
+
+ var i;
+ for (i = 0; i < this.byteLength; i += 1) {
+ this._bytes[i] = 0;
+ }
+
+ configureProperties(this);
+ };
+
+ exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
+
+ //
+ // 4 The ArrayBufferView Type
+ //
+
+ // NOTE: this constructor is not exported
+ /** @constructor */
+ var ArrayBufferView = function ArrayBufferView() {
+ //this.buffer = null;
+ //this.byteOffset = 0;
+ //this.byteLength = 0;
+ };
+
+ //
+ // 5 The Typed Array View Types
+ //
+
+ function makeConstructor(bytesPerElement, pack, unpack) {
+ // Each TypedArray type requires a distinct constructor instance with
+ // identical logic, which this produces.
+
+ var ctor;
+ ctor = function(buffer, byteOffset, length) {
+ var array, sequence, i, s;
+
+ if (!arguments.length || typeof arguments[0] === 'number') {
+ // Constructor(unsigned long length)
+ this.length = ECMAScript.ToInt32(arguments[0]);
+ if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
+
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+ } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
+ // Constructor(TypedArray array)
+ array = arguments[0];
+
+ this.length = array.length;
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ this._setter(i, array._getter(i));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(sequence<type> array)
+ sequence = arguments[0];
+
+ this.length = ECMAScript.ToUint32(sequence.length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ this.buffer = new ArrayBuffer(this.byteLength);
+ this.byteOffset = 0;
+
+ for (i = 0; i < this.length; i += 1) {
+ s = sequence[i];
+ this._setter(i, Number(s));
+ }
+ } else if (typeof arguments[0] === 'object' &&
+ (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset, optional unsigned long length)
+ this.buffer = buffer;
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (this.byteOffset % this.BYTES_PER_ELEMENT) {
+ // The given byteOffset must be a multiple of the element
+ // size of the specific type, otherwise an exception is raised.
+ throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+
+ if (this.byteLength % this.BYTES_PER_ELEMENT) {
+ throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
+ }
+ this.length = this.byteLength / this.BYTES_PER_ELEMENT;
+ } else {
+ this.length = ECMAScript.ToUint32(length);
+ this.byteLength = this.length * this.BYTES_PER_ELEMENT;
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+
+ this.constructor = ctor;
+
+ configureProperties(this);
+ makeArrayAccessors(this);
+ };
+
+ ctor.prototype = new ArrayBufferView();
+ ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
+ ctor.prototype._pack = pack;
+ ctor.prototype._unpack = unpack;
+ ctor.BYTES_PER_ELEMENT = bytesPerElement;
+
+ // getter type (unsigned long index);
+ ctor.prototype._getter = function(index) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = [], i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ bytes.push(this.buffer._bytes[o]);
+ }
+ return this._unpack(bytes);
+ };
+
+ // NONSTANDARD: convenience alias for getter: type get(unsigned long index);
+ ctor.prototype.get = ctor.prototype._getter;
+
+ // setter void (unsigned long index, type value);
+ ctor.prototype._setter = function(index, value) {
+ if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
+
+ index = ECMAScript.ToUint32(index);
+ if (index >= this.length) {
+ return undefined;
+ }
+
+ var bytes = this._pack(value), i, o;
+ for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
+ i < this.BYTES_PER_ELEMENT;
+ i += 1, o += 1) {
+ this.buffer._bytes[o] = bytes[i];
+ }
+ };
+
+ // void set(TypedArray array, optional unsigned long offset);
+ // void set(sequence<type> array, optional unsigned long offset);
+ ctor.prototype.set = function(index, value) {
+ if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
+ var array, sequence, offset, len,
+ i, s, d,
+ byteOffset, byteLength, tmp;
+
+ if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
+ // void set(TypedArray array, optional unsigned long offset);
+ array = arguments[0];
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + array.length > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
+ byteLength = array.length * this.BYTES_PER_ELEMENT;
+
+ if (array.buffer === this.buffer) {
+ tmp = [];
+ for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
+ tmp[i] = array.buffer._bytes[s];
+ }
+ for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
+ this.buffer._bytes[d] = tmp[i];
+ }
+ } else {
+ for (i = 0, s = array.byteOffset, d = byteOffset;
+ i < byteLength; i += 1, s += 1, d += 1) {
+ this.buffer._bytes[d] = array.buffer._bytes[s];
+ }
+ }
+ } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
+ // void set(sequence<type> array, optional unsigned long offset);
+ sequence = arguments[0];
+ len = ECMAScript.ToUint32(sequence.length);
+ offset = ECMAScript.ToUint32(arguments[1]);
+
+ if (offset + len > this.length) {
+ throw new RangeError("Offset plus length of array is out of range");
+ }
+
+ for (i = 0; i < len; i += 1) {
+ s = sequence[i];
+ this._setter(offset + i, Number(s));
+ }
+ } else {
+ throw new TypeError("Unexpected argument type(s)");
+ }
+ };
+
+ // TypedArray subarray(long begin, optional long end);
+ ctor.prototype.subarray = function(start, end) {
+ function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
+
+ start = ECMAScript.ToInt32(start);
+ end = ECMAScript.ToInt32(end);
+
+ if (arguments.length < 1) { start = 0; }
+ if (arguments.length < 2) { end = this.length; }
+
+ if (start < 0) { start = this.length + start; }
+ if (end < 0) { end = this.length + end; }
+
+ start = clamp(start, 0, this.length);
+ end = clamp(end, 0, this.length);
+
+ var len = end - start;
+ if (len < 0) {
+ len = 0;
+ }
+
+ return new this.constructor(
+ this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
+ };
+
+ return ctor;
+ }
+
+ var Int8Array = makeConstructor(1, packI8, unpackI8);
+ var Uint8Array = makeConstructor(1, packU8, unpackU8);
+ var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
+ var Int16Array = makeConstructor(2, packI16, unpackI16);
+ var Uint16Array = makeConstructor(2, packU16, unpackU16);
+ var Int32Array = makeConstructor(4, packI32, unpackI32);
+ var Uint32Array = makeConstructor(4, packU32, unpackU32);
+ var Float32Array = makeConstructor(4, packF32, unpackF32);
+ var Float64Array = makeConstructor(8, packF64, unpackF64);
+
+ exports.Int8Array = exports.Int8Array || Int8Array;
+ exports.Uint8Array = exports.Uint8Array || Uint8Array;
+ exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
+ exports.Int16Array = exports.Int16Array || Int16Array;
+ exports.Uint16Array = exports.Uint16Array || Uint16Array;
+ exports.Int32Array = exports.Int32Array || Int32Array;
+ exports.Uint32Array = exports.Uint32Array || Uint32Array;
+ exports.Float32Array = exports.Float32Array || Float32Array;
+ exports.Float64Array = exports.Float64Array || Float64Array;
+}());
+
+//
+// 6 The DataView View Type
+//
+
+(function() {
+ function r(array, index) {
+ return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
+ }
+
+ var IS_BIG_ENDIAN = (function() {
+ var u16array = new(exports.Uint16Array)([0x1234]),
+ u8array = new(exports.Uint8Array)(u16array.buffer);
+ return r(u8array, 0) === 0x12;
+ }());
+
+ // Constructor(ArrayBuffer buffer,
+ // optional unsigned long byteOffset,
+ // optional unsigned long byteLength)
+ /** @constructor */
+ var DataView = function DataView(buffer, byteOffset, byteLength) {
+ if (arguments.length === 0) {
+ buffer = new exports.ArrayBuffer(0);
+ } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
+ throw new TypeError("TypeError");
+ }
+
+ this.buffer = buffer || new exports.ArrayBuffer(0);
+
+ this.byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (this.byteOffset > this.buffer.byteLength) {
+ throw new RangeError("byteOffset out of range");
+ }
+
+ if (arguments.length < 3) {
+ this.byteLength = this.buffer.byteLength - this.byteOffset;
+ } else {
+ this.byteLength = ECMAScript.ToUint32(byteLength);
+ }
+
+ if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
+ throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
+ }
+
+ configureProperties(this);
+ };
+
+ function makeGetter(arrayType) {
+ return function(byteOffset, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+ byteOffset += this.byteOffset;
+
+ var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
+ bytes = [], i;
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(uint8Array, i));
+ }
+
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
+ };
+ }
+
+ DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
+ DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
+ DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
+ DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
+ DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
+ DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
+ DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
+ DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
+
+ function makeSetter(arrayType) {
+ return function(byteOffset, value, littleEndian) {
+
+ byteOffset = ECMAScript.ToUint32(byteOffset);
+ if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
+ throw new RangeError("Array index out of range");
+ }
+
+ // Get bytes
+ var typeArray = new arrayType([value]),
+ byteArray = new exports.Uint8Array(typeArray.buffer),
+ bytes = [], i, byteView;
+
+ for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
+ bytes.push(r(byteArray, i));
+ }
+
+ // Flip if necessary
+ if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
+ bytes.reverse();
+ }
+
+ // Write them
+ byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
+ byteView.set(bytes);
+ };
+ }
+
+ DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
+ DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
+ DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
+ DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
+ DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
+ DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
+ DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
+ DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
+
+ exports.DataView = exports.DataView || DataView;
+
+}());
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
new file mode 100644
index 0000000000..f1822836ee
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "typedarray@^0.0.6",
+ "_id": "typedarray@0.0.6",
+ "_inBundle": false,
+ "_integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+ "_location": "/pacote/make-fetch-happen/mississippi/concat-stream/typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray@^0.0.6",
+ "name": "typedarray",
+ "escapedName": "typedarray",
+ "rawSpec": "^0.0.6",
+ "saveSpec": null,
+ "fetchSpec": "^0.0.6"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/concat-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "_shasum": "867ac74e3864187b1d3d47d996a78ec5c8830777",
+ "_spec": "typedarray@^0.0.6",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "TypedArray polyfill for old browsers",
+ "devDependencies": {
+ "tape": "~2.3.2"
+ },
+ "homepage": "https://github.com/substack/typedarray",
+ "keywords": [
+ "ArrayBuffer",
+ "DataView",
+ "Float32Array",
+ "Float64Array",
+ "Int8Array",
+ "Int16Array",
+ "Int32Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Uint16Array",
+ "Uint32Array",
+ "typed",
+ "array",
+ "polyfill"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/typedarray.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "0.0.6"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
new file mode 100644
index 0000000000..d18f6f7197
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/readme.markdown
@@ -0,0 +1,61 @@
+# typedarray
+
+TypedArray polyfill ripped from [this
+module](https://raw.github.com/inexorabletash/polyfill).
+
+[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray)
+
+[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray)
+
+# example
+
+``` js
+var Uint8Array = require('typedarray').Uint8Array;
+var ua = new Uint8Array(5);
+ua[1] = 256 + 55;
+console.log(ua[1]);
+```
+
+output:
+
+```
+55
+```
+
+# methods
+
+``` js
+var TA = require('typedarray')
+```
+
+The `TA` object has the following constructors:
+
+* TA.ArrayBuffer
+* TA.DataView
+* TA.Float32Array
+* TA.Float64Array
+* TA.Int8Array
+* TA.Int16Array
+* TA.Int32Array
+* TA.Uint8Array
+* TA.Uint8ClampedArray
+* TA.Uint16Array
+* TA.Uint32Array
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install typedarray
+```
+
+To use this module in the browser, compile with
+[browserify](http://browserify.org)
+or download a UMD build from browserify CDN:
+
+http://wzrd.in/standalone/typedarray@latest
+
+# license
+
+MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
new file mode 100644
index 0000000000..e57dabdceb
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/server/undef_globals.js
@@ -0,0 +1,19 @@
+var test = require('tape');
+var vm = require('vm');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8');
+
+test('u8a without globals', function (t) {
+ var c = {
+ module: { exports: {} },
+ };
+ c.exports = c.module.exports;
+ vm.runInNewContext(src, c);
+ var TA = c.module.exports;
+ var ua = new(TA.Uint8Array)(5);
+
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
new file mode 100644
index 0000000000..df596a34f2
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/node_modules/typedarray/test/tarray.js
@@ -0,0 +1,10 @@
+var TA = require('../');
+var test = require('tape');
+
+test('tiny u8a test', function (t) {
+ var ua = new(TA.Uint8Array)(5);
+ t.equal(ua.length, 5);
+ ua[1] = 256 + 55;
+ t.equal(ua[1], 55);
+ t.end();
+});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json
new file mode 100644
index 0000000000..dc7f143f68
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/package.json
@@ -0,0 +1,83 @@
+{
+ "_from": "concat-stream@^1.5.0",
+ "_id": "concat-stream@1.6.1",
+ "_inBundle": false,
+ "_integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==",
+ "_location": "/pacote/make-fetch-happen/mississippi/concat-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "concat-stream@^1.5.0",
+ "name": "concat-stream",
+ "escapedName": "concat-stream",
+ "rawSpec": "^1.5.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.5.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz",
+ "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26",
+ "_spec": "concat-stream@^1.5.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Max Ogden",
+ "email": "max@maxogden.com"
+ },
+ "bugs": {
+ "url": "http://github.com/maxogden/concat-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ },
+ "deprecated": false,
+ "description": "writable stream that concatenates strings or binary data and calls a callback with the result",
+ "devDependencies": {
+ "tape": "^4.6.3"
+ },
+ "engines": [
+ "node >= 0.8"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/maxogden/concat-stream#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "concat-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/maxogden/concat-stream.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js test/server/*.js"
+ },
+ "tags": [
+ "stream",
+ "simple",
+ "util",
+ "utility"
+ ],
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/17..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ },
+ "version": "1.6.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md
new file mode 100644
index 0000000000..9478721990
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/concat-stream/readme.md
@@ -0,0 +1,102 @@
+# concat-stream
+
+Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer.
+
+[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream)
+
+[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/)
+
+### description
+
+Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you.
+
+Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM).
+
+There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details.
+
+## Related
+
+`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
+
+### examples
+
+#### Buffers
+
+```js
+var fs = require('fs')
+var concat = require('concat-stream')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = concat(gotPicture)
+
+readStream.on('error', handleError)
+readStream.pipe(concatStream)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+
+```
+
+#### Arrays
+
+```js
+var write = concat(function(data) {})
+write.write([1,2,3])
+write.write([4,5,6])
+write.end()
+// data will be [1,2,3,4,5,6] in the above callback
+```
+
+#### Uint8Arrays
+
+```js
+var write = concat(function(data) {})
+var a = new Uint8Array(3)
+a[0] = 97; a[1] = 98; a[2] = 99
+write.write(a)
+write.write('!')
+write.end(Buffer('!!1'))
+```
+
+See `test/` for more examples
+
+# methods
+
+```js
+var concat = require('concat-stream')
+```
+
+## var writable = concat(opts={}, cb)
+
+Return a `writable` stream that will fire `cb(data)` with all of the data that
+was written to the stream. Data can be written to `writable` as strings,
+Buffers, arrays of byte integers, and Uint8Arrays.
+
+By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason.
+
+* `string` - get a string
+* `buffer` - get back a Buffer
+* `array` - get an array of byte integers
+* `uint8array`, `u8`, `uint8` - get back a Uint8Array
+* `object`, get back an array of Objects
+
+If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`.
+
+If nothing is written to `writable` then `data` will be an empty array `[]`.
+
+# error handling
+
+`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors.
+
+We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code.
+
+# license
+
+MIT LICENSE
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md
new file mode 100644
index 0000000000..8352900fc6
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/README.md
@@ -0,0 +1,97 @@
+# duplexify
+
+Turn a writeable and readable stream into a single streams2 duplex stream.
+
+Similar to [duplexer2](https://github.com/deoxxa/duplexer2) except it supports both streams2 and streams1 as input
+and it allows you to set the readable and writable part asynchronously using `setReadable(stream)` and `setWritable(stream)`
+
+```
+npm install duplexify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/duplexify.svg?style=flat)](http://travis-ci.org/mafintosh/duplexify)
+
+## Usage
+
+Use `duplexify(writable, readable, streamOptions)` (or `duplexify.obj(writable, readable)` to create an object stream)
+
+``` js
+var duplexify = require('duplexify')
+
+// turn writableStream and readableStream into a single duplex stream
+var dup = duplexify(writableStream, readableStream)
+
+dup.write('hello world') // will write to writableStream
+dup.on('data', function(data) {
+ // will read from readableStream
+})
+```
+
+You can also set the readable and writable parts asynchronously
+
+``` js
+var dup = duplexify()
+
+dup.write('hello world') // write will buffer until the writable
+ // part has been set
+
+// wait a bit ...
+dup.setReadable(readableStream)
+
+// maybe wait some more?
+dup.setWritable(writableStream)
+```
+
+If you call `setReadable` or `setWritable` multiple times it will unregister the previous readable/writable stream.
+To disable the readable or writable part call `setReadable` or `setWritable` with `null`.
+
+If the readable or writable streams emits an error or close it will destroy both streams and bubble up the event.
+You can also explicitly destroy the streams by calling `dup.destroy()`. The `destroy` method optionally takes an
+error object as argument, in which case the error is emitted as part of the `error` event.
+
+``` js
+dup.on('error', function(err) {
+ console.log('readable or writable emitted an error - close will follow')
+})
+
+dup.on('close', function() {
+ console.log('the duplex stream is destroyed')
+})
+
+dup.destroy() // calls destroy on the readable and writable part (if present)
+```
+
+## HTTP request example
+
+Turn a node core http request into a duplex stream is as easy as
+
+``` js
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
+```
+
+## License
+
+MIT
+
+## Related
+
+`duplexify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js
new file mode 100644
index 0000000000..5585c19756
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/example.js
@@ -0,0 +1,21 @@
+var duplexify = require('duplexify')
+var http = require('http')
+
+var request = function(opts) {
+ var req = http.request(opts)
+ var dup = duplexify()
+ dup.setWritable(req)
+ req.on('response', function(res) {
+ dup.setReadable(res)
+ })
+ return dup
+}
+
+var req = request({
+ method: 'GET',
+ host: 'www.google.com',
+ port: 80
+})
+
+req.end()
+req.pipe(process.stdout)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js
new file mode 100644
index 0000000000..8323e654ac
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/index.js
@@ -0,0 +1,241 @@
+var stream = require('readable-stream')
+var eos = require('end-of-stream')
+var inherits = require('inherits')
+var shift = require('stream-shift')
+
+var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from)
+ ? Buffer.from([0])
+ : new Buffer([0])
+
+var onuncork = function(self, fn) {
+ if (self._corked) self.once('uncork', fn)
+ else fn()
+}
+
+var destroyer = function(self, end) {
+ return function(err) {
+ if (err) self._destroyInterval(err)
+ else if (end && !self._ended) self.end()
+ }
+}
+
+var end = function(ws, fn) {
+ if (!ws) return fn()
+ if (ws._writableState && ws._writableState.finished) return fn()
+ if (ws._writableState) return ws.end(fn)
+ ws.end()
+ fn()
+}
+
+var toStreams2 = function(rs) {
+ return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)
+}
+
+var Duplexify = function(writable, readable, opts) {
+ if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)
+ stream.Duplex.call(this, opts)
+
+ this._writable = null
+ this._readable = null
+ this._readable2 = null
+
+ this._forwardDestroy = !opts || opts.destroy !== false
+ this._forwardEnd = !opts || opts.end !== false
+ this._corked = 1 // start corked
+ this._ondrain = null
+ this._drained = false
+ this._forwarding = false
+ this._unwrite = null
+ this._unread = null
+ this._ended = false
+ this._error = null
+ this._preferError = false
+
+ this.destroyed = false
+
+ if (writable) this.setWritable(writable)
+ if (readable) this.setReadable(readable)
+}
+
+inherits(Duplexify, stream.Duplex)
+
+Duplexify.obj = function(writable, readable, opts) {
+ if (!opts) opts = {}
+ opts.objectMode = true
+ opts.highWaterMark = 16
+ return new Duplexify(writable, readable, opts)
+}
+
+Duplexify.prototype.cork = function() {
+ if (++this._corked === 1) this.emit('cork')
+}
+
+Duplexify.prototype.uncork = function() {
+ if (this._corked && --this._corked === 0) this.emit('uncork')
+}
+
+Duplexify.prototype.setWritable = function(writable) {
+ if (this._unwrite) this._unwrite()
+
+ if (this.destroyed) {
+ if (writable && writable.destroy) writable.destroy()
+ return
+ }
+
+ if (writable === null || writable === false) {
+ this.end()
+ return
+ }
+
+ var self = this
+ var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd))
+
+ var ondrain = function() {
+ var ondrain = self._ondrain
+ self._ondrain = null
+ if (ondrain) ondrain()
+ }
+
+ var clear = function() {
+ self._writable.removeListener('drain', ondrain)
+ unend()
+ }
+
+ if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks
+
+ this._writable = writable
+ this._writable.on('drain', ondrain)
+ this._unwrite = clear
+
+ this.uncork() // always uncork setWritable
+}
+
+Duplexify.prototype.setReadable = function(readable) {
+ if (this._unread) this._unread()
+
+ if (this.destroyed) {
+ if (readable && readable.destroy) readable.destroy()
+ return
+ }
+
+ if (readable === null || readable === false) {
+ this.push(null)
+ this.resume()
+ return
+ }
+
+ var self = this
+ var unend = eos(readable, {writable:false, readable:true}, destroyer(this))
+
+ var onreadable = function() {
+ self._forward()
+ }
+
+ var onend = function() {
+ self.push(null)
+ }
+
+ var clear = function() {
+ self._readable2.removeListener('readable', onreadable)
+ self._readable2.removeListener('end', onend)
+ unend()
+ }
+
+ this._drained = true
+ this._readable = readable
+ this._readable2 = readable._readableState ? readable : toStreams2(readable)
+ this._readable2.on('readable', onreadable)
+ this._readable2.on('end', onend)
+ this._unread = clear
+
+ this._forward()
+}
+
+Duplexify.prototype._read = function() {
+ this._drained = true
+ this._forward()
+}
+
+Duplexify.prototype._forward = function() {
+ if (this._forwarding || !this._readable2 || !this._drained) return
+ this._forwarding = true
+
+ var data
+
+ while (this._drained && (data = shift(this._readable2)) !== null) {
+ if (this.destroyed) continue
+ this._drained = this.push(data)
+ }
+
+ this._forwarding = false
+}
+
+Duplexify.prototype.destroy = function(err) {
+ if (this._preferError && !this._error && err) this._error = err
+
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ self._destroy(self._preferError ? self._error : err)
+ })
+}
+
+Duplexify.prototype._destroyInterval = function(err) {
+ if (this.destroyed) return
+ if (err.message !== 'premature close') return this.destroy(err)
+ this._preferError = true
+ this.destroy(null)
+}
+
+Duplexify.prototype._destroy = function(err) {
+ if (err) {
+ var ondrain = this._ondrain
+ this._ondrain = null
+ if (ondrain) ondrain(err)
+ else this.emit('error', err)
+ }
+
+ if (this._forwardDestroy) {
+ if (this._readable && this._readable.destroy) this._readable.destroy()
+ if (this._writable && this._writable.destroy) this._writable.destroy()
+ }
+
+ this.emit('close')
+}
+
+Duplexify.prototype._write = function(data, enc, cb) {
+ if (this.destroyed) return cb()
+ if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb))
+ if (data === SIGNAL_FLUSH) return this._finish(cb)
+ if (!this._writable) return cb()
+
+ if (this._writable.write(data) === false) this._ondrain = cb
+ else cb()
+}
+
+
+Duplexify.prototype._finish = function(cb) {
+ var self = this
+ this.emit('preend')
+ onuncork(this, function() {
+ end(self._forwardEnd && self._writable, function() {
+ // haxx to not emit prefinish twice
+ if (self._writableState.prefinished === false) self._writableState.prefinished = true
+ self.emit('prefinish')
+ onuncork(self, cb)
+ })
+ })
+}
+
+Duplexify.prototype.end = function(data, enc, cb) {
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ this._ended = true
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+module.exports = Duplexify
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..96bd3ac0ed
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/pacote/make-fetch-happen/mississippi/duplexify/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/duplexify"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json
new file mode 100644
index 0000000000..f51b08f4e6
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "duplexify@^3.4.2",
+ "_id": "duplexify@3.5.4",
+ "_inBundle": false,
+ "_integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
+ "_location": "/pacote/make-fetch-happen/mississippi/duplexify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "duplexify@^3.4.2",
+ "name": "duplexify",
+ "escapedName": "duplexify",
+ "rawSpec": "^3.4.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.4.2"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi",
+ "/pacote/make-fetch-happen/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
+ "_shasum": "4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4",
+ "_spec": "duplexify@^3.4.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/duplexify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",
+ "devDependencies": {
+ "concat-stream": "^1.5.2",
+ "tape": "^4.0.0",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/duplexify",
+ "keywords": [
+ "duplex",
+ "streams2",
+ "streams",
+ "stream",
+ "writable",
+ "readable",
+ "async"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "duplexify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/duplexify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "3.5.4"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js
new file mode 100644
index 0000000000..4330e93cf0
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/duplexify/test.js
@@ -0,0 +1,291 @@
+var tape = require('tape')
+var through = require('through2')
+var concat = require('concat-stream')
+var net = require('net')
+var duplexify = require('./')
+
+tape('passthrough', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('passthrough + double end', function(t) {
+ t.plan(2)
+
+ var pt = through()
+ var dup = duplexify(pt, pt)
+
+ dup.end('hello world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('async passthrough + end', function(t) {
+ t.plan(2)
+
+ var pt = through.obj({highWaterMark:1}, function(data, enc, cb) {
+ setTimeout(function() {
+ cb(null, data)
+ }, 100)
+ })
+
+ var dup = duplexify(pt, pt)
+
+ dup.write('hello ')
+ dup.write('world')
+ dup.end()
+
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'hello world', 'same in as out')
+ }))
+})
+
+tape('duplex', function(t) {
+ var readExpected = ['read-a', 'read-b', 'read-c']
+ var writeExpected = ['write-a', 'write-b', 'write-c']
+
+ t.plan(readExpected.length+writeExpected.length+2)
+
+ var readable = through.obj()
+ var writable = through.obj(function(data, enc, cb) {
+ t.same(data, writeExpected.shift(), 'onwrite should match')
+ cb()
+ })
+
+ var dup = duplexify.obj(writable, readable)
+
+ readExpected.slice().forEach(function(data) {
+ readable.write(data)
+ })
+ readable.end()
+
+ writeExpected.slice().forEach(function(data) {
+ dup.write(data)
+ })
+ dup.end()
+
+ dup.on('data', function(data) {
+ t.same(data, readExpected.shift(), 'ondata should match')
+ })
+ dup.on('end', function() {
+ t.ok(true, 'should end')
+ })
+ dup.on('finish', function() {
+ t.ok(true, 'should finish')
+ })
+})
+
+tape('async', function(t) {
+ var dup = duplexify()
+ var pt = through()
+
+ dup.pipe(concat(function(data) {
+ t.same(data.toString(), 'i was async', 'same in as out')
+ t.end()
+ }))
+
+ dup.write('i')
+ dup.write(' was ')
+ dup.end('async')
+
+ setTimeout(function() {
+ dup.setWritable(pt)
+ setTimeout(function() {
+ dup.setReadable(pt)
+ }, 50)
+ }, 50)
+})
+
+tape('destroy', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('destroy both', function(t) {
+ t.plan(3)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ write.destroy = function() {
+ t.ok(true, 'write destroyed')
+ }
+
+ read.destroy = function() {
+ t.ok(true, 'read destroyed')
+ }
+
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ dup.destroy()
+ dup.destroy() // should only work once
+})
+
+tape('bubble read errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'read-error', 'received read error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ read.emit('error', new Error('read-error'))
+ write.emit('error', new Error('write-error')) // only emit first error
+})
+
+tape('bubble write errors', function(t) {
+ t.plan(2)
+
+ var write = through()
+ var read = through()
+ var dup = duplexify(write, read)
+
+ dup.on('error', function(err) {
+ t.same(err.message, 'write-error', 'received write error')
+ })
+ dup.on('close', function() {
+ t.ok(true, 'close emitted')
+ })
+
+ write.emit('error', new Error('write-error'))
+ read.emit('error', new Error('read-error')) // only emit first error
+})
+
+tape('reset writable / readable', function(t) {
+ t.plan(3)
+
+ var toUpperCase = function(data, enc, cb) {
+ cb(null, data.toString().toUpperCase())
+ }
+
+ var passthrough = through()
+ var upper = through(toUpperCase)
+ var dup = duplexify(passthrough, passthrough)
+
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'hello')
+ dup.setWritable(upper)
+ dup.setReadable(upper)
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ dup.once('data', function(data) {
+ t.same(data.toString(), 'HI')
+ t.end()
+ })
+ })
+ dup.write('hello')
+ dup.write('hi')
+ })
+ dup.write('hello')
+})
+
+tape('cork', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var ok = false
+
+ dup.on('prefinish', function() {
+ dup.cork()
+ setTimeout(function() {
+ ok = true
+ dup.uncork()
+ }, 100)
+ })
+ dup.on('finish', function() {
+ t.ok(ok)
+ t.end()
+ })
+ dup.end()
+})
+
+tape('prefinish not twice', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+ var prefinished = false
+
+ dup.on('prefinish', function() {
+ t.ok(!prefinished, 'only prefinish once')
+ prefinished = true
+ })
+
+ dup.on('finish', function() {
+ t.end()
+ })
+
+ dup.end()
+})
+
+tape('close', function(t) {
+ var passthrough = through()
+ var dup = duplexify(passthrough, passthrough)
+
+ passthrough.emit('close')
+ dup.on('close', function() {
+ t.ok(true, 'should forward close')
+ t.end()
+ })
+})
+
+tape('works with node native streams (net)', function(t) {
+ t.plan(1)
+
+ var server = net.createServer(function(socket) {
+ var dup = duplexify(socket, socket)
+
+ dup.once('data', function(chunk) {
+ t.same(chunk, Buffer('hello world'))
+ server.close()
+ socket.end()
+ t.end()
+ })
+ })
+
+ server.listen(0, function () {
+ var socket = net.connect(server.address().port)
+ var dup = duplexify(socket, socket)
+
+ dup.write(Buffer('hello world'))
+ })
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md
new file mode 100644
index 0000000000..f2560c939d
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/README.md
@@ -0,0 +1,52 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams, streams2 and stream3 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ // this will be set to the stream instance
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended', this === readableStream);
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished', this === writableStream);
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished', this === duplexStream);
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished but might still be readable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js
new file mode 100644
index 0000000000..be426c227c
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/index.js
@@ -0,0 +1,87 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function() {
+ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+
+ return function() {
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json
new file mode 100644
index 0000000000..17fba30234
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/end-of-stream/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "end-of-stream@^1.1.0",
+ "_id": "end-of-stream@1.4.1",
+ "_inBundle": false,
+ "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "_location": "/pacote/make-fetch-happen/mississippi/end-of-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "end-of-stream@^1.1.0",
+ "name": "end-of-stream",
+ "escapedName": "end-of-stream",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi",
+ "/pacote/make-fetch-happen/mississippi/duplexify",
+ "/pacote/make-fetch-happen/mississippi/pump",
+ "/pacote/make-fetch-happen/mississippi/pumpify/pump",
+ "/pacote/make-fetch-happen/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43",
+ "_spec": "end-of-stream@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "once": "^1.4.0"
+ },
+ "deprecated": false,
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "keywords": [
+ "stream",
+ "streams",
+ "callback",
+ "finish",
+ "close",
+ "end",
+ "wait"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "end-of-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.4.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
new file mode 100644
index 0000000000..3e70011a19
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.npmignore
@@ -0,0 +1,3 @@
+node_modules
+bundle.js
+test.html
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
new file mode 100644
index 0000000000..c042821703
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - '4.0'
+ - '5.0'
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md
new file mode 100644
index 0000000000..7ea7b699b8
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/README.md
@@ -0,0 +1,59 @@
+# flush-write-stream
+
+A write stream constructor that supports a flush function that is called before `finish` is emitted
+
+```
+npm install flush-write-stream
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/flush-write-stream.svg?style=flat)](http://travis-ci.org/mafintosh/flush-write-stream)
+
+## Usage
+
+``` js
+var writer = require('flush-write-stream')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+## API
+
+#### `var ws = writer([options], write, [flush])`
+
+Create a new writable stream. Options are forwarded to the stream constructor.
+
+#### `var ws = writer.obj([options], write, [flush])`
+
+Same as the above except `objectMode` is set to `true` per default.
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js
new file mode 100644
index 0000000000..fa6b5dab25
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/example.js
@@ -0,0 +1,22 @@
+var writer = require('./')
+
+var ws = writer(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js
new file mode 100644
index 0000000000..e82e126126
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/index.js
@@ -0,0 +1,52 @@
+var stream = require('readable-stream')
+var inherits = require('inherits')
+
+var SIGNAL_FLUSH = new Buffer([0])
+
+module.exports = WriteStream
+
+function WriteStream (opts, write, flush) {
+ if (!(this instanceof WriteStream)) return new WriteStream(opts, write, flush)
+
+ if (typeof opts === 'function') {
+ flush = write
+ write = opts
+ opts = {}
+ }
+
+ stream.Writable.call(this, opts)
+
+ this.destroyed = false
+ this._worker = write || null
+ this._flush = flush || null
+}
+
+inherits(WriteStream, stream.Writable)
+
+WriteStream.obj = function (opts, worker, flush) {
+ if (typeof opts === 'function') return WriteStream.obj(null, opts, worker)
+ if (!opts) opts = {}
+ opts.objectMode = true
+ return new WriteStream(opts, worker, flush)
+}
+
+WriteStream.prototype._write = function (data, enc, cb) {
+ if (SIGNAL_FLUSH === data) this._flush(cb)
+ else this._worker(data, enc, cb)
+}
+
+WriteStream.prototype.end = function (data, enc, cb) {
+ if (!this._flush) return stream.Writable.prototype.end.apply(this, arguments)
+ if (typeof data === 'function') return this.end(null, null, data)
+ if (typeof enc === 'function') return this.end(data, null, enc)
+ if (data) this.write(data)
+ if (!this._writableState.ending) this.write(SIGNAL_FLUSH)
+ return stream.Writable.prototype.end.call(this, cb)
+}
+
+WriteStream.prototype.destroy = function (err) {
+ if (this.destroyed) return
+ this.destroyed = true
+ if (err) this.emit('error', err)
+ this.emit('close')
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json
new file mode 100644
index 0000000000..23519f7b5a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "flush-write-stream@^1.0.0",
+ "_id": "flush-write-stream@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=",
+ "_location": "/pacote/make-fetch-happen/mississippi/flush-write-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "flush-write-stream@^1.0.0",
+ "name": "flush-write-stream",
+ "escapedName": "flush-write-stream",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz",
+ "_shasum": "c81b90d8746766f1a609a46809946c45dd8ae417",
+ "_spec": "flush-write-stream@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/flush-write-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.4"
+ },
+ "deprecated": false,
+ "description": "A write stream constructor that supports a flush function that is called before finish is emitted",
+ "devDependencies": {
+ "tape": "^4.2.2"
+ },
+ "homepage": "https://github.com/mafintosh/flush-write-stream",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "flush-write-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/flush-write-stream.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js
new file mode 100644
index 0000000000..6cd0c20e1f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/flush-write-stream/test.js
@@ -0,0 +1,85 @@
+var tape = require('tape')
+var writer = require('./')
+
+tape('is a write stream', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var ws = writer.obj(write)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+})
+
+tape('is flushable', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer.obj(write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('can pass options', function (t) {
+ var expected = ['hello', 'world', 'verden']
+ var flushed = false
+
+ var ws = writer({objectMode: true}, write, flush)
+
+ ws.write('hello')
+ ws.write('world')
+ ws.write('verden')
+ ws.end(function () {
+ t.same(expected.length, 0)
+ t.ok(flushed, 'was flushed')
+ t.end()
+ })
+
+ function write (data, enc, cb) {
+ t.same(data, expected.shift())
+ cb()
+ }
+
+ function flush (cb) {
+ flushed = true
+ process.nextTick(cb)
+ }
+})
+
+tape('emits error on destroy', function (t) {
+ var expected = new Error()
+
+ var ws = writer({objectMode: true}, function () {})
+
+ ws.on('error', function (err) {
+ t.equal(err, expected)
+ })
+ ws.on('close', t.end)
+
+ ws.destroy(expected)
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml
new file mode 100644
index 0000000000..b03ffabcab
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+before_install:
+ - npm install -g npm
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+ - "iojs"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md
new file mode 100644
index 0000000000..146cb32a7d
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/LICENSE.md
@@ -0,0 +1,21 @@
+## The MIT License (MIT) ##
+
+Copyright (c) 2014 Hugh Kennedy
+
+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/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md
new file mode 100644
index 0000000000..3e041a412a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/README.md
@@ -0,0 +1,70 @@
+# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
+
+`from2` is a high-level module for creating readable streams that properly handle backpressure.
+
+Convience wrapper for
+[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
+base class, with an API lifted from
+[from](http://github.com/dominictarr/from) and
+[through2](http://github.com/rvagg/through2).
+
+## Usage ##
+
+[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
+
+### `stream = from2([opts], read)` ###
+
+Where `opts` are the options to pass on to the `ReadableStream` constructor,
+and `read(size, next)` is called when data is requested from the stream.
+
+* `size` is the recommended amount of data (in bytes) to retrieve.
+* `next(err)` should be called when you're ready to emit more data.
+
+For example, here's a readable stream that emits the contents of a given
+string:
+
+``` javascript
+var from = require('from2')
+
+function fromString(string) {
+ return from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### `stream = from2.obj([opts], read)` ###
+
+Shorthand for `from2({ objectMode: true }, read)`.
+
+### `createStream = from2.ctor([opts], read)` ###
+
+If you're creating similar streams in quick succession you can improve
+performance by generating a stream **constructor** that you can reuse instead
+of creating one-off streams on each call.
+
+Takes the same options as `from2`, instead returning a constructor which you
+can use to create new streams.
+
+### See Also
+
+- [from2-array](https://github.com/binocarlos/from2-array) - Create a from2 stream based on an array of source values.
+- [from2-string](https://github.com/yoshuawuyts/from2-string) - Create a stream from a string. Sugary wrapper around from2.
+
+## License ##
+
+MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js
new file mode 100644
index 0000000000..cb200c610a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/index.js
@@ -0,0 +1,103 @@
+var Readable = require('readable-stream').Readable
+var inherits = require('inherits')
+
+module.exports = from2
+
+from2.ctor = ctor
+from2.obj = obj
+
+var Proto = ctor()
+
+function toFunction(list) {
+ list = list.slice()
+ return function (_, cb) {
+ var err = null
+ var item = list.length ? list.shift() : null
+ if (item instanceof Error) {
+ err = item
+ item = null
+ }
+
+ cb(err, item)
+ }
+}
+
+function from2(opts, read) {
+ if (typeof opts !== 'object' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ var rs = new Proto(opts)
+ rs._from = Array.isArray(read) ? toFunction(read) : (read || noop)
+ return rs
+}
+
+function ctor(opts, read) {
+ if (typeof opts === 'function') {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+
+ inherits(Class, Readable)
+ function Class(override) {
+ if (!(this instanceof Class)) return new Class(override)
+ this._reading = false
+ this._callback = check
+ this.destroyed = false
+ Readable.call(this, override || opts)
+
+ var self = this
+ var hwm = this._readableState.highWaterMark
+
+ function check(err, data) {
+ if (self.destroyed) return
+ if (err) return self.destroy(err)
+ if (data === null) return self.push(null)
+ self._reading = false
+ if (self.push(data)) self._read(hwm)
+ }
+ }
+
+ Class.prototype._from = read || noop
+ Class.prototype._read = function(size) {
+ if (this._reading || this.destroyed) return
+ this._reading = true
+ this._from(size, this._callback)
+ }
+
+ Class.prototype.destroy = function(err) {
+ if (this.destroyed) return
+ this.destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err) self.emit('error', err)
+ self.emit('close')
+ })
+ }
+
+ return Class
+}
+
+function obj(opts, read) {
+ if (typeof opts === 'function' || Array.isArray(opts)) {
+ read = opts
+ opts = {}
+ }
+
+ opts = defaults(opts)
+ opts.objectMode = true
+ opts.highWaterMark = 16
+
+ return from2(opts, read)
+}
+
+function noop () {}
+
+function defaults(opts) {
+ opts = opts || {}
+ return opts
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json
new file mode 100644
index 0000000000..eb22ffaa86
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "from2@^2.1.0",
+ "_id": "from2@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+ "_location": "/pacote/make-fetch-happen/mississippi/from2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "from2@^2.1.0",
+ "name": "from2",
+ "escapedName": "from2",
+ "rawSpec": "^2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.1.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+ "_shasum": "8bfb5502bde4a4d36cfdeea007fcca21d7e382af",
+ "_spec": "from2@^2.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Hugh Kennedy",
+ "email": "hughskennedy@gmail.com",
+ "url": "http://hughsk.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/hughsk/from2/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
+ "devDependencies": {
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/hughsk/from2",
+ "keywords": [
+ "from",
+ "stream",
+ "readable",
+ "pull",
+ "convenience",
+ "wrapper"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "from2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hughsk/from2.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "version": "2.3.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js
new file mode 100644
index 0000000000..150429b0f7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/from2/test.js
@@ -0,0 +1,121 @@
+var test = require('tape')
+var path = require('path')
+var from = require('./')
+var fs = require('fs')
+
+var tmp = path.resolve(
+ __dirname, 'tmp.txt'
+)
+
+function fromString(string) {
+ return from(function(size, next) {
+ if (string.length <= 0) return next(null, null)
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+ next(null, chunk)
+ })
+}
+
+test('from2', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+
+ stream
+ .pipe(fs.createWriteStream(tmp))
+ .on('close', function() {
+ t.equal(fs.readFileSync(tmp, 'utf8'), contents)
+ fs.unlinkSync(tmp)
+ t.end()
+ })
+})
+
+test('old mode', function(t) {
+ var contents = fs.readFileSync(__filename, 'utf8')
+ var stream = fromString(contents)
+ var buffer = ''
+
+ stream.on('data', function(data) {
+ buffer += data
+ }).on('end', function() {
+ t.equal(buffer, contents)
+ t.end()
+ })
+})
+
+test('destroy', function(t) {
+ var stream = from(function(size, next) {
+ process.nextTick(function() {
+ next(null, 'no')
+ })
+ })
+
+ stream.on('data', function(data) {
+ t.ok(false)
+ }).on('close', function() {
+ t.ok(true)
+ t.end()
+ })
+
+ stream.destroy()
+})
+
+test('arrays', function (t) {
+ var input = ['a', 'b', 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+test('obj arrays', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('end', function () {
+ t.deepEqual(input, output)
+ t.end()
+ })
+})
+
+
+test('arrays can emit errors', function (t) {
+ var input = ['a', 'b', new Error('ooops'), 'c']
+ var stream = from(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter.toString())
+ })
+ stream.on('error', function(e){
+ t.deepEqual(['a', 'b'], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
+
+test('obj arrays can emit errors', function (t) {
+ var input = [{foo:'a'}, {foo:'b'}, new Error('ooops'), {foo:'c'}]
+ var stream = from.obj(input)
+ var output = []
+ stream.on('data', function (letter) {
+ output.push(letter)
+ })
+ stream.on('error', function(e){
+ t.deepEqual([{foo:'a'}, {foo:'b'}], output)
+ t.equal('ooops', e.message)
+ t.end()
+ })
+ stream.on('end', function () {
+ t.fail('the stream should have errored')
+ })
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE
new file mode 100644
index 0000000000..4b30ed5d95
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md
new file mode 100644
index 0000000000..f53e130849
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/README.md
@@ -0,0 +1,54 @@
+# parallel-transform
+
+[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms
+in parallel without changing the order of the output.
+
+ npm install parallel-transform
+
+It is easy to use
+
+``` js
+var transform = require('parallel-transform');
+
+var stream = transform(10, function(data, callback) { // 10 is the parallism level
+ setTimeout(function() {
+ callback(null, data);
+ }, Math.random() * 1000);
+});
+
+for (var i = 0; i < 10; i++) {
+ stream.write(''+i);
+}
+stream.end();
+
+stream.on('data', function(data) {
+ console.log(data); // prints 0,1,2,...
+});
+stream.on('end', function() {
+ console.log('stream has ended');
+});
+```
+
+If you run the above example you'll notice that it runs in parallel
+(does not take ~1 second between each print) and that the order is preserved
+
+## Stream options
+
+All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`.
+If you want to use your own stream options pass them as the second parameter
+
+``` js
+var stream = transform(10, {objectMode:false}, function(data, callback) {
+ // data is now a buffer
+ callback(null, data);
+});
+
+fs.createReadStream('filename').pipe(stream).pipe(process.stdout);
+```
+
+### Unordered
+Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order.
+
+## License
+
+MIT \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js
new file mode 100644
index 0000000000..77329e4ccf
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/index.js
@@ -0,0 +1,105 @@
+var Transform = require('readable-stream').Transform;
+var inherits = require('inherits');
+var cyclist = require('cyclist');
+var util = require('util');
+
+var ParallelTransform = function(maxParallel, opts, ontransform) {
+ if (!(this instanceof ParallelTransform)) return new ParallelTransform(maxParallel, opts, ontransform);
+
+ if (typeof maxParallel === 'function') {
+ ontransform = maxParallel;
+ opts = null;
+ maxParallel = 1;
+ }
+ if (typeof opts === 'function') {
+ ontransform = opts;
+ opts = null;
+ }
+
+ if (!opts) opts = {};
+ if (!opts.highWaterMark) opts.highWaterMark = Math.max(maxParallel, 16);
+ if (opts.objectMode !== false) opts.objectMode = true;
+
+ Transform.call(this, opts);
+
+ this._maxParallel = maxParallel;
+ this._ontransform = ontransform;
+ this._destroyed = false;
+ this._flushed = false;
+ this._ordered = opts.ordered !== false;
+ this._buffer = this._ordered ? cyclist(maxParallel) : [];
+ this._top = 0;
+ this._bottom = 0;
+ this._ondrain = null;
+};
+
+inherits(ParallelTransform, Transform);
+
+ParallelTransform.prototype.destroy = function() {
+ if (this._destroyed) return;
+ this._destroyed = true;
+ this.emit('close');
+};
+
+ParallelTransform.prototype._transform = function(chunk, enc, callback) {
+ var self = this;
+ var pos = this._top++;
+
+ this._ontransform(chunk, function(err, data) {
+ if (self._destroyed) return;
+ if (err) {
+ self.emit('error', err);
+ self.push(null);
+ self.destroy();
+ return;
+ }
+ if (self._ordered) {
+ self._buffer.put(pos, (data === undefined || data === null) ? null : data);
+ }
+ else {
+ self._buffer.push(data);
+ }
+ self._drain();
+ });
+
+ if (this._top - this._bottom < this._maxParallel) return callback();
+ this._ondrain = callback;
+};
+
+ParallelTransform.prototype._flush = function(callback) {
+ this._flushed = true;
+ this._ondrain = callback;
+ this._drain();
+};
+
+ParallelTransform.prototype._drain = function() {
+ if (this._ordered) {
+ while (this._buffer.get(this._bottom) !== undefined) {
+ var data = this._buffer.del(this._bottom++);
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+ else {
+ while (this._buffer.length > 0) {
+ var data = this._buffer.pop();
+ this._bottom++;
+ if (data === null) continue;
+ this.push(data);
+ }
+ }
+
+
+ if (!this._drained() || !this._ondrain) return;
+
+ var ondrain = this._ondrain;
+ this._ondrain = null;
+ ondrain();
+};
+
+ParallelTransform.prototype._drained = function() {
+ var diff = this._top - this._bottom;
+ return this._flushed ? !diff : diff < this._maxParallel;
+};
+
+module.exports = ParallelTransform;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
new file mode 100644
index 0000000000..ba99195bae
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/.npmignore
@@ -0,0 +1 @@
+bench
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
new file mode 100644
index 0000000000..50c35cc5fd
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/README.md
@@ -0,0 +1,39 @@
+# Cyclist
+
+Cyclist is an efficient [cyclic list](http://en.wikipedia.org/wiki/Circular_buffer) implemention for Javascript.
+It is available through npm
+
+ npm install cyclist
+
+## What?
+
+Cyclist allows you to create a list of fixed size that is cyclic.
+In a cyclist list the element following the last one is the first one.
+This property can be really useful when for example trying to order data
+packets that can arrive out of order over a network stream.
+
+## Usage
+
+``` js
+var cyclist = require('cyclist');
+var list = cyclist(4); // if size (4) is not a power of 2 it will be the follwing power of 2
+ // this buffer can now hold 4 elements in total
+
+list.put(42, 'hello 42'); // store something and index 42
+list.put(43, 'hello 43'); // store something and index 43
+
+console.log(list.get(42)); // prints hello 42
+console.log(list.get(46)); // prints hello 42 again since 46 - 42 == list.size
+```
+
+## API
+
+* `cyclist(size)` creates a new buffer
+* `cyclist#get(index)` get an object stored in the buffer
+* `cyclist#put(index,value)` insert an object into the buffer
+* `cyclist#del(index)` delete an object from an index
+* `cyclist#size` property containing current size of buffer
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
new file mode 100644
index 0000000000..baf710c3a9
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/index.js
@@ -0,0 +1,33 @@
+var ensureTwoPower = function(n) {
+ if (n && !(n & (n - 1))) return n;
+ var p = 1;
+ while (p < n) p <<= 1;
+ return p;
+};
+
+var Cyclist = function(size) {
+ if (!(this instanceof Cyclist)) return new Cyclist(size);
+ size = ensureTwoPower(size);
+ this.mask = size-1;
+ this.size = size;
+ this.values = new Array(size);
+};
+
+Cyclist.prototype.put = function(index, val) {
+ var pos = index & this.mask;
+ this.values[pos] = val;
+ return pos;
+};
+
+Cyclist.prototype.get = function(index) {
+ return this.values[index & this.mask];
+};
+
+Cyclist.prototype.del = function(index) {
+ var pos = index & this.mask;
+ var val = this.values[pos];
+ this.values[pos] = undefined;
+ return val;
+};
+
+module.exports = Cyclist; \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
new file mode 100644
index 0000000000..75381174b2
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/node_modules/cyclist/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "cyclist@~0.2.2",
+ "_id": "cyclist@0.2.2",
+ "_inBundle": false,
+ "_integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
+ "_location": "/pacote/make-fetch-happen/mississippi/parallel-transform/cyclist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cyclist@~0.2.2",
+ "name": "cyclist",
+ "escapedName": "cyclist",
+ "rawSpec": "~0.2.2",
+ "saveSpec": null,
+ "fetchSpec": "~0.2.2"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/parallel-transform"
+ ],
+ "_resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+ "_shasum": "1b33792e11e914a2fd6d6ed6447464444e5fa640",
+ "_spec": "cyclist@~0.2.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/cyclist/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Cyclist is an efficient cyclic list implemention.",
+ "homepage": "https://github.com/mafintosh/cyclist#readme",
+ "keywords": [
+ "circular",
+ "buffer",
+ "ring",
+ "cyclic",
+ "data"
+ ],
+ "name": "cyclist",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/cyclist.git"
+ },
+ "version": "0.2.2"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json
new file mode 100644
index 0000000000..892ea9399f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/parallel-transform/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "parallel-transform@^1.1.0",
+ "_id": "parallel-transform@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
+ "_location": "/pacote/make-fetch-happen/mississippi/parallel-transform",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "parallel-transform@^1.1.0",
+ "name": "parallel-transform",
+ "escapedName": "parallel-transform",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+ "_shasum": "d410f065b05da23081fcd10f28854c29bda33b06",
+ "_spec": "parallel-transform@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/parallel-transform/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "cyclist": "~0.2.2",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.1.5"
+ },
+ "deprecated": false,
+ "description": "Transform stream that allows you to run your transforms in parallel without changing the order",
+ "homepage": "https://github.com/mafintosh/parallel-transform#readme",
+ "keywords": [
+ "transform",
+ "stream",
+ "parallel",
+ "preserve",
+ "order"
+ ],
+ "license": "MIT",
+ "name": "parallel-transform",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/parallel-transform.git"
+ },
+ "version": "1.1.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js
new file mode 100644
index 0000000000..f0c639a8c8
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/index.js
@@ -0,0 +1,80 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ return streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json
new file mode 100644
index 0000000000..5897928ffa
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "pump@^1.0.0",
+ "_id": "pump@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
+ "_location": "/pacote/make-fetch-happen/mississippi/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^1.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
+ "_shasum": "5dfe8311c33bbf6fc18261f9f34702c47c08a954",
+ "_spec": "pump@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..80e852c7dc
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test-browser.js
@@ -0,0 +1,58 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) console.log('done')
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+setTimeout(function () {
+ if (!check()) throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js
new file mode 100644
index 0000000000..64e772ca5b
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pump/test.js
@@ -0,0 +1,46 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) process.exit(0)
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml
new file mode 100644
index 0000000000..32e71a6b55
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+
+node_js:
+ - "0.10"
+ - "4"
+ - "5"
+
+sudo: false
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
new file mode 100644
index 0000000000..4988f7b126
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/README.md
@@ -0,0 +1,56 @@
+# pumpify
+
+Combine an array of streams into a single duplex stream using [pump](https://github.com/mafintosh/pump) and [duplexify](https://github.com/mafintosh/duplexify).
+If one of the streams closes/errors all streams in the pipeline will be destroyed.
+
+```
+npm install pumpify
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pumpify.svg?style=flat)](http://travis-ci.org/mafintosh/pumpify)
+
+## Usage
+
+Pass the streams you want to pipe together to pumpify `pipeline = pumpify(s1, s2, s3, ...)`.
+`pipeline` is a duplex stream that writes to the first streams and reads from the last one.
+Streams are piped together using [pump](https://github.com/mafintosh/pump) so if one of them closes
+all streams will be destroyed.
+
+``` js
+var pumpify = require('pumpify')
+var tar = require('tar-fs')
+var zlib = require('zlib')
+var fs = require('fs')
+
+var untar = pumpify(zlib.createGunzip(), tar.extract('output-folder'))
+// you can also pass an array instead
+// var untar = pumpify([zlib.createGunzip(), tar.extract('output-folder')])
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+If you are pumping object streams together use `pipeline = pumpify.obj(s1, s2, ...)`.
+Call `pipeline.destroy()` to destroy the pipeline (including the streams passed to pumpify).
+
+### Using `setPipeline(s1, s2, ...)`
+
+Similar to [duplexify](https://github.com/mafintosh/duplexify) you can also define the pipeline asynchronously using `setPipeline(s1, s2, ...)`
+
+``` js
+var untar = pumpify()
+
+setTimeout(function() {
+ // will start draining the input now
+ untar.setPipeline(zlib.createGunzip(), tar.extract('output-folder'))
+}, 1000)
+
+fs.createReadStream('some-gzipped-tarball.tgz').pipe(untar)
+```
+
+## License
+
+MIT
+
+## Related
+
+`pumpify` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js
new file mode 100644
index 0000000000..45bb987e85
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/index.js
@@ -0,0 +1,56 @@
+var pump = require('pump')
+var inherits = require('inherits')
+var Duplexify = require('duplexify')
+
+var toArray = function(args) {
+ if (!args.length) return []
+ return Array.isArray(args[0]) ? args[0] : Array.prototype.slice.call(args)
+}
+
+var define = function(opts) {
+ var Pumpify = function() {
+ var streams = toArray(arguments)
+ if (!(this instanceof Pumpify)) return new Pumpify(streams)
+ Duplexify.call(this, null, null, opts)
+ if (streams.length) this.setPipeline(streams)
+ }
+
+ inherits(Pumpify, Duplexify)
+
+ Pumpify.prototype.setPipeline = function() {
+ var streams = toArray(arguments)
+ var self = this
+ var ended = false
+ var w = streams[0]
+ var r = streams[streams.length-1]
+
+ r = r.readable ? r : null
+ w = w.writable ? w : null
+
+ var onclose = function() {
+ streams[0].emit('error', new Error('stream was destroyed'))
+ }
+
+ this.on('close', onclose)
+ this.on('prefinish', function() {
+ if (!ended) self.cork()
+ })
+
+ pump(streams, function(err) {
+ self.removeListener('close', onclose)
+ if (err) return self.destroy(err)
+ ended = true
+ self.uncork()
+ })
+
+ if (this.destroyed) return onclose()
+ this.setWritable(w)
+ this.setReadable(r)
+ }
+
+ return Pumpify
+}
+
+module.exports = define({destroy:false})
+module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16})
+module.exports.ctor = define
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
new file mode 100644
index 0000000000..17f94330e7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
new file mode 100644
index 0000000000..757562ec59
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
new file mode 100644
index 0000000000..5029b27d68
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/README.md
@@ -0,0 +1,56 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
new file mode 100644
index 0000000000..d9ca0335cb
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
new file mode 100644
index 0000000000..d17c2429c4
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "pump@^2.0.0",
+ "_id": "pump@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+ "_location": "/pacote/make-fetch-happen/mississippi/pumpify/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pump@^2.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/pumpify"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "_shasum": "12399add6e4cf7526d973cbc8b5ce2e2908b3909",
+ "_spec": "pump@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "deprecated": false,
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "2.0.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
new file mode 100644
index 0000000000..75ea4a292e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-browser.js
@@ -0,0 +1,62 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
new file mode 100644
index 0000000000..034a65414d
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res) {
+ process.exit(1)
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json
new file mode 100644
index 0000000000..36f52a8817
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "pumpify@^1.3.3",
+ "_id": "pumpify@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
+ "_location": "/pacote/make-fetch-happen/mississippi/pumpify",
+ "_phantomChildren": {
+ "end-of-stream": "1.4.1",
+ "once": "1.4.0"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "pumpify@^1.3.3",
+ "name": "pumpify",
+ "escapedName": "pumpify",
+ "rawSpec": "^1.3.3",
+ "saveSpec": null,
+ "fetchSpec": "^1.3.3"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
+ "_shasum": "80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb",
+ "_spec": "pumpify@^1.3.3",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pumpify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "duplexify": "^3.5.3",
+ "inherits": "^2.0.3",
+ "pump": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "Combine an array of streams into a single duplex stream using pump and duplexify",
+ "devDependencies": {
+ "tape": "^4.8.0",
+ "through2": "^2.0.3"
+ },
+ "homepage": "https://github.com/mafintosh/pumpify",
+ "keywords": [
+ "pump",
+ "duplexify",
+ "duplex",
+ "streams",
+ "stream",
+ "pipeline",
+ "combine"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "pumpify",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pumpify.git"
+ },
+ "scripts": {
+ "test": "tape test.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js
new file mode 100644
index 0000000000..de6b16e346
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/pumpify/test.js
@@ -0,0 +1,181 @@
+var tape = require('tape')
+var through = require('through2')
+var pumpify = require('./')
+var stream = require('stream')
+
+tape('basic', function(t) {
+ t.plan(3)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'hello')
+ t.end()
+ })
+})
+
+tape('3 times', function(t) {
+ t.plan(4)
+
+ var pipeline = pumpify(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+})
+
+tape('destroy', function(t) {
+ var test = through()
+ test.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify(through(), test)
+
+ pipeline.destroy()
+})
+
+tape('close', function(t) {
+ var test = through()
+ var pipeline = pumpify(through(), test)
+
+ pipeline.on('error', function(err) {
+ t.same(err.message, 'lol')
+ t.end()
+ })
+
+ test.emit('error', new Error('lol'))
+})
+
+tape('end waits for last one', function(t) {
+ var ran = false
+
+ var a = through()
+ var b = through()
+ var c = through(function(data, enc, cb) {
+ setTimeout(function() {
+ ran = true
+ cb()
+ }, 100)
+ })
+
+ var pipeline = pumpify(a, b, c)
+
+ pipeline.write('foo')
+ pipeline.end(function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ t.ok(!ran)
+})
+
+tape('always wait for finish', function(t) {
+ var a = new stream.Readable()
+ a._read = function() {}
+ a.push('hello')
+
+ var pipeline = pumpify(a, through(), through())
+ var ran = false
+
+ pipeline.on('finish', function() {
+ t.ok(ran)
+ t.end()
+ })
+
+ setTimeout(function() {
+ ran = true
+ a.push(null)
+ }, 100)
+})
+
+tape('async', function(t) {
+ var pipeline = pumpify()
+
+ t.plan(4)
+
+ pipeline.write('hello')
+ pipeline.on('data', function(data) {
+ t.same(data.toString(), 'HELLO')
+ t.end()
+ })
+
+ setTimeout(function() {
+ pipeline.setPipeline(
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'HELLO')
+ cb(null, data.toString().toLowerCase())
+ }),
+ through(function(data, enc, cb) {
+ t.same(data.toString(), 'hello')
+ cb(null, data.toString().toUpperCase())
+ })
+ )
+ }, 100)
+})
+
+tape('early destroy', function(t) {
+ var a = through()
+ var b = through()
+ var c = through()
+
+ b.destroy = function() {
+ t.ok(true)
+ t.end()
+ }
+
+ var pipeline = pumpify()
+
+ pipeline.destroy()
+ setTimeout(function() {
+ pipeline.setPipeline(a, b, c)
+ }, 100)
+})
+
+tape('preserves error', function (t) {
+ var a = through()
+ var b = through(function (data, enc, cb) {
+ cb(new Error('stop'))
+ })
+ var c = through()
+ var s = pumpify()
+
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ s.setPipeline(a, b, c)
+ s.resume()
+ s.write('hi')
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml
new file mode 100644
index 0000000000..aa89858a8a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'stable'
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE
new file mode 100644
index 0000000000..66a4d2a149
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md
new file mode 100644
index 0000000000..e0832d55bd
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/README.md
@@ -0,0 +1,41 @@
+# stream-each
+
+Iterate all the data in a stream
+
+```
+npm install stream-each
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)
+
+## Usage
+
+``` js
+var each = require('stream-each')
+
+each(stream, function (data, next) {
+ console.log('data from stream', data)
+ // when ready to consume next chunk
+ next()
+}, function (err) {
+ console.log('no more data')
+})
+```
+
+## API
+
+#### `each(stream, iterator, cb)`
+
+Iterate the data in the stream by calling the iterator function with `(data, next)`
+where data is a data chunk and next is a callback. Call next when you are ready to
+consume the next chunk. Optionally you can call next with an error to destroy the stream
+
+When the stream ends/errors the callback is called if provided
+
+## License
+
+MIT
+
+## Related
+
+`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md
new file mode 100644
index 0000000000..fc16de25f9
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/collaborators.md
@@ -0,0 +1,7 @@
+## Collaborators
+
+stream-each is only possible due to the excellent work of the following collaborators:
+
+<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
+<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
+</tbody></table>
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js
new file mode 100644
index 0000000000..7e67f7337a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/index.js
@@ -0,0 +1,58 @@
+var eos = require('end-of-stream')
+var shift = require('stream-shift')
+
+module.exports = each
+
+function each (stream, fn, cb) {
+ var want = true
+ var error = null
+ var ended = false
+ var running = false
+ var calling = false
+
+ stream.on('readable', onreadable)
+ onreadable()
+
+ if (cb) eos(stream, {readable: true, writable: false}, done)
+ return stream
+
+ function done (err) {
+ if (!error) error = err
+ ended = true
+ if (!running) cb(error)
+ }
+
+ function onreadable () {
+ if (want) read()
+ }
+
+ function afterRead (err) {
+ running = false
+
+ if (err) {
+ error = err
+ if (ended) return cb(error)
+ stream.destroy(err)
+ return
+ }
+ if (ended) return cb(error)
+ if (!calling) read()
+ }
+
+ function read () {
+ while (!running && !ended) {
+ want = false
+
+ var data = shift(stream)
+ if (data === null) {
+ want = true
+ return
+ }
+
+ running = true
+ calling = true
+ fn(data, afterRead)
+ calling = false
+ }
+ }
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "4"
+ - "6"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Mathias Buus
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# stream-shift
+
+Returns the next buffer/object in a stream's readable queue
+
+```
+npm install stream-shift
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
+
+## Usage
+
+``` js
+var shift = require('stream-shift')
+
+console.log(shift(someStream)) // first item in its buffer
+```
+
+## Credit
+
+Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
+
+## License
+
+MIT
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+module.exports = shift
+
+function shift (stream) {
+ var rs = stream._readableState
+ if (!rs) return null
+ return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
+}
+
+function getStateLength (state) {
+ if (state.buffer.length) {
+ // Since node 6.3.0 state.buffer is a BufferList not an array
+ if (state.buffer.head) {
+ return state.buffer.head.data.length
+ }
+
+ return state.buffer[0].length
+ }
+
+ return state.length
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
new file mode 100644
index 0000000000..8d1166eabc
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+ "_location": "/pacote/make-fetch-happen/mississippi/stream-each/stream-shift",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-shift@^1.0.0",
+ "name": "stream-shift",
+ "escapedName": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/stream-each"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "_spec": "stream-shift@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Returns the next buffer/object in a stream's readable queue",
+ "devDependencies": {
+ "standard": "^7.1.2",
+ "tape": "^4.6.0",
+ "through2": "^2.0.1"
+ },
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-shift",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-shift.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+var tape = require('tape')
+var through = require('through2')
+var stream = require('stream')
+var shift = require('./')
+
+tape('shifts next', function (t) {
+ var passthrough = through()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with core', function (t) {
+ var passthrough = stream.PassThrough()
+
+ passthrough.write('hello')
+ passthrough.write('world')
+
+ t.same(shift(passthrough), Buffer('hello'))
+ t.same(shift(passthrough), Buffer('world'))
+ t.end()
+})
+
+tape('shifts next with object mode', function (t) {
+ var passthrough = through({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
+
+tape('shifts next with object mode with core', function (t) {
+ var passthrough = stream.PassThrough({objectMode: true})
+
+ passthrough.write({hello: 1})
+ passthrough.write({world: 1})
+
+ t.same(shift(passthrough), {hello: 1})
+ t.same(shift(passthrough), {world: 1})
+ t.end()
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json
new file mode 100644
index 0000000000..aab5b16ace
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "stream-each@^1.1.0",
+ "_id": "stream-each@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==",
+ "_location": "/pacote/make-fetch-happen/mississippi/stream-each",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "stream-each@^1.1.0",
+ "name": "stream-each",
+ "escapedName": "stream-each",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz",
+ "_shasum": "8e8c463f91da8991778765873fe4d960d8f616bd",
+ "_spec": "stream-each@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-each/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "stream-shift": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Iterate all the data in a stream",
+ "devDependencies": {
+ "standard": "^5.3.1",
+ "tape": "^4.2.1",
+ "through2": "^2.0.0"
+ },
+ "homepage": "https://github.com/mafintosh/stream-each",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "stream-each",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/stream-each.git"
+ },
+ "scripts": {
+ "test": "standard && tape test.js"
+ },
+ "version": "1.2.2"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js
new file mode 100644
index 0000000000..277634cd05
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/stream-each/test.js
@@ -0,0 +1,122 @@
+var tape = require('tape')
+var through = require('through2')
+var each = require('./')
+
+tape('each', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+})
+
+tape('each and callback', function (t) {
+ var s = through.obj()
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.end()
+ })
+})
+
+tape('each (write after)', function (t) {
+ var s = through.obj()
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = ['a', 'b', 'c']
+ each(s, function (data, next) {
+ t.same(data, expected.shift())
+ next()
+ })
+
+ setTimeout(function () {
+ s.write('a')
+ s.write('b')
+ s.write('c')
+ s.end()
+ }, 100)
+})
+
+tape('each error', function (t) {
+ var s = through.obj()
+ s.write('hello')
+ s.on('error', function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ })
+})
+
+tape('each error and callback', function (t) {
+ var s = through.obj()
+ s.write('hello')
+
+ each(s, function (data, next) {
+ next(new Error('stop'))
+ }, function (err) {
+ t.same(err.message, 'stop')
+ t.end()
+ })
+})
+
+tape('each with falsey values', function (t) {
+ var s = through.obj()
+ s.write(0)
+ s.write(false)
+ s.write(undefined)
+ s.end()
+
+ s.on('end', function () {
+ t.end()
+ })
+
+ var expected = [0, false]
+ var count = 0
+ each(s, function (data, next) {
+ count++
+ t.same(data, expected.shift())
+ next()
+ }, function () {
+ t.same(count, 2)
+ })
+})
+
+tape('huge stack', function (t) {
+ var s = through.obj()
+
+ for (var i = 0; i < 5000; i++) {
+ s.write('foo')
+ }
+
+ s.end()
+
+ each(s, function (data, cb) {
+ if (data !== 'foo') t.fail('bad data')
+ cb()
+ }, function (err) {
+ t.error(err, 'no error')
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore
new file mode 100644
index 0000000000..1e1dcab34c
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/.npmignore
@@ -0,0 +1,3 @@
+test
+.jshintrc
+.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html
new file mode 100644
index 0000000000..ac478189ea
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.html
@@ -0,0 +1,336 @@
+<!doctype html>
+<!-- Created with GFM2HTML: https://github.com/rvagg/gfm2html -->
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title></title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="created-with" content="https://github.com/rvagg/gfm2html">
+
+ <style type="text/css">
+/* most of normalize.css */
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}[hidden],template{display:none;}html{font-family:sans-serif;/*1*/-ms-text-size-adjust:100%;/*2*/-webkit-text-size-adjust:100%;/*2*/}body{margin:0;}a{background:transparent;}a:focus{outline:thindotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em0;}abbr[title]{border-bottom:1pxdotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C""\201D""\2018""\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}table{border-collapse:collapse;border-spacing:0;}
+
+html {
+ font: 14px 'Helvetica Neue', Helvetica, arial, freesans, clean, sans-serif;
+}
+
+.container {
+ line-height: 1.6;
+ color: #333;
+ background: #eee;
+ border-radius: 3px;
+ padding: 3px;
+ width: 790px;
+ margin: 10px auto;
+}
+
+.body-content {
+ background-color: #fff;
+ border: 1px solid #CACACA;
+ padding: 30px;
+}
+
+.body-content > *:first-child {
+ margin-top: 0 !important;
+}
+
+a, a:visited {
+ color: #4183c4;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+p, blockquote, ul, ol, dl, table, pre {
+ margin: 15px 0;
+}
+
+ .markdown-body h1
+, .markdown-body h2
+, .markdown-body h3
+, .markdown-body h4
+, .markdown-body h5
+, .markdown-body h6 {
+ margin: 20px 0 10px;
+ padding: 0;
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 2.5em;
+ color: #000;
+ border-bottom: 1px solid #ddd;
+}
+
+h2 {
+ font-size: 2em;
+ border-bottom: 1px solid #eee;
+ color: #000;
+}
+
+img {
+ max-width: 100%;
+}
+
+hr {
+ background: transparent url("/img/hr.png") repeat-x 0 0;
+ border: 0 none;
+ color: #ccc;
+ height: 4px;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+tr:nth-child(2n) {
+ background-color: #f8f8f8;
+}
+
+.markdown-body tr {
+ border-top: 1px solid #ccc;
+ background-color: #fff;
+}
+
+td, th {
+ border: 1px solid #ccc;
+ padding: 6px 13px;
+}
+
+th {
+ font-weight: bold;
+}
+
+blockquote {
+ border-left: 4px solid #ddd;
+ padding: 0 15px;
+ color: #777;
+}
+
+blockquote > :last-child, blockquote > :first-child {
+ margin-bottom: 0px;
+}
+
+pre, code {
+ font-size: 13px;
+ font-family: 'UbuntuMono', monospace;
+ white-space: nowrap;
+ margin: 0 2px;
+ padding: 0px 5px;
+ border: 1px solid #eaeaea;
+ background-color: #f8f8f8;
+ border-radius: 3px;
+}
+
+pre > code {
+ white-space: pre;
+}
+
+pre {
+ overflow-x: auto;
+ white-space: pre;
+ padding: 10px;
+ line-height: 150%;
+ background-color: #f8f8f8;
+ border-color: #ccc;
+}
+
+pre code, pre tt {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ background-color: transparent;
+ border: none;
+}
+
+ .highlight .c
+, .highlight .cm
+, .highlight .cp
+, .highlight .c1 {
+ color:#999988;
+ font-style:italic;
+}
+
+.highlight .err {
+ color:#a61717;
+ background-color:#e3d2d2
+}
+
+ .highlight .o
+, .highlight .gs
+, .highlight .kc
+, .highlight .kd
+, .highlight .kn
+, .highlight .kp
+, .highlight .kr {
+ font-weight:bold
+}
+
+.highlight .cs {
+ color:#999999;
+ font-weight:bold;
+ font-style:italic
+}
+
+.highlight .gd {
+ color:#000000;
+ background-color:#ffdddd
+}
+
+.highlight .gd .x {
+ color:#000000;
+ background-color:#ffaaaa
+}
+
+.highlight .ge {
+ font-style:italic
+}
+
+ .highlight .gr
+, .highlight .gt {
+ color:#aa0000
+}
+
+ .highlight .gh
+, .highlight .bp {
+ color:#999999
+}
+
+.highlight .gi {
+ color:#000000;
+ background-color:#ddffdd
+}
+
+.highlight .gi .x {
+ color:#000000;
+ background-color:#aaffaa
+}
+
+.highlight .go {
+ color:#888888
+}
+
+ .highlight .gp
+, .highlight .nn {
+ color:#555555
+}
+
+
+.highlight .gu {
+ color:#800080;
+ font-weight:bold
+}
+
+
+.highlight .kt {
+ color:#445588;
+ font-weight:bold
+}
+
+ .highlight .m
+, .highlight .mf
+, .highlight .mh
+, .highlight .mi
+, .highlight .mo
+, .highlight .il {
+ color:#009999
+}
+
+ .highlight .s
+, .highlight .sb
+, .highlight .sc
+, .highlight .sd
+, .highlight .s2
+, .highlight .se
+, .highlight .sh
+, .highlight .si
+, .highlight .sx
+, .highlight .s1 {
+ color:#d14
+}
+
+.highlight .n {
+ color:#333333
+}
+
+ .highlight .na
+, .highlight .no
+, .highlight .nv
+, .highlight .vc
+, .highlight .vg
+, .highlight .vi
+, .highlight .nb {
+ color:#0086B3
+}
+
+.highlight .nc {
+ color:#445588;
+ font-weight:bold
+}
+
+.highlight .ni {
+ color:#800080
+}
+
+ .highlight .ne
+, .highlight .nf {
+ color:#990000;
+ font-weight:bold
+}
+
+.highlight .nt {
+ color:#000080
+}
+
+.highlight .ow {
+ font-weight:bold
+}
+
+.highlight .w {
+ color:#bbbbbb
+}
+
+.highlight .sr {
+ color:#009926
+}
+
+.highlight .ss {
+ color:#990073
+}
+
+.highlight .gc {
+ color:#999;
+ background-color:#EAF2F5
+}
+
+@media print {
+ .container {
+ background: transparent;
+ border-radius: 0;
+ padding: 0;
+ }
+
+ .body-content {
+ border: none;
+ }
+}
+</style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="body-content"><h1 id="the-mit-license-mit-">The MIT License (MIT)</h1>
+<p><strong>Copyright (c) 2016 Rod Vagg (the &quot;Original Author&quot;) and additional contributors</strong></p>
+<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
+<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, 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.</p>
+</div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md
new file mode 100644
index 0000000000..7f0b93daaa
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/LICENSE.md
@@ -0,0 +1,9 @@
+# The MIT License (MIT)
+
+**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional 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. \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md
new file mode 100644
index 0000000000..a916f15ef5
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/README.md
@@ -0,0 +1,136 @@
+# through2
+
+[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
+
+**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
+
+Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
+
+Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
+
+```js
+fs.createReadStream('ex.txt')
+ .pipe(through2(function (chunk, enc, callback) {
+ for (var i = 0; i < chunk.length; i++)
+ if (chunk[i] == 97)
+ chunk[i] = 122 // swap 'a' for 'z'
+
+ this.push(chunk)
+
+ callback()
+ }))
+ .pipe(fs.createWriteStream('out.txt'))
+ .on('finish', function () {
+ doSomethingSpecial()
+ })
+```
+
+Or object streams:
+
+```js
+var all = []
+
+fs.createReadStream('data.csv')
+ .pipe(csv2())
+ .pipe(through2.obj(function (chunk, enc, callback) {
+ var data = {
+ name : chunk[0]
+ , address : chunk[3]
+ , phone : chunk[10]
+ }
+ this.push(data)
+
+ callback()
+ }))
+ .on('data', function (data) {
+ all.push(data)
+ })
+ .on('end', function () {
+ doSomethingSpecial(all)
+ })
+```
+
+Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
+
+## API
+
+<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
+
+Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
+
+### options
+
+The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
+
+The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2({ objectMode: true, allowHalfOpen: false },
+ function (chunk, enc, cb) {
+ cb(null, 'wut?') // note we can use the second argument on the callback
+ // to provide data as an alternative to this.push('wut?')
+ }
+ )
+ .pipe(fs.createWriteStream('/tmp/wut.txt'))
+```
+
+### transformFunction
+
+The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
+
+To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
+
+Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
+
+If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
+
+### flushFunction
+
+The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
+
+```js
+fs.createReadStream('/tmp/important.dat')
+ .pipe(through2(
+ function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
+ function (cb) { // flush function
+ this.push('tacking on an extra buffer to the end');
+ cb();
+ }
+ ))
+ .pipe(fs.createWriteStream('/tmp/wut.txt'));
+```
+
+<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
+
+Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
+
+```js
+var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
+ if (record.temp != null && record.unit == "F") {
+ record.temp = ( ( record.temp - 32 ) * 5 ) / 9
+ record.unit = "C"
+ }
+ this.push(record)
+ callback()
+})
+
+// Create instances of FToC like so:
+var converter = new FToC()
+// Or:
+var converter = FToC()
+// Or specify/override options when you instantiate, if you prefer:
+var converter = FToC({objectMode: true})
+```
+
+## See Also
+
+ - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
+ - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
+ - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
+ - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
+ - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
+
+## License
+
+**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. 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/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
new file mode 100644
index 0000000000..1a14b437e8
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/LICENCE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2014 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
new file mode 100644
index 0000000000..d583fcf49d
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/Makefile
@@ -0,0 +1,4 @@
+browser:
+ node ./support/compile
+
+.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
new file mode 100644
index 0000000000..093cb2978e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/README.md
@@ -0,0 +1,32 @@
+# xtend
+
+[![browser support][3]][4]
+
+[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Extend like a boss
+
+xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
+
+## Examples
+
+```js
+var extend = require("xtend")
+
+// extend returns a new object. Does not mutate arguments
+var combination = extend({
+ a: "a",
+ b: 'c'
+}, {
+ b: "b"
+})
+// { a: "a", b: "b" }
+```
+
+## Stability status: Locked
+
+## MIT Licenced
+
+
+ [3]: http://ci.testling.com/Raynos/xtend.png
+ [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
new file mode 100644
index 0000000000..94889c9de1
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/immutable.js
@@ -0,0 +1,19 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
new file mode 100644
index 0000000000..72debede6c
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/mutable.js
@@ -0,0 +1,17 @@
+module.exports = extend
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
+
+ return target
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
new file mode 100644
index 0000000000..0fca15675a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/package.json
@@ -0,0 +1,86 @@
+{
+ "_from": "xtend@~4.0.1",
+ "_id": "xtend@4.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "_location": "/pacote/make-fetch-happen/mississippi/through2/xtend",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "xtend@~4.0.1",
+ "name": "xtend",
+ "escapedName": "xtend",
+ "rawSpec": "~4.0.1",
+ "saveSpec": null,
+ "fetchSpec": "~4.0.1"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi/through2"
+ ],
+ "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
+ "_spec": "xtend@~4.0.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2",
+ "author": {
+ "name": "Raynos",
+ "email": "raynos2@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Raynos/xtend/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Jake Verbaten"
+ },
+ {
+ "name": "Matt Esch"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "extend like a boss",
+ "devDependencies": {
+ "tape": "~1.1.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "homepage": "https://github.com/Raynos/xtend",
+ "keywords": [
+ "extend",
+ "merge",
+ "options",
+ "opts",
+ "object",
+ "array"
+ ],
+ "license": "MIT",
+ "main": "immutable",
+ "name": "xtend",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Raynos/xtend.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "testling": {
+ "files": "test.js",
+ "browsers": [
+ "ie/7..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest"
+ ]
+ },
+ "version": "4.0.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
new file mode 100644
index 0000000000..093a2b061e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/node_modules/xtend/test.js
@@ -0,0 +1,83 @@
+var test = require("tape")
+var extend = require("./")
+var mutableExtend = require("./mutable")
+
+test("merge", function(assert) {
+ var a = { a: "foo" }
+ var b = { b: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("replace", function(assert) {
+ var a = { a: "foo" }
+ var b = { a: "bar" }
+
+ assert.deepEqual(extend(a, b), { a: "bar" })
+ assert.end()
+})
+
+test("undefined", function(assert) {
+ var a = { a: undefined }
+ var b = { b: "foo" }
+
+ assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
+ assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
+ assert.end()
+})
+
+test("handle 0", function(assert) {
+ var a = { a: "default" }
+ var b = { a: 0 }
+
+ assert.deepEqual(extend(a, b), { a: 0 })
+ assert.deepEqual(extend(b, a), { a: "default" })
+ assert.end()
+})
+
+test("is immutable", function (assert) {
+ var record = {}
+
+ extend(record, { foo: "bar" })
+ assert.equal(record.foo, undefined)
+ assert.end()
+})
+
+test("null as argument", function (assert) {
+ var a = { foo: "bar" }
+ var b = null
+ var c = void 0
+
+ assert.deepEqual(extend(b, a, c), { foo: "bar" })
+ assert.end()
+})
+
+test("mutable", function (assert) {
+ var a = { foo: "bar" }
+
+ mutableExtend(a, { bar: "baz" })
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
+
+test("null prototype", function(assert) {
+ var a = { a: "foo" }
+ var b = Object.create(null)
+ b.b = "bar";
+
+ assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
+ assert.end()
+})
+
+test("null prototype mutable", function (assert) {
+ var a = { foo: "bar" }
+ var b = Object.create(null)
+ b.bar = "baz";
+
+ mutableExtend(a, b)
+
+ assert.equal(a.bar, "baz")
+ assert.end()
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json
new file mode 100644
index 0000000000..33637acbaf
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/package.json
@@ -0,0 +1,65 @@
+{
+ "_from": "through2@^2.0.0",
+ "_id": "through2@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "_location": "/pacote/make-fetch-happen/mississippi/through2",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "through2@^2.0.0",
+ "name": "through2",
+ "escapedName": "through2",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/mississippi"
+ ],
+ "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
+ "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be",
+ "_spec": "through2@^2.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "r@va.gg",
+ "url": "https://github.com/rvagg"
+ },
+ "bugs": {
+ "url": "https://github.com/rvagg/through2/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "readable-stream": "^2.1.5",
+ "xtend": "~4.0.1"
+ },
+ "deprecated": false,
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
+ "devDependencies": {
+ "bl": "~1.1.2",
+ "faucet": "0.0.1",
+ "stream-spigot": "~3.0.5",
+ "tape": "~4.6.2"
+ },
+ "homepage": "https://github.com/rvagg/through2#readme",
+ "keywords": [
+ "stream",
+ "streams2",
+ "through",
+ "transform"
+ ],
+ "license": "MIT",
+ "main": "through2.js",
+ "name": "through2",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/through2.git"
+ },
+ "scripts": {
+ "test": "node test/test.js | faucet",
+ "test-local": "brtapsauce-local test/basic-test.js"
+ },
+ "version": "2.0.3"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js
new file mode 100644
index 0000000000..ef13980d7b
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/node_modules/through2/through2.js
@@ -0,0 +1,96 @@
+var Transform = require('readable-stream/transform')
+ , inherits = require('util').inherits
+ , xtend = require('xtend')
+
+function DestroyableTransform(opts) {
+ Transform.call(this, opts)
+ this._destroyed = false
+}
+
+inherits(DestroyableTransform, Transform)
+
+DestroyableTransform.prototype.destroy = function(err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ var self = this
+ process.nextTick(function() {
+ if (err)
+ self.emit('error', err)
+ self.emit('close')
+ })
+}
+
+// a noop _transform function
+function noop (chunk, enc, callback) {
+ callback(null, chunk)
+}
+
+
+// create a new export function, used by both the main export and
+// the .ctor export, contains common logic for dealing with arguments
+function through2 (construct) {
+ return function (options, transform, flush) {
+ if (typeof options == 'function') {
+ flush = transform
+ transform = options
+ options = {}
+ }
+
+ if (typeof transform != 'function')
+ transform = noop
+
+ if (typeof flush != 'function')
+ flush = null
+
+ return construct(options, transform, flush)
+ }
+}
+
+
+// main export, just make me a transform stream!
+module.exports = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(options)
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
+
+
+// make me a reusable prototype that I can `new`, or implicitly `new`
+// with a constructor call
+module.exports.ctor = through2(function (options, transform, flush) {
+ function Through2 (override) {
+ if (!(this instanceof Through2))
+ return new Through2(override)
+
+ this.options = xtend(options, override)
+
+ DestroyableTransform.call(this, this.options)
+ }
+
+ inherits(Through2, DestroyableTransform)
+
+ Through2.prototype._transform = transform
+
+ if (flush)
+ Through2.prototype._flush = flush
+
+ return Through2
+})
+
+
+module.exports.obj = through2(function (options, transform, flush) {
+ var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
+
+ t2._transform = transform
+
+ if (flush)
+ t2._flush = flush
+
+ return t2
+})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/package.json
new file mode 100644
index 0000000000..bb78f9ead4
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/package.json
@@ -0,0 +1,63 @@
+{
+ "_from": "mississippi@^1.2.0",
+ "_id": "mississippi@1.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg==",
+ "_location": "/pacote/make-fetch-happen/mississippi",
+ "_phantomChildren": {
+ "inherits": "2.0.3",
+ "once": "1.4.0",
+ "readable-stream": "2.3.3"
+ },
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mississippi@^1.2.0",
+ "name": "mississippi",
+ "escapedName": "mississippi",
+ "rawSpec": "^1.2.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen"
+ ],
+ "_resolved": "https://registry.npmjs.org/mississippi/-/mississippi-1.3.1.tgz",
+ "_shasum": "2a8bb465e86550ac8b36a7b6f45599171d78671e",
+ "_spec": "mississippi@^1.2.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
+ "author": {
+ "name": "max ogden"
+ },
+ "bugs": {
+ "url": "https://github.com/maxogden/mississippi/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "concat-stream": "^1.5.0",
+ "duplexify": "^3.4.2",
+ "end-of-stream": "^1.1.0",
+ "flush-write-stream": "^1.0.0",
+ "from2": "^2.1.0",
+ "parallel-transform": "^1.1.0",
+ "pump": "^1.0.0",
+ "pumpify": "^1.3.3",
+ "stream-each": "^1.1.0",
+ "through2": "^2.0.0"
+ },
+ "deprecated": false,
+ "description": "a collection of useful streams",
+ "devDependencies": {},
+ "homepage": "https://github.com/maxogden/mississippi#readme",
+ "license": "BSD-2-Clause",
+ "main": "index.js",
+ "name": "mississippi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/maxogden/mississippi.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.3.1"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/readme.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/readme.md
new file mode 100644
index 0000000000..ed71403a86
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/mississippi/readme.md
@@ -0,0 +1,399 @@
+# mississippi
+
+a collection of useful stream utility modules. learn how the modules work using this and then pick the ones you want and use them individually
+
+the goal of the modules included in mississippi is to make working with streams easy without sacrificing speed, error handling or composability.
+
+## usage
+
+```js
+var miss = require('mississippi')
+```
+
+## methods
+
+- [pipe](#pipe)
+- [each](#each)
+- [pipeline](#pipeline)
+- [duplex](#duplex)
+- [through](#through)
+- [from](#from)
+- [to](#to)
+- [concat](#concat)
+- [finished](#finished)
+- [parallel](#parallel)
+
+### pipe
+
+##### `miss.pipe(stream1, stream2, stream3, ..., cb)`
+
+Pipes streams together and destroys all of them if one of them closes. Calls `cb` with `(error)` if there was an error in any of the streams.
+
+When using standard `source.pipe(destination)` the source will _not_ be destroyed if the destination emits close or error. You are also not able to provide a callback to tell when the pipe has finished.
+
+`miss.pipe` does these two things for you, ensuring you handle stream errors 100% of the time (unhandled errors are probably the most common bug in most node streams code)
+
+#### original module
+
+`miss.pipe` is provided by [`require('pump')`](https://www.npmjs.com/package/pump)
+
+#### example
+
+```js
+// lets do a simple file copy
+var fs = require('fs')
+
+var read = fs.createReadStream('./original.zip')
+var write = fs.createWriteStream('./copy.zip')
+
+// use miss.pipe instead of read.pipe(write)
+miss.pipe(read, write, function (err) {
+ if (err) return console.error('Copy error!', err)
+ console.log('Copied successfully')
+})
+```
+
+### each
+
+##### `miss.each(stream, each, [done])`
+
+Iterate the data in `stream` one chunk at a time. Your `each` function will be called with `(data, next)` where data is a data chunk and next is a callback. Call `next` when you are ready to consume the next chunk.
+
+Optionally you can call `next` with an error to destroy the stream. You can also pass the optional third argument, `done`, which is a function that will be called with `(err)` when the stream ends. The `err` argument will be populated with an error if the stream emitted an error.
+
+#### original module
+
+`miss.each` is provided by [`require('stream-each')`](https://www.npmjs.com/package/stream-each)
+
+#### example
+
+```js
+var fs = require('fs')
+var split = require('split2')
+
+var newLineSeparatedNumbers = fs.createReadStream('numbers.txt')
+
+var pipeline = miss.pipeline(newLineSeparatedNumbers, split())
+miss.each(pipeline, eachLine, done)
+var sum = 0
+
+function eachLine (line, next) {
+ sum += parseInt(line.toString())
+ next()
+}
+
+function done (err) {
+ if (err) throw err
+ console.log('sum is', sum)
+}
+```
+
+### pipeline
+
+##### `var pipeline = miss.pipeline(stream1, stream2, stream3, ...)`
+
+Builds a pipeline from all the transform streams passed in as arguments by piping them together and returning a single stream object that lets you write to the first stream and read from the last stream.
+
+If any of the streams in the pipeline emits an error or gets destroyed, or you destroy the stream it returns, all of the streams will be destroyed and cleaned up for you.
+
+#### original module
+
+`miss.pipeline` is provided by [`require('pumpify')`](https://www.npmjs.com/package/pumpify)
+
+#### example
+
+```js
+// first create some transform streams (note: these two modules are fictional)
+var imageResize = require('image-resizer-stream')({width: 400})
+var pngOptimizer = require('png-optimizer-stream')({quality: 60})
+
+// instead of doing a.pipe(b), use pipelin
+var resizeAndOptimize = miss.pipeline(imageResize, pngOptimizer)
+// `resizeAndOptimize` is a transform stream. when you write to it, it writes
+// to `imageResize`. when you read from it, it reads from `pngOptimizer`.
+// it handles piping all the streams together for you
+
+// use it like any other transform stream
+var fs = require('fs')
+
+var read = fs.createReadStream('./image.png')
+var write = fs.createWriteStream('./resized-and-optimized.png')
+
+miss.pipe(read, resizeAndOptimize, write, function (err) {
+ if (err) return console.error('Image processing error!', err)
+ console.log('Image processed successfully')
+})
+```
+
+### duplex
+
+##### `var duplex = miss.duplex([writable, readable, opts])`
+
+Take two separate streams, a writable and a readable, and turn them into a single [duplex (readable and writable) stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
+
+The returned stream will emit data from the readable. When you write to it it writes to the writable.
+
+You can either choose to supply the writable and the readable at the time you create the stream, or you can do it later using the `.setWritable` and `.setReadable` methods and data written to the stream in the meantime will be buffered for you.
+
+#### original module
+
+`miss.duplex` is provided by [`require('duplexify')`](https://www.npmjs.com/package/duplexify)
+
+#### example
+
+```js
+// lets spawn a process and take its stdout and stdin and combine them into 1 stream
+var child = require('child_process')
+
+// @- tells it to read from stdin, --data-binary sets 'raw' binary mode
+var curl = child.spawn('curl -X POST --data-binary @- http://foo.com')
+
+// duplexCurl will write to stdin and read from stdout
+var duplexCurl = miss.duplex(curl.stdin, curl.stdout)
+```
+
+### through
+
+##### `var transformer = miss.through([options, transformFunction, flushFunction])`
+
+Make a custom [transform stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform).
+
+The `options` object is passed to the internal transform stream and can be used to create an `objectMode` stream (or use the shortcut `miss.through.obj([...])`)
+
+The `transformFunction` is called when data is available for the writable side and has the signature `(chunk, encoding, cb)`. Within the function, add data to the readable side any number of times with `this.push(data)`. Call `cb()` to indicate processing of the `chunk` is complete. Or to easily emit a single error or chunk, call `cb(err, chunk)`
+
+The `flushFunction`, with signature `(cb)`, is called just before the stream is complete and should be used to wrap up stream processing.
+
+#### original module
+
+`miss.through` is provided by [`require('through2')`](https://www.npmjs.com/package/through2)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var read = fs.createReadStream('./boring_lowercase.txt')
+var write = fs.createWriteStream('./AWESOMECASE.TXT')
+
+// Leaving out the options object
+var uppercaser = miss.through(
+ function (chunk, enc, cb) {
+ cb(null, chunk.toString().toUpperCase())
+ },
+ function (cb) {
+ cb(null, 'ONE LAST BIT OF UPPERCASE')
+ }
+)
+
+miss.pipe(read, uppercaser, write, function (err) {
+ if (err) return console.error('Trouble uppercasing!')
+ console.log('Splendid uppercasing!')
+})
+```
+
+### from
+
+##### `miss.from([opts], read)`
+
+Make a custom [readable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_readable).
+
+`opts` contains the options to pass on to the ReadableStream constructor e.g. for creating a readable object stream (or use the shortcut `miss.from.obj([...])`).
+
+Returns a readable stream that calls `read(size, next)` when data is requested from the stream.
+
+- `size` is the recommended amount of data (in bytes) to retrieve.
+- `next(err, chunk)` should be called when you're ready to emit more data.
+
+#### original module
+
+`miss.from` is provided by [`require('from2')`](https://www.npmjs.com/package/from2)
+
+#### example
+
+```js
+
+
+function fromString(string) {
+ return miss.from(function(size, next) {
+ // if there's no more content
+ // left in the string, close the stream.
+ if (string.length <= 0) return next(null, null)
+
+ // Pull in a new chunk of text,
+ // removing it from the string.
+ var chunk = string.slice(0, size)
+ string = string.slice(size)
+
+ // Emit "chunk" from the stream.
+ next(null, chunk)
+ })
+}
+
+// pipe "hello world" out
+// to stdout.
+fromString('hello world').pipe(process.stdout)
+```
+
+### to
+
+##### `miss.to([options], write, [flush])`
+
+Make a custom [writable stream](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_writable).
+
+`opts` contains the options to pass on to the WritableStream constructor e.g. for creating a writable object stream (or use the shortcut `miss.to.obj([...])`).
+
+Returns a writable stream that calls `write(data, enc, cb)` when data is written to the stream.
+
+- `data` is the received data to write the destination.
+- `enc` encoding of the piece of data received.
+- `cb(err, data)` should be called when you're ready to write more data, or encountered an error.
+
+`flush(cb)` is called before `finish` is emitted and allows for cleanup steps to occur.
+
+#### original module
+
+`miss.to` is provided by [`require('flush-write-stream')`](https://www.npmjs.com/package/flush-write-stream)
+
+#### example
+
+```js
+var ws = miss.to(write, flush)
+
+ws.on('finish', function () {
+ console.log('finished')
+})
+
+ws.write('hello')
+ws.write('world')
+ws.end()
+
+function write (data, enc, cb) {
+ // i am your normal ._write method
+ console.log('writing', data.toString())
+ cb()
+}
+
+function flush (cb) {
+ // i am called before finish is emitted
+ setTimeout(cb, 1000) // wait 1 sec
+}
+```
+
+If you run the above it will produce the following output
+
+```
+writing hello
+writing world
+(nothing happens for 1 sec)
+finished
+```
+
+### concat
+
+##### `var concat = miss.concat(cb)`
+
+Returns a writable stream that concatenates all data written to the stream and calls a callback with the single result.
+
+Calling `miss.concat(cb)` returns a writable stream. `cb` is called when the writable stream is finished, e.g. when all data is done being written to it. `cb` is called with a single argument, `(data)`, which will contain the result of concatenating all the data written to the stream.
+
+Note that `miss.concat` will not handle stream errors for you. To handle errors, use `miss.pipe` or handle the `error` event manually.
+
+#### original module
+
+`miss.concat` is provided by [`require('concat-stream')`](https://www.npmjs.com/package/concat-stream)
+
+#### example
+
+```js
+var fs = require('fs')
+
+var readStream = fs.createReadStream('cat.png')
+var concatStream = miss.concat(gotPicture)
+
+function callback (err) {
+ if (err) {
+ console.error(err)
+ process.exit(1)
+ }
+}
+
+miss.pipe(readStream, concatStream, callback)
+
+function gotPicture(imageBuffer) {
+ // imageBuffer is all of `cat.png` as a node.js Buffer
+}
+
+function handleError(err) {
+ // handle your error appropriately here, e.g.:
+ console.error(err) // print the error to STDERR
+ process.exit(1) // exit program with non-zero exit code
+}
+```
+
+### finished
+
+##### `miss.finished(stream, cb)`
+
+Waits for `stream` to finish or error and then calls `cb` with `(err)`. `cb` will only be called once. `err` will be null if the stream finished without error, or else it will be populated with the error from the streams `error` event.
+
+This function is useful for simplifying stream handling code as it lets you handle success or error conditions in a single code path. It's used internally `miss.pipe`.
+
+#### original module
+
+`miss.finished` is provided by [`require('end-of-stream')`](https://www.npmjs.com/package/end-of-stream)
+
+#### example
+
+```js
+var copySource = fs.createReadStream('./movie.mp4')
+var copyDest = fs.createWriteStream('./movie-copy.mp4')
+
+copySource.pipe(copyDest)
+
+miss.finished(copyDest, function(err) {
+ if (err) return console.log('write failed', err)
+ console.log('write success')
+})
+```
+
+### parallel
+
+##### `miss.parallel(concurrency, each)`
+
+This works like `through` except you can process items in parallel, while still preserving the original input order.
+
+This is handy if you wanna take advantage of node's async I/O and process streams of items in batches. With this module you can build your very own streaming parallel job queue.
+
+Note that `miss.parallel` preserves input ordering, if you don't need that then you can use [through2-concurrent](https://github.com/almost/through2-concurrent) instead, which is very similar to this otherwise.
+
+#### original module
+
+`miss.parallel` is provided by [`require('parallel-transform')`](https://npmjs.org/parallel-transform)
+
+#### example
+
+This example fetches the GET HTTP headers for a stream of input URLs 5 at a time in parallel.
+
+```js
+function getResponse (item, cb) {
+ var r = request(item.url)
+ r.on('error', function (err) {
+ cb(err)
+ })
+ r.on('response', function (re) {
+ cb(null, {url: item.url, date: new Date(), status: re.statusCode, headers: re.headers})
+ r.abort()
+ })
+}
+
+miss.pipe(
+ fs.createReadStream('./urls.txt'), // one url per line
+ split(),
+ miss.parallel(5, getResponse),
+ miss.through(function (row, enc, next) {
+ console.log(JSON.stringify(row))
+ next()
+ })
+)
+```
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
index e12180e423..80c88dc401 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md
@@ -1,4 +1,12 @@
+4.2.0 / 2018-01-15
+==================
+
+ * Add support for returning an `http.Agent` instance
+ * Optimize promisifying logic
+ * Set `timeout` to null for proper cleanup
+ * Remove Node.js <= 0.11.3 special-casing from test case
+
4.1.2 / 2017-11-20
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
index 64175a43a4..dbeceab8a1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md
@@ -63,7 +63,7 @@ http.get(parsed, function (res) {
});
```
-You can also return a Promise or use an `async` function:
+Returning a Promise or using an `async` function is also supported:
```js
agent(async function (req, opts) {
@@ -72,6 +72,15 @@ agent(async function (req, opts) {
});
```
+Return another `http.Agent` instance to "pass through" the responsibility
+for that HTTP request to that agent:
+
+```js
+agent(function (req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+```
+
API
---
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
index df3ca727a7..b1f42e6317 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
@@ -1,20 +1,15 @@
'use strict';
-
-/**
- * Module dependencies.
- */
-
require('./patch-core');
const inherits = require('util').inherits;
const promisify = require('es6-promisify');
const EventEmitter = require('events').EventEmitter;
-/**
- * Module exports.
- */
-
module.exports = Agent;
+function isAgent(v) {
+ return v && typeof v.addRequest === 'function';
+}
+
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
@@ -22,7 +17,6 @@ module.exports = Agent;
* @param {Function} callback
* @api public
*/
-
function Agent(callback, _opts) {
if (!(this instanceof Agent)) {
return new Agent(callback, _opts);
@@ -30,6 +24,10 @@ function Agent(callback, _opts) {
EventEmitter.call(this);
+ // The callback gets promisified if it has 3 parameters
+ // (i.e. it has a callback function) lazily
+ this._promisifiedCallback = false;
+
let opts = _opts;
if ('function' === typeof callback) {
this.callback = callback;
@@ -59,19 +57,15 @@ Agent.prototype.callback = function callback(req, opts) {
*
* @api public
*/
-
-Agent.prototype.addRequest = function addRequest(
- req,
- _opts
-) {
+Agent.prototype.addRequest = function addRequest(req, _opts) {
const ownOpts = Object.assign({}, _opts);
- // set default `host` for HTTP to localhost
+ // Set default `host` for HTTP to localhost
if (null == ownOpts.host) {
ownOpts.host = 'localhost';
}
- // set default `port` for HTTP if none was explicitly specified
+ // Set default `port` for HTTP if none was explicitly specified
if (null == ownOpts.port) {
ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
}
@@ -79,7 +73,7 @@ Agent.prototype.addRequest = function addRequest(
const opts = Object.assign({}, this.options, ownOpts);
if (opts.host && opts.path) {
- // if both a `host` and `path` are specified then it's most likely the
+ // If both a `host` and `path` are specified then it's most likely the
// result of a `url.parse()` call... we need to remove the `path` portion so
// that `net.connect()` doesn't attempt to open that as a unix socket file.
delete opts.path;
@@ -91,12 +85,12 @@ Agent.prototype.addRequest = function addRequest(
delete opts.defaultPort;
delete opts.createConnection;
- // hint to use "Connection: close"
+ // Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
- // create the `stream.Duplex` instance
+ // Create the `stream.Duplex` instance
let timeout;
let timedOut = false;
const timeoutMs = this.timeout;
@@ -110,6 +104,7 @@ Agent.prototype.addRequest = function addRequest(
}
function ontimeout() {
+ timeout = null;
timedOut = true;
const err = new Error(
'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
@@ -122,6 +117,7 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
onerror(err);
}
@@ -130,18 +126,26 @@ Agent.prototype.addRequest = function addRequest(
if (timedOut) return;
if (timeout != null) {
clearTimeout(timeout);
+ timeout = null;
}
- if (socket) {
+ if (isAgent(socket)) {
+ // `socket` is actually an http.Agent instance, so relinquish
+ // responsibility for this `req` to the Agent from here on
+ socket.addRequest(req, opts);
+ } else if (socket) {
req.onSocket(socket);
} else {
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
onerror(err);
}
}
- if (this.callback.length >= 3) {
- // legacy callback function, convert to Promise
+ if (!this._promisifiedCallback && this.callback.length >= 3) {
+ // Legacy callback function - convert to a Promise
this.callback = promisify(this.callback, this);
+ this._promisifiedCallback = true;
}
if (timeoutMs > 0) {
@@ -149,10 +153,8 @@ Agent.prototype.addRequest = function addRequest(
}
try {
- Promise.resolve(this.callback(req, opts))
- .then(onsocket, callbackError);
+ Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
} catch (err) {
- Promise.reject(err)
- .catch(callbackError);
+ Promise.reject(err).catch(callbackError);
}
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
index 6ff0013622..51582059f9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
index bb07d25c17..5bc88d3a64 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md
@@ -1,21 +1,42 @@
# ES6-Promise (subset of [rsvp.js](https://github.com/tildeio/rsvp.js)) [![Build Status](https://travis-ci.org/stefanpenner/es6-promise.svg?branch=master)](https://travis-ci.org/stefanpenner/es6-promise)
-This is a polyfill of the [ES6 Promise](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
+This is a polyfill of the [ES6 Promise](http://www.ecma-international.org/ecma-262/6.0/#sec-promise-constructor). The implementation is a subset of [rsvp.js](https://github.com/tildeio/rsvp.js) extracted by @jakearchibald, if you're wanting extra features and more debugging options, check out the [full library](https://github.com/tildeio/rsvp.js).
For API details and how to use promises, see the <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">JavaScript Promises HTML5Rocks article</a>.
## Downloads
-* [es6-promise 27.86 KB (7.33 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.js)
-* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
-* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.min.js)
-* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://raw.githubusercontent.com/stefanpenner/es6-promise/master/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+* [es6-promise 27.86 KB (7.33 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js)
+* [es6-promise-auto 27.78 KB (7.3 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.js) - Automatically provides/replaces `Promise` if missing or broken.
+* [es6-promise-min 6.17 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.min.js)
+* [es6-promise-auto-min 6.19 KB (2.4 KB gzipped)](https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js) - Minified version of `es6-promise-auto` above.
+
+## CDN
+
+To use via a CDN include this in your html:
+
+```html
+<!-- Automatically provides/replaces `Promise` if missing or broken. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>
+
+<!-- Minified version of `es6-promise-auto` below. -->
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
+
+```
## Node.js
To install:
```sh
+yarn add es6-promise
+```
+
+or
+
+```sh
npm install es6-promise
```
@@ -25,20 +46,16 @@ To use:
var Promise = require('es6-promise').Promise;
```
-## Bower
-
-To install:
-
-```sh
-bower install es6-promise --save
-```
-
## Usage in IE<9
-`catch` is a reserved word in IE<9, meaning `promise.catch(func)` throws a syntax error. To work around this, you can use a string to access the property as shown in the following example.
+`catch` and `finally` are reserved keywords in IE<9, meaning
+`promise.catch(func)` or `promise.finally(func)` throw a syntax error. To work
+around this, you can use a string to access the property as shown in the
+following example.
-However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+However most minifiers will automatically fix this for you, making the
+resulting code safe for old browsers and production:
```js
promise['catch'](function(err) {
@@ -46,10 +63,8 @@ promise['catch'](function(err) {
});
```
-Or use `.then` instead:
-
```js
-promise.then(undefined, function(err) {
+promise['finally'](function() {
// ...
});
```
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
index 51eb80a648..9e5e513f56 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$3) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$2) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,301 +858,324 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$3(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$3 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$3.all = all$1;
-Promise$3.race = race$1;
-Promise$3.resolve = resolve$1;
-Promise$3.reject = reject$1;
-Promise$3._setScheduler = setScheduler;
-Promise$3._setAsap = setAsap;
-Promise$3._asap = asap;
+var Promise$2 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$3.prototype = {
- constructor: Promise$3,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$2.prototype.then = then;
+Promise$2.all = all;
+Promise$2.race = race;
+Promise$2.resolve = resolve$1;
+Promise$2.reject = reject$1;
+Promise$2._setScheduler = setScheduler;
+Promise$2._setAsap = setAsap;
+Promise$2._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$3;
+ local.Promise = Promise$2;
}
// Strange compat..
-Promise$3.polyfill = polyfill$1;
-Promise$3.Promise = Promise$3;
+Promise$2.polyfill = polyfill;
+Promise$2.Promise = Promise$2;
-Promise$3.polyfill();
+Promise$2.polyfill();
-return Promise$3;
+return Promise$2;
})));
+
+
//# sourceMappingURL=es6-promise.auto.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
index 1e06e2c73c..bff203c5fa 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,CAAC,AACvB;;ACzBA,IAAI,GAAG,GAAG,CAAC,CAAC;AACZ,I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AED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAA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AK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
index ba34fa7ced..fdf8bff267 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U.polyfill(),U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it.polyfill(),it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
index 3ada8df844..aaa7536787 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","'use strict';\n\nimport Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAA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AAC;;IAEtB,IAAI,CAAC,EAAE;QACH,IAAI,eAAe,GAAG,IAAI,CAAC;QAC3B,IAAI;YACA,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B;;ACLAA,SAAO,CAAC,QAAQ,EAAE,CAAC,AACnB,;;,;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js","lib/es6-promise.auto.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","import Promise from './es6-promise';\nPromise.polyfill();\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise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,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC,OAAO,CAAC,EAAE;;KAEX;;IAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;MACrD,OAAO;KACR;GACF;;EAED,KAAK,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;ACJ1BA,SAAO,CAAC,QAAQ,EAAE,CAAC;;;;;;;;","file":"es6-promise.auto.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
index b3724141a8..80d4645c34 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js
@@ -3,7 +3,7 @@
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version 4.1.1
+ * @version v4.2.4+314e4831
*/
(function (global, factory) {
@@ -21,7 +21,9 @@ function isFunction(x) {
return typeof x === 'function';
}
-var _isArray = undefined;
+
+
+var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
@@ -33,8 +35,8 @@ if (Array.isArray) {
var isArray = _isArray;
var len = 0;
-var vertxNext = undefined;
-var customSchedulerFn = undefined;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
@@ -63,7 +65,7 @@ function setAsap(asapFn) {
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
@@ -134,8 +136,7 @@ function flush() {
function attemptVertx() {
try {
- var r = require;
- var vertx = r('vertx');
+ var vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
@@ -143,7 +144,7 @@ function attemptVertx() {
}
}
-var scheduleFlush = undefined;
+var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
@@ -158,8 +159,6 @@ if (isNode) {
}
function then(onFulfillment, onRejection) {
- var _arguments = arguments;
-
var parent = this;
var child = new this.constructor(noop);
@@ -170,13 +169,12 @@ function then(onFulfillment, onRejection) {
var _state = parent._state;
+
if (_state) {
- (function () {
- var callback = _arguments[_state - 1];
- asap(function () {
- return invokeCallback(_state, child, callback, parent._result);
- });
- })();
+ var callback = arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
@@ -228,7 +226,7 @@ function resolve$1(object) {
return promise;
}
-var PROMISE_ID = Math.random().toString(36).substring(16);
+var PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -236,7 +234,7 @@ var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
-var GET_THEN_ERROR = new ErrorObject();
+var TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -250,8 +248,8 @@ function getThen(promise) {
try {
return promise.then;
} catch (error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -310,9 +308,9 @@ function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then$$1 === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then$$1 === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
@@ -368,6 +366,7 @@ function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
+
parent._onerror = null;
_subscribers[length] = child;
@@ -387,8 +386,8 @@ function publish(promise) {
return;
}
- var child = undefined,
- callback = undefined,
+ var child = void 0,
+ callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
@@ -405,12 +404,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-var TRY_CATCH_ERROR = new ErrorObject();
-
function tryCatch(callback, detail) {
try {
return callback(detail);
@@ -422,10 +415,10 @@ function tryCatch(callback, detail) {
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
- value = undefined,
- error = undefined,
- succeeded = undefined,
- failed = undefined;
+ value = void 0,
+ error = void 0,
+ succeeded = void 0,
+ failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
@@ -450,14 +443,14 @@ function invokeCallback(settled, promise, callback, detail) {
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
- resolve(promise, value);
- } else if (failed) {
- reject(promise, error);
- } else if (settled === FULFILLED) {
- fulfill(promise, value);
- } else if (settled === REJECTED) {
- reject(promise, value);
- }
+ resolve(promise, value);
+ } else if (failed) {
+ reject(promise, error);
+ } else if (settled === FULFILLED) {
+ fulfill(promise, value);
+ } else if (settled === REJECTED) {
+ reject(promise, value);
+ }
}
function initializePromise(promise, resolver) {
@@ -484,97 +477,103 @@ function makePromise(promise) {
promise._subscribers = [];
}
-function Enumerator$1(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+var Enumerator = function () {
+ function Enumerator(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- this._result = new Array(this.length);
+ this._result = new Array(this.length);
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-}
+ Enumerator.prototype._enumerate = function _enumerate(input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+ };
-Enumerator$1.prototype._enumerate = function (input) {
- for (var i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
- }
-};
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+ var c = this._instanceConstructor;
+ var resolve$$1 = c.resolve;
-Enumerator$1.prototype._eachEntry = function (entry, i) {
- var c = this._instanceConstructor;
- var resolve$$1 = c.resolve;
- if (resolve$$1 === resolve$1) {
- var _then = getThen(entry);
+ if (resolve$$1 === resolve$1) {
+ var _then = getThen(entry);
- if (_then === then && entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof _then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise$2) {
- var promise = new c(noop);
- handleMaybeThenable(promise, entry, _then);
- this._willSettleAt(promise, i);
+ if (_then === then && entry._state !== PENDING) {
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof _then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise$1) {
+ var promise = new c(noop);
+ handleMaybeThenable(promise, entry, _then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
} else {
- this._willSettleAt(new c(function (resolve$$1) {
- return resolve$$1(entry);
- }), i);
+ this._willSettleAt(resolve$$1(entry), i);
}
- } else {
- this._willSettleAt(resolve$$1(entry), i);
- }
-};
+ };
-Enumerator$1.prototype._settledAt = function (state, i, value) {
- var promise = this.promise;
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+ var promise = this.promise;
- if (promise._state === PENDING) {
- this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (promise._state === PENDING) {
+ this._remaining--;
+
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
- }
-};
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+ };
-Enumerator$1.prototype._willSettleAt = function (promise, i) {
- var enumerator = this;
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+ var enumerator = this;
- subscribe(promise, undefined, function (value) {
- return enumerator._settledAt(FULFILLED, i, value);
- }, function (reason) {
- return enumerator._settledAt(REJECTED, i, reason);
- });
-};
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+ };
+
+ return Enumerator;
+}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
@@ -623,8 +622,8 @@ Enumerator$1.prototype._willSettleAt = function (promise, i) {
fulfilled, or rejected if any of them become rejected.
@static
*/
-function all$1(entries) {
- return new Enumerator$1(this, entries).promise;
+function all(entries) {
+ return new Enumerator(this, entries).promise;
}
/**
@@ -692,7 +691,7 @@ function all$1(entries) {
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
-function race$1(entries) {
+function race(entries) {
/*jshint validthis:true */
var Constructor = this;
@@ -859,299 +858,322 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-function Promise$2(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise$2.all = all$1;
-Promise$2.race = race$1;
-Promise$2.resolve = resolve$1;
-Promise$2.reject = reject$1;
-Promise$2._setScheduler = setScheduler;
-Promise$2._setAsap = setAsap;
-Promise$2._asap = asap;
+var Promise$1 = function () {
+ function Promise(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise$2.prototype = {
- constructor: Promise$2,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
/**
- The primary way of interacting with a promise is through its `then` method,
- which registers callbacks to receive either a promise's eventual value or the
- reason why the promise cannot be fulfilled.
-
- ```js
- findUser().then(function(user){
- // user is available
- }, function(reason){
- // user is unavailable, and you are given the reason why
- });
- ```
-
- Chaining
- --------
-
- The return value of `then` is itself a promise. This second, 'downstream'
- promise is resolved with the return value of the first promise's fulfillment
- or rejection handler, or rejected if the handler throws an exception.
-
- ```js
- findUser().then(function (user) {
- return user.name;
- }, function (reason) {
- return 'default name';
- }).then(function (userName) {
- // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
- // will be `'default name'`
- });
-
- findUser().then(function (user) {
- throw new Error('Found user, but still unhappy');
- }, function (reason) {
- throw new Error('`findUser` rejected and we're unhappy');
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
- // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
- });
- ```
- If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-
- ```js
- findUser().then(function (user) {
- throw new PedagogicalException('Upstream error');
- }).then(function (value) {
- // never reached
- }).then(function (value) {
- // never reached
- }, function (reason) {
- // The `PedgagocialException` is propagated all the way down to here
- });
- ```
-
- Assimilation
- ------------
-
- Sometimes the value you want to propagate to a downstream promise can only be
- retrieved asynchronously. This can be achieved by returning a promise in the
- fulfillment or rejection handler. The downstream promise will then be pending
- until the returned promise is settled. This is called *assimilation*.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // The user's comments are now available
- });
- ```
-
- If the assimliated promise rejects, then the downstream promise will also reject.
-
- ```js
- findUser().then(function (user) {
- return findCommentsByAuthor(user);
- }).then(function (comments) {
- // If `findCommentsByAuthor` fulfills, we'll have the value here
- }, function (reason) {
- // If `findCommentsByAuthor` rejects, we'll have the reason here
- });
- ```
-
- Simple Example
- --------------
-
- Synchronous Example
-
- ```javascript
- let result;
-
- try {
- result = findResult();
- // success
- } catch(reason) {
+ The primary way of interacting with a promise is through its `then` method,
+ which registers callbacks to receive either a promise's eventual value or the
+ reason why the promise cannot be fulfilled.
+ ```js
+ findUser().then(function(user){
+ // user is available
+ }, function(reason){
+ // user is unavailable, and you are given the reason why
+ });
+ ```
+ Chaining
+ --------
+ The return value of `then` is itself a promise. This second, 'downstream'
+ promise is resolved with the return value of the first promise's fulfillment
+ or rejection handler, or rejected if the handler throws an exception.
+ ```js
+ findUser().then(function (user) {
+ return user.name;
+ }, function (reason) {
+ return 'default name';
+ }).then(function (userName) {
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+ // will be `'default name'`
+ });
+ findUser().then(function (user) {
+ throw new Error('Found user, but still unhappy');
+ }, function (reason) {
+ throw new Error('`findUser` rejected and we're unhappy');
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+ });
+ ```
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+ ```js
+ findUser().then(function (user) {
+ throw new PedagogicalException('Upstream error');
+ }).then(function (value) {
+ // never reached
+ }).then(function (value) {
+ // never reached
+ }, function (reason) {
+ // The `PedgagocialException` is propagated all the way down to here
+ });
+ ```
+ Assimilation
+ ------------
+ Sometimes the value you want to propagate to a downstream promise can only be
+ retrieved asynchronously. This can be achieved by returning a promise in the
+ fulfillment or rejection handler. The downstream promise will then be pending
+ until the returned promise is settled. This is called *assimilation*.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // The user's comments are now available
+ });
+ ```
+ If the assimliated promise rejects, then the downstream promise will also reject.
+ ```js
+ findUser().then(function (user) {
+ return findCommentsByAuthor(user);
+ }).then(function (comments) {
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
+ }, function (reason) {
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
+ });
+ ```
+ Simple Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let result;
+ try {
+ result = findResult();
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ findResult(function(result, err){
+ if (err) {
// failure
+ } else {
+ // success
}
- ```
-
- Errback Example
-
- ```js
- findResult(function(result, err){
- if (err) {
- // failure
- } else {
- // success
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findResult().then(function(result){
+ // success
+ }, function(reason){
+ // failure
+ });
+ ```
+ Advanced Example
+ --------------
+ Synchronous Example
+ ```javascript
+ let author, books;
+ try {
+ author = findAuthor();
+ books = findBooksByAuthor(author);
+ // success
+ } catch(reason) {
+ // failure
+ }
+ ```
+ Errback Example
+ ```js
+ function foundBooks(books) {
+ }
+ function failure(reason) {
+ }
+ findAuthor(function(author, err){
+ if (err) {
+ failure(err);
+ // failure
+ } else {
+ try {
+ findBoooksByAuthor(author, function(books, err) {
+ if (err) {
+ failure(err);
+ } else {
+ try {
+ foundBooks(books);
+ } catch(reason) {
+ failure(reason);
+ }
+ }
+ });
+ } catch(error) {
+ failure(err);
}
- });
- ```
-
- Promise Example;
-
- ```javascript
- findResult().then(function(result){
// success
- }, function(reason){
- // failure
- });
- ```
+ }
+ });
+ ```
+ Promise Example;
+ ```javascript
+ findAuthor().
+ then(findBooksByAuthor).
+ then(function(books){
+ // found books
+ }).catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method then
+ @param {Function} onFulfilled
+ @param {Function} onRejected
+ Useful for tooling.
+ @return {Promise}
+ */
- Advanced Example
- --------------
+ /**
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+ as the catch block of a try/catch statement.
+ ```js
+ function findAuthor(){
+ throw new Error('couldn't find that author');
+ }
+ // synchronous
+ try {
+ findAuthor();
+ } catch(reason) {
+ // something went wrong
+ }
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
- Synchronous Example
- ```javascript
- let author, books;
+ Promise.prototype.catch = function _catch(onRejection) {
+ return this.then(null, onRejection);
+ };
- try {
- author = findAuthor();
- books = findBooksByAuthor(author);
- // success
- } catch(reason) {
- // failure
- }
- ```
+ /**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
- Errback Example
+ Synchronous example:
```js
-
- function foundBooks(books) {
-
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
}
- function failure(reason) {
-
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
}
-
- findAuthor(function(author, err){
- if (err) {
- failure(err);
- // failure
- } else {
- try {
- findBoooksByAuthor(author, function(books, err) {
- if (err) {
- failure(err);
- } else {
- try {
- foundBooks(books);
- } catch(reason) {
- failure(reason);
- }
- }
- });
- } catch(error) {
- failure(err);
- }
- // success
- }
- });
```
- Promise Example;
+ Asynchronous example:
- ```javascript
- findAuthor().
- then(findBooksByAuthor).
- then(function(books){
- // found books
- }).catch(function(reason){
- // something went wrong
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
});
```
- @method then
- @param {Function} onFulfilled
- @param {Function} onRejected
- Useful for tooling.
+ @method finally
+ @param {Function} callback
@return {Promise}
*/
- then: then,
-
- /**
- `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
- as the catch block of a try/catch statement.
- ```js
- function findAuthor(){
- throw new Error('couldn't find that author');
- }
- // synchronous
- try {
- findAuthor();
- } catch(reason) {
- // something went wrong
- }
+ Promise.prototype.finally = function _finally(callback) {
+ var promise = this;
+ var constructor = promise.constructor;
- // async with promises
- findAuthor().catch(function(reason){
- // something went wrong
+ return promise.then(function (value) {
+ return constructor.resolve(callback()).then(function () {
+ return value;
+ });
+ }, function (reason) {
+ return constructor.resolve(callback()).then(function () {
+ throw reason;
+ });
});
- ```
+ };
- @method catch
- @param {Function} onRejection
- Useful for tooling.
- @return {Promise}
- */
- 'catch': function _catch(onRejection) {
- return this.then(null, onRejection);
- }
-};
+ return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
/*global self*/
-function polyfill$1() {
- var local = undefined;
+function polyfill() {
+ var local = void 0;
- if (typeof global !== 'undefined') {
- local = global;
- } else if (typeof self !== 'undefined') {
- local = self;
- } else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ if (typeof global !== 'undefined') {
+ local = global;
+ } else if (typeof self !== 'undefined') {
+ local = self;
+ } else {
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
}
+ }
- var P = local.Promise;
+ var P = local.Promise;
- if (P) {
- var promiseToString = null;
- try {
- promiseToString = Object.prototype.toString.call(P.resolve());
- } catch (e) {
- // silently ignored
- }
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
- if (promiseToString === '[object Promise]' && !P.cast) {
- return;
- }
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
}
+ }
- local.Promise = Promise$2;
+ local.Promise = Promise$1;
}
// Strange compat..
-Promise$2.polyfill = polyfill$1;
-Promise$2.Promise = Promise$2;
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
-return Promise$2;
+return Promise$1;
})));
+
+
//# sourceMappingURL=es6-promise.map
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
index 98c7af7ba4..bbe71e43fc 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC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C,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,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,CAAC,OAAO,GAAGA,SAAO,CAAC;;;CACzB,DC/BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
index 7696ed71f1..1d9dc4877a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){I=t}function r(t){J=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof H?function(){H(a)}:c()}function s(){var t=0,e=new V(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<G;t+=2){var e=$[t],n=$[t+1];e(n),$[t]=void 0,$[t+1]=void 0}G=0}function f(){try{var t=require,e=t("vertx");return H=e.runOnLoop||e.runOnContext,i()}catch(n){return c()}}function l(t,e){var n=arguments,r=this,o=new this.constructor(p);void 0===o[et]&&k(o);var i=r._state;return i?!function(){var t=n[i-1];J(function(){return x(i,o,t,r._result)})}():E(r,o,t,e),o}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return it.error=e,it}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){J(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?(j(t,it.error),it.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(T,t))}function j(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}function M(){this.error=null}function P(t,e){try{return t(e)}catch(n){return st.error=n,st}}function x(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=P(r,o),s===st?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}function C(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function O(){return ut++}function k(t){t[et]=ut++,t._state=void 0,t._result=void 0,t._subscribers=[]}function Y(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[et]||k(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}function q(){return new Error("Array Methods must be provided an Array")}function F(t){return new Y(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function K(t){var e=this,n=new e(p);return j(n,t),n}function L(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function N(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(t){this[et]=O(),this._result=this._state=void 0,this._subscribers=[],p!==t&&("function"!=typeof t&&L(),this instanceof U?C(this,t):N())}function W(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=U}var z=void 0;z=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=z,G=0,H=void 0,I=void 0,J=function(t,e){$[G]=t,$[G+1]=e,G+=2,2===G&&(I?I(a):tt())},Q="undefined"!=typeof window?window:void 0,R=Q||{},V=R.MutationObserver||R.WebKitMutationObserver,X="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Z="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),tt=void 0;tt=X?o():V?s():Z?u():void 0===Q&&"function"==typeof require?f():c();var et=Math.random().toString(36).substring(16),nt=void 0,rt=1,ot=2,it=new M,st=new M,ut=0;return Y.prototype._enumerate=function(t){for(var e=0;this._state===nt&&e<t.length;e++)this._eachEntry(t[e],e)},Y.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==nt)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===U){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},Y.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===nt&&(this._remaining--,t===ot?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},Y.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(rt,e,t)},function(t){return n._settledAt(ot,e,t)})},U.all=F,U.race=D,U.resolve=h,U.reject=K,U._setScheduler=n,U._setAsap=r,U._asap=J,U.prototype={constructor:U,then:l,"catch":function(t){return this.then(null,t)}},U.polyfill=W,U.Promise=U,U}); \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){B=t}function r(t){G=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof z?function(){z(a)}:c()}function s(){var t=0,e=new J(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<W;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}W=0}function f(){try{var t=Function("return this")().require("vertx");return z=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[Z]&&O(r);var o=n._state;if(o){var i=arguments[o-1];G(function(){return P(o,r,i,n._result)})}else E(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return g(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t){try{return t.then}catch(e){return nt.error=e,nt}}function y(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function m(t,e,n){G(function(t){var r=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}function b(t,e){e._state===tt?S(t,e._result):e._state===et?j(t,e._result):E(e,void 0,function(e){return g(t,e)},function(e){return j(t,e)})}function w(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===nt?(j(t,nt.error),nt.error=null):void 0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}function g(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}function A(t){t._onerror&&t._onerror(t._result),T(t)}function S(t,e){t._state===$&&(t._result=e,t._state=tt,0!==t._subscribers.length&&G(T,t))}function j(t,e){t._state===$&&(t._state=et,t._result=e,G(A,t))}function E(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+tt]=n,o[i+et]=r,0===i&&t._state&&G(T,t)}function T(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?P(n,r,o,i):o(i);t._subscribers.length=0}}function M(t,e){try{return t(e)}catch(n){return nt.error=n,nt}}function P(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if(s=M(r,o),s===nt?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void j(n,d())}else s=o,c=!0;n._state!==$||(i&&c?g(n,s):a?j(n,u):t===tt?S(n,s):t===et&&j(n,s))}function x(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}function C(){return rt++}function O(t){t[Z]=rt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function k(){return new Error("Array Methods must be provided an Array")}function F(t){return new ot(this,t).promise}function Y(t){var e=this;return new e(U(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function q(t){var e=this,n=new e(p);return j(n,t),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function L(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=it}var N=void 0;N=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var U=N,W=0,z=void 0,B=void 0,G=function(t,e){V[W]=t,V[W+1]=e,W+=2,2===W&&(B?B(a):X())},H="undefined"!=typeof window?window:void 0,I=H||{},J=I.MutationObserver||I.WebKitMutationObserver,Q="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),R="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3),X=void 0;X=Q?o():J?s():R?u():void 0===H&&"function"==typeof require?f():c();var Z=Math.random().toString(36).substring(2),$=void 0,tt=1,et=2,nt={error:null},rt=0,ot=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[Z]||O(this.promise),U(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&S(this.promise,this._result))):j(this.promise,k())}return t.prototype._enumerate=function(t){for(var e=0;this._state===$&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=_(t);if(o===l&&t._state!==$)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===it){var i=new n(p);w(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,t===et?j(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt(tt,e,t)},function(t){return n._settledAt(et,e,t)})},t}(),it=function(){function t(e){this[Z]=C(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&D(),this instanceof t?x(this,e):K())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return it.prototype.then=l,it.all=F,it.race=Y,it.resolve=h,it.reject=q,it._setScheduler=n,it._setAsap=r,it._asap=G,it.polyfill=L,it.Promise=it,it}); \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
index ac752492db..0488c1d80c 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map
@@ -1 +1 @@
-{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Enumerator","Promise","all","race","reject","_reject","Resolve","Reject","polyfill"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACAA,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAC3B,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,SAAS,UAAU,CAAC,CAAC,EAAE;EACrB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;CAChC;;AAED,AAIA,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;EACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;CAC1B,MAAM;EACL,QAAQ,GAAG,UAAU,CAAC,EAAE;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;GAC/D,CAAC;CACH;;AAED,IAAI,OAAO,GAAG,QAAQ,C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AAE,CAAC,CAAC;SACjE,CAAC,OAAO,CAAC,EAAE;;SAEX;;QAED,IAAI,eAAe,KAAK,kBAAkB,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;YACnD,OAAO;SACV;KACJ;;IAED,KAAK,CAAC,OAAO,GAAGP,SAAO,CAAC;;;AC9B5B;AACAA,SAAO,CAAC,QAAQ,GAAGO,UAAQ,CAAC;AAC5BP,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC,AAC1B,;;,;;;;","file":"es6-promise.min.js"} \ No newline at end of file
+{"version":3,"sources":["config/versionTemplate.txt","lib/es6-promise/utils.js","lib/es6-promise/asap.js","lib/es6-promise/then.js","lib/es6-promise/promise/resolve.js","lib/es6-promise/-internal.js","lib/es6-promise/enumerator.js","lib/es6-promise/promise/all.js","lib/es6-promise/promise/race.js","lib/es6-promise/promise/reject.js","lib/es6-promise/promise.js","lib/es6-promise/polyfill.js","lib/es6-promise.js"],"sourcesContent":["/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.4+314e4831\n */\n","export function objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n\nexport function isMaybeThenable(x) {\n return x !== null && typeof x === 'object';\n}\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nexport var isArray = _isArray;","var len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nexport var asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport function setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nexport function setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","import { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\n\nexport default function then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","import { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nexport default function resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","import { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nexport var PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isArray, isMaybeThenable } from './utils';\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\nexport default Enumerator;\n;","import Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nexport default function all(entries) {\n return new Enumerator(this, entries).promise;\n}","import { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nexport default function race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","import { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nexport default function reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport { isFunction } from './utils';\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n };\n\n return Promise;\n}();\n\nPromise.prototype.then = then;\nexport default Promise;\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;","/*global self*/\nimport Promise from './promise';\n\nexport default function polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","import Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;"],"names":["resolve","_resolve","then","originalThen","originalResolve","Promise","reject","_reject","Resolve","Reject"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNO,SAAS,gBAAgB,CAAC,CAAC,EAAE;EAClC,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;EACpB,OAAO,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;CACjE;;AAED,AAAO,SAAS,UA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BD;AACAA,SAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5BA,SAAO,CAAC,OAAO,GAAGA,SAAO,CAAC;;;;;;;;","file":"es6-promise.min.js"} \ No newline at end of file
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
index d90ab85a59..cce5b36071 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts
@@ -34,6 +34,13 @@ export class Promise <R> implements Thenable <R> {
catch <U> (onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
/**
+ * onSettled is invoked when/if the "promise" settles (either rejects or fulfills);
+ *
+ * @param onFinally called when/if "promise" settles
+ */
+ finally <U> (onFinally?: (callback: any) => U | Thenable<U>): Promise<U>;
+
+ /**
* Make a new promise from the thenable.
* A thenable is promise-like in as far as it has a "then" method.
*/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
index 038140d8d8..925776f55f 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
index 1055b92e75..0483201dc9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
index df4faca879..b0eaa9300e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -21,91 +20,94 @@ import originalResolve from './promise/resolve';
import originalThen from './then';
import { makePromise, PROMISE_ID } from './-internal';
-export default Enumerator;
-function Enumerator(Constructor, input) {
- this._instanceConstructor = Constructor;
- this.promise = new Constructor(noop);
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+};
- if (!this.promise[PROMISE_ID]) {
- makePromise(this.promise);
- }
+export default class Enumerator {
+ constructor(Constructor, input) {
+ this._instanceConstructor = Constructor;
+ this.promise = new Constructor(noop);
- if (isArray(input)) {
- this.length = input.length;
- this._remaining = input.length;
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
- this._result = new Array(this.length);
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.length;
- if (this.length === 0) {
- fulfill(this.promise, this._result);
- } else {
- this.length = this.length || 0;
- this._enumerate(input);
- if (this._remaining === 0) {
+ this._result = new Array(this.length);
+
+ if (this.length === 0) {
fulfill(this.promise, this._result);
+ } else {
+ this.length = this.length || 0;
+ this._enumerate(input);
+ if (this._remaining === 0) {
+ fulfill(this.promise, this._result);
+ }
}
+ } else {
+ reject(this.promise, validationError());
}
- } else {
- reject(this.promise, validationError());
}
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
-};
-
-Enumerator.prototype._enumerate = function(input) {
- for (let i = 0; this._state === PENDING && i < input.length; i++) {
- this._eachEntry(input[i], i);
+ _enumerate(input) {
+ for (let i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
}
-};
-Enumerator.prototype._eachEntry = function(entry, i) {
- let c = this._instanceConstructor;
- let { resolve } = c;
+ _eachEntry(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
- if (resolve === originalResolve) {
- let then = getThen(entry);
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
- if (then === originalThen &&
+ if (then === originalThen &&
entry._state !== PENDING) {
- this._settledAt(entry._state, i, entry._result);
- } else if (typeof then !== 'function') {
- this._remaining--;
- this._result[i] = entry;
- } else if (c === Promise) {
- let promise = new c(noop);
- handleMaybeThenable(promise, entry, then);
- this._willSettleAt(promise, i);
+ this._settledAt(entry._state, i, entry._result);
+ } else if (typeof then !== 'function') {
+ this._remaining--;
+ this._result[i] = entry;
+ } else if (c === Promise) {
+ let promise = new c(noop);
+ handleMaybeThenable(promise, entry, then);
+ this._willSettleAt(promise, i);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
} else {
- this._willSettleAt(new c(resolve => resolve(entry)), i);
+ this._willSettleAt(resolve(entry), i);
}
- } else {
- this._willSettleAt(resolve(entry), i);
}
-};
-Enumerator.prototype._settledAt = function(state, i, value) {
- let { promise } = this;
+ _settledAt(state, i, value) {
+ let { promise } = this;
- if (promise._state === PENDING) {
- this._remaining--;
+ if (promise._state === PENDING) {
+ this._remaining--;
- if (state === REJECTED) {
- reject(promise, value);
- } else {
- this._result[i] = value;
+ if (state === REJECTED) {
+ reject(promise, value);
+ } else {
+ this._result[i] = value;
+ }
}
- }
- if (this._remaining === 0) {
- fulfill(promise, this._result);
+ if (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
}
-};
-Enumerator.prototype._willSettleAt = function(promise, i) {
- let enumerator = this;
+ _willSettleAt(promise, i) {
+ let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
+ }
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
index 83ddf0662b..30db73c9d0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
index 20558cbeea..8d8f829c5e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
@@ -21,7 +19,6 @@ import Resolve from './promise/resolve';
import Reject from './promise/reject';
import then from './then';
-
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
@@ -129,33 +126,24 @@ function needsNew() {
```
@class Promise
- @param {function} resolver
+ @param {Function} resolver
Useful for tooling.
@constructor
*/
-export default function Promise(resolver) {
- this[PROMISE_ID] = nextId();
- this._result = this._state = undefined;
- this._subscribers = [];
-
- if (noop !== resolver) {
- typeof resolver !== 'function' && needsResolver();
- this instanceof Promise ? initializePromise(this, resolver) : needsNew();
- }
-}
-Promise.all = all;
-Promise.race = race;
-Promise.resolve = Resolve;
-Promise.reject = Reject;
-Promise._setScheduler = setScheduler;
-Promise._setAsap = setAsap;
-Promise._asap = asap;
+class Promise {
+ constructor(resolver) {
+ this[PROMISE_ID] = nextId();
+ this._result = this._state = undefined;
+ this._subscribers = [];
-Promise.prototype = {
- constructor: Promise,
+ if (noop !== resolver) {
+ typeof resolver !== 'function' && needsResolver();
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+ }
+ }
-/**
+ /**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
@@ -347,10 +335,9 @@ Promise.prototype = {
@param {Function} onRejected
Useful for tooling.
@return {Promise}
-*/
- then: then,
+ */
-/**
+ /**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
@@ -376,8 +363,64 @@ Promise.prototype = {
@param {Function} onRejection
Useful for tooling.
@return {Promise}
-*/
+ */
catch(onRejection) {
return this.then(null, onRejection);
}
-};
+
+/**
+ `finally` will be invoked regardless of the promise's fate just as native
+ try/catch/finally behaves
+
+ Synchronous example:
+
+ ```js
+ findAuthor() {
+ if (Math.random() > 0.5) {
+ throw new Error();
+ }
+ return new Author();
+ }
+
+ try {
+ return findAuthor(); // succeed or fail
+ } catch(error) {
+ return findOtherAuther();
+ } finally {
+ // always runs
+ // doesn't affect the return value
+ }
+ ```
+
+ Asynchronous example:
+
+ ```js
+ findAuthor().catch(function(reason){
+ return findOtherAuther();
+ }).finally(function(){
+ // author was either found, or not
+ });
+ ```
+
+ @method finally
+ @param {Function} callback
+ @return {Promise}
+*/
+ finally(callback) {
+ let promise = this;
+ let constructor = promise.constructor;
+
+ return promise.then(value => constructor.resolve(callback()).then(() => value),
+ reason => constructor.resolve(callback()).then(() => { throw reason; }));
+ }
+}
+
+Promise.prototype.then = then;
+export default Promise;
+Promise.all = all;
+Promise.race = race;
+Promise.resolve = Resolve;
+Promise.reject = Reject;
+Promise._setScheduler = setScheduler;
+Promise._setAsap = setAsap;
+Promise._asap = asap;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
index 3eeaa7e3d6..f9d9892893 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json
@@ -1,8 +1,8 @@
{
"_from": "es6-promise@^4.0.3",
- "_id": "es6-promise@4.1.1",
+ "_id": "es6-promise@4.2.4",
"_inBundle": false,
- "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify/es6-promise",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify"
],
- "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz",
- "_shasum": "8811e90915d9a0dba36274f0b242dbda78f9c92a",
+ "_resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
+ "_shasum": "dc4221c2b16518760bd8c39a52d8f356fc00ed29",
"_spec": "es6-promise@^4.0.3",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify",
"author": {
@@ -33,24 +33,34 @@
"url": "https://github.com/stefanpenner/es6-promise/issues"
},
"bundleDependencies": false,
+ "dependencies": {},
"deprecated": false,
"description": "A lightweight library that provides tools for organizing asynchronous code",
"devDependencies": {
- "broccoli-babel-transpiler": "^5.6.1",
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.24.1",
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
+ "babel-plugin-transform-es2015-computed-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-constants": "^6.1.4",
+ "babel-plugin-transform-es2015-destructuring": "^6.23.0",
+ "babel-plugin-transform-es2015-parameters": "^6.24.1",
+ "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1",
+ "babel-plugin-transform-es2015-spread": "^6.22.0",
+ "babel-plugin-transform-es2015-template-literals": "^6.22.0",
+ "babel6-plugin-strip-class-callcheck": "^6.0.0",
+ "broccoli-babel-transpiler": "^6.0.0",
"broccoli-concat": "^3.1.0",
- "broccoli-merge-trees": "^1.2.3",
- "broccoli-rollup": "^1.0.2",
- "broccoli-stew": "^1.2.0",
+ "broccoli-merge-trees": "^2.0.0",
+ "broccoli-rollup": "^2.0.0",
+ "broccoli-stew": "^1.5.0",
"broccoli-uglify-js": "^0.2.0",
"broccoli-watchify": "^1.0.1",
- "ember-cli": "2.12.2",
- "ember-cli-dependency-checker": "^1.3.0",
- "ember-publisher": "0.0.7",
- "git-repo-version": "0.4.1",
+ "ember-cli": "2.18.0-beta.2",
+ "ember-cli-dependency-checker": "^2.1.0",
+ "git-repo-version": "1.0.1",
"json3": "^3.3.2",
- "mocha": "^3.1.0",
- "promises-aplus-tests-phantom": "^2.1.0-revise",
- "release-it": "2.7.1"
+ "mocha": "^4.0.1",
+ "promises-aplus-tests-phantom": "^2.1.0-revise"
},
"directories": {
"lib": "lib"
@@ -79,18 +89,16 @@
},
"scripts": {
"build": "ember build --environment production",
- "build:production": "ember build --env production",
- "dry-run-release": "ember build --environment production && release-it --dry-run --non-interactive",
- "lint": "jshint lib",
- "prepublish": "ember build --environment production",
+ "prepublishOnly": "ember build --environment production",
"start": "ember s",
"test": "ember test",
- "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:browser": "ember test --launch PhantomJS",
+ "test:node": "ember test --launch Mocha",
"test:server": "ember test --server"
},
"spm": {
"main": "dist/es6-promise.js"
},
"typings": "es6-promise.d.ts",
- "version": "4.1.1"
+ "version": "4.2.4"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
index 73baf0b326..8d429cef7a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@^4.1.0",
- "_id": "agent-base@4.1.2",
+ "_id": "agent-base@4.2.0",
"_inBundle": false,
- "_integrity": "sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw==",
+ "_integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.2.tgz",
- "_shasum": "80fa6cde440f4dcf9af2617cf246099b5d99f0c8",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
+ "_shasum": "9838b5c3392b962bad031e6a4c5e1024abec45ce",
"_spec": "agent-base@^4.1.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
"author": {
@@ -61,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "4.1.2"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
index 3891c13a8b..47d26a72b0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js
@@ -1,5 +1,4 @@
'use strict';
-
const url = require('url');
const https = require('https');
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
index 23814e2c32..da2e919835 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js
@@ -14,6 +14,10 @@ var events = require('events');
var inherits = require('util').inherits;
var Agent = require('../');
+var PassthroughAgent = Agent(function(req, opts) {
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
+});
+
describe('Agent', function() {
describe('subclass', function() {
it('should be subclassable', function(done) {
@@ -70,10 +74,10 @@ describe('Agent', function() {
it('should be the Agent instance', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function () {
+ agent.callback = function() {
called = true;
assert.equal(this, agent);
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -81,15 +85,15 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
+ });
it('should be the Agent instance with callback signature', function(done) {
var called = false;
var agent = new Agent();
- agent.callback = function (req, opts, fn) {
+ agent.callback = function(req, opts, fn) {
called = true;
assert.equal(this, agent);
fn();
- }
+ };
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
@@ -97,8 +101,8 @@ describe('Agent', function() {
assert(/no Duplex stream was returned/.test(err.message));
done();
});
- })
- })
+ });
+ });
describe('"error" event', function() {
it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function(
done
@@ -201,13 +205,7 @@ describe('Agent', function() {
'Set-Cookie: 1\r\n' +
'Set-Cookie: 2\r\n\r\n'
);
- if ('function' == typeof stream.ondata) {
- // node <= v0.11.3
- stream.ondata(buf, 0, buf.length);
- } else {
- // node > v0.11.3
- stream.emit('data', buf);
- }
+ stream.emit('data', buf);
});
req.end();
@@ -399,6 +397,28 @@ describe('"http" module', function() {
done();
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `http.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"https" module', function() {
@@ -426,7 +446,6 @@ describe('"https" module', function() {
server.close();
});
-
it('should not modify the passed in Options object', function(done) {
var called = false;
var agent = new Agent(function(req, opts, fn) {
@@ -515,6 +534,29 @@ describe('"https" module', function() {
rejectUnauthorized: false
});
});
+
+ describe('PassthroughAgent', function() {
+ it('should pass through to `https.globalAgent`', function(done) {
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function(req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = PassthroughAgent;
+ info.rejectUnauthorized = false;
+ https.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ done();
+ });
+ });
+ });
});
describe('"ws" server', function() {
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/LICENSE b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/LICENSE
new file mode 100644
index 0000000000..de3226673c
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+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/pacote/node_modules/minimatch/node_modules/brace-expansion/README.md b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/README.md
index 778a1c3c1d..bbfd3fcb88 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/README.md
@@ -63,7 +63,7 @@ Valid expansions are:
// {a,b,...}
```
-A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
@@ -98,6 +98,12 @@ npm install brace-expansion
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
+## Sponsors
+
+This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
+
+Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
+
## License
(MIT)
diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
index 0ba0e63cb8..13b8a45f49 100644
--- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -1,8 +1,8 @@
{
"_from": "brace-expansion@^1.1.7",
- "_id": "brace-expansion@1.1.8",
+ "_id": "brace-expansion@1.1.11",
"_inBundle": false,
- "_integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+ "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"_location": "/pacote/minimatch/brace-expansion",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/minimatch"
],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
"_spec": "brace-expansion@^1.1.7",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch",
"author": {
@@ -71,5 +71,5 @@
"android-browser/4.2..latest"
]
},
- "version": "1.1.8"
+ "version": "1.1.11"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/protoduck/CHANGELOG.md
index 61b1c9878a..dd7669aa13 100644
--- a/deps/npm/node_modules/pacote/node_modules/protoduck/CHANGELOG.md
+++ b/deps/npm/node_modules/pacote/node_modules/protoduck/CHANGELOG.md
@@ -2,6 +2,23 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="5.0.0"></a>
+# [5.0.0](https://github.com/zkat/protoduck/compare/v4.0.0...v5.0.0) (2017-12-12)
+
+
+### Bug Fixes
+
+* **license:** relicense to MIT ([55cdd89](https://github.com/zkat/protoduck/commit/55cdd89))
+* **platforms:** drop support for node 4 and 7 ([07a19b1](https://github.com/zkat/protoduck/commit/07a19b1))
+
+
+### BREAKING CHANGES
+
+* **platforms:** node 4 and node 7 are no longer officially supported
+* **license:** license changed from CC0-1.0 to MIT
+
+
+
<a name="4.0.0"></a>
# [4.0.0](https://github.com/zkat/protoduck/compare/v3.3.2...v4.0.0) (2017-04-17)
diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/LICENSE b/deps/npm/node_modules/pacote/node_modules/protoduck/LICENSE
new file mode 100644
index 0000000000..1e0a1d6f8d
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/protoduck/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+Copyright (c) 2017 Kat MarchƔn
+
+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/pacote/node_modules/protoduck/package.json b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
index b436c22e87..4dfbe0ceb6 100644
--- a/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json
@@ -1,26 +1,26 @@
{
- "_from": "protoduck@^4.0.0",
- "_id": "protoduck@4.0.0",
+ "_from": "protoduck@^5.0.0",
+ "_id": "protoduck@5.0.0",
"_inBundle": false,
- "_integrity": "sha1-/kh02MeRM2bP2erRJFOiLNNlf44=",
+ "_integrity": "sha512-agsGWD8/RZrS4ga6v82Fxb0RHIS2RZnbsSue6A9/MBRhB/jcqOANAMNrqM9900b8duj+Gx+T/JMy5IowDoO/hQ==",
"_location": "/pacote/protoduck",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "protoduck@^4.0.0",
+ "raw": "protoduck@^5.0.0",
"name": "protoduck",
"escapedName": "protoduck",
- "rawSpec": "^4.0.0",
+ "rawSpec": "^5.0.0",
"saveSpec": null,
- "fetchSpec": "^4.0.0"
+ "fetchSpec": "^5.0.0"
},
"_requiredBy": [
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz",
- "_shasum": "fe4874d8c7913366cfd9ead12453a22cd3657f8e",
- "_spec": "protoduck@^4.0.0",
+ "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.0.tgz",
+ "_shasum": "752145e6be0ad834cb25716f670a713c860dce70",
+ "_spec": "protoduck@^5.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote",
"author": {
"name": "Kat MarchƔn",
@@ -68,7 +68,7 @@
"typeclass",
"traits"
],
- "license": "CC0-1.0",
+ "license": "MIT",
"main": "index.js",
"name": "protoduck",
"repository": {
@@ -84,5 +84,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "4.0.0"
+ "version": "5.0.0"
}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index 7e230fc18f..0c183de9d5 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,36 +1,39 @@
{
- "_from": "pacote@7.0.2",
- "_id": "pacote@7.0.2",
+ "_from": "pacote@latest",
+ "_id": "pacote@7.6.1",
"_inBundle": false,
- "_integrity": "sha512-cTiugiG2ujDcqDtYtJ3doDrS6E3eU0bhuYAHhMTWgBezrhoqTEjc0axSBpbjw4QQkNT5AGRF15Mj2tF2HuBz7w==",
+ "_integrity": "sha512-2kRIsHxjuYC1KRUIK80AFIXKWy0IgtFj76nKcaunozKAOSlfT+DFh3EfeaaKvNHCWixgi0G0rLg11lJeyEnp/Q==",
"_location": "/pacote",
"_phantomChildren": {
- "cacache": "10.0.1",
+ "cacache": "10.0.4",
+ "inherits": "2.0.3",
"lru-cache": "4.1.1",
- "mississippi": "1.3.0",
"npm-package-arg": "6.0.0",
+ "once": "1.4.0",
+ "readable-stream": "2.3.5",
"retry": "0.10.1",
"safe-buffer": "5.1.1",
- "semver": "5.4.1",
- "ssri": "5.0.0"
+ "semver": "5.5.0",
+ "ssri": "5.2.4"
},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "pacote@7.0.2",
+ "raw": "pacote@latest",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "7.0.2",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "7.0.2"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/libcipm"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-7.0.2.tgz",
- "_shasum": "c60610c994b8ecdd8fbb7c6a5c0bcd8de52f829c",
- "_spec": "pacote@7.0.2",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-7.6.1.tgz",
+ "_shasum": "d44621c89a5a61f173989b60236757728387c094",
+ "_spec": "pacote@latest",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Kat MarchƔn",
@@ -52,42 +55,42 @@
],
"dependencies": {
"bluebird": "^3.5.1",
- "cacache": "^10.0.1",
+ "cacache": "^10.0.4",
"get-stream": "^3.0.0",
"glob": "^7.1.2",
"lru-cache": "^4.1.1",
"make-fetch-happen": "^2.6.0",
"minimatch": "^3.0.4",
- "mississippi": "^1.2.0",
+ "mississippi": "^3.0.0",
+ "mkdirp": "^0.5.1",
"normalize-package-data": "^2.4.0",
"npm-package-arg": "^6.0.0",
"npm-packlist": "^1.1.10",
"npm-pick-manifest": "^2.1.0",
- "osenv": "^0.1.4",
+ "osenv": "^0.1.5",
"promise-inflight": "^1.0.1",
"promise-retry": "^1.1.1",
- "protoduck": "^4.0.0",
+ "protoduck": "^5.0.0",
+ "rimraf": "^2.6.2",
"safe-buffer": "^5.1.1",
- "semver": "^5.4.1",
- "ssri": "^5.0.0",
- "tar": "^4.0.2",
+ "semver": "^5.5.0",
+ "ssri": "^5.2.4",
+ "tar": "^4.4.0",
"unique-filename": "^1.1.0",
"which": "^1.3.0"
},
"deprecated": false,
"description": "JavaScript package downloader",
"devDependencies": {
- "mkdirp": "^0.5.1",
- "nock": "^9.0.22",
+ "nock": "^9.2.3",
"npmlog": "^4.1.2",
- "nyc": "^11.2.1",
+ "nyc": "^11.4.1",
"require-inject": "^1.4.2",
- "rimraf": "^2.6.2",
- "standard": "^10.0.3",
- "standard-version": "^4.2.0",
+ "standard": "^11.0.0",
+ "standard-version": "^4.3.0",
"tacks": "^1.2.6",
- "tap": "^10.7.2",
- "tar-stream": "^1.5.4",
+ "tap": "^11.1.2",
+ "tar-stream": "^1.5.5",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.7"
},
@@ -111,12 +114,12 @@
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t",
- "pretest": "standard lib test *.js",
+ "pretest": "standard",
"release": "standard-version -s",
"test": "nyc --all -- tap -J test/*.js",
"test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "7.0.2"
+ "version": "7.6.1"
}
diff --git a/deps/npm/node_modules/pacote/tarball.js b/deps/npm/node_modules/pacote/tarball.js
index f1f3ed9342..e0ad52ab3e 100644
--- a/deps/npm/node_modules/pacote/tarball.js
+++ b/deps/npm/node_modules/pacote/tarball.js
@@ -2,94 +2,66 @@
const BB = require('bluebird')
-const cacache = require('cacache')
const fs = require('fs')
const getStream = require('get-stream')
const mkdirp = BB.promisify(require('mkdirp'))
const npa = require('npm-package-arg')
-const optCheck = require('./lib/util/opt-check')
+const optCheck = require('./lib/util/opt-check.js')
+const PassThrough = require('stream').PassThrough
const path = require('path')
-const pipe = BB.promisify(require('mississippi').pipe)
+const rimraf = BB.promisify(require('rimraf'))
+const withTarballStream = require('./lib/with-tarball-stream.js')
module.exports = tarball
function tarball (spec, opts) {
opts = optCheck(opts)
spec = npa(spec, opts.where)
- const startTime = Date.now()
- if (opts.integrity && !opts.preferOnline) {
- opts.log.silly('tarball', 'checking if', opts.integrity, 'is already cached')
- return cacache.get.byDigest(opts.cache, opts.integrity).then(data => {
- if (data) {
- opts.log.silly('tarball', `cached content available for ${spec} (${Date.now() - startTime}ms)`)
- return data
- } else {
- return getStream.buffer(tarballByManifest(startTime, spec, opts))
- }
- })
- } else {
- opts.log.silly('tarball', `no integrity hash provided for ${spec} - fetching by manifest`)
- return getStream.buffer(tarballByManifest(startTime, spec, opts))
- }
+ return withTarballStream(spec, opts, stream => getStream.buffer(stream))
}
module.exports.stream = tarballStream
function tarballStream (spec, opts) {
opts = optCheck(opts)
spec = npa(spec, opts.where)
- const startTime = Date.now()
- if (opts.integrity && !opts.preferOnline) {
- opts.log.silly('tarball', 'checking if', opts.integrity, 'is already cached')
- return cacache.get.hasContent(opts.cache, opts.integrity).then(info => {
- if (info) {
- opts.log.silly('tarball', `cached content available for ${spec} (${Date.now() - startTime}ms)`)
- return cacache.get.stream.byDigest(opts.cache, opts.integrity, opts)
- } else {
- return tarballByManifest(startTime, spec, opts)
- }
- })
- } else {
- opts.log.silly('tarball', `no integrity hash provided for ${spec} - fetching by manifest`)
- return tarballByManifest(startTime, spec, opts)
- }
+ const output = new PassThrough()
+ let hasTouchedOutput = false
+ let lastError = null
+ withTarballStream(spec, opts, stream => {
+ if (hasTouchedOutput && lastError) {
+ throw lastError
+ } else if (hasTouchedOutput) {
+ throw new Error('abort, abort!')
+ } else {
+ return new BB((resolve, reject) => {
+ stream.on('error', reject)
+ output.on('error', reject)
+ output.on('error', () => { hasTouchedOutput = true })
+ output.on('finish', resolve)
+ stream.pipe(output)
+ stream.once('data', () => { hasTouchedOutput = true })
+ }).catch(err => {
+ lastError = err
+ throw err
+ })
+ }
+ })
+ .catch(err => output.emit('error', err))
+ return output
}
module.exports.toFile = tarballToFile
function tarballToFile (spec, dest, opts) {
opts = optCheck(opts)
spec = npa(spec, opts.where)
- const startTime = Date.now()
- return mkdirp(path.dirname(dest)).then(() => {
- if (opts.integrity && !opts.preferOnline) {
- opts.log.silly('tarball', 'checking if', opts.integrity, 'is already cached')
- return cacache.get.copy.byDigest(opts.cache, opts.integrity, dest, opts)
- .then(() => {
- opts.log.silly('tarball', `cached content for ${spec} copied (${Date.now() - startTime}ms)`)
- }, err => {
- if (err.code === 'ENOENT') {
- return pipe(
- tarballByManifest(startTime, spec, opts),
- fs.createWriteStream(dest)
- )
- } else {
- throw err
- }
- })
- } else {
- opts.log.silly('tarball', `no integrity hash provided for ${spec} - fetching by manifest`)
- return pipe(
- tarballByManifest(startTime, spec, opts),
- fs.createWriteStream(dest)
- )
- }
- })
-}
-
-let fetch
-function tarballByManifest (start, spec, opts) {
- if (!fetch) {
- fetch = require('./lib/fetch')
- }
- return fetch.tarball(spec, opts).on('end', () => {
- opts.log.silly('tarball', `${spec} done in ${Date.now() - start}ms`)
- })
+ return mkdirp(path.dirname(dest))
+ .then(() => withTarballStream(spec, opts, stream => {
+ return rimraf(dest)
+ .then(() => new BB((resolve, reject) => {
+ const writer = fs.createWriteStream(dest)
+ stream.on('error', reject)
+ writer.on('error', reject)
+ writer.on('close', resolve)
+ stream.pipe(writer)
+ }))
+ }))
}
diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js
index 7da4fead5f..379d5feb13 100644
--- a/deps/npm/node_modules/query-string/index.js
+++ b/deps/npm/node_modules/query-string/index.js
@@ -176,9 +176,13 @@ exports.stringify = function (obj, opts) {
opts = objectAssign(defaults, opts);
+ if (opts.sort === false) {
+ opts.sort = function () {};
+ }
+
var formatter = encoderForArrayFormat(opts);
- return obj ? Object.keys(obj).sort().map(function (key) {
+ return obj ? Object.keys(obj).sort(opts.sort).map(function (key) {
var val = obj[key];
if (val === undefined) {
@@ -208,3 +212,10 @@ exports.stringify = function (obj, opts) {
return x.length > 0;
}).join('&') : '';
};
+
+exports.parseUrl = function (str, opts) {
+ return {
+ url: str.split('?')[0] || '',
+ query: this.parse(this.extract(str), opts)
+ };
+};
diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json
index 00bf7c58df..6674628f25 100644
--- a/deps/npm/node_modules/query-string/package.json
+++ b/deps/npm/node_modules/query-string/package.json
@@ -1,28 +1,28 @@
{
- "_from": "query-string@5.0.1",
- "_id": "query-string@5.0.1",
+ "_from": "query-string@5.1.0",
+ "_id": "query-string@5.1.0",
"_inBundle": false,
- "_integrity": "sha512-aM+MkQClojlNiKkO09tiN2Fv8jM/L7GWIjG2liWeKljlOdOPNWr+bW3KQ+w5V/uKprpezC7fAsAMsJtJ+2rLKA==",
+ "_integrity": "sha512-F3DkxxlY0AqD/rwe4YAwjRE2HjOkKW7TxsuteyrS/Jbwrxw887PqYBL4sWUJ9D/V1hmFns0SCD6FDyvlwo9RCQ==",
"_location": "/query-string",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "query-string@5.0.1",
+ "raw": "query-string@5.1.0",
"name": "query-string",
"escapedName": "query-string",
- "rawSpec": "5.0.1",
+ "rawSpec": "5.1.0",
"saveSpec": null,
- "fetchSpec": "5.0.1"
+ "fetchSpec": "5.1.0"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/query-string/-/query-string-5.0.1.tgz",
- "_shasum": "6e2b86fe0e08aef682ecbe86e85834765402bd88",
- "_spec": "query-string@5.0.1",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.0.tgz",
+ "_shasum": "9583b15fd1307f899e973ed418886426a9976469",
+ "_spec": "query-string@5.1.0",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -74,5 +74,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "5.0.1"
+ "version": "5.1.0"
}
diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md
index 8d2148c9d1..c9273eae00 100644
--- a/deps/npm/node_modules/query-string/readme.md
+++ b/deps/npm/node_modules/query-string/readme.md
@@ -1,10 +1,10 @@
# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string)
-> Parse and stringify URL [query strings](http://en.wikipedia.org/wiki/Query_string)
+> Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string)
---
-<p align="center"><b>šŸ”„ Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos. You might also like his <a href="https://ReactForBeginners.com/friend/AWESOME">React course</a>.</p>
+<p align="center"><b>šŸ”„ Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.<br>Also check out his <a href="https://LearnNode.com/friend/AWESOME">Node.js</a>, <a href="https://ReactForBeginners.com/friend/AWESOME">React</a>, <a href="https://SublimeTextBook.com/friend/AWESOME">Sublime</a> courses.</p>
---
@@ -15,6 +15,10 @@
$ npm install query-string
```
+<a href="https://www.patreon.com/sindresorhus">
+ <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
+</a>
+
## Usage
@@ -133,10 +137,44 @@ queryString.stringify({foo: [1,2,3]});
// => foo=1&foo=2&foo=3
```
+#### sort
+
+Type: `Function` `boolean`
+
+Supports both `Function` as a custom sorting function or `false` to disable sorting.
+
+```js
+const order = ['c', 'a', 'b'];
+queryString.stringify({ a: 1, b: 2, c: 3}, {
+ sort: (m, n) => order.indexOf(m) >= order.indexOf(n)
+});
+// => 'c=3&a=1&b=2'
+```
+
+```js
+queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false});
+// => 'c=3&a=1&b=2'
+```
+
+If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order.
+
### .extract(*string*)
Extract a query string from a URL that can be passed into `.parse()`.
+### .parseUrl(*string*, *[options]*)
+
+Extract the URL and the query string as an object.
+
+The `options` are the same as for `.parse()`.
+
+Returns an object with a `url` and `query` property.
+
+```js
+queryString.parseUrl('https://foo.bar?foo=bar');
+//=> {url: 'https://foo.bar', query: {foo: 'bar'}}
+```
+
## Nesting
diff --git a/deps/npm/node_modules/read-package-json/CHANGELOG.md b/deps/npm/node_modules/read-package-json/CHANGELOG.md
new file mode 100644
index 0000000000..25e9896cec
--- /dev/null
+++ b/deps/npm/node_modules/read-package-json/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="2.0.13"></a>
+## [2.0.13](https://github.com/npm/read-package-json/compare/v2.0.12...v2.0.13) (2018-03-08)
+
+
+### Bug Fixes
+
+* **git:** support git packed refs --all mode ([#77](https://github.com/npm/read-package-json/issues/77)) ([1869940](https://github.com/npm/read-package-json/commit/1869940))
diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json
index 0df406db67..b9ce0a9f83 100644
--- a/deps/npm/node_modules/read-package-json/package.json
+++ b/deps/npm/node_modules/read-package-json/package.json
@@ -1,31 +1,32 @@
{
- "_from": "read-package-json@2.0.12",
- "_id": "read-package-json@2.0.12",
+ "_from": "read-package-json@2.0.13",
+ "_id": "read-package-json@2.0.13",
"_inBundle": false,
- "_integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==",
+ "_integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==",
"_location": "/read-package-json",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "read-package-json@2.0.12",
+ "raw": "read-package-json@2.0.13",
"name": "read-package-json",
"escapedName": "read-package-json",
- "rawSpec": "2.0.12",
+ "rawSpec": "2.0.13",
"saveSpec": null,
- "fetchSpec": "2.0.12"
+ "fetchSpec": "2.0.13"
},
"_requiredBy": [
"#USER",
"/",
"/init-package-json",
+ "/libcipm",
"/read-installed",
"/read-package-tree"
],
- "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz",
- "_shasum": "68ea45f98b3741cb6e10ae3bbd42a605026a6951",
- "_spec": "read-package-json@2.0.12",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.13.tgz",
+ "_shasum": "2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a",
+ "_spec": "read-package-json@2.0.13",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -38,15 +39,16 @@
"dependencies": {
"glob": "^7.1.1",
"graceful-fs": "^4.1.2",
- "json-parse-better-errors": "^1.0.0",
+ "json-parse-better-errors": "^1.0.1",
"normalize-package-data": "^2.0.0",
"slash": "^1.0.0"
},
"deprecated": false,
"description": "The thing npm uses to read package.json files with semantics and defaults and validation",
"devDependencies": {
- "standard": "^9.0.1",
- "tap": "^10.3.0"
+ "standard": "^11.0.0",
+ "standard-version": "^4.3.0",
+ "tap": "^11.1.2"
},
"files": [
"read-json.js"
@@ -63,7 +65,11 @@
"url": "git+https://github.com/npm/read-package-json.git"
},
"scripts": {
- "test": "standard && tap -J test/*.js"
+ "postrelease": "npm publish && git push --follow-tags",
+ "prerelease": "npm t",
+ "pretest": "standard",
+ "release": "standard-version -s",
+ "test": "tap --nyc-arg=--all --coverage test/*.js"
},
- "version": "2.0.12"
+ "version": "2.0.13"
}
diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js
index 969bcc030b..243af8e271 100644
--- a/deps/npm/node_modules/read-package-json/read-json.js
+++ b/deps/npm/node_modules/read-package-json/read-json.js
@@ -339,10 +339,26 @@ function githead_ (file, data, dir, head, cb) {
data.gitHead = head.trim()
return cb(null, data)
}
- var headFile = head.replace(/^ref: /, '').trim()
- headFile = path.resolve(dir, '.git', headFile)
+ var headRef = head.replace(/^ref: /, '').trim()
+ var headFile = path.resolve(dir, '.git', headRef)
fs.readFile(headFile, 'utf8', function (er, head) {
- if (er || !head) return cb(null, data)
+ if (er || !head) {
+ var packFile = path.resolve(dir, '.git/packed-refs')
+ return fs.readFile(packFile, 'utf8', function (er, refs) {
+ if (er || !refs) {
+ return cb(null, data)
+ }
+ refs = refs.split('\n')
+ for (var i = 0; i < refs.length; i++) {
+ var match = refs[i].match(/^([0-9a-f]{40}) (.+)$/)
+ if (match && match[2].trim() === headRef) {
+ data.gitHead = match[1]
+ break
+ }
+ }
+ return cb(null, data)
+ })
+ }
head = head.replace(/^ref: /, '').trim()
data.gitHead = head
return cb(null, data)
@@ -371,7 +387,7 @@ function checkBinReferences_ (file, data, warn, cb) {
var relName = data.bin[key]
try {
var binPath = path.resolve(dirName, relName)
- fs.exists(binPath, handleExists.bind(null, relName))
+ fs.stat(binPath, (err) => handleExists(relName, !err))
} catch (error) {
if (error.message === 'Arguments to path.resolve must be strings' || error.message.indexOf('Path must be a string') === 0) {
warn('Bin filename for ' + key + ' is not a string: ' + util.inspect(relName))
diff --git a/deps/npm/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 6d270c6ccb..0000000000
--- a/deps/npm/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,9 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js
-.zuul.yml
-.nyc_output
-coverage
-docs/
diff --git a/deps/npm/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/readable-stream/.travis.yml
index 0c5d2bc262..40992555bf 100644
--- a/deps/npm/node_modules/readable-stream/.travis.yml
+++ b/deps/npm/node_modules/readable-stream/.travis.yml
@@ -46,18 +46,8 @@ matrix:
env: TASK=test
- node_js: 8
env: TASK=test
- - node_js: 6
- env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
- - node_js: 6
- env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest"
- - node_js: 6
- env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest"
- - node_js: 6
- env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest"
- - node_js: 6
- env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
- - node_js: 6
- env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest
+ - node_js: 9
+ env: TASK=test
script: "npm run $TASK"
env:
global:
diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md
index b24a2c88f8..f0d8b47c13 100644
--- a/deps/npm/node_modules/readable-stream/README.md
+++ b/deps/npm/node_modules/readable-stream/README.md
@@ -1,6 +1,6 @@
# readable-stream
-***Node-core v8.1.3 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+***Node-core v8.9.4 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
@@ -18,7 +18,7 @@ npm install --save readable-stream
This package is a mirror of the Streams2 and Streams3 implementations in
Node-core.
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.1.3/docs/api/stream.html).
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/stream.html).
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, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
@@ -55,3 +55,4 @@ Node.js. The responsibilities of the Streams Working Group include:
* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
- Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
index c599463dd8..1045089182 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_duplex.js
@@ -28,7 +28,7 @@
/*<replacement>*/
-var processNextTick = require('process-nextick-args');
+var pna = require('process-nextick-args');
/*</replacement>*/
/*<replacement>*/
@@ -82,7 +82,7 @@ function onend() {
// no more data can be written.
// But allow more writes to happen in this tick.
- processNextTick(onEndNT, this);
+ pna.nextTick(onEndNT, this);
}
function onEndNT(self) {
@@ -114,7 +114,7 @@ Duplex.prototype._destroy = function (err, cb) {
this.push(null);
this.end();
- processNextTick(cb, err);
+ pna.nextTick(cb, err);
};
function forEach(xs, f) {
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
index ee9001cdf0..af150f434c 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
@@ -23,7 +23,7 @@
/*<replacement>*/
-var processNextTick = require('process-nextick-args');
+var pna = require('process-nextick-args');
/*</replacement>*/
module.exports = Readable;
@@ -50,9 +50,8 @@ var EElistenerCount = function (emitter, type) {
var Stream = require('./internal/streams/stream');
/*</replacement>*/
-// TODO(bmeurer): Change this back to const once hole checks are
-// properly optimized away early in Ignition+TurboFan.
/*<replacement>*/
+
var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
@@ -61,6 +60,7 @@ function _uint8ArrayToBuffer(chunk) {
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
+
/*</replacement>*/
/*<replacement>*/
@@ -89,15 +89,13 @@ var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
function prependListener(emitter, event, fn) {
// Sadly this is not cacheable as some libraries bundle their own
// event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') {
- return emitter.prependListener(event, fn);
- } else {
- // This is a hack to make sure that our error handler is attached before any
- // userland ones. NEVER DO THIS. This is here only because this code needs
- // to continue to work with older versions of Node.js that do not include
- // the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
- }
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
+
+ // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}
function ReadableState(options, stream) {
@@ -105,17 +103,26 @@ function ReadableState(options, stream) {
options = options || {};
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
- if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
// the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
var hwm = options.highWaterMark;
+ var readableHwm = options.readableHighWaterMark;
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
// cast to ints.
this.highWaterMark = Math.floor(this.highWaterMark);
@@ -488,7 +495,7 @@ function emitReadable(stream) {
if (!state.emittedReadable) {
debug('emitReadable', state.flowing);
state.emittedReadable = true;
- if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
}
}
@@ -507,7 +514,7 @@ function emitReadable_(stream) {
function maybeReadMore(stream, state) {
if (!state.readingMore) {
state.readingMore = true;
- processNextTick(maybeReadMore_, stream, state);
+ pna.nextTick(maybeReadMore_, stream, state);
}
}
@@ -552,7 +559,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
dest.on('unpipe', onunpipe);
function onunpipe(readable, unpipeInfo) {
@@ -742,7 +749,7 @@ Readable.prototype.on = function (ev, fn) {
state.readableListening = state.needReadable = true;
state.emittedReadable = false;
if (!state.reading) {
- processNextTick(nReadingNextTick, this);
+ pna.nextTick(nReadingNextTick, this);
} else if (state.length) {
emitReadable(this);
}
@@ -773,7 +780,7 @@ Readable.prototype.resume = function () {
function resume(stream, state) {
if (!state.resumeScheduled) {
state.resumeScheduled = true;
- processNextTick(resume_, stream, state);
+ pna.nextTick(resume_, stream, state);
}
}
@@ -810,18 +817,19 @@ function flow(stream) {
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
var state = this._readableState;
var paused = false;
- var self = this;
stream.on('end', function () {
debug('wrapped end');
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
- if (chunk && chunk.length) self.push(chunk);
+ if (chunk && chunk.length) _this.push(chunk);
}
- self.push(null);
+ _this.push(null);
});
stream.on('data', function (chunk) {
@@ -831,7 +839,7 @@ Readable.prototype.wrap = function (stream) {
// don't skip over falsy values in objectMode
if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
- var ret = self.push(chunk);
+ var ret = _this.push(chunk);
if (!ret) {
paused = true;
stream.pause();
@@ -852,12 +860,12 @@ Readable.prototype.wrap = function (stream) {
// proxy certain important events.
for (var n = 0; n < kProxyEvents.length; n++) {
- stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
}
// when we try to consume some more bytes, simply unpause the
// underlying stream.
- self._read = function (n) {
+ this._read = function (n) {
debug('wrapped _read', n);
if (paused) {
paused = false;
@@ -865,7 +873,7 @@ Readable.prototype.wrap = function (stream) {
}
};
- return self;
+ return this;
};
// exposed for testing purposes only.
@@ -980,7 +988,7 @@ function endReadable(stream) {
if (!state.endEmitted) {
state.ended = true;
- processNextTick(endReadableNT, state, stream);
+ pna.nextTick(endReadableNT, state, stream);
}
}
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
index a0c23173da..5d1f8b876d 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
@@ -74,39 +74,28 @@ util.inherits = require('inherits');
util.inherits(Transform, Duplex);
-function TransformState(stream) {
- this.afterTransform = function (er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
- this.writeencoding = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
+function afterTransform(er, data) {
+ var ts = this._transformState;
ts.transforming = false;
var cb = ts.writecb;
if (!cb) {
- return stream.emit('error', new Error('write callback called multiple times'));
+ return this.emit('error', new Error('write callback called multiple times'));
}
ts.writechunk = null;
ts.writecb = null;
- if (data !== null && data !== undefined) stream.push(data);
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
cb(er);
- var rs = stream._readableState;
+ var rs = this._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
+ this._read(rs.highWaterMark);
}
}
@@ -115,9 +104,14 @@ function Transform(options) {
Duplex.call(this, options);
- this._transformState = new TransformState(this);
-
- var stream = this;
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ };
// start out asking for a readable event once data is transformed.
this._readableState.needReadable = true;
@@ -134,11 +128,19 @@ function Transform(options) {
}
// When the writable side finishes, then flush out anything remaining.
- this.once('prefinish', function () {
- if (typeof this._flush === 'function') this._flush(function (er, data) {
- done(stream, er, data);
- });else done(stream);
- });
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function') {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
}
Transform.prototype.push = function (chunk, encoding) {
@@ -188,27 +190,25 @@ Transform.prototype._read = function (n) {
};
Transform.prototype._destroy = function (err, cb) {
- var _this = this;
+ var _this2 = this;
Duplex.prototype._destroy.call(this, err, function (err2) {
cb(err2);
- _this.emit('close');
+ _this2.emit('close');
});
};
function done(stream, er, data) {
if (er) return stream.emit('error', er);
- if (data !== null && data !== undefined) stream.push(data);
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data);
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
- var ws = stream._writableState;
- var ts = stream._transformState;
-
- if (ws.length) throw new Error('Calling transform done when ws.length != 0');
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
- if (ts.transforming) throw new Error('Calling transform done when still transforming');
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
return stream.push(null);
} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
index d20da88c75..0e1c28df51 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
@@ -27,7 +27,7 @@
/*<replacement>*/
-var processNextTick = require('process-nextick-args');
+var pna = require('process-nextick-args');
/*</replacement>*/
module.exports = Writable;
@@ -54,7 +54,7 @@ function CorkedRequest(state) {
/* </replacement> */
/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
+var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
/*</replacement>*/
/*<replacement>*/
@@ -79,6 +79,7 @@ var Stream = require('./internal/streams/stream');
/*</replacement>*/
/*<replacement>*/
+
var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
@@ -87,6 +88,7 @@ function _uint8ArrayToBuffer(chunk) {
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
+
/*</replacement>*/
var destroyImpl = require('./internal/streams/destroy');
@@ -100,18 +102,27 @@ function WritableState(options, stream) {
options = options || {};
+ // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+ var isDuplex = stream instanceof Duplex;
+
// object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
- if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
// the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
var hwm = options.highWaterMark;
+ var writableHwm = options.writableHighWaterMark;
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
// cast to ints.
this.highWaterMark = Math.floor(this.highWaterMark);
@@ -225,6 +236,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
Object.defineProperty(Writable, Symbol.hasInstance, {
value: function (object) {
if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
return object && object._writableState instanceof WritableState;
}
@@ -276,7 +288,7 @@ function writeAfterEnd(stream, cb) {
var er = new Error('write after end');
// TODO: defer error events consistently everywhere, not just the cb
stream.emit('error', er);
- processNextTick(cb, er);
+ pna.nextTick(cb, er);
}
// Checks that a user-supplied chunk is valid, especially for the particular
@@ -293,7 +305,7 @@ function validChunk(stream, state, chunk, cb) {
}
if (er) {
stream.emit('error', er);
- processNextTick(cb, er);
+ pna.nextTick(cb, er);
valid = false;
}
return valid;
@@ -302,7 +314,7 @@ function validChunk(stream, state, chunk, cb) {
Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
- var isBuf = _isUint8Array(chunk) && !state.objectMode;
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
if (isBuf && !Buffer.isBuffer(chunk)) {
chunk = _uint8ArrayToBuffer(chunk);
@@ -413,10 +425,10 @@ function onwriteError(stream, state, sync, er, cb) {
if (sync) {
// defer the callback if we are being called synchronously
// to avoid piling up things on the stack
- processNextTick(cb, er);
+ pna.nextTick(cb, er);
// this can emit finish, and it will always happen
// after error
- processNextTick(finishMaybe, stream, state);
+ pna.nextTick(finishMaybe, stream, state);
stream._writableState.errorEmitted = true;
stream.emit('error', er);
} else {
@@ -514,6 +526,7 @@ function clearBuffer(stream, state) {
} else {
state.corkedRequestsFree = new CorkedRequest(state);
}
+ state.bufferedRequestCount = 0;
} else {
// Slow case, write chunks one-by-one
while (entry) {
@@ -524,6 +537,7 @@ function clearBuffer(stream, state) {
doWrite(stream, state, false, len, chunk, encoding, cb);
entry = entry.next;
+ state.bufferedRequestCount--;
// 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
@@ -536,7 +550,6 @@ function clearBuffer(stream, state) {
if (entry === null) state.lastBufferedRequest = null;
}
- state.bufferedRequestCount = 0;
state.bufferedRequest = entry;
state.bufferProcessing = false;
}
@@ -590,7 +603,7 @@ function prefinish(stream, state) {
if (typeof stream._final === 'function') {
state.pendingcb++;
state.finalCalled = true;
- processNextTick(callFinal, stream, state);
+ pna.nextTick(callFinal, stream, state);
} else {
state.prefinished = true;
stream.emit('prefinish');
@@ -614,7 +627,7 @@ function endWritable(stream, state, cb) {
state.ending = true;
finishMaybe(stream, state);
if (cb) {
- if (state.finished) processNextTick(cb);else stream.once('finish', cb);
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
}
state.ended = true;
stream.writable = false;
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
index d467615978..aefc68bd90 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/BufferList.js
@@ -1,11 +1,9 @@
'use strict';
-/*<replacement>*/
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Buffer = require('safe-buffer').Buffer;
-/*</replacement>*/
+var util = require('util');
function copyBuffer(src, target, offset) {
src.copy(target, offset);
@@ -71,4 +69,11 @@ module.exports = function () {
};
return BufferList;
-}(); \ No newline at end of file
+}();
+
+if (util && util.inspect && util.inspect.custom) {
+ module.exports.prototype[util.inspect.custom] = function () {
+ var obj = util.inspect({ length: this.length });
+ return this.constructor.name + ' ' + obj;
+ };
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
index b3e58c33bc..5a0a0d88ce 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -2,7 +2,7 @@
/*<replacement>*/
-var processNextTick = require('process-nextick-args');
+var pna = require('process-nextick-args');
/*</replacement>*/
// undocumented cb() API, needed for core, not for public API
@@ -16,9 +16,9 @@ function destroy(err, cb) {
if (cb) {
cb(err);
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- processNextTick(emitErrorNT, this, err);
+ pna.nextTick(emitErrorNT, this, err);
}
- return;
+ return this;
}
// we set destroyed to true before firing error callbacks in order
@@ -35,7 +35,7 @@ function destroy(err, cb) {
this._destroy(err || null, function (err) {
if (!cb && err) {
- processNextTick(emitErrorNT, _this, err);
+ pna.nextTick(emitErrorNT, _this, err);
if (_this._writableState) {
_this._writableState.errorEmitted = true;
}
@@ -43,6 +43,8 @@ function destroy(err, cb) {
cb(err);
}
});
+
+ return this;
}
function undestroy() {
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
index a4f40f845f..ce045c6560 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
+++ b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
@@ -3,9 +3,9 @@
if (!process.version ||
process.version.indexOf('v0.') === 0 ||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
- module.exports = nextTick;
+ module.exports = { nextTick: nextTick };
} else {
- module.exports = process.nextTick;
+ module.exports = process
}
function nextTick(fn, arg1, arg2, arg3) {
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
index 5d463a4b3f..0d46794474 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
+++ b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
@@ -1,45 +1,44 @@
{
- "_from": "process-nextick-args@~1.0.6",
- "_id": "process-nextick-args@1.0.7",
- "_integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+ "_from": "process-nextick-args@~2.0.0",
+ "_id": "process-nextick-args@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
"_location": "/readable-stream/process-nextick-args",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "process-nextick-args@~1.0.6",
+ "raw": "process-nextick-args@~2.0.0",
"name": "process-nextick-args",
"escapedName": "process-nextick-args",
- "rawSpec": "~1.0.6",
+ "rawSpec": "~2.0.0",
"saveSpec": null,
- "fetchSpec": "~1.0.6"
+ "fetchSpec": "~2.0.0"
},
"_requiredBy": [
"/readable-stream"
],
- "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
- "_shrinkwrap": null,
- "_spec": "process-nextick-args@~1.0.6",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream",
+ "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "_shasum": "a37d732f4271b4ab1ad070d35508e8290788ffaa",
+ "_spec": "process-nextick-args@~2.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/readable-stream",
"author": "",
- "bin": null,
"bugs": {
"url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
},
"bundleDependencies": false,
- "dependencies": {},
"deprecated": false,
"description": "process.nextTick but always with args",
"devDependencies": {
"tap": "~0.2.6"
},
+ "files": [
+ "index.js"
+ ],
"homepage": "https://github.com/calvinmetcalf/process-nextick-args",
"license": "MIT",
"main": "index.js",
"name": "process-nextick-args",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/calvinmetcalf/process-nextick-args.git"
@@ -47,5 +46,5 @@
"scripts": {
"test": "node test.js"
},
- "version": "1.0.7"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/readme.md b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
index 78e7cfaeb7..ecb432c9b2 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
+++ b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/readme.md
@@ -10,9 +10,9 @@ npm install --save process-nextick-args
Always be able to pass arguments to process.nextTick, no matter the platform
```js
-var nextTick = require('process-nextick-args');
+var pna = require('process-nextick-args');
-nextTick(function (a, b, c) {
+pna.nextTick(function (a, b, c) {
console.log(a, b, c);
}, 'step', 3, 'profit');
```
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/test.js b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/test.js
deleted file mode 100644
index ef15721584..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/test.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var test = require("tap").test;
-var nextTick = require('./');
-
-test('should work', function (t) {
- t.plan(5);
- nextTick(function (a) {
- t.ok(a);
- nextTick(function (thing) {
- t.equals(thing, 7);
- }, 7);
- }, true);
- nextTick(function (a, b, c) {
- t.equals(a, 'step');
- t.equals(b, 3);
- t.equals(c, 'profit');
- }, 'step', 3, 'profit');
-});
-
-test('correct number of arguments', function (t) {
- t.plan(1);
- nextTick(function () {
- t.equals(2, arguments.length, 'correct number');
- }, 1, 2);
-});
diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
index e6813c0db6..4472090b40 100644
--- a/deps/npm/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,8 +1,8 @@
{
- "_from": "readable-stream@2.3.3",
- "_id": "readable-stream@2.3.3",
+ "_from": "readable-stream@2.3.5",
+ "_id": "readable-stream@2.3.5",
"_inBundle": false,
- "_integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
+ "_integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
"_location": "/readable-stream",
"_phantomChildren": {
"safe-buffer": "5.1.1"
@@ -10,12 +10,12 @@
"_requested": {
"type": "version",
"registry": true,
- "raw": "readable-stream@2.3.3",
+ "raw": "readable-stream@2.3.5",
"name": "readable-stream",
"escapedName": "readable-stream",
- "rawSpec": "2.3.3",
+ "rawSpec": "2.3.5",
"saveSpec": null,
- "fetchSpec": "2.3.3"
+ "fetchSpec": "2.3.5"
},
"_requiredBy": [
"#USER",
@@ -27,21 +27,30 @@
"/mississippi/from2",
"/mississippi/parallel-transform",
"/mississippi/through2",
+ "/npm-profile/make-fetch-happen/mississippi/concat-stream",
+ "/npm-profile/make-fetch-happen/mississippi/duplexify",
+ "/npm-profile/make-fetch-happen/mississippi/flush-write-stream",
+ "/npm-profile/make-fetch-happen/mississippi/from2",
+ "/npm-profile/make-fetch-happen/mississippi/parallel-transform",
+ "/npm-profile/make-fetch-happen/mississippi/through2",
"/npm-registry-client/concat-stream",
"/npmlog/are-we-there-yet",
- "/pacote/tar-stream",
- "/pacote/tar-stream/bl",
+ "/pacote/make-fetch-happen/mississippi/concat-stream",
+ "/pacote/make-fetch-happen/mississippi/duplexify",
+ "/pacote/make-fetch-happen/mississippi/flush-write-stream",
+ "/pacote/make-fetch-happen/mississippi/from2",
+ "/pacote/make-fetch-happen/mississippi/parallel-transform",
+ "/pacote/make-fetch-happen/mississippi/through2",
"/sha",
"/sorted-union-stream/stream-iterate",
"/standard/eslint/concat-stream",
- "/tap",
"/tap/tap-mocha-reporter",
- "/tap/tap-parser"
+ "/tap/tap-mocha-reporter/tap-parser"
],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
- "_shasum": "368f2512d79f9d46fdfc71349ae7878bbc1eb95c",
- "_spec": "readable-stream@2.3.3",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
+ "_shasum": "b4f85003a938cbb6ecbce2a124fb1012bd1a838d",
+ "_spec": "readable-stream@2.3.5",
+ "_where": "/Users/zkat/Documents/code/npm",
"browser": {
"util": false,
"./readable.js": "./readable-browser.js",
@@ -57,7 +66,7 @@
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
+ "process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.0.3",
"util-deprecate": "~1.0.1"
@@ -65,13 +74,14 @@
"deprecated": false,
"description": "Streams3, a user-land copy of the stream library from Node.js",
"devDependencies": {
- "assert": "~1.4.0",
+ "assert": "^1.4.0",
"babel-polyfill": "^6.9.1",
"buffer": "^4.9.0",
+ "lolex": "^2.3.2",
"nyc": "^6.4.0",
- "tap": "~0.7.1",
- "tape": "~4.5.1",
- "zuul": "~3.10.0"
+ "tap": "^0.7.0",
+ "tape": "^4.8.0",
+ "zuul": "^3.11.1"
},
"homepage": "https://github.com/nodejs/readable-stream#readme",
"keywords": [
@@ -93,11 +103,12 @@
},
"scripts": {
"browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js",
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
"cover": "nyc npm test",
"local": "zuul --local 3000 --no-coverage -- test/browser.js",
"report": "nyc report --reporter=lcov",
"test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js",
"write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
},
- "version": "2.3.3"
+ "version": "2.3.5"
}
diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md
index fd5151ab37..951c53956a 100644
--- a/deps/npm/node_modules/semver/README.md
+++ b/deps/npm/node_modules/semver/README.md
@@ -20,6 +20,8 @@ semver.clean(' =v1.2.3 ') // '1.2.3'
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
```
As a command-line utility:
@@ -52,6 +54,10 @@ Options:
-l --loose
Interpret versions and ranges loosely
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@@ -364,3 +370,19 @@ satisfy the range.
If you want to know if a version satisfies or does not satisfy a
range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver
+string to semver. It looks for the first digit in a string, and
+consumes all remaining characters which satisfy at least a partial semver
+(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters).
+Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`).
+All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`).
+Only text which lacks digits will fail coercion (`version one` is not valid).
+The maximum length for any semver component considered for coercion is 16 characters;
+longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`).
+The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`;
+higher value components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/deps/npm/node_modules/semver/bin/semver b/deps/npm/node_modules/semver/bin/semver
index c5f2e857e8..dddbcdf118 100755
--- a/deps/npm/node_modules/semver/bin/semver
+++ b/deps/npm/node_modules/semver/bin/semver
@@ -12,6 +12,7 @@ var argv = process.argv.slice(2)
, inc = null
, version = require("../package.json").version
, loose = false
+ , coerce = false
, identifier = undefined
, semver = require("../semver")
, reverse = false
@@ -54,6 +55,9 @@ function main () {
case "-r": case "--range":
range.push(argv.shift())
break
+ case "-c": case "--coerce":
+ coerce = true
+ break
case "-h": case "--help": case "-?":
return help()
default:
@@ -62,8 +66,10 @@ function main () {
}
}
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
+ versions = versions.map(function (v) {
+ return coerce ? (semver.coerce(v) || {version: v}).version : v
+ }).filter(function (v) {
+ return semver.valid(v)
})
if (!versions.length) return fail()
if (inc && (versions.length !== 1 || range.length))
@@ -122,6 +128,10 @@ function help () {
,"-l --loose"
," Interpret versions and ranges loosely"
,""
+ ,"-c --coerce"
+ ," Coerce a string into SemVer if possible"
+ ," (does not imply --loose)"
+ ,""
,"Program exits successfully if any valid version satisfies"
,"all supplied ranges, and prints all satisfying versions."
,""
diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json
index cf8088662e..c38357333b 100644
--- a/deps/npm/node_modules/semver/package.json
+++ b/deps/npm/node_modules/semver/package.json
@@ -1,38 +1,41 @@
{
- "_from": "semver@latest",
- "_id": "semver@5.4.1",
+ "_from": "semver@5.5.0",
+ "_id": "semver@5.5.0",
"_inBundle": false,
- "_integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
+ "_integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"_location": "/semver",
"_phantomChildren": {},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "semver@latest",
+ "raw": "semver@5.5.0",
"name": "semver",
"escapedName": "semver",
- "rawSpec": "latest",
+ "rawSpec": "5.5.0",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "5.5.0"
},
"_requiredBy": [
"#USER",
"/",
"/init-package-json",
+ "/init-package-json/npm-package-arg",
+ "/libcipm/lock-verify",
+ "/libcipm/lock-verify/npm-package-arg",
+ "/libnpx/npm-package-arg",
"/normalize-package-data",
"/npm-install-checks",
"/npm-package-arg",
"/npm-registry-client",
- "/pacote",
- "/pacote/npm-pick-manifest",
+ "/npm-registry-client/npm-package-arg",
"/read-installed",
"/update-notifier/latest-version/package-json",
"/update-notifier/semver-diff"
],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
- "_shasum": "e059c09d8571f0540823733433505d3a2f00b18e",
- "_spec": "semver@latest",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "_shasum": "dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab",
+ "_spec": "semver@5.5.0",
+ "_where": "/Users/rebecca/code/npm",
"bin": {
"semver": "./bin/semver"
},
@@ -61,5 +64,5 @@
"scripts": {
"test": "tap test/*.js --cov -J"
},
- "version": "5.4.1"
+ "version": "5.5.0"
}
diff --git a/deps/npm/node_modules/semver/range.bnf b/deps/npm/node_modules/semver/range.bnf
index 25ebd5c832..d4c6ae0d76 100644
--- a/deps/npm/node_modules/semver/range.bnf
+++ b/deps/npm/node_modules/semver/range.bnf
@@ -3,10 +3,10 @@ logical-or ::= ( ' ' ) * '||' ( ' ' ) *
range ::= hyphen | simple ( ' ' simple ) * | ''
hyphen ::= partial ' - ' partial
simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+nr ::= '0' | [1-9] ( [0-9] ) *
tilde ::= '~' partial
caret ::= '^' partial
qualifier ::= ( '-' pre )? ( '+' build )?
diff --git a/deps/npm/node_modules/semver/semver.js b/deps/npm/node_modules/semver/semver.js
index 389cb44676..6a2bc01002 100644
--- a/deps/npm/node_modules/semver/semver.js
+++ b/deps/npm/node_modules/semver/semver.js
@@ -21,6 +21,9 @@ exports.SEMVER_SPEC_VERSION = '2.0.0';
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16;
+
// The actual regexps go on exports.re
var re = exports.re = [];
var src = exports.src = [];
@@ -156,6 +159,15 @@ src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
var XRANGELOOSE = R++;
src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+var COERCE = R++;
+src[COERCE] = '(?:^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])';
+
// Tilde ranges.
// Meaning is "reasonably at or greater than"
var LONETILDE = R++;
@@ -1294,3 +1306,19 @@ function intersects(r1, r2, loose) {
r2 = new Range(r2, loose)
return r1.intersects(r2)
}
+
+exports.coerce = coerce;
+function coerce(version) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ var match = version.match(re[COERCE]);
+
+ if (match == null)
+ return null;
+
+ return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
+}
diff --git a/deps/npm/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/ssri/CHANGELOG.md
index 7ae2b000dc..f90bb70f78 100644
--- a/deps/npm/node_modules/ssri/CHANGELOG.md
+++ b/deps/npm/node_modules/ssri/CHANGELOG.md
@@ -2,6 +2,62 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="5.2.4"></a>
+## [5.2.4](https://github.com/zkat/ssri/compare/v5.2.3...v5.2.4) (2018-02-16)
+
+
+
+<a name="5.2.3"></a>
+## [5.2.3](https://github.com/zkat/ssri/compare/v5.2.2...v5.2.3) (2018-02-16)
+
+
+### Bug Fixes
+
+* **hashes:** filter hash priority list by available hashes ([2fa30b8](https://github.com/zkat/ssri/commit/2fa30b8))
+* **integrityStream:** dedupe algorithms to generate ([d56c654](https://github.com/zkat/ssri/commit/d56c654))
+
+
+
+<a name="5.2.2"></a>
+## [5.2.2](https://github.com/zkat/ssri/compare/v5.2.1...v5.2.2) (2018-02-14)
+
+
+### Bug Fixes
+
+* **security:** tweak strict SRI regex ([#10](https://github.com/zkat/ssri/issues/10)) ([d0ebcdc](https://github.com/zkat/ssri/commit/d0ebcdc))
+
+
+
+<a name="5.2.1"></a>
+## [5.2.1](https://github.com/zkat/ssri/compare/v5.2.0...v5.2.1) (2018-02-06)
+
+
+
+<a name="5.2.0"></a>
+# [5.2.0](https://github.com/zkat/ssri/compare/v5.1.0...v5.2.0) (2018-02-06)
+
+
+### Features
+
+* **match:** add integrity.match() ([3c49cc4](https://github.com/zkat/ssri/commit/3c49cc4))
+
+
+
+<a name="5.1.0"></a>
+# [5.1.0](https://github.com/zkat/ssri/compare/v5.0.0...v5.1.0) (2018-01-18)
+
+
+### Bug Fixes
+
+* **checkStream:** integrityStream now takes opts.integrity algos into account ([d262910](https://github.com/zkat/ssri/commit/d262910))
+
+
+### Features
+
+* **sha3:** do some guesswork about upcoming sha3 ([7fdd9df](https://github.com/zkat/ssri/commit/7fdd9df))
+
+
+
<a name="5.0.0"></a>
# [5.0.0](https://github.com/zkat/ssri/compare/v4.1.6...v5.0.0) (2017-10-23)
diff --git a/deps/npm/node_modules/ssri/README.md b/deps/npm/node_modules/ssri/README.md
index f2fc035da5..801141817b 100644
--- a/deps/npm/node_modules/ssri/README.md
+++ b/deps/npm/node_modules/ssri/README.md
@@ -21,6 +21,7 @@ Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) hashes.
* [`Integrity#concat`](#integrity-concat)
* [`Integrity#toString`](#integrity-to-string)
* [`Integrity#toJSON`](#integrity-to-json)
+ * [`Integrity#match`](#integrity-match)
* [`Integrity#pickAlgorithm`](#integrity-pick-algorithm)
* [`Integrity#hexDigest`](#integrity-hex-digest)
* Integrity Generation
@@ -218,6 +219,27 @@ const integrity = '"sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3x
JSON.stringify(ssri.parse(integrity)) === integrity
```
+#### <a name="integrity-match"></a> `> Integrity#match(sri, [opts]) -> Hash | false`
+
+Returns the matching (truthy) hash if `Integrity` matches the argument passed as
+`sri`, which can be anything that [`parse`](#parse) will accept. `opts` will be
+passed through to `parse` and [`pickAlgorithm()`](#integrity-pick-algorithm).
+
+##### Example
+
+```javascript
+const integrity = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
+
+ssri.parse(integrity).match(integrity)
+// Hash {
+// digest: '9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A+line3jUBgzQ7A=='
+// algorithm: 'sha512'
+// }
+
+ssri.parse(integrity).match('sha1-deadbeef')
+// false
+```
+
#### <a name="integrity-pick-algorithm"></a> `> Integrity#pickAlgorithm([opts]) -> String`
Returns the "best" algorithm from those available in the integrity object.
@@ -423,7 +445,7 @@ ssri.checkStream(
) // -> Promise<Error<{code: 'EINTEGRITY'}>>
```
-#### <a name="integrity-stream"></a> `> integrityStream(sri, [opts]) -> IntegrityStream`
+#### <a name="integrity-stream"></a> `> integrityStream([opts]) -> IntegrityStream`
Returns a `Transform` stream that data can be piped through in order to generate
and optionally check data integrity for piped data. When the stream completes
@@ -458,5 +480,5 @@ may intentionally deprioritize algorithms with known vulnerabilities.
```javascript
const integrity = ssri.fromData(fs.readFileSync('index.js'))
fs.createReadStream('index.js')
-.pipe(ssri.checkStream(integrity))
+.pipe(ssri.integrityStream({integrity}))
```
diff --git a/deps/npm/node_modules/ssri/index.js b/deps/npm/node_modules/ssri/index.js
index 8ece662ba6..5418256f1c 100644
--- a/deps/npm/node_modules/ssri/index.js
+++ b/deps/npm/node_modules/ssri/index.js
@@ -9,7 +9,7 @@ const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512']
const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i
const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/
-const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/]+(?:=?=?))([?\x21-\x7E]*)$/
+const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/
const VCHAR_REGEX = /^[\x21-\x7E]+$/
class Hash {
@@ -93,6 +93,19 @@ class Integrity {
hexDigest () {
return parse(this, {single: true}).hexDigest()
}
+ match (integrity, opts) {
+ const other = parse(integrity, opts)
+ const algo = other.pickAlgorithm(opts)
+ return (
+ this[algo] &&
+ other[algo] &&
+ this[algo].find(hash =>
+ other[algo].find(otherhash =>
+ hash.digest === otherhash.digest
+ )
+ )
+ ) || false
+ }
pickAlgorithm (opts) {
const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash
const keys = Object.keys(this)
@@ -205,9 +218,8 @@ function checkData (data, sri, opts) {
sri = parse(sri, opts)
if (!Object.keys(sri).length) { return false }
const algorithm = sri.pickAlgorithm(opts)
- const digests = sri[algorithm] || []
const digest = crypto.createHash(algorithm).update(data).digest('base64')
- return digests.find(hash => hash.digest === digest) || false
+ return parse({algorithm, digest}).match(sri, opts)
}
module.exports.checkStream = checkStream
@@ -237,7 +249,12 @@ function integrityStream (opts) {
const algorithm = goodSri && sri.pickAlgorithm(opts)
const digests = goodSri && sri[algorithm]
// Calculating stream
- const algorithms = opts.algorithms || [algorithm || 'sha512']
+ const algorithms = Array.from(
+ new Set(
+ (opts.algorithms || ['sha512'])
+ .concat(algorithm ? [algorithm] : [])
+ )
+ )
const hashes = algorithms.map(crypto.createHash)
let streamSize = 0
const stream = new Transform({
@@ -253,17 +270,8 @@ function integrityStream (opts) {
const newSri = parse(hashes.map((h, i) => {
return `${algorithms[i]}-${h.digest('base64')}${optString}`
}).join(' '), opts)
- const match = (
- // Integrity verification mode
- opts.integrity &&
- newSri[algorithm] &&
- digests &&
- digests.find(hash => {
- return newSri[algorithm].find(newhash => {
- return hash.digest === newhash.digest
- })
- })
- )
+ // Integrity verification mode
+ const match = goodSri && newSri.match(sri, opts)
if (typeof opts.size === 'number' && streamSize !== opts.size) {
const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`)
err.code = 'EBADSIZE'
@@ -323,10 +331,18 @@ function createIntegrity (opts) {
}
}
+const NODE_HASHES = new Set(crypto.getHashes())
+
// This is a Best Effortā„¢ at a reasonable priority for hash algos
const DEFAULT_PRIORITY = [
- 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'
-]
+ 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512',
+ // TODO - it's unclear _which_ of these Node will actually use as its name
+ // for the algorithm, so we guesswork it based on the OpenSSL names.
+ 'sha3',
+ 'sha3-256', 'sha3-384', 'sha3-512',
+ 'sha3_256', 'sha3_384', 'sha3_512'
+].filter(algo => NODE_HASHES.has(algo))
+
function getPrioritizedHash (algo1, algo2) {
return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase())
? algo1
diff --git a/deps/npm/node_modules/ssri/package.json b/deps/npm/node_modules/ssri/package.json
index 24722ee821..59f5c92f3f 100644
--- a/deps/npm/node_modules/ssri/package.json
+++ b/deps/npm/node_modules/ssri/package.json
@@ -1,27 +1,30 @@
{
- "_from": "ssri@5.0.0",
- "_id": "ssri@5.0.0",
+ "_from": "ssri@latest",
+ "_id": "ssri@5.2.4",
"_inBundle": false,
- "_integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==",
+ "_integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==",
"_location": "/ssri",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "ssri@5.0.0",
+ "raw": "ssri@latest",
"name": "ssri",
"escapedName": "ssri",
- "rawSpec": "5.0.0",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "5.0.0"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/cacache",
+ "/pacote",
+ "/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz",
- "_shasum": "13c19390b606c821f2a10d02b351c1729b94d8cf",
- "_spec": "ssri@5.0.0",
+ "_resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz",
+ "_shasum": "9985e14041e65fc397af96542be35724ac11da52",
+ "_spec": "ssri@latest",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Kat MarchƔn",
@@ -40,15 +43,15 @@
}
},
"dependencies": {
- "safe-buffer": "^5.1.0"
+ "safe-buffer": "^5.1.1"
},
"deprecated": false,
"description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
"devDependencies": {
- "nyc": "^10.3.2",
- "standard": "^9.0.2",
- "standard-version": "^4.1.0",
- "tap": "^10.3.3",
+ "nyc": "^11.4.1",
+ "standard": "^10.0.3",
+ "standard-version": "^4.3.0",
+ "tap": "^11.1.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
@@ -86,5 +89,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "5.0.0"
+ "version": "5.2.4"
}
diff --git a/deps/npm/node_modules/tar/README.md b/deps/npm/node_modules/tar/README.md
index a356a78da2..ea98e0b21b 100644
--- a/deps/npm/node_modules/tar/README.md
+++ b/deps/npm/node_modules/tar/README.md
@@ -226,6 +226,10 @@ The following options are supported:
- `noPax` Suppress pax extended headers. Note that this means that
long paths and linkpaths will be truncated, and large or negative
numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
The following options are mostly internal, but can be modified in some
advanced use cases, such as re-using caches between runs.
@@ -310,6 +314,16 @@ The following options are supported:
specified group id, regardless of the `gid` field in the archive.
Cannot be used along with `preserveOwner`. Requires also setting a
`uid` option.
+- `noMtime` Set to true to omit writing `mtime` value for extracted
+ entries. [Alias: `m`, `no-mtime`]
+- `transform` Provide a function that takes an `entry` object, and
+ returns a stream, or any falsey value. If a stream is provided,
+ then that stream's data will be written instead of the contents of
+ the archive entry. If a falsey value is provided, then the entry is
+ written to disk as normal. (To exclude items from extraction, use
+ the `filter` option described above.)
+- `onentry` A function that gets called with `(entry)` for each entry
+ that passes the filter.
The following options are mostly internal, but can be modified in some
advanced use cases, such as re-using caches between runs.
@@ -323,6 +337,11 @@ advanced use cases, such as re-using caches between runs.
- `maxMetaEntrySize` The maximum size of meta entries that is
supported. Defaults to 1 MB.
+Note that using an asynchronous stream type with the `transform`
+option will cause undefined behavior in sync extractions.
+[MiniPass](http://npm.im/minipass)-based streams are designed for this
+use case.
+
### tar.t(options, fileList, callback) [alias: tar.list]
List the contents of a tarball archive.
@@ -405,6 +424,12 @@ The following options are supported:
- `noPax` Suppress pax extended headers. Note that this means that
long paths and linkpaths will be truncated, and large or negative
numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
### tar.r(options, fileList, callback) [alias: tar.replace]
@@ -450,6 +475,13 @@ The following options are supported:
- `noPax` Suppress pax extended headers. Note that this means that
long paths and linkpaths will be truncated, and large or negative
numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+ [Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+
## Low-Level API
@@ -496,6 +528,12 @@ The following options are supported:
- `noPax` Suppress pax extended headers. Note that this means that
long paths and linkpaths will be truncated, and large or negative
numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
+
#### add(path)
@@ -583,11 +621,29 @@ Most unpack errors will cause a `warn` event to be emitted. If the
specified group id, regardless of the `gid` field in the archive.
Cannot be used along with `preserveOwner`. Requires also setting a
`uid` option.
+- `noMtime` Set to true to omit writing `mtime` value for extracted
+ entries.
+- `transform` Provide a function that takes an `entry` object, and
+ returns a stream, or any falsey value. If a stream is provided,
+ then that stream's data will be written instead of the contents of
+ the archive entry. If a falsey value is provided, then the entry is
+ written to disk as normal. (To exclude items from extraction, use
+ the `filter` option described above.)
+- `strict` Treat warnings as crash-worthy errors. Default false.
+- `onentry` A function that gets called with `(entry)` for each entry
+ that passes the filter.
+- `onwarn` A function that will get called with `(message, data)` for
+ any warnings encountered.
### class tar.Unpack.Sync
Synchronous version of `tar.Unpack`.
+Note that using an asynchronous stream type with the `transform`
+option will cause undefined behavior in sync unpack streams.
+[MiniPass](http://npm.im/minipass)-based streams are designed for this
+use case.
+
### class tar.Parse
A writable stream that parses a tar archive stream. All the standard
@@ -693,6 +749,10 @@ It has the following fields:
- `noPax` Suppress pax extended headers. Note that this means that
long paths and linkpaths will be truncated, and large or negative
numeric values may be interpreted incorrectly.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
+
#### constructor(path, options)
@@ -721,6 +781,9 @@ The following options are supported:
replace `\` with `/`.
- `onwarn` A function that will get called with `(message, data)` for
any warnings encountered.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
#### warn(message, data)
@@ -752,6 +815,9 @@ The following options are supported:
- `strict` Treat warnings as crash-worthy errors. Default false.
- `onwarn` A function that will get called with `(message, data)` for
any warnings encountered.
+- `noMtime` Set to true to omit writing `mtime` values for entries.
+ Note that this prevents using other mtime-based features like
+ `tar.update` or the `keepNewer` option with the resulting tar archive.
### class tar.Header
diff --git a/deps/npm/node_modules/tar/lib/create.js b/deps/npm/node_modules/tar/lib/create.js
index 5d46b3ba70..a37aa52e6d 100644
--- a/deps/npm/node_modules/tar/lib/create.js
+++ b/deps/npm/node_modules/tar/lib/create.js
@@ -5,6 +5,7 @@ const hlo = require('./high-level-opt.js')
const Pack = require('./pack.js')
const fs = require('fs')
+const fsm = require('fs-minipass')
const t = require('./list.js')
const path = require('path')
@@ -36,24 +37,18 @@ const c = module.exports = (opt_, files, cb) => {
const createFileSync = (opt, files) => {
const p = new Pack.Sync(opt)
-
- let threw = true
- let fd
- try {
- fd = fs.openSync(opt.file, 'w', opt.mode || 0o666)
- p.on('data', chunk => fs.writeSync(fd, chunk, 0, chunk.length))
- p.on('end', _ => fs.closeSync(fd))
- addFilesSync(p, files)
- threw = false
- } finally {
- if (threw)
- try { fs.closeSync(fd) } catch (er) {}
- }
+ const stream = new fsm.WriteStreamSync(opt.file, {
+ mode: opt.mode || 0o666
+ })
+ p.pipe(stream)
+ addFilesSync(p, files)
}
const createFile = (opt, files, cb) => {
const p = new Pack(opt)
- const stream = fs.createWriteStream(opt.file, { mode: opt.mode || 0o666 })
+ const stream = new fsm.WriteStream(opt.file, {
+ mode: opt.mode || 0o666
+ })
p.pipe(stream)
const promise = new Promise((res, rej) => {
diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js
index 53ecf67894..cbb458a0a4 100644
--- a/deps/npm/node_modules/tar/lib/extract.js
+++ b/deps/npm/node_modules/tar/lib/extract.js
@@ -4,6 +4,7 @@
const hlo = require('./high-level-opt.js')
const Unpack = require('./unpack.js')
const fs = require('fs')
+const fsm = require('fs-minipass')
const path = require('path')
const x = module.exports = (opt_, files, cb) => {
@@ -64,28 +65,15 @@ const extractFileSync = opt => {
const file = opt.file
let threw = true
let fd
- try {
- const stat = fs.statSync(file)
- const readSize = opt.maxReadSize || 16*1024*1024
- if (stat.size < readSize)
- u.end(fs.readFileSync(file))
- else {
- let pos = 0
- const buf = Buffer.allocUnsafe(readSize)
- fd = fs.openSync(file, 'r')
- while (pos < stat.size) {
- let bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
- pos += bytesRead
- u.write(buf.slice(0, bytesRead))
- }
- u.end()
- fs.closeSync(fd)
- }
- threw = false
- } finally {
- if (threw && fd)
- try { fs.closeSync(fd) } catch (er) {}
- }
+ const stat = fs.statSync(file)
+ // This trades a zero-byte read() syscall for a stat
+ // However, it will usually result in less memory allocation
+ const readSize = opt.maxReadSize || 16*1024*1024
+ const stream = new fsm.ReadStreamSync(file, {
+ readSize: readSize,
+ size: stat.size
+ })
+ stream.pipe(u)
}
const extractFile = (opt, cb) => {
@@ -97,18 +85,15 @@ const extractFile = (opt, cb) => {
u.on('error', reject)
u.on('close', resolve)
+ // This trades a zero-byte read() syscall for a stat
+ // However, it will usually result in less memory allocation
fs.stat(file, (er, stat) => {
if (er)
reject(er)
- else if (stat.size < readSize)
- fs.readFile(file, (er, data) => {
- if (er)
- return reject(er)
- u.end(data)
- })
else {
- const stream = fs.createReadStream(file, {
- highWaterMark: readSize
+ const stream = new fsm.ReadStream(file, {
+ readSize: readSize,
+ size: stat.size
})
stream.on('error', reject)
stream.pipe(u)
diff --git a/deps/npm/node_modules/tar/lib/header.js b/deps/npm/node_modules/tar/lib/header.js
index db002e8c18..4de35fa8df 100644
--- a/deps/npm/node_modules/tar/lib/header.js
+++ b/deps/npm/node_modules/tar/lib/header.js
@@ -33,9 +33,9 @@ class Header {
this.atime = null
this.ctime = null
- if (Buffer.isBuffer(data)) {
+ if (Buffer.isBuffer(data))
this.decode(data, off || 0)
- } else if (data)
+ else if (data)
this.set(data)
}
diff --git a/deps/npm/node_modules/tar/lib/list.js b/deps/npm/node_modules/tar/lib/list.js
index 1f5e70bd36..9da3f812c3 100644
--- a/deps/npm/node_modules/tar/lib/list.js
+++ b/deps/npm/node_modules/tar/lib/list.js
@@ -7,6 +7,7 @@
const hlo = require('./high-level-opt.js')
const Parser = require('./parse.js')
const fs = require('fs')
+const fsm = require('fs-minipass')
const path = require('path')
const t = module.exports = (opt_, files, cb) => {
@@ -111,15 +112,10 @@ const listFile = (opt, cb) => {
fs.stat(file, (er, stat) => {
if (er)
reject(er)
- else if (stat.size < readSize)
- fs.readFile(file, (er, data) => {
- if (er)
- return reject(er)
- parse.end(data)
- })
else {
- const stream = fs.createReadStream(file, {
- highWaterMark: readSize
+ const stream = new fsm.ReadStream(file, {
+ readSize: readSize,
+ size: stat.size
})
stream.on('error', reject)
stream.pipe(parse)
diff --git a/deps/npm/node_modules/tar/lib/mkdir.js b/deps/npm/node_modules/tar/lib/mkdir.js
index 2a8f461afe..382329ef51 100644
--- a/deps/npm/node_modules/tar/lib/mkdir.js
+++ b/deps/npm/node_modules/tar/lib/mkdir.js
@@ -145,7 +145,6 @@ const mkdirSync = module.exports.sync = (dir, opt) => {
chownr.sync(created, uid, gid)
if (needChmod)
fs.chmodSync(dir, mode)
- cache.set(dir, true)
}
if (cache && cache.get(dir) === true)
diff --git a/deps/npm/node_modules/tar/lib/pack.js b/deps/npm/node_modules/tar/lib/pack.js
index 09b6ac590b..8df366e118 100644
--- a/deps/npm/node_modules/tar/lib/pack.js
+++ b/deps/npm/node_modules/tar/lib/pack.js
@@ -88,6 +88,8 @@ const Pack = warner(class Pack extends MiniPass {
this.portable = !!opt.portable
this.noDirRecurse = !!opt.noDirRecurse
this.follow = !!opt.follow
+ this.noMtime = !!opt.noMtime
+ this.mtime = opt.mtime || null
this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
@@ -291,17 +293,18 @@ const Pack = warner(class Pack extends MiniPass {
strict: this.strict,
portable: this.portable,
linkCache: this.linkCache,
- statCache: this.statCache
+ statCache: this.statCache,
+ noMtime: this.noMtime,
+ mtime: this.mtime
}
}
[ENTRY] (job) {
this[JOBS] += 1
try {
- return new this[WRITEENTRYCLASS](
- job.path, this[ENTRYOPT](job)).on('end', _ => {
- this[JOBDONE](job)
- }).on('error', er => this.emit('error', er))
+ return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job))
+ .on('end', () => this[JOBDONE](job))
+ .on('error', er => this.emit('error', er))
} catch (er) {
this.emit('error', er)
}
@@ -378,7 +381,6 @@ class PackSync extends Pack {
job.path.slice(this.prefix.length + 1) || './'
: job.path
-
const base = p === './' ? '' : p.replace(/\/*$/, '/')
this[ADDFSENTRY](base + entry)
})
diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js
index 63c7ee9cef..090b2d2c0f 100644
--- a/deps/npm/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/tar/lib/parse.js
@@ -262,7 +262,8 @@ module.exports = warner(class Parser extends EE {
abort (msg, error) {
this[ABORTED] = true
this.warn(msg, error)
- this.emit('abort')
+ this.emit('abort', error)
+ this.emit('error', error)
}
write (chunk) {
@@ -289,12 +290,15 @@ module.exports = warner(class Parser extends EE {
this[UNZIP] = new zlib.Unzip()
this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))
this[UNZIP].on('error', er =>
- this.abort('zlib error: ' + er.message, er))
+ this.abort(er.message, er))
this[UNZIP].on('end', _ => {
this[ENDED] = true
this[CONSUMECHUNK]()
})
- return ended ? this[UNZIP].end(chunk) : this[UNZIP].write(chunk)
+ this[WRITING] = true
+ const ret = this[UNZIP][ended ? 'end' : 'write' ](chunk)
+ this[WRITING] = false
+ return ret
}
}
@@ -324,7 +328,10 @@ module.exports = warner(class Parser extends EE {
}
[MAYBEEND] () {
- if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED]) {
+ if (this[ENDED] &&
+ !this[EMITTEDEND] &&
+ !this[ABORTED] &&
+ !this[CONSUMING]) {
this[EMITTEDEND] = true
const entry = this[WRITEENTRY]
if (entry && entry.blockRemain) {
diff --git a/deps/npm/node_modules/tar/lib/replace.js b/deps/npm/node_modules/tar/lib/replace.js
index aac6b57fa8..44126d1f85 100644
--- a/deps/npm/node_modules/tar/lib/replace.js
+++ b/deps/npm/node_modules/tar/lib/replace.js
@@ -5,6 +5,7 @@ const hlo = require('./high-level-opt.js')
const Pack = require('./pack.js')
const Parse = require('./parse.js')
const fs = require('fs')
+const fsm = require('fs-minipass')
const t = require('./list.js')
const path = require('path')
@@ -39,6 +40,8 @@ const replaceSync = (opt, files) => {
let threw = true
let fd
+ let position
+
try {
try {
fd = fs.openSync(opt.file, 'r+')
@@ -51,7 +54,6 @@ const replaceSync = (opt, files) => {
const st = fs.fstatSync(fd)
const headBuf = Buffer.alloc(512)
- let position
POSITION: for (position = 0; position < st.size; position += 512) {
for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
@@ -78,21 +80,24 @@ const replaceSync = (opt, files) => {
if (opt.mtimeCache)
opt.mtimeCache.set(h.path, h.mtime)
}
-
- p.on('data', c => {
- fs.writeSync(fd, c, 0, c.length, position)
- position += c.length
- })
- p.on('end', _ => fs.closeSync(fd))
-
- addFilesSync(p, files)
threw = false
+
+ streamSync(opt, p, position, fd, files)
} finally {
if (threw)
try { fs.closeSync(fd) } catch (er) {}
}
}
+const streamSync = (opt, p, position, fd, files) => {
+ const stream = new fsm.WriteStreamSync(opt.file, {
+ fd: fd,
+ start: position
+ })
+ p.pipe(stream)
+ addFilesSync(p, files)
+}
+
const replace = (opt, files, cb) => {
files = Array.from(files)
const p = new Pack(opt)
@@ -150,21 +155,24 @@ const replace = (opt, files, cb) => {
const promise = new Promise((resolve, reject) => {
p.on('error', reject)
+ let flag = 'r+'
const onopen = (er, fd) => {
- if (er) {
- if (er.code === 'ENOENT')
- return fs.open(opt.file, 'w+', onopen)
- return reject(er)
+ if (er && er.code === 'ENOENT' && flag === 'r+') {
+ flag = 'w+'
+ return fs.open(opt.file, flag, onopen)
}
+
+ if (er)
+ return reject(er)
+
fs.fstat(fd, (er, st) => {
if (er)
return reject(er)
getPos(fd, st.size, (er, position) => {
if (er)
return reject(er)
- const stream = fs.createWriteStream(opt.file, {
+ const stream = new fsm.WriteStream(opt.file, {
fd: fd,
- flags: 'r+',
start: position
})
p.pipe(stream)
@@ -174,7 +182,7 @@ const replace = (opt, files, cb) => {
})
})
}
- fs.open(opt.file, 'r+', onopen)
+ fs.open(opt.file, flag, onopen)
})
return cb ? promise.then(cb, cb) : promise
diff --git a/deps/npm/node_modules/tar/lib/unpack.js b/deps/npm/node_modules/tar/lib/unpack.js
index e8c80c6fd5..3e1c527b64 100644
--- a/deps/npm/node_modules/tar/lib/unpack.js
+++ b/deps/npm/node_modules/tar/lib/unpack.js
@@ -4,6 +4,7 @@ const assert = require('assert')
const EE = require('events').EventEmitter
const Parser = require('./parse.js')
const fs = require('fs')
+const fsm = require('fs-minipass')
const path = require('path')
const mkdir = require('./mkdir.js')
const mkdirSync = mkdir.sync
@@ -32,6 +33,12 @@ const DOCHOWN = Symbol('doChown')
const UID = Symbol('uid')
const GID = Symbol('gid')
+// this.gid, entry.gid, this.processUid
+const uint32 = (a, b, c) =>
+ a === a >>> 0 ? a
+ : b === b >>> 0 ? b
+ : c
+
class Unpack extends Parser {
constructor (opt) {
if (!opt)
@@ -44,6 +51,8 @@ class Unpack extends Parser {
super(opt)
+ this.transform = typeof opt.transform === 'function' ? opt.transform : null
+
this.writable = true
this.readable = false
@@ -79,6 +88,10 @@ class Unpack extends Parser {
this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ?
process.getgid() : null
+ // mostly just for testing, but useful in some cases.
+ // Forcibly trigger a chown on every entry, no matter what
+ this.forceChown = opt.forceChown === true
+
// turn ><?| in filenames into 0xf000-higher encoded forms
this.win32 = !!opt.win32 || process.platform === 'win32'
@@ -215,7 +228,8 @@ class Unpack extends Parser {
[DOCHOWN] (entry) {
// in preserve owner mode, chown if the entry doesn't match process
// in set owner mode, chown if setting doesn't match process
- return this.preserveOwner &&
+ return this.forceChown ||
+ this.preserveOwner &&
( typeof entry.uid === 'number' && entry.uid !== this.processUid ||
typeof entry.gid === 'number' && entry.gid !== this.processGid )
||
@@ -224,41 +238,62 @@ class Unpack extends Parser {
}
[UID] (entry) {
- return typeof this.uid === 'number' ? this.uid
- : typeof entry.uid === 'number' ? entry.uid
- : this.processUid
+ return uint32(this.uid, entry.uid, this.processUid)
}
[GID] (entry) {
- return typeof this.gid === 'number' ? this.gid
- : typeof entry.gid === 'number' ? entry.gid
- : this.processGid
+ return uint32(this.gid, entry.gid, this.processGid)
}
[FILE] (entry) {
const mode = entry.mode & 0o7777 || this.fmode
- const stream = fs.createWriteStream(entry.absolute, { mode: mode })
+ const stream = new fsm.WriteStream(entry.absolute, {
+ mode: mode,
+ autoClose: false
+ })
stream.on('error', er => this[ONERROR](er, entry))
- const queue = []
- const processQueue = _ => {
- const action = queue.shift()
- if (action)
- action(processQueue)
- else
- this[UNPEND]()
+ let actions = 1
+ const done = er => {
+ if (er)
+ return this[ONERROR](er, entry)
+
+ if (--actions === 0)
+ fs.close(stream.fd, _ => this[UNPEND]())
}
- stream.on('close', _ => {
- if (entry.mtime && !this.noMtime)
- queue.push(cb =>
- fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, cb))
- if (this[DOCHOWN](entry))
- queue.push(cb =>
- fs.chown(entry.absolute, this[UID](entry), this[GID](entry), cb))
- processQueue()
+ stream.on('finish', _ => {
+ // if futimes fails, try utimes
+ // if utimes fails, fail with the original error
+ // same for fchown/chown
+ const abs = entry.absolute
+ const fd = stream.fd
+
+ if (entry.mtime && !this.noMtime) {
+ actions++
+ const atime = entry.atime || new Date()
+ const mtime = entry.mtime
+ fs.futimes(fd, atime, mtime, er =>
+ er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er))
+ : done())
+ }
+
+ if (this[DOCHOWN](entry)) {
+ actions++
+ const uid = this[UID](entry)
+ const gid = this[GID](entry)
+ fs.fchown(fd, uid, gid, er =>
+ er ? fs.chown(abs, uid, gid, er2 => done(er2 && er))
+ : done())
+ }
+
+ done()
})
- entry.pipe(stream)
+
+ const tx = this.transform ? this.transform(entry) || entry : entry
+ if (tx !== entry)
+ entry.pipe(tx)
+ tx.pipe(stream)
}
[DIRECTORY] (entry) {
@@ -267,25 +302,25 @@ class Unpack extends Parser {
if (er)
return this[ONERROR](er, entry)
- const queue = []
- const processQueue = _ => {
- const action = queue.shift()
- if (action)
- action(processQueue)
- else {
+ let actions = 1
+ const done = _ => {
+ if (--actions === 0) {
this[UNPEND]()
entry.resume()
}
}
- if (entry.mtime && !this.noMtime)
- queue.push(cb =>
- fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, cb))
- if (this[DOCHOWN](entry))
- queue.push(cb =>
- fs.chown(entry.absolute, this[UID](entry), this[GID](entry), cb))
+ if (entry.mtime && !this.noMtime) {
+ actions++
+ fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done)
+ }
- processQueue()
+ if (this[DOCHOWN](entry)) {
+ actions++
+ fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done)
+ }
+
+ done()
})
}
@@ -411,23 +446,67 @@ class UnpackSync extends Unpack {
[FILE] (entry) {
const mode = entry.mode & 0o7777 || this.fmode
+
+ const oner = er => {
+ try { fs.closeSync(fd) } catch (_) {}
+ if (er)
+ this[ONERROR](er, entry)
+ }
+
+ let stream
+ let fd
try {
- const fd = fs.openSync(entry.absolute, 'w', mode)
- entry.on('data', buf => fs.writeSync(fd, buf, 0, buf.length, null))
- entry.on('end', _ => {
- if (entry.mtime && !this.noMtime) {
+ fd = fs.openSync(entry.absolute, 'w', mode)
+ } catch (er) {
+ return oner(er)
+ }
+ const tx = this.transform ? this.transform(entry) || entry : entry
+ if (tx !== entry)
+ entry.pipe(tx)
+
+ tx.on('data', chunk => {
+ try {
+ fs.writeSync(fd, chunk, 0, chunk.length)
+ } catch (er) {
+ oner(er)
+ }
+ })
+
+ tx.on('end', _ => {
+ let er = null
+ // try both, falling futimes back to utimes
+ // if either fails, handle the first error
+ if (entry.mtime && !this.noMtime) {
+ const atime = entry.atime || new Date()
+ const mtime = entry.mtime
+ try {
+ fs.futimesSync(fd, atime, mtime)
+ } catch (futimeser) {
try {
- fs.futimesSync(fd, entry.atime || new Date(), entry.mtime)
- } catch (er) {}
+ fs.utimesSync(entry.absolute, atime, mtime)
+ } catch (utimeser) {
+ er = futimeser
+ }
}
- if (this[DOCHOWN](entry)) {
+ }
+
+ if (this[DOCHOWN](entry)) {
+ const uid = this[UID](entry)
+ const gid = this[GID](entry)
+
+ try {
+ fs.fchownSync(fd, uid, gid)
+ } catch (fchowner) {
try {
- fs.fchownSync(fd, this[UID](entry), this[GID](entry))
- } catch (er) {}
+ fs.chownSync(entry.absolute, uid, gid)
+ } catch (chowner) {
+ er = er || fchowner
+ }
}
- try { fs.closeSync(fd) } catch (er) { this[ONERROR](er, entry) }
- })
- } catch (er) { this[ONERROR](er, entry) }
+ }
+
+ oner(er)
+ })
}
[DIRECTORY] (entry) {
diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js
index f562bf138a..4eddb8b7c9 100644
--- a/deps/npm/node_modules/tar/lib/write-entry.js
+++ b/deps/npm/node_modules/tar/lib/write-entry.js
@@ -44,6 +44,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
this.cwd = opt.cwd || process.cwd()
this.strict = !!opt.strict
this.noPax = !!opt.noPax
+ this.noMtime = !!opt.noMtime
+ this.mtime = opt.mtime || null
+
if (typeof opt.onwarn === 'function')
this.on('warn', opt.onwarn)
@@ -101,6 +104,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
}
[HEADER] () {
+ if (this.type === 'Directory' && this.portable)
+ this.noMtime = true
+
this.header = new Header({
path: this.path,
linkpath: this.linkpath,
@@ -110,8 +116,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
uid: this.portable ? null : this.stat.uid,
gid: this.portable ? null : this.stat.gid,
size: this.stat.size,
- mtime: this.type === 'Directory' && this.portable
- ? null : this.stat.mtime,
+ mtime: this.noMtime ? null : this.mtime || this.stat.mtime,
type: this.type,
uname: this.portable ? null :
this.stat.uid === this.myuid ? this.myuser : '',
@@ -124,7 +129,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
atime: this.portable ? null : this.header.atime,
ctime: this.portable ? null : this.header.ctime,
gid: this.portable ? null : this.header.gid,
- mtime: this.header.mtime,
+ mtime: this.noMtime ? null : this.mtime || this.header.mtime,
path: this.path,
linkpath: this.linkpath,
size: this.header.size,
@@ -294,28 +299,30 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
constructor (readEntry, opt) {
opt = opt || {}
super(opt)
+ this.preservePaths = !!opt.preservePaths
+ this.portable = !!opt.portable
+ this.strict = !!opt.strict
+ this.noPax = !!opt.noPax
+ this.noMtime = !!opt.noMtime
+
this.readEntry = readEntry
this.type = readEntry.type
+ if (this.type === 'Directory' && this.portable)
+ this.noMtime = true
+
this.path = readEntry.path
this.mode = readEntry.mode
if (this.mode)
this.mode = this.mode & 0o7777
- this.uid = readEntry.uid
- this.gid = readEntry.gid
- this.uname = readEntry.uname
- this.gname = readEntry.gname
+ this.uid = this.portable ? null : readEntry.uid
+ this.gid = this.portable ? null : readEntry.gid
+ this.uname = this.portable ? null : readEntry.uname
+ this.gname = this.portable ? null : readEntry.gname
this.size = readEntry.size
- this.mtime = readEntry.mtime
- this.atime = readEntry.atime
- this.ctime = readEntry.ctime
+ this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
+ this.atime = this.portable ? null : readEntry.atime
+ this.ctime = this.portable ? null : readEntry.ctime
this.linkpath = readEntry.linkpath
- this.uname = readEntry.uname
- this.gname = readEntry.gname
-
- this.preservePaths = !!opt.preservePaths
- this.portable = !!opt.portable
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
if (typeof opt.onwarn === 'function')
this.on('warn', opt.onwarn)
@@ -341,7 +348,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
uid: this.portable ? null : this.uid,
gid: this.portable ? null : this.gid,
size: this.size,
- mtime: this.mtime,
+ mtime: this.noMtime ? null : this.mtime,
type: this.type,
uname: this.portable ? null : this.uname,
atime: this.portable ? null : this.atime,
@@ -353,7 +360,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
atime: this.portable ? null : this.atime,
ctime: this.portable ? null : this.ctime,
gid: this.portable ? null : this.gid,
- mtime: this.mtime,
+ mtime: this.noMtime ? null : this.mtime,
path: this.path,
linkpath: this.linkpath,
size: this.size,
diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE b/deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE
index 19129e315f..19129e315f 100644
--- a/deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE
+++ b/deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md b/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md
new file mode 100644
index 0000000000..1e61241cf0
--- /dev/null
+++ b/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md
@@ -0,0 +1,70 @@
+# fs-minipass
+
+Filesystem streams based on [minipass](http://npm.im/minipass).
+
+4 classes are exported:
+
+- ReadStream
+- ReadStreamSync
+- WriteStream
+- WriteStreamSync
+
+When using `ReadStreamSync`, all of the data is made available
+immediately upon consuming the stream. Nothing is buffered in memory
+when the stream is constructed. If the stream is piped to a writer,
+then it will synchronously `read()` and emit data into the writer as
+fast as the writer can consume it. (That is, it will respect
+backpressure.) If you call `stream.read()` then it will read the
+entire file and return the contents.
+
+When using `WriteStreamSync`, every write is flushed to the file
+synchronously. If your writes all come in a single tick, then it'll
+write it all out in a single tick. It's as synchronous as you are.
+
+The async versions work much like their node builtin counterparts,
+with the exception of introducing significantly less Stream machinery
+overhead.
+
+## USAGE
+
+It's just streams, you pipe them or read() them or write() to them.
+
+```js
+const fsm = require('fs-minipass')
+const readStream = new fsm.ReadStream('file.txt')
+const writeStream = new fsm.WriteStream('output.txt')
+writeStream.write('some file header or whatever\n')
+readStream.pipe(writeStream)
+```
+
+## ReadStream(path, options)
+
+Path string is required, but somewhat irrelevant if an open file
+descriptor is passed in as an option.
+
+Options:
+
+- `fd` Pass in a numeric file descriptor, if the file is already open.
+- `readSize` The size of reads to do, defaults to 16MB
+- `size` The size of the file, if known. Prevents zero-byte read()
+ call at the end.
+- `autoClose` Set to `false` to prevent the file descriptor from being
+ closed when the file is done being read.
+
+## WriteStream(path, options)
+
+Path string is required, but somewhat irrelevant if an open file
+descriptor is passed in as an option.
+
+Options:
+
+- `fd` Pass in a numeric file descriptor, if the file is already open.
+- `mode` The mode to create the file with. Defaults to `0o666`.
+- `start` The position in the file to start reading. If not
+ specified, then the file will start writing at position zero, and be
+ truncated by default.
+- `autoClose` Set to `false` to prevent the file descriptor from being
+ closed when the stream is ended.
+- `flags` Flags to use when opening the file. Irrelevant if `fd` is
+ passed in, since file won't be opened in that case. Defaults to
+ `'a'` if a `pos` is specified, or `'w'` otherwise.
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js b/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js
new file mode 100644
index 0000000000..0f15c810eb
--- /dev/null
+++ b/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js
@@ -0,0 +1,386 @@
+'use strict'
+const MiniPass = require('minipass')
+const EE = require('events').EventEmitter
+const fs = require('fs')
+
+// for writev
+const binding = process.binding('fs')
+const writeBuffers = binding.writeBuffers
+const FSReqWrap = binding.FSReqWrap
+
+const _autoClose = Symbol('_autoClose')
+const _close = Symbol('_close')
+const _ended = Symbol('_ended')
+const _fd = Symbol('_fd')
+const _finished = Symbol('_finished')
+const _flags = Symbol('_flags')
+const _flush = Symbol('_flush')
+const _handleChunk = Symbol('_handleChunk')
+const _makeBuf = Symbol('_makeBuf')
+const _mode = Symbol('_mode')
+const _needDrain = Symbol('_needDrain')
+const _onerror = Symbol('_onerror')
+const _onopen = Symbol('_onopen')
+const _onread = Symbol('_onread')
+const _onwrite = Symbol('_onwrite')
+const _open = Symbol('_open')
+const _path = Symbol('_path')
+const _pos = Symbol('_pos')
+const _queue = Symbol('_queue')
+const _read = Symbol('_read')
+const _readSize = Symbol('_readSize')
+const _reading = Symbol('_reading')
+const _remain = Symbol('_remain')
+const _size = Symbol('_size')
+const _write = Symbol('_write')
+const _writing = Symbol('_writing')
+const _defaultFlag = Symbol('_defaultFlag')
+
+class ReadStream extends MiniPass {
+ constructor (path, opt) {
+ opt = opt || {}
+ super(opt)
+
+ this.writable = false
+
+ if (typeof path !== 'string')
+ throw new TypeError('path must be a string')
+
+ this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
+ this[_path] = path
+ this[_readSize] = opt.readSize || 16*1024*1024
+ this[_reading] = false
+ this[_size] = typeof opt.size === 'number' ? opt.size : Infinity
+ this[_remain] = this[_size]
+ this[_autoClose] = typeof opt.autoClose === 'boolean' ?
+ opt.autoClose : true
+
+ if (typeof this[_fd] === 'number')
+ this[_read]()
+ else
+ this[_open]()
+ }
+
+ get fd () { return this[_fd] }
+ get path () { return this[_path] }
+
+ write () {
+ throw new TypeError('this is a readable stream')
+ }
+
+ end () {
+ throw new TypeError('this is a readable stream')
+ }
+
+ [_open] () {
+ fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))
+ }
+
+ [_onopen] (er, fd) {
+ if (er)
+ this[_onerror](er)
+ else {
+ this[_fd] = fd
+ this.emit('open', fd)
+ this[_read]()
+ }
+ }
+
+ [_makeBuf] () {
+ return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))
+ }
+
+ [_read] () {
+ if (!this[_reading]) {
+ this[_reading] = true
+ const buf = this[_makeBuf]()
+ /* istanbul ignore if */
+ if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf))
+ fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) =>
+ this[_onread](er, br, buf))
+ }
+ }
+
+ [_onread] (er, br, buf) {
+ this[_reading] = false
+ if (er)
+ this[_onerror](er)
+ else if (this[_handleChunk](br, buf))
+ this[_read]()
+ }
+
+ [_close] () {
+ if (this[_autoClose] && typeof this[_fd] === 'number') {
+ fs.close(this[_fd], _ => this.emit('close'))
+ this[_fd] = null
+ }
+ }
+
+ [_onerror] (er) {
+ this[_reading] = true
+ this[_close]()
+ this.emit('error', er)
+ }
+
+ [_handleChunk] (br, buf) {
+ let ret = false
+ // no effect if infinite
+ this[_remain] -= br
+ if (br > 0)
+ ret = super.write(br < buf.length ? buf.slice(0, br) : buf)
+
+ if (br === 0 || this[_remain] <= 0) {
+ ret = false
+ this[_close]()
+ super.end()
+ }
+
+ return ret
+ }
+
+ emit (ev, data) {
+ switch (ev) {
+ case 'prefinish':
+ case 'finish':
+ break
+
+ case 'drain':
+ if (typeof this[_fd] === 'number')
+ this[_read]()
+ break
+
+ default:
+ return super.emit(ev, data)
+ }
+ }
+}
+
+class ReadStreamSync extends ReadStream {
+ [_open] () {
+ let threw = true
+ try {
+ this[_onopen](null, fs.openSync(this[_path], 'r'))
+ threw = false
+ } finally {
+ if (threw)
+ this[_close]()
+ }
+ }
+
+ [_read] () {
+ let threw = true
+ try {
+ if (!this[_reading]) {
+ this[_reading] = true
+ do {
+ const buf = this[_makeBuf]()
+ /* istanbul ignore next */
+ const br = buf.length === 0 ? 0 : fs.readSync(this[_fd], buf, 0, buf.length, null)
+ if (!this[_handleChunk](br, buf))
+ break
+ } while (true)
+ this[_reading] = false
+ }
+ threw = false
+ } finally {
+ if (threw)
+ this[_close]()
+ }
+ }
+
+ [_close] () {
+ if (this[_autoClose] && typeof this[_fd] === 'number') {
+ try {
+ fs.closeSync(this[_fd])
+ } catch (er) {}
+ this[_fd] = null
+ this.emit('close')
+ }
+ }
+}
+
+class WriteStream extends EE {
+ constructor (path, opt) {
+ opt = opt || {}
+ super(opt)
+ this.readable = false
+ this[_writing] = false
+ this[_ended] = false
+ this[_needDrain] = false
+ this[_queue] = []
+ this[_path] = path
+ this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
+ this[_mode] = opt.mode === undefined ? 0o666 : opt.mode
+ this[_pos] = typeof opt.start === 'number' ? opt.start : null
+ this[_autoClose] = typeof opt.autoClose === 'boolean' ?
+ opt.autoClose : true
+
+ // truncating makes no sense when writing into the middle
+ const defaultFlag = this[_pos] !== null ? 'r+' : 'w'
+ this[_defaultFlag] = opt.flags === undefined
+ this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags
+
+ if (this[_fd] === null)
+ this[_open]()
+ }
+
+ get fd () { return this[_fd] }
+ get path () { return this[_path] }
+
+ [_onerror] (er) {
+ this[_close]()
+ this[_writing] = true
+ this.emit('error', er)
+ }
+
+ [_open] () {
+ fs.open(this[_path], this[_flags], this[_mode],
+ (er, fd) => this[_onopen](er, fd))
+ }
+
+ [_onopen] (er, fd) {
+ if (this[_defaultFlag] &&
+ this[_flags] === 'r+' &&
+ er && er.code === 'ENOENT') {
+ this[_flags] = 'w'
+ this[_open]()
+ } else if (er)
+ this[_onerror](er)
+ else {
+ this[_fd] = fd
+ this.emit('open', fd)
+ this[_flush]()
+ }
+ }
+
+ end (buf, enc) {
+ if (buf)
+ this.write(buf, enc)
+
+ this[_ended] = true
+
+ // synthetic after-write logic, where drain/finish live
+ if (!this[_writing] && !this[_queue].length &&
+ typeof this[_fd] === 'number')
+ this[_onwrite](null, 0)
+ }
+
+ write (buf, enc) {
+ if (typeof buf === 'string')
+ buf = new Buffer(buf, enc)
+
+ if (this[_ended]) {
+ this.emit('error', new Error('write() after end()'))
+ return false
+ }
+
+ if (this[_fd] === null || this[_writing] || this[_queue].length) {
+ this[_queue].push(buf)
+ this[_needDrain] = true
+ return false
+ }
+
+ this[_writing] = true
+ this[_write](buf)
+ return true
+ }
+
+ [_write] (buf) {
+ fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) =>
+ this[_onwrite](er, bw))
+ }
+
+ [_onwrite] (er, bw) {
+ if (er)
+ this[_onerror](er)
+ else {
+ if (this[_pos] !== null)
+ this[_pos] += bw
+ if (this[_queue].length)
+ this[_flush]()
+ else {
+ this[_writing] = false
+
+ if (this[_ended] && !this[_finished]) {
+ this[_finished] = true
+ this[_close]()
+ this.emit('finish')
+ } else if (this[_needDrain]) {
+ this[_needDrain] = false
+ this.emit('drain')
+ }
+ }
+ }
+ }
+
+ [_flush] () {
+ if (this[_queue].length === 0) {
+ if (this[_ended])
+ this[_onwrite](null, 0)
+ } else if (this[_queue].length === 1)
+ this[_write](this[_queue].pop())
+ else {
+ const iovec = this[_queue]
+ this[_queue] = []
+ writev(this[_fd], iovec, this[_pos],
+ (er, bw) => this[_onwrite](er, bw))
+ }
+ }
+
+ [_close] () {
+ if (this[_autoClose] && typeof this[_fd] === 'number') {
+ fs.close(this[_fd], _ => this.emit('close'))
+ this[_fd] = null
+ }
+ }
+}
+
+class WriteStreamSync extends WriteStream {
+ [_open] () {
+ let fd
+ try {
+ fd = fs.openSync(this[_path], this[_flags], this[_mode])
+ } catch (er) {
+ if (this[_defaultFlag] &&
+ this[_flags] === 'r+' &&
+ er && er.code === 'ENOENT') {
+ this[_flags] = 'w'
+ return this[_open]()
+ } else
+ throw er
+ }
+ this[_onopen](null, fd)
+ }
+
+ [_close] () {
+ if (this[_autoClose] && typeof this[_fd] === 'number') {
+ try {
+ fs.closeSync(this[_fd])
+ } catch (er) {}
+ this[_fd] = null
+ this.emit('close')
+ }
+ }
+
+ [_write] (buf) {
+ try {
+ this[_onwrite](null,
+ fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos]))
+ } catch (er) {
+ this[_onwrite](er, 0)
+ }
+ }
+}
+
+const writev = (fd, iovec, pos, cb) => {
+ const done = (er, bw) => cb(er, bw, iovec)
+ const req = new FSReqWrap()
+ req.oncomplete = done
+ binding.writeBuffers(fd, iovec, pos, req)
+}
+
+exports.ReadStream = ReadStream
+exports.ReadStreamSync = ReadStreamSync
+
+exports.WriteStream = WriteStream
+exports.WriteStreamSync = WriteStreamSync
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json b/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json
new file mode 100644
index 0000000000..9a96770d5c
--- /dev/null
+++ b/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "fs-minipass@1.2.5",
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "fs-minipass@1.2.5",
+ "_id": "fs-minipass@1.2.5",
+ "_inBundle": false,
+ "_integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
+ "_location": "/tar/fs-minipass",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "fs-minipass@1.2.5",
+ "name": "fs-minipass",
+ "escapedName": "fs-minipass",
+ "rawSpec": "1.2.5",
+ "saveSpec": null,
+ "fetchSpec": "1.2.5"
+ },
+ "_requiredBy": [
+ "/tar"
+ ],
+ "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
+ "_spec": "1.2.5",
+ "_where": "/Users/rebecca/code/npm",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/fs-minipass/issues"
+ },
+ "dependencies": {
+ "minipass": "^2.2.1"
+ },
+ "description": "fs read and write streams based on minipass",
+ "devDependencies": {
+ "mutate-fs": "^2.0.1",
+ "tap": "^10.7.2"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/npm/fs-minipass#readme",
+ "keywords": [],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "fs-minipass",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/fs-minipass.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --100 -J"
+ },
+ "version": "1.2.5"
+}
diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/index.js b/deps/npm/node_modules/tar/node_modules/minizlib/index.js
index 8c0df2ac43..10c8a8b486 100644
--- a/deps/npm/node_modules/tar/node_modules/minizlib/index.js
+++ b/deps/npm/node_modules/tar/node_modules/minizlib/index.js
@@ -7,6 +7,18 @@ const binding = process.binding('zlib')
const constants = exports.constants = require('./constants.js')
const MiniPass = require('minipass')
+class ZlibError extends Error {
+ constructor (msg, errno) {
+ super('zlib: ' + msg)
+ this.errno = errno
+ this.code = codes.get(errno)
+ }
+
+ get name () {
+ return 'ZlibError'
+ }
+}
+
// translation table for return codes.
const codes = new Map([
[constants.Z_OK, 'Z_OK'],
@@ -61,10 +73,10 @@ class Zlib extends MiniPass {
this[_opts] = opts = opts || {}
this[_chunkSize] = opts.chunkSize || constants.Z_DEFAULT_CHUNK
if (opts.flush && !validFlushFlags.has(opts.flush)) {
- throw new Error('Invalid flush flag: ' + opts.flush)
+ throw new TypeError('Invalid flush flag: ' + opts.flush)
}
if (opts.finishFlush && !validFlushFlags.has(opts.finishFlush)) {
- throw new Error('Invalid flush flag: ' + opts.finishFlush)
+ throw new TypeError('Invalid flush flag: ' + opts.finishFlush)
}
this[_flushFlag] = opts.flush || constants.Z_NO_FLUSH
@@ -73,37 +85,37 @@ class Zlib extends MiniPass {
if (opts.chunkSize) {
if (opts.chunkSize < constants.Z_MIN_CHUNK) {
- throw new Error('Invalid chunk size: ' + opts.chunkSize)
+ throw new RangeError('Invalid chunk size: ' + opts.chunkSize)
}
}
if (opts.windowBits) {
if (opts.windowBits < constants.Z_MIN_WINDOWBITS ||
opts.windowBits > constants.Z_MAX_WINDOWBITS) {
- throw new Error('Invalid windowBits: ' + opts.windowBits)
+ throw new RangeError('Invalid windowBits: ' + opts.windowBits)
}
}
if (opts.level) {
if (opts.level < constants.Z_MIN_LEVEL ||
opts.level > constants.Z_MAX_LEVEL) {
- throw new Error('Invalid compression level: ' + opts.level)
+ throw new RangeError('Invalid compression level: ' + opts.level)
}
}
if (opts.memLevel) {
if (opts.memLevel < constants.Z_MIN_MEMLEVEL ||
opts.memLevel > constants.Z_MAX_MEMLEVEL) {
- throw new Error('Invalid memLevel: ' + opts.memLevel)
+ throw new RangeError('Invalid memLevel: ' + opts.memLevel)
}
}
if (opts.strategy && !(strategies.has(opts.strategy)))
- throw new Error('Invalid strategy: ' + opts.strategy)
+ throw new TypeError('Invalid strategy: ' + opts.strategy)
if (opts.dictionary) {
if (!(opts.dictionary instanceof Buffer)) {
- throw new Error('Invalid dictionary: it should be a Buffer instance')
+ throw new TypeError('Invalid dictionary: it should be a Buffer instance')
}
}
@@ -116,9 +128,7 @@ class Zlib extends MiniPass {
this.close()
this[_hadError] = true
- const error = new Error(message)
- error.errno = errno
- error.code = codes.get(errno)
+ const error = new ZlibError(message, errno)
this.emit('error', error)
}
diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/package.json b/deps/npm/node_modules/tar/node_modules/minizlib/package.json
index 0a41e31c82..24f9157989 100644
--- a/deps/npm/node_modules/tar/node_modules/minizlib/package.json
+++ b/deps/npm/node_modules/tar/node_modules/minizlib/package.json
@@ -1,27 +1,27 @@
{
- "_from": "minizlib@1.0.4",
- "_id": "minizlib@1.0.4",
+ "_from": "minizlib@^1.1.0",
+ "_id": "minizlib@1.1.0",
"_inBundle": false,
- "_integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==",
+ "_integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
"_location": "/tar/minizlib",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "minizlib@1.0.4",
+ "raw": "minizlib@^1.1.0",
"name": "minizlib",
"escapedName": "minizlib",
- "rawSpec": "1.0.4",
+ "rawSpec": "^1.1.0",
"saveSpec": null,
- "fetchSpec": "1.0.4"
+ "fetchSpec": "^1.1.0"
},
"_requiredBy": [
"/tar"
],
- "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.4.tgz",
- "_shasum": "8ebb51dd8bbe40b0126b5633dbb36b284a2f523c",
- "_spec": "minizlib@1.0.4",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
+ "_shasum": "11e13658ce46bc3a70a267aac58359d1e0c29ceb",
+ "_spec": "minizlib@^1.1.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -67,5 +67,5 @@
"preversion": "npm test",
"test": "tap test/*.js --100 -J"
},
- "version": "1.0.4"
+ "version": "1.1.0"
}
diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json
index d68b63a66d..38c4ec5169 100644
--- a/deps/npm/node_modules/tar/package.json
+++ b/deps/npm/node_modules/tar/package.json
@@ -1,28 +1,27 @@
{
- "_from": "tar@4.0.2",
- "_id": "tar@4.0.2",
+ "_from": "tar@4.4.0",
+ "_id": "tar@4.4.0",
"_inBundle": false,
- "_integrity": "sha512-4lWN4uAEWzw8aHyBUx9HWXvH3vIFEhOyvN22HfBzWpE07HaTBXM8ttSeCQpswRo5On4q3nmmYmk7Tomn0uhUaw==",
+ "_integrity": "sha512-gJlTiiErwo96K904FnoYWl+5+FBgS+FimU6GMh66XLdLa55al8+d4jeDfPoGwSNHdtWI5FJP6xurmVqhBuGJpQ==",
"_location": "/tar",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "tar@4.0.2",
+ "raw": "tar@4.4.0",
"name": "tar",
"escapedName": "tar",
- "rawSpec": "4.0.2",
+ "rawSpec": "4.4.0",
"saveSpec": null,
- "fetchSpec": "4.0.2"
+ "fetchSpec": "4.4.0"
},
"_requiredBy": [
"#USER",
- "/",
- "/pacote"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-4.0.2.tgz",
- "_shasum": "e8e22bf3eec330e5c616d415a698395e294e8fad",
- "_spec": "tar@4.0.2",
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.0.tgz",
+ "_shasum": "3aaf8c29b6b800a8215f33efb4df1c95ce2ac2f5",
+ "_spec": "tar@4.4.0",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -35,8 +34,9 @@
"bundleDependencies": false,
"dependencies": {
"chownr": "^1.0.1",
+ "fs-minipass": "^1.2.3",
"minipass": "^2.2.1",
- "minizlib": "^1.0.4",
+ "minizlib": "^1.1.0",
"mkdirp": "^0.5.0",
"yallist": "^3.0.2"
},
@@ -46,9 +46,9 @@
"chmodr": "^1.0.2",
"end-of-stream": "^1.4.0",
"events-to-array": "^1.1.2",
- "mutate-fs": "^1.1.0",
+ "mutate-fs": "^2.1.1",
"rimraf": "^2.6.2",
- "tap": "^10.7.2",
+ "tap": "^11.0.0-rc.3",
"tar-fs": "^1.16.0",
"tar-stream": "^1.5.2"
},
@@ -72,7 +72,7 @@
"postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
"preversion": "npm test",
- "test": "tap test/*.js --100 -J --coverage-report=text"
+ "test": "tap test/*.js --100 -J --coverage-report=text -c"
},
- "version": "4.0.2"
+ "version": "4.4.0"
}
diff --git a/deps/npm/node_modules/uuid/.eslintrc.json b/deps/npm/node_modules/uuid/.eslintrc.json
index 638b0a56fd..734a8e14c7 100644
--- a/deps/npm/node_modules/uuid/.eslintrc.json
+++ b/deps/npm/node_modules/uuid/.eslintrc.json
@@ -7,16 +7,16 @@
"mocha": true
},
"extends": ["eslint:recommended"],
- "installedESLint": true,
"rules": {
"array-bracket-spacing": ["warn", "never"],
"arrow-body-style": ["warn", "as-needed"],
"arrow-parens": ["warn", "as-needed"],
"arrow-spacing": "warn",
- "brace-style": "warn",
+ "brace-style": ["warn", "1tbs"],
"camelcase": "warn",
"comma-spacing": ["warn", {"after": true}],
"dot-notation": "warn",
+ "eqeqeq": ["warn", "smart"],
"indent": ["warn", 2, {
"SwitchCase": 1,
"FunctionDeclaration": {"parameters": 1},
@@ -33,6 +33,7 @@
"no-trailing-spaces": "warn",
"no-undef": "error",
"no-unused-vars": ["warn", {"args": "none"}],
+ "one-var": ["warn", "never"],
"padded-blocks": ["warn", "never"],
"object-curly-spacing": ["warn", "never"],
"quotes": ["warn", "single"],
diff --git a/deps/npm/node_modules/uuid/CHANGELOG.md b/deps/npm/node_modules/uuid/CHANGELOG.md
new file mode 100644
index 0000000000..d9fe59c150
--- /dev/null
+++ b/deps/npm/node_modules/uuid/CHANGELOG.md
@@ -0,0 +1,57 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="3.2.1"></a>
+## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.1) (2018-01-16)
+
+
+### Bug Fixes
+
+* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b))
+
+
+
+<a name="3.2.0"></a>
+# [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
+
+
+### Bug Fixes
+
+* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824))
+* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b))
+
+
+### Features
+
+* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726))
+
+
+
+# 3.0.1 (2016-11-28)
+
+ * split uuid versions into separate files
+
+# 3.0.0 (2016-11-17)
+
+ * remove .parse and .unparse
+
+# 2.0.0
+
+ * Removed uuid.BufferClass
+
+# 1.4.0
+
+ * Improved module context detection
+ * Removed public RNG functions
+
+# 1.3.2
+
+ * Improve tests and handling of v1() options (Issue #24)
+ * Expose RNG option to allow for perf testing with different generators
+
+# 1.3.0
+
+ * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+ * Support for node.js crypto API
+ * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/uuid/HISTORY.md b/deps/npm/node_modules/uuid/HISTORY.md
deleted file mode 100644
index 02daad3f61..0000000000
--- a/deps/npm/node_modules/uuid/HISTORY.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# 3.0.1 (2016-11-28)
-
- * split uuid versions into separate files
-
-# 3.0.0 (2016-11-17)
-
- * remove .parse and .unparse
-
-# 2.0.0
-
- * Removed uuid.BufferClass
-
-# 1.4.0
-
- * Improved module context detection
- * Removed public RNG functions
-
-# 1.3.2
-
- * Improve tests and handling of v1() options (Issue #24)
- * Expose RNG option to allow for perf testing with different generators
-
-# 1.3.0
-
- * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
- * Support for node.js crypto API
- * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/deps/npm/node_modules/uuid/README.md b/deps/npm/node_modules/uuid/README.md
index 5adaa8f946..cddaa14469 100644
--- a/deps/npm/node_modules/uuid/README.md
+++ b/deps/npm/node_modules/uuid/README.md
@@ -1,14 +1,21 @@
+<!--
+ -- This file is auto-generated from README_js.md. Changes should be made there.
+ -->
+
# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) #
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
Features:
-* Support for version 1, 4 and 5 UUIDs
+* Support for version 1, 3, 4 and 5 UUIDs
* Cross-platform
* Uses cryptographically-strong random number APIs (when available)
* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883))
+[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be
+supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.]
+
## Quickstart - CommonJS (Recommended)
```shell
@@ -21,14 +28,36 @@ Version 1 (timestamp):
```javascript
const uuidv1 = require('uuid/v1');
-uuidv1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
+uuidv1(); // ā‡Ø 'f64f2940-fae4-11e7-8c5f-ef356f279131'
+
+```
+
+Version 3 (namespace):
+
+```javascript
+const uuidv3 = require('uuid/v3');
+
+// ... using predefined DNS namespace (for domain names)
+uuidv3('hello.example.com', uuidv3.DNS); // ā‡Ø '9125a8dc-52ee-365b-a5aa-81b0b3681cf6'
+
+// ... using predefined URL namespace (for, well, URLs)
+uuidv3('http://example.com/hello', uuidv3.URL); // ā‡Ø 'c6235813-3ba4-3801-ae84-e0a6ebb7d138'
+
+// ... using a custom namespace
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv3('Hello, World!', MY_NAMESPACE); // ā‡Ø 'e8b5a51d-11c8-3310-a6ab-367563f20686'
+
```
Version 4 (random):
```javascript
const uuidv4 = require('uuid/v4');
-uuidv4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
+uuidv4(); // ā‡Ø '416ac246-e7ac-49ff-93b4-f7e94d997e6b'
+
```
Version 5 (namespace):
@@ -37,14 +66,18 @@ Version 5 (namespace):
const uuidv5 = require('uuid/v5');
// ... using predefined DNS namespace (for domain names)
-uuidv5('hello.example.com', uuidv5.DNS)); // -> 'fdda765f-fc57-5604-a269-52a7df8164ec'
+uuidv5('hello.example.com', uuidv5.DNS); // ā‡Ø 'fdda765f-fc57-5604-a269-52a7df8164ec'
// ... using predefined URL namespace (for, well, URLs)
-uuidv5('http://example.com/hello', uuidv5.URL); // -> '3bbcee75-cecc-5b56-8031-b6641c1ed1f1'
+uuidv5('http://example.com/hello', uuidv5.URL); // ā‡Ø '3bbcee75-cecc-5b56-8031-b6641c1ed1f1'
// ... using a custom namespace
-const MY_NAMESPACE = '<UUID string you previously generated elsewhere>';
-uuidv5('Hello, World!', MY_NAMESPACE); // -> '90123e1c-7512-523e-bb28-76fab9f2f73d'
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv5('Hello, World!', MY_NAMESPACE); // ā‡Ø '630eb68f-e0fa-5ecc-887a-7c7a62614681'
+
```
## Quickstart - Browser-ready Versions
@@ -60,6 +93,15 @@ uuidv1(); // -> v1 UUID
</script>
```
+For version 3 uuids:
+
+```html
+<script src="http://wzrd.in/standalone/uuid%2Fv3@latest"></script>
+<script>
+uuidv3('http://example.com/hello', uuidv3.URL); // -> v3 UUID
+</script>
+```
+
For version 4 uuids:
```html
@@ -85,7 +127,7 @@ uuidv5('http://example.com/hello', uuidv5.URL); // -> v5 UUID
```javascript
const uuidv1 = require('uuid/v1');
-// Allowed arguments
+// Incantations
uuidv1();
uuidv1(options);
uuidv1(options, buffer, offset);
@@ -97,7 +139,7 @@ Generate and return a RFC4122 v1 (timestamp-based) UUID.
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
- * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
+ * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used.
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
@@ -110,21 +152,51 @@ Note: The <node> id is generated guaranteed to stay constant for the lifetime of
Example: Generate string UUID with fully-specified options
```javascript
-uuidv1({
+const v1options = {
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
clockseq: 0x1234,
msecs: new Date('2011-11-01').getTime(),
nsecs: 5678
-}); // -> "710b962e-041c-11e1-9234-0123456789ab"
+};
+uuidv1(v1options); // ā‡Ø '710b962e-041c-11e1-9234-0123456789ab'
+
```
Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
-const arr = new Array(32); // -> []
-uuidv1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-uuidv1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
+const arr = new Array();
+uuidv1(null, arr, 0); // ā‡Ø [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
+uuidv1(null, arr, 16); // ā‡Ø [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49, 246, 87, 180, 192, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ]
+
+```
+
+### Version 3
+
+```javascript
+const uuidv3 = require('uuid/v3');
+
+// Incantations
+uuidv3(name, namespace);
+uuidv3(name, namespace, buffer);
+uuidv3(name, namespace, buffer, offset);
+```
+
+Generate and return a RFC4122 v3 UUID.
+
+* `name` - (String | Array[]) "name" to create UUID with
+* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example:
+
+```javascript
+uuidv3('hello world', MY_NAMESPACE); // ā‡Ø '042ffd34-d989-321c-ad06-f60826172424'
+
```
### Version 4
@@ -132,7 +204,7 @@ uuidv1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 0
```javascript
const uuidv4 = require('uuid/v4')
-// Allowed arguments
+// Incantations
uuidv4();
uuidv4(options);
uuidv4(options, buffer, offset);
@@ -148,38 +220,40 @@ Generate and return a RFC4122 v4 UUID.
Returns `buffer`, if specified, otherwise the string form of the UUID
-Example: Generate string UUID with fully-specified options
+Example: Generate string UUID with predefined `random` values
```javascript
-uuid.v4({
+const v4options = {
random: [
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
]
-});
-// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
+};
+uuidv4(v4options); // ā‡Ø '109156be-c4fb-41ea-b1b4-efe1671c5836'
+
```
Example: Generate two IDs in a single buffer
```javascript
-const buffer = new Array(32); // (or 'new Buffer' in node.js)
-uuid.v4(null, buffer, 0);
-uuid.v4(null, buffer, 16);
+const buffer = new Array();
+uuidv4(null, buffer, 0); // ā‡Ø [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250 ]
+uuidv4(null, buffer, 16); // ā‡Ø [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250, 75, 162, 105, 153, 48, 238, 77, 58, 169, 56, 158, 207, 106, 160, 47, 239 ]
+
```
### Version 5
```javascript
-const uuidv5 = require('uuid/v4');
+const uuidv5 = require('uuid/v5');
-// Allowed arguments
+// Incantations
uuidv5(name, namespace);
uuidv5(name, namespace, buffer);
uuidv5(name, namespace, buffer, offset);
```
-Generate and return a RFC4122 v4 UUID.
+Generate and return a RFC4122 v5 UUID.
* `name` - (String | Array[]) "name" to create UUID with
* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
@@ -191,37 +265,29 @@ Returns `buffer`, if specified, otherwise the string form of the UUID
Example:
```javascript
-// Generate a unique namespace (typically you would do this once, outside of
-// your project, then bake this value into your code)
-const uuidv4 = require('uuid/v4');
-const MY_NAMESPACE = uuidv4(); //
+uuidv5('hello world', MY_NAMESPACE); // ā‡Ø '9f282611-e0fd-5650-8953-89c8e342da0b'
-// Generate a couple namespace uuids
-const uuidv5 = require('uuid/v5');
-uuidv5('hello', MY_NAMESPACE);
-uuidv5('world', MY_NAMESPACE);
```
-## Testing
+## Command Line
-```shell
-npm test
-```
+UUIDs can be generated from the command line with the `uuid` command.
-## Deprecated / Browser-ready API
+```shell
+$ uuid
+ddeb27fb-d9a0-4624-be4d-4615062daed4
-The API below is available for legacy purposes and is not expected to be available post-3.X
+$ uuid v1
+02d37060-d446-11e7-a9fa-7bdae751ebe1
+```
-```javascript
-const uuid = require('uuid');
+Type `uuid --help` for usage details
-uuid.v1(...); // alias of uuid/v1
-uuid.v4(...); // alias of uuid/v4
-uuid(...); // alias of uuid/v4
+## Testing
-// uuid.v5() is not supported in this API
+```shell
+npm test
```
-## Legacy node-uuid package
-
-The code for the legacy node-uuid package is available in the `node-uuid` branch.
+----
+Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file
diff --git a/deps/npm/node_modules/uuid/README_js.md b/deps/npm/node_modules/uuid/README_js.md
new file mode 100644
index 0000000000..f34453be40
--- /dev/null
+++ b/deps/npm/node_modules/uuid/README_js.md
@@ -0,0 +1,280 @@
+```javascript --hide
+runmd.onRequire = path => path.replace(/^uuid/, './');
+```
+
+# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) #
+
+Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
+
+Features:
+
+* Support for version 1, 3, 4 and 5 UUIDs
+* Cross-platform
+* Uses cryptographically-strong random number APIs (when available)
+* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883))
+
+[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be
+supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.]
+
+## Quickstart - CommonJS (Recommended)
+
+```shell
+npm install uuid
+```
+
+Then generate your uuid version of choice ...
+
+Version 1 (timestamp):
+
+```javascript --run v1
+const uuidv1 = require('uuid/v1');
+uuidv1(); // RESULT
+```
+
+Version 3 (namespace):
+
+```javascript --run v3
+const uuidv3 = require('uuid/v3');
+
+// ... using predefined DNS namespace (for domain names)
+uuidv3('hello.example.com', uuidv3.DNS); // RESULT
+
+// ... using predefined URL namespace (for, well, URLs)
+uuidv3('http://example.com/hello', uuidv3.URL); // RESULT
+
+// ... using a custom namespace
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv3('Hello, World!', MY_NAMESPACE); // RESULT
+```
+
+Version 4 (random):
+
+```javascript --run v4
+const uuidv4 = require('uuid/v4');
+uuidv4(); // RESULT
+```
+
+Version 5 (namespace):
+
+```javascript --run v5
+const uuidv5 = require('uuid/v5');
+
+// ... using predefined DNS namespace (for domain names)
+uuidv5('hello.example.com', uuidv5.DNS); // RESULT
+
+// ... using predefined URL namespace (for, well, URLs)
+uuidv5('http://example.com/hello', uuidv5.URL); // RESULT
+
+// ... using a custom namespace
+//
+// Note: Custom namespaces should be a UUID string specific to your application!
+// E.g. the one here was generated using this modules `uuid` CLI.
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+uuidv5('Hello, World!', MY_NAMESPACE); // RESULT
+```
+
+## Quickstart - Browser-ready Versions
+
+Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
+
+For version 1 uuids:
+
+```html
+<script src="http://wzrd.in/standalone/uuid%2Fv1@latest"></script>
+<script>
+uuidv1(); // -> v1 UUID
+</script>
+```
+
+For version 3 uuids:
+
+```html
+<script src="http://wzrd.in/standalone/uuid%2Fv3@latest"></script>
+<script>
+uuidv3('http://example.com/hello', uuidv3.URL); // -> v3 UUID
+</script>
+```
+
+For version 4 uuids:
+
+```html
+<script src="http://wzrd.in/standalone/uuid%2Fv4@latest"></script>
+<script>
+uuidv4(); // -> v4 UUID
+</script>
+```
+
+For version 5 uuids:
+
+```html
+<script src="http://wzrd.in/standalone/uuid%2Fv5@latest"></script>
+<script>
+uuidv5('http://example.com/hello', uuidv5.URL); // -> v5 UUID
+</script>
+```
+
+## API
+
+### Version 1
+
+```javascript
+const uuidv1 = require('uuid/v1');
+
+// Incantations
+uuidv1();
+uuidv1(options);
+uuidv1(options, buffer, offset);
+```
+
+Generate and return a RFC4122 v1 (timestamp-based) UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+
+ * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
+ * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
+ * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used.
+ * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
+
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Note: The <node> id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
+
+Example: Generate string UUID with fully-specified options
+
+```javascript --run v1
+const v1options = {
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678
+};
+uuidv1(v1options); // RESULT
+```
+
+Example: In-place generation of two binary IDs
+
+```javascript --run v1
+// Generate two ids in an array
+const arr = new Array();
+uuidv1(null, arr, 0); // RESULT
+uuidv1(null, arr, 16); // RESULT
+```
+
+### Version 3
+
+```javascript
+const uuidv3 = require('uuid/v3');
+
+// Incantations
+uuidv3(name, namespace);
+uuidv3(name, namespace, buffer);
+uuidv3(name, namespace, buffer, offset);
+```
+
+Generate and return a RFC4122 v3 UUID.
+
+* `name` - (String | Array[]) "name" to create UUID with
+* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example:
+
+```javascript --run v3
+uuidv3('hello world', MY_NAMESPACE); // RESULT
+```
+
+### Version 4
+
+```javascript
+const uuidv4 = require('uuid/v4')
+
+// Incantations
+uuidv4();
+uuidv4(options);
+uuidv4(options, buffer, offset);
+```
+
+Generate and return a RFC4122 v4 UUID.
+
+* `options` - (Object) Optional uuid state to apply. Properties may include:
+ * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
+ * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255)
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing.
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example: Generate string UUID with predefined `random` values
+
+```javascript --run v4
+const v4options = {
+ random: [
+ 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
+ 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
+ ]
+};
+uuidv4(v4options); // RESULT
+```
+
+Example: Generate two IDs in a single buffer
+
+```javascript --run v4
+const buffer = new Array();
+uuidv4(null, buffer, 0); // RESULT
+uuidv4(null, buffer, 16); // RESULT
+```
+
+### Version 5
+
+```javascript
+const uuidv5 = require('uuid/v5');
+
+// Incantations
+uuidv5(name, namespace);
+uuidv5(name, namespace, buffer);
+uuidv5(name, namespace, buffer, offset);
+```
+
+Generate and return a RFC4122 v5 UUID.
+
+* `name` - (String | Array[]) "name" to create UUID with
+* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values
+* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
+* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0
+
+Returns `buffer`, if specified, otherwise the string form of the UUID
+
+Example:
+
+```javascript --run v5
+uuidv5('hello world', MY_NAMESPACE); // RESULT
+```
+
+## Command Line
+
+UUIDs can be generated from the command line with the `uuid` command.
+
+```shell
+$ uuid
+ddeb27fb-d9a0-4624-be4d-4615062daed4
+
+$ uuid v1
+02d37060-d446-11e7-a9fa-7bdae751ebe1
+```
+
+Type `uuid --help` for usage details
+
+## Testing
+
+```shell
+npm test
+```
diff --git a/deps/npm/node_modules/uuid/bin/uuid b/deps/npm/node_modules/uuid/bin/uuid
index 2fd26d7642..502626e60f 100755
--- a/deps/npm/node_modules/uuid/bin/uuid
+++ b/deps/npm/node_modules/uuid/bin/uuid
@@ -5,6 +5,7 @@ function usage() {
console.log('Usage:');
console.log(' uuid');
console.log(' uuid v1');
+ console.log(' uuid v3 <name> <namespace uuid>');
console.log(' uuid v4');
console.log(' uuid v5 <name> <namespace uuid>');
console.log(' uuid --help');
@@ -25,6 +26,20 @@ switch (version) {
console.log(uuidV1());
break;
+ case 'v3':
+ var uuidV3 = require('../v3');
+
+ var name = args.shift();
+ var namespace = args.shift();
+ assert(name != null, 'v3 name not specified');
+ assert(namespace != null, 'v3 namespace not specified');
+
+ if (namespace == 'URL') namespace = uuidV3.URL;
+ if (namespace == 'DNS') namespace = uuidV3.DNS;
+
+ console.log(uuidV3(name, namespace));
+ break;
+
case 'v4':
var uuidV4 = require('../v4');
console.log(uuidV4());
diff --git a/deps/npm/node_modules/uuid/lib/md5-browser.js b/deps/npm/node_modules/uuid/lib/md5-browser.js
new file mode 100644
index 0000000000..9b3b6c7eff
--- /dev/null
+++ b/deps/npm/node_modules/uuid/lib/md5-browser.js
@@ -0,0 +1,216 @@
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+'use strict';
+
+function md5(bytes) {
+ if (typeof(bytes) == 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+ bytes = new Array(msg.length);
+ for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);
+ }
+
+ return md5ToHexEncodedArray(
+ wordsToMd5(
+ bytesToWords(bytes)
+ , bytes.length * 8)
+ );
+}
+
+
+/*
+* Convert an array of little-endian words to an array of bytes
+*/
+function md5ToHexEncodedArray(input) {
+ var i;
+ var x;
+ var output = [];
+ var length32 = input.length * 32;
+ var hexTab = '0123456789abcdef';
+ var hex;
+
+ for (i = 0; i < length32; i += 8) {
+ x = (input[i >> 5] >>> (i % 32)) & 0xFF;
+
+ hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16);
+
+ output.push(hex);
+ }
+ return output;
+}
+
+/*
+* Calculate the MD5 of an array of little-endian words, and a bit length.
+*/
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << (len % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var i;
+ var olda;
+ var oldb;
+ var oldc;
+ var oldd;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+
+ var d = 271733878;
+
+ for (i = 0; i < x.length; i += 16) {
+ olda = a;
+ oldb = b;
+ oldc = c;
+ oldd = d;
+
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+ return [a, b, c, d];
+}
+
+/*
+* Convert an array bytes to an array of little-endian words
+* Characters >255 have their high-byte silently ignored.
+*/
+function bytesToWords(input) {
+ var i;
+ var output = [];
+ output[(input.length >> 2) - 1] = undefined;
+ for (i = 0; i < output.length; i += 1) {
+ output[i] = 0;
+ }
+ var length8 = input.length * 8;
+ for (i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32);
+ }
+
+ return output;
+}
+
+/*
+* Add integers, wrapping at 2^32. This uses 16-bit operations internally
+* to work around bugs in some JS interpreters.
+*/
+function safeAdd(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+* Bitwise rotate a 32-bit number to the left.
+*/
+function bitRotateLeft(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+* These functions implement the four basic operations the algorithm uses.
+*/
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+module.exports = md5;
diff --git a/deps/npm/node_modules/uuid/lib/md5.js b/deps/npm/node_modules/uuid/lib/md5.js
new file mode 100644
index 0000000000..7044b872f5
--- /dev/null
+++ b/deps/npm/node_modules/uuid/lib/md5.js
@@ -0,0 +1,25 @@
+'use strict';
+
+var crypto = require('crypto');
+
+function md5(bytes) {
+ if (typeof Buffer.from === 'function') {
+ // Modern Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ } else {
+ // Pre-v4 Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = new Buffer(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = new Buffer(bytes, 'utf8');
+ }
+ }
+
+ return crypto.createHash('md5').update(bytes).digest();
+}
+
+module.exports = md5;
diff --git a/deps/npm/node_modules/uuid/lib/rng-browser.js b/deps/npm/node_modules/uuid/lib/rng-browser.js
index ac39b1289b..14d21170d5 100644
--- a/deps/npm/node_modules/uuid/lib/rng-browser.js
+++ b/deps/npm/node_modules/uuid/lib/rng-browser.js
@@ -2,25 +2,26 @@
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API. We do the best we can via
// feature-detection
-var rng;
-var crypto = global.crypto || global.msCrypto; // for IE 11
-if (crypto && crypto.getRandomValues) {
+// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
+var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
+ (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
+if (getRandomValues) {
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
- rng = function whatwgRNG() {
- crypto.getRandomValues(rnds8);
+
+ module.exports = function whatwgRNG() {
+ getRandomValues(rnds8);
return rnds8;
};
-}
-
-if (!rng) {
+} else {
// Math.random()-based (RNG)
//
// If all else fails, use Math.random(). It's fast, but is of unspecified
// quality.
var rnds = new Array(16);
- rng = function() {
+
+ module.exports = function mathRNG() {
for (var i = 0, r; i < 16; i++) {
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
@@ -29,5 +30,3 @@ if (!rng) {
return rnds;
};
}
-
-module.exports = rng;
diff --git a/deps/npm/node_modules/uuid/lib/rng.js b/deps/npm/node_modules/uuid/lib/rng.js
index 4a0182fd68..58f0dc9cfb 100644
--- a/deps/npm/node_modules/uuid/lib/rng.js
+++ b/deps/npm/node_modules/uuid/lib/rng.js
@@ -1,10 +1,8 @@
// Unique ID creation requires a high quality random # generator. In node.js
// this is pretty straight-forward - we use the crypto API.
-var rb = require('crypto').randomBytes;
+var crypto = require('crypto');
-function rng() {
- return rb(16);
-}
-
-module.exports = rng;
+module.exports = function nodeRNG() {
+ return crypto.randomBytes(16);
+};
diff --git a/deps/npm/node_modules/uuid/lib/sha1-browser.js b/deps/npm/node_modules/uuid/lib/sha1-browser.js
index dbc3184208..5758ed75c9 100644
--- a/deps/npm/node_modules/uuid/lib/sha1-browser.js
+++ b/deps/npm/node_modules/uuid/lib/sha1-browser.js
@@ -54,7 +54,11 @@ function sha1(bytes) {
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
}
- var a = H[0], b = H[1], c = H[2], d = H[3], e = H[4];
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
for (var t=0; t<80; t++) {
var s = Math.floor(t/20);
diff --git a/deps/npm/node_modules/uuid/lib/sha1.js b/deps/npm/node_modules/uuid/lib/sha1.js
index e8771ce540..0b54b25072 100644
--- a/deps/npm/node_modules/uuid/lib/sha1.js
+++ b/deps/npm/node_modules/uuid/lib/sha1.js
@@ -3,19 +3,23 @@
var crypto = require('crypto');
function sha1(bytes) {
- // support modern Buffer API
- if (typeof Buffer.from === 'function') {
- if (Array.isArray(bytes)) bytes = Buffer.from(bytes);
- else if (typeof bytes === 'string') bytes = Buffer.from(bytes, 'utf8');
- }
+ if (typeof Buffer.from === 'function') {
+ // Modern Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+ } else {
+ // Pre-v4 Buffer API
+ if (Array.isArray(bytes)) {
+ bytes = new Buffer(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = new Buffer(bytes, 'utf8');
+ }
+ }
- // support pre-v4 Buffer API
- else {
- if (Array.isArray(bytes)) bytes = new Buffer(bytes);
- else if (typeof bytes === 'string') bytes = new Buffer(bytes, 'utf8');
- }
-
- return crypto.createHash('sha1').update(bytes).digest();
+ return crypto.createHash('sha1').update(bytes).digest();
}
module.exports = sha1;
diff --git a/deps/npm/node_modules/uuid/lib/v35.js b/deps/npm/node_modules/uuid/lib/v35.js
new file mode 100644
index 0000000000..842c60ea2b
--- /dev/null
+++ b/deps/npm/node_modules/uuid/lib/v35.js
@@ -0,0 +1,53 @@
+var bytesToUuid = require('./bytesToUuid');
+
+function uuidToBytes(uuid) {
+ // Note: We assume we're being passed a valid uuid string
+ var bytes = [];
+ uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) {
+ bytes.push(parseInt(hex, 16));
+ });
+
+ return bytes;
+}
+
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+ var bytes = new Array(str.length);
+ for (var i = 0; i < str.length; i++) {
+ bytes[i] = str.charCodeAt(i);
+ }
+ return bytes;
+}
+
+module.exports = function(name, version, hashfunc) {
+ var generateUUID = function(value, namespace, buf, offset) {
+ var off = buf && offset || 0;
+
+ if (typeof(value) == 'string') value = stringToBytes(value);
+ if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace);
+
+ if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
+ if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values');
+
+ // Per 4.3
+ var bytes = hashfunc(namespace.concat(value));
+ bytes[6] = (bytes[6] & 0x0f) | version;
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
+
+ if (buf) {
+ for (var idx = 0; idx < 16; ++idx) {
+ buf[off+idx] = bytes[idx];
+ }
+ }
+
+ return buf || bytesToUuid(bytes);
+ };
+
+ generateUUID.name = name;
+
+ // Pre-defined namespaces, per Appendix C
+ generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+ generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+
+ return generateUUID;
+};
diff --git a/deps/npm/node_modules/uuid/package.json b/deps/npm/node_modules/uuid/package.json
index 8aebdb2ed1..7ea5d38da2 100644
--- a/deps/npm/node_modules/uuid/package.json
+++ b/deps/npm/node_modules/uuid/package.json
@@ -1,36 +1,38 @@
{
- "_from": "uuid@3.1.0",
- "_id": "uuid@3.1.0",
+ "_from": "uuid@3.2.1",
+ "_id": "uuid@3.2.1",
"_inBundle": false,
- "_integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==",
+ "_integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"_location": "/uuid",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "uuid@3.1.0",
+ "raw": "uuid@3.2.1",
"name": "uuid",
"escapedName": "uuid",
- "rawSpec": "3.1.0",
+ "rawSpec": "3.2.1",
"saveSpec": null,
- "fetchSpec": "3.1.0"
+ "fetchSpec": "3.2.1"
},
"_requiredBy": [
"#USER",
"/",
+ "/npm-registry-couchapp/couchapp/nano/cloudant-follow/request",
"/request",
"/tap/coveralls/request"
],
- "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
- "_shasum": "3dd3d3e790abc24d7b0d3a034ffababe28ebbc04",
- "_spec": "uuid@3.1.0",
+ "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
+ "_shasum": "12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14",
+ "_spec": "uuid@3.2.1",
"_where": "/Users/rebecca/code/npm",
"bin": {
"uuid": "./bin/uuid"
},
"browser": {
"./lib/rng.js": "./lib/rng-browser.js",
- "./lib/sha1.js": "./lib/sha1-browser.js"
+ "./lib/sha1.js": "./lib/sha1-browser.js",
+ "./lib/md5.js": "./lib/md5-browser.js"
},
"bugs": {
"url": "https://github.com/kelektiv/node-uuid/issues"
@@ -58,10 +60,14 @@
"email": "shtylman@gmail.com"
}
],
+ "dependencies": {},
"deprecated": false,
"description": "RFC4122 (v1, v4, and v5) UUIDs",
"devDependencies": {
- "mocha": "3.1.2"
+ "eslint": "4.5.0",
+ "mocha": "3.1.2",
+ "runmd": "1.0.1",
+ "standard-version": "4.2.0"
},
"homepage": "https://github.com/kelektiv/node-uuid#readme",
"keywords": [
@@ -76,7 +82,10 @@
"url": "git+https://github.com/kelektiv/node-uuid.git"
},
"scripts": {
+ "md": "runmd --watch --output=README.md README_js.md",
+ "prepare": "runmd --output=README.md README_js.md",
+ "release": "standard-version",
"test": "mocha test/test.js"
},
- "version": "3.1.0"
+ "version": "3.2.1"
}
diff --git a/deps/npm/node_modules/uuid/v1.js b/deps/npm/node_modules/uuid/v1.js
index 613f67e2e8..d84c0f4523 100644
--- a/deps/npm/node_modules/uuid/v1.js
+++ b/deps/npm/node_modules/uuid/v1.js
@@ -6,20 +6,12 @@ var bytesToUuid = require('./lib/bytesToUuid');
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
-// random #'s we need to init node and clockseq
-var _seedBytes = rng();
-
-// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
-var _nodeId = [
- _seedBytes[0] | 0x01,
- _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
-];
-
-// Per 4.2.2, randomize (14 bit) clockseq
-var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
+var _nodeId;
+var _clockseq;
// Previous uuid creation time
-var _lastMSecs = 0, _lastNSecs = 0;
+var _lastMSecs = 0;
+var _lastNSecs = 0;
// See https://github.com/broofa/node-uuid for API details
function v1(options, buf, offset) {
@@ -27,9 +19,27 @@ function v1(options, buf, offset) {
var b = buf || [];
options = options || {};
-
+ var node = options.node || _nodeId;
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+ // node and clockseq need to be initialized to random values if they're not
+ // specified. We do this lazily to minimize issues related to insufficient
+ // system entropy. See #189
+ if (node == null || clockseq == null) {
+ var seedBytes = rng();
+ if (node == null) {
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+ node = _nodeId = [
+ seedBytes[0] | 0x01,
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
+ ];
+ }
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ }
+ }
+
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
@@ -89,7 +99,6 @@ function v1(options, buf, offset) {
b[i++] = clockseq & 0xff;
// `node`
- var node = options.node || _nodeId;
for (var n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
diff --git a/deps/npm/node_modules/uuid/v3.js b/deps/npm/node_modules/uuid/v3.js
new file mode 100644
index 0000000000..ee7e14c0f0
--- /dev/null
+++ b/deps/npm/node_modules/uuid/v3.js
@@ -0,0 +1,4 @@
+var v35 = require('./lib/v35.js');
+var md5 = require('./lib/md5');
+
+module.exports = v35('v3', 0x30, md5); \ No newline at end of file
diff --git a/deps/npm/node_modules/uuid/v4.js b/deps/npm/node_modules/uuid/v4.js
index 38b6f76a98..1f07be1c53 100644
--- a/deps/npm/node_modules/uuid/v4.js
+++ b/deps/npm/node_modules/uuid/v4.js
@@ -5,7 +5,7 @@ function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof(options) == 'string') {
- buf = options == 'binary' ? new Array(16) : null;
+ buf = options === 'binary' ? new Array(16) : null;
options = null;
}
options = options || {};
diff --git a/deps/npm/node_modules/uuid/v5.js b/deps/npm/node_modules/uuid/v5.js
index 39cc35e7c8..4945baf385 100644
--- a/deps/npm/node_modules/uuid/v5.js
+++ b/deps/npm/node_modules/uuid/v5.js
@@ -1,42 +1,3 @@
-var sha1 = require('./lib/sha1-browser');
-var bytesToUuid = require('./lib/bytesToUuid');
-
-function uuidToBytes(uuid) {
- // Note: We assume we're being passed a valid uuid string
- var bytes = [];
- uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) {
- bytes.push(parseInt(hex, 16));
- });
-
- return bytes;
-}
-
-function stringToBytes(str) {
- str = unescape(encodeURIComponent(str)); // UTF8 escape
- var bytes = new Array(str.length);
- for (var i = 0; i < str.length; i++) {
- bytes[i] = str.charCodeAt(i);
- }
- return bytes;
-}
-
-function v5(name, namespace, buf, offset) {
- if (typeof(name) == 'string') name = stringToBytes(name);
- if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace);
-
- if (!Array.isArray(name)) throw TypeError('name must be an array of bytes');
- if (!Array.isArray(namespace) || namespace.length != 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values');
-
- // Per 4.3
- var bytes = sha1(namespace.concat(name));
- bytes[6] = (bytes[6] & 0x0f) | 0x50;
- bytes[8] = (bytes[8] & 0x3f) | 0x80;
-
- return buf || bytesToUuid(bytes);
-}
-
-// Pre-defined namespaces, per Appendix C
-v5.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
-v5.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
-
-module.exports = v5;
+var v35 = require('./lib/v35.js');
+var sha1 = require('./lib/sha1');
+module.exports = v35('v5', 0x50, sha1);
diff --git a/deps/npm/node_modules/worker-farm/.travis.yml b/deps/npm/node_modules/worker-farm/.travis.yml
index 8e23761153..1c9e2b559d 100644
--- a/deps/npm/node_modules/worker-farm/.travis.yml
+++ b/deps/npm/node_modules/worker-farm/.travis.yml
@@ -3,6 +3,7 @@ node_js:
- 4
- 6
- 8
+ - 9
branches:
only:
- master
diff --git a/deps/npm/node_modules/worker-farm/lib/farm.js b/deps/npm/node_modules/worker-farm/lib/farm.js
index bdc70e84a1..c77c95d2c7 100644
--- a/deps/npm/node_modules/worker-farm/lib/farm.js
+++ b/deps/npm/node_modules/worker-farm/lib/farm.js
@@ -2,7 +2,7 @@
const DEFAULT_OPTIONS = {
maxCallsPerWorker : Infinity
- , maxConcurrentWorkers : require('os').cpus().length
+ , maxConcurrentWorkers : (require('os').cpus() || { length: 1 }).length
, maxConcurrentCallsPerWorker : 10
, maxConcurrentCalls : Infinity
, maxCallTime : Infinity // exceed this and the whole worker is terminated
@@ -132,7 +132,7 @@ Farm.prototype.stopChild = function (childId) {
setTimeout(function () {
if (child.exitCode === null)
child.child.kill('SIGKILL')
- }, this.options.forcedKillTime)
+ }, this.options.forcedKillTime).unref()
;delete this.children[childId]
this.activeChildren--
}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore b/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore
deleted file mode 100644
index b512c09d47..0000000000
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml b/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml
new file mode 100644
index 0000000000..f996821c51
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml
@@ -0,0 +1,11 @@
+sudo: false
+
+language: node_js
+
+node_js:
+ - 9
+ - 8
+ - 7
+ - 6
+ - 5
+ - 4
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/README.md b/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
index 2c1f8a525d..a4d0fb542d 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
@@ -1,6 +1,10 @@
# node-errno
-Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*.
+> Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*.
+
+[![npm](https://img.shields.io/npm/v/errno.svg)](https://www.npmjs.com/package/errno)
+[![Build Status](https://secure.travis-ci.org/rvagg/node-errno.png)](http://travis-ci.org/rvagg/node-errno)
+[![npm](https://img.shields.io/npm/dm/errno.svg)](https://www.npmjs.com/package/errno)
* [errno exposed](#errnoexposed)
* [Custom errors](#customerrors)
@@ -86,7 +90,7 @@ You will need to install with `npm install errno -g` if you want the `errno` com
<a name="customerrors"></a>
## Custom errors
-Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error heirachies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor.
+Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error hierarchies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor.
```js
var create = require('errno').custom.createError
@@ -138,4 +142,4 @@ 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
+SOFTWARE.
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js b/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
index f841771b8a..61d179bbe6 100755
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
@@ -4,8 +4,10 @@ var errno = require('./')
, arg = process.argv[2]
, data, code
-if (arg === undefined)
- return console.log(JSON.stringify(errno.code, null, 2))
+if (arg === undefined) {
+ console.log(JSON.stringify(errno.code, null, 2))
+ process.exit(0)
+}
if ((code = +arg) == arg)
data = errno.errno[code]
@@ -17,4 +19,4 @@ if (data)
else {
console.error('No such errno/code: "' + arg + '"')
process.exit(1)
-} \ No newline at end of file
+}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js b/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
index 7be16c1e4d..ca8c1d8dcd 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
@@ -1,13 +1,15 @@
var prr = require('prr')
function init (type, message, cause) {
+ if (!!message && typeof message != 'string') {
+ message = message.message || message.name
+ }
prr(this, {
type : type
, name : type
// can be passed just a 'cause'
, cause : typeof message != 'string' ? message : cause
- , message : !!message && typeof message != 'string' ? message.message : message
-
+ , message : message
}, 'ewr')
}
@@ -15,7 +17,7 @@ function init (type, message, cause) {
function CustomError (message, cause) {
Error.call(this)
if (Error.captureStackTrace)
- Error.captureStackTrace(this, arguments.callee)
+ Error.captureStackTrace(this, this.constructor)
init.call(this, 'CustomError', message, cause)
}
@@ -37,7 +39,7 @@ function createError (errno, type, proto) {
}
Error.call(this)
if (Error.captureStackTrace)
- Error.captureStackTrace(this, arguments.callee)
+ Error.captureStackTrace(this, err)
}
err.prototype = !!proto ? new proto() : new CustomError()
return err
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
index fe3f4eb153..33dcbc3a86 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
@@ -7,4 +7,4 @@ branches:
- master
notifications:
email:
- - rod@vagg.org
+ - rod@vagg.org \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE
deleted file mode 100644
index f6a0029de1..0000000000
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
new file mode 100644
index 0000000000..29b95e39a5
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
@@ -0,0 +1,11 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2014 Rod Vagg
+---------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
index 3e709e3bd9..b934048235 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
@@ -4,7 +4,7 @@ An sensible alternative to `Object.defineProperty()`. Available in npm and Ender
## Usage
-Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*):
+Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (`'enumerable'`, `'configurable'` and `'writable'` are all `false`):
```js
prr(obj, 'foo', 'bar')
@@ -24,7 +24,9 @@ prr(obj, { one: 'one', two: 'two' })
prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true })
```
-But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**.
+### Simplify!
+
+But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can simplify.
As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`:
@@ -42,4 +44,4 @@ Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[pro
## Licence
-prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file
+prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
index 4af59e2e92..706d2aec4e 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
@@ -1,30 +1,32 @@
{
- "_from": "prr@~0.0.0",
- "_id": "prr@0.0.0",
+ "_from": "prr@~1.0.1",
+ "_id": "prr@1.0.1",
"_inBundle": false,
- "_integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=",
+ "_integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"_location": "/worker-farm/errno/prr",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "prr@~0.0.0",
+ "raw": "prr@~1.0.1",
"name": "prr",
"escapedName": "prr",
- "rawSpec": "~0.0.0",
+ "rawSpec": "~1.0.1",
"saveSpec": null,
- "fetchSpec": "~0.0.0"
+ "fetchSpec": "~1.0.1"
},
"_requiredBy": [
"/worker-farm/errno"
],
- "_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
- "_shasum": "1a84b85908325501411853d0081ee3fa86e2926a",
- "_spec": "prr@~0.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/worker-farm/node_modules/errno",
- "authors": [
- "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"
- ],
+ "_resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "_shasum": "d3fc114ba06995a45ec6893f484ceb1d78f5f476",
+ "_spec": "prr@~1.0.1",
+ "_where": "/Users/rebecca/code/npm/node_modules/worker-farm/node_modules/errno",
+ "author": {
+ "name": "Rod Vagg",
+ "email": "rod@vagg.org",
+ "url": "https://github.com/rvagg"
+ },
"bugs": {
"url": "https://github.com/rvagg/prr/issues"
},
@@ -52,5 +54,5 @@
"scripts": {
"test": "node ./test.js"
},
- "version": "0.0.0"
+ "version": "1.0.1"
}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/package.json b/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
index c0df7f24aa..ce2a8cb2ad 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
@@ -1,27 +1,27 @@
{
- "_from": "errno@>=0.1.1 <0.2.0-0",
- "_id": "errno@0.1.4",
+ "_from": "errno@^0.1.4",
+ "_id": "errno@0.1.7",
"_inBundle": false,
- "_integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=",
+ "_integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
"_location": "/worker-farm/errno",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "errno@>=0.1.1 <0.2.0-0",
+ "raw": "errno@^0.1.4",
"name": "errno",
"escapedName": "errno",
- "rawSpec": ">=0.1.1 <0.2.0-0",
+ "rawSpec": "^0.1.4",
"saveSpec": null,
- "fetchSpec": ">=0.1.1 <0.2.0-0"
+ "fetchSpec": "^0.1.4"
},
"_requiredBy": [
"/worker-farm"
],
- "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz",
- "_shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d",
- "_spec": "errno@>=0.1.1 <0.2.0-0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/worker-farm",
+ "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+ "_shasum": "4684d71779ad39af177e3f007996f7c67c852618",
+ "_spec": "errno@^0.1.4",
+ "_where": "/Users/rebecca/code/npm/node_modules/worker-farm",
"authors": [
"Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)"
],
@@ -33,12 +33,14 @@
},
"bundleDependencies": false,
"dependencies": {
- "prr": "~0.0.0"
+ "prr": "~1.0.1"
},
"deprecated": false,
"description": "libuv errno details exposed",
"devDependencies": {
- "tape": "~3.5.0"
+ "error-stack-parser": "^2.0.1",
+ "inherits": "^2.0.3",
+ "tape": "~4.8.0"
},
"homepage": "https://github.com/rvagg/node-errno#readme",
"keywords": [
@@ -54,7 +56,7 @@
"url": "git+https://github.com/rvagg/node-errno.git"
},
"scripts": {
- "test": "tape test.js"
+ "test": "node --use_strict test.js"
},
- "version": "0.1.4"
+ "version": "0.1.7"
}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/test.js b/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
index 6b76a85ae1..1c046357bc 100755..100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
@@ -1,27 +1,27 @@
-#!/usr/bin/env node
-
-var test = require('tape')
- , errno = require('./')
+var test = require('tape')
+ , inherits = require('inherits')
+ , ErrorStackParser = require('error-stack-parser')
+ , errno = require('./')
test('sanity checks', function (t) {
t.ok(errno.all, 'errno.all not found')
t.ok(errno.errno, 'errno.errno not found')
t.ok(errno.code, 'errno.code not found')
- t.equal(errno.all.length, 59, 'found ' + errno.all.length + ', expected 59')
- t.equal(errno.errno['-1'], errno.all[0], 'errno -1 not first element')
+ t.equal(errno.all.length, 60, 'found ' + errno.all.length + ', expected 60')
+ t.equal(errno.errno['-1'], errno.all[1], 'errno -1 not second element')
- t.equal(errno.code['UNKNOWN'], errno.all[0], 'code UNKNOWN not first element')
+ t.equal(errno.code['UNKNOWN'], errno.all[1], 'code UNKNOWN not second element')
- t.equal(errno.errno[1], errno.all[2], 'errno 1 not third element')
+ t.equal(errno.errno[1], errno.all[3], 'errno 1 not fourth element')
- t.equal(errno.code['EOF'], errno.all[2], 'code EOF not third element')
+ t.equal(errno.code['EOF'], errno.all[3], 'code EOF not fourth element')
t.end()
})
test('custom errors', function (t) {
- var Cust = errno.create('FooNotBarError')
- var cust = new Cust('foo is not bar')
+ const Cust = errno.create('FooNotBarError')
+ const cust = new Cust('foo is not bar')
t.equal(cust.name, 'FooNotBarError', 'correct custom name')
t.equal(cust.type, 'FooNotBarError', 'correct custom type')
@@ -29,3 +29,60 @@ test('custom errors', function (t) {
t.notOk(cust.cause, 'no cause')
t.end()
})
+
+test('callstack', function (t) {
+ const MyError = errno.create('MyError')
+
+ function lastFunction (ErrorType, cb) {
+ process.nextTick(cb, new ErrorType('oh noes!'))
+ }
+
+ function secondLastFunction (ErrorType, cb) {
+ lastFunction(ErrorType, cb)
+ }
+
+ function testFrames (t) {
+ return function (err) {
+ const stack = ErrorStackParser.parse(err)
+ t.same(stack[0].functionName, 'lastFunction', 'last stack frame ok')
+ t.same(stack[1].functionName, 'secondLastFunction', 'second last stack frame ok')
+ t.end()
+ }
+ }
+
+ t.test('custom error, default prototype', function (t) {
+ secondLastFunction(MyError, testFrames(t))
+ })
+
+ t.test('custom error, custom prototype', function (t) {
+ const MyError2 = errno.create('MyError2', MyError)
+ secondLastFunction(MyError2, testFrames(t))
+ })
+
+ t.test('custom error, using inheritance', function (t) {
+ const CustomError = errno.custom.CustomError
+
+ function MyError3 (message, cause) {
+ CustomError.call(this, message, cause)
+ }
+
+ inherits(MyError3, CustomError)
+
+ secondLastFunction(MyError3, testFrames(t))
+ })
+})
+
+test('error without message', function (t) {
+ const Cust = errno.create('WriteError')
+ const cust = new Cust({
+ code: 22,
+ message: '',
+ name: 'QuotaExceededError'
+ })
+
+ t.equal(cust.name, 'WriteError', 'correct custom name')
+ t.equal(cust.type, 'WriteError', 'correct custom type')
+ t.equal(cust.message, 'QuotaExceededError', 'message is the name')
+ t.notOk(cust.cause, 'no cause')
+ t.end()
+})
diff --git a/deps/npm/node_modules/worker-farm/package.json b/deps/npm/node_modules/worker-farm/package.json
index d60f581cff..7adec272cd 100644
--- a/deps/npm/node_modules/worker-farm/package.json
+++ b/deps/npm/node_modules/worker-farm/package.json
@@ -1,27 +1,27 @@
{
- "_from": "worker-farm@1.5.1",
- "_id": "worker-farm@1.5.1",
+ "_from": "worker-farm@1.5.4",
+ "_id": "worker-farm@1.5.4",
"_inBundle": false,
- "_integrity": "sha512-T5NH6Wqsd8MwGD4AK8BBllUy6LmHaqjEOyo/YIUEegZui6/v5Bqde//3jwyE3PGiGYMmWi06exFBi5LNhhPFNw==",
+ "_integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==",
"_location": "/worker-farm",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "worker-farm@1.5.1",
+ "raw": "worker-farm@1.5.4",
"name": "worker-farm",
"escapedName": "worker-farm",
- "rawSpec": "1.5.1",
+ "rawSpec": "1.5.4",
"saveSpec": null,
- "fetchSpec": "1.5.1"
+ "fetchSpec": "1.5.4"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.1.tgz",
- "_shasum": "8e9f4a7da4f3c595aa600903051b969390423fa1",
- "_spec": "worker-farm@1.5.1",
+ "_resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz",
+ "_shasum": "4debbe46b40edefcc717ebde74a90b1ae1e909a1",
+ "_spec": "worker-farm@1.5.4",
"_where": "/Users/zkat/Documents/code/npm",
"authors": [
"Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)"
@@ -31,13 +31,13 @@
},
"bundleDependencies": false,
"dependencies": {
- "errno": "^0.1.4",
- "xtend": "^4.0.1"
+ "errno": "~0.1.7",
+ "xtend": "~4.0.1"
},
"deprecated": false,
"description": "Distribute processing tasks to child processes with an Ć¼ber-simple API and baked-in durability & custom concurrency options.",
"devDependencies": {
- "tape": "^4.7.0"
+ "tape": "~4.9.0"
},
"homepage": "https://github.com/rvagg/node-worker-farm",
"keywords": [
@@ -57,5 +57,5 @@
"test": "node ./tests/"
},
"types": "./index.d.ts",
- "version": "1.5.1"
+ "version": "1.5.4"
}
diff --git a/deps/npm/node_modules/worker-farm/tests/child.js b/deps/npm/node_modules/worker-farm/tests/child.js
new file mode 100644
index 0000000000..85e8f5789e
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/tests/child.js
@@ -0,0 +1,85 @@
+'use strict'
+
+const fs = require('fs')
+const started = Date.now()
+
+
+module.exports = function (timeout, callback) {
+ callback = callback.bind(null, null, process.pid, Math.random(), timeout)
+ if (timeout)
+ return setTimeout(callback, timeout)
+ callback()
+}
+
+
+module.exports.args = function (callback) {
+ console.log(process.argv)
+ console.log(process.execArgv)
+ callback()
+}
+
+
+module.exports.run0 = function (callback) {
+ module.exports(0, callback)
+}
+
+
+module.exports.killable = function (id, callback) {
+ if (Math.random() < 0.5)
+ return process.exit(-1)
+ callback(null, id, process.pid)
+}
+
+
+module.exports.err = function (type, message, data, callback) {
+ if (typeof data == 'function') {
+ callback = data
+ data = null
+ } else {
+ let err = new Error(message)
+ Object.keys(data).forEach(function(key) {
+ err[key] = data[key]
+ })
+ callback(err)
+ return
+ }
+
+ if (type == 'TypeError')
+ return callback(new TypeError(message))
+ callback(new Error(message))
+}
+
+
+module.exports.block = function () {
+ while (true);
+}
+
+
+// use provided file path to save retries count among terminated workers
+module.exports.stubborn = function (path, callback) {
+ function isOutdated(path) {
+ return ((new Date).getTime() - fs.statSync(path).mtime.getTime()) > 2000
+ }
+
+ // file may not be properly deleted, check if modified no earler than two seconds ago
+ if (!fs.existsSync(path) || isOutdated(path)) {
+ fs.writeFileSync(path, '1')
+ process.exit(-1)
+ }
+
+ let retry = parseInt(fs.readFileSync(path, 'utf8'))
+ if (Number.isNaN(retry))
+ return callback(new Error('file contents is not a number'))
+
+ if (retry > 4) {
+ callback(null, 12)
+ } else {
+ fs.writeFileSync(path, String(retry + 1))
+ process.exit(-1)
+ }
+}
+
+
+module.exports.uptime = function (callback) {
+ callback(null, Date.now() - started)
+}
diff --git a/deps/npm/node_modules/worker-farm/tests/debug.js b/deps/npm/node_modules/worker-farm/tests/debug.js
new file mode 100644
index 0000000000..6ffd446489
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/tests/debug.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const workerFarm = require('../')
+ , workers = workerFarm(require.resolve('./child'), ['args'])
+
+
+workers.args(function() {
+ workerFarm.end(workers)
+ console.log('FINISHED')
+ process.exit(0)
+})
diff --git a/deps/npm/node_modules/worker-farm/tests/index.js b/deps/npm/node_modules/worker-farm/tests/index.js
new file mode 100644
index 0000000000..32d200ff7b
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/tests/index.js
@@ -0,0 +1,541 @@
+'use strict'
+
+const tape = require('tape')
+ , child_process = require('child_process')
+ , workerFarm = require('../')
+ , childPath = require.resolve('./child')
+ , fs = require('fs')
+
+function uniq (ar) {
+ let a = [], i, j
+ o: for (i = 0; i < ar.length; ++i) {
+ for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o
+ a[a.length] = ar[i]
+ }
+ return a
+}
+
+
+// a child where module.exports = function ...
+tape('simple, exports=function test', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath)
+ child(0, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense')
+ t.ok(pid < process.pid + 500, 'pid makes sense')
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// a child where we have module.exports.fn = function ...
+tape('simple, exports.fn test', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath, [ 'run0' ])
+ child.run0(function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense')
+ t.ok(pid < process.pid + 500, 'pid makes sense')
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using a single child process
+// when maxConcurrentWorkers = 1
+tape('single worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 1 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(1, uniq(pids).length, 'only a single process (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using two child processes
+// when maxConcurrentWorkers = 2
+tape('two workers', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 2 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(2, uniq(pids).length, 'only two child processes (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// use the returned pids to check that we're using a child process per
+// call when maxConcurrentWorkers = 10
+tape('many workers', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({ maxConcurrentWorkers: 10 }, childPath)
+ , pids = []
+ , i = 10
+
+ while (i--) {
+ child(1, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == 10) {
+ t.equal(10, uniq(pids).length, 'pids are all the same (by pid)')
+ } else if (pids.length > 10)
+ t.fail('too many callbacks!')
+ })
+ }
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('auto start workers', function (t) {
+ let child = workerFarm({ maxConcurrentWorkers: 3, autoStart: true }, childPath, ['uptime'])
+ , pids = []
+ , count = 5
+ , i = count
+ , delay = 250
+
+ t.plan(count + 1)
+
+ setTimeout(function() {
+ while (i--)
+ child.uptime(function (err, uptime) {
+ t.ok(uptime > 10, 'child has been up before the request (' + uptime + 'ms)')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ }, delay)
+})
+
+
+// use the returned pids to check that we're using a child process per
+// call when we set maxCallsPerWorker = 1 even when we have maxConcurrentWorkers = 1
+tape('single call per worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: 1
+ , autoStart: true
+ }, childPath)
+ , pids = []
+ , count = 25
+ , i = count
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == count) {
+ t.equal(count, uniq(pids).length, 'one process for each call (by pid)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (pids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// use the returned pids to check that we're using a child process per
+// two-calls when we set maxCallsPerWorker = 2 even when we have maxConcurrentWorkers = 1
+tape('two calls per worker', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: 2
+ , autoStart: true
+ }, childPath)
+ , pids = []
+ , count = 20
+ , i = count
+
+ while (i--) {
+ child(0, function (err, pid) {
+ pids.push(pid)
+ if (pids.length == count) {
+ t.equal(count / 2, uniq(pids).length, 'one process for each call (by pid)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (pids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// use timing to confirm that one worker will process calls sequentially
+tape('many concurrent calls', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: Infinity
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 200
+ , count = 200
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // upper-limit not tied to `count` at all
+ t.ok(time > defer && time < (defer * 2.5), 'processed tasks concurrently (' + time + 'ms)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// use timing to confirm that one child processes calls sequentially with
+// maxConcurrentCallsPerWorker = 1
+tape('single concurrent call', function (t) {
+ t.plan(2)
+
+ let child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: 1
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 20
+ , count = 100
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // upper-limit tied closely to `count`, 1.3 is generous but accounts for all the timers
+ // coming back at the same time and the IPC overhead
+ t.ok(time > (defer * count) && time < (defer * count * 1.3), 'processed tasks sequentially (' + time + ')')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// use timing to confirm that one child processes *only* 5 calls concurrently
+tape('multiple concurrent calls', function (t) {
+ t.plan(2)
+
+ let callsPerWorker = 5
+ , child = workerFarm({
+ maxConcurrentWorkers: 1
+ , maxConcurrentCallsPerWorker: callsPerWorker
+ , maxCallsPerWorker: Infinity
+ , autoStart: true
+ }, childPath)
+ , defer = 100
+ , count = 100
+ , i = count
+ , cbc = 0
+
+ setTimeout(function () {
+ let start = Date.now()
+
+ while (i--) {
+ child(defer, function () {
+ if (++cbc == count) {
+ let time = Date.now() - start
+ // (defer * (count / callsPerWorker + 1)) - if precise it'd be count/callsPerWorker
+ // but accounting for IPC and other overhead, we need to give it a bit of extra time,
+ // hence the +1
+ t.ok(time > (defer * 1.5) && time < (defer * (count / callsPerWorker + 1)), 'processed tasks concurrently (' + time + 'ms)')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (cbc > count)
+ t.fail('too many callbacks!')
+ })
+ }
+ }, 250)
+})
+
+
+// call a method that will die with a probability of 0.5 but expect that
+// we'll get results for each of our calls anyway
+tape('durability', function (t) {
+ t.plan(3)
+
+ let child = workerFarm({ maxConcurrentWorkers: 2 }, childPath, [ 'killable' ])
+ , ids = []
+ , pids = []
+ , count = 20
+ , i = count
+
+ while (i--) {
+ child.killable(i, function (err, id, pid) {
+ ids.push(id)
+ pids.push(pid)
+ if (ids.length == count) {
+ t.ok(uniq(pids).length > 2, 'processed by many (' + uniq(pids).length + ') workers, but got there in the end!')
+ t.ok(uniq(ids).length == count, 'received a single result for each unique call')
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ } else if (ids.length > count)
+ t.fail('too many callbacks!')
+ })
+ }
+})
+
+
+// a callback provided to .end() can and will be called (uses "simple, exports=function test" to create a child)
+tape('simple, end callback', function (t) {
+ t.plan(4)
+
+ let child = workerFarm(childPath)
+ child(0, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd >= 0 && rnd < 1, 'rnd result makes sense')
+ })
+
+ workerFarm.end(child, function() {
+ t.pass('an .end() callback was successfully called')
+ })
+})
+
+
+tape('call timeout test', function (t) {
+ t.plan(3 + 3 + 4 + 4 + 4 + 3 + 1)
+
+ let child = workerFarm({ maxCallTime: 250, maxConcurrentWorkers: 1 }, childPath)
+
+ // should come back ok
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+
+ // should come back ok
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+
+ // should die
+ child(500, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+
+ // should die
+ child(1000, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+
+ // should die even though it is only a 100ms task, it'll get caught up
+ // in a dying worker
+ setTimeout(function () {
+ child(100, function (err, pid, rnd) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ t.ok(pid === undefined, 'no pid')
+ t.ok(rnd === undefined, 'no rnd')
+ })
+ }, 200)
+
+ // should be ok, new worker
+ setTimeout(function () {
+ child(50, function (err, pid, rnd) {
+ t.ok(pid > process.pid, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(pid < process.pid + 500, 'pid makes sense ' + pid + ' vs ' + process.pid)
+ t.ok(rnd > 0 && rnd < 1, 'rnd result makes sense ' + rnd)
+ })
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+ }, 400)
+})
+
+
+tape('test error passing', function (t) {
+ t.plan(10)
+
+ let child = workerFarm(childPath, [ 'err' ])
+ child.err('Error', 'this is an Error', function (err) {
+ t.ok(err instanceof Error, 'is an Error object')
+ t.equal('Error', err.type, 'correct type')
+ t.equal('this is an Error', err.message, 'correct message')
+ })
+ child.err('TypeError', 'this is a TypeError', function (err) {
+ t.ok(err instanceof Error, 'is a TypeError object')
+ t.equal('TypeError', err.type, 'correct type')
+ t.equal('this is a TypeError', err.message, 'correct message')
+ })
+ child.err('Error', 'this is an Error with custom props', {foo: 'bar', 'baz': 1}, function (err) {
+ t.ok(err instanceof Error, 'is an Error object')
+ t.equal(err.foo, 'bar', 'passes data')
+ t.equal(err.baz, 1, 'passes data')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('test maxConcurrentCalls', function (t) {
+ t.plan(10)
+
+ let child = workerFarm({ maxConcurrentCalls: 5 }, childPath)
+
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) { t.notOk(err, 'no error') })
+ child(50, function (err) {
+ t.ok(err)
+ t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type')
+ })
+ child(50, function (err) {
+ t.ok(err)
+ t.equal(err.type, 'MaxConcurrentCallsError', 'correct error type')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+// this test should not keep the process running! if the test process
+// doesn't die then the problem is here
+tape('test timeout kill', function (t) {
+ t.plan(3)
+
+ let child = workerFarm({ maxCallTime: 250, maxConcurrentWorkers: 1 }, childPath, [ 'block' ])
+ child.block(function (err) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'TimeoutError', 'correct error type')
+ })
+
+ workerFarm.end(child, function () {
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('test max retries after process terminate', function (t) {
+ t.plan(7)
+
+ // temporary file is used to store the number of retries among terminating workers
+ let filepath1 = '.retries1'
+ let child1 = workerFarm({ maxConcurrentWorkers: 1, maxRetries: 5}, childPath, [ 'stubborn' ])
+ child1.stubborn(filepath1, function (err, result) {
+ t.notOk(err, 'no error')
+ t.equal(result, 12, 'correct result')
+ })
+
+ workerFarm.end(child1, function () {
+ fs.unlinkSync(filepath1)
+ t.ok(true, 'workerFarm ended')
+ })
+
+ let filepath2 = '.retries2'
+ let child2 = workerFarm({ maxConcurrentWorkers: 1, maxRetries: 3}, childPath, [ 'stubborn' ])
+ child2.stubborn(filepath2, function (err, result) {
+ t.ok(err, 'got an error')
+ t.equal(err.type, 'ProcessTerminatedError', 'correct error type')
+ t.equal(err.message, 'cancel after 3 retries!', 'correct message and number of retries')
+ })
+
+ workerFarm.end(child2, function () {
+ fs.unlinkSync(filepath2)
+ t.ok(true, 'workerFarm ended')
+ })
+})
+
+
+tape('ensure --debug/--inspect not propagated to children', function (t) {
+ t.plan(3)
+
+ let script = __dirname + '/debug.js'
+ , debugArg = process.version.replace(/^v(\d+)\..*$/, '$1') >= 8 ? '--inspect' : '--debug=8881'
+ , child = child_process.spawn(process.execPath, [ debugArg, script ])
+ , stdout = ''
+
+ child.stdout.on('data', function (data) {
+ stdout += data.toString()
+ })
+
+ child.on('close', function (code) {
+ t.equal(code, 0, 'exited without error (' + code + ')')
+ t.ok(stdout.indexOf('FINISHED') > -1, 'process finished')
+ t.ok(stdout.indexOf('--debug') === -1, 'child does not receive debug flag')
+ })
+})
diff --git a/deps/npm/node_modules/write-file-atomic/README.md b/deps/npm/node_modules/write-file-atomic/README.md
index 63f00420ca..af385f3b70 100644
--- a/deps/npm/node_modules/write-file-atomic/README.md
+++ b/deps/npm/node_modules/write-file-atomic/README.md
@@ -15,6 +15,7 @@ atomic and allows you set ownership (uid/gid of the file).
* encoding **String** | **Null** default = 'utf8'
* fsync **Boolean** default = true
* mode **Number** default = 438 (aka 0666 in Octal)
+ * Promise **Object** default = native Promise object
callback **Function**
Atomically and asynchronously writes data to a file, replacing the file if it already
@@ -25,6 +26,7 @@ If writeFile completes successfully then, if passed the **chown** option it will
the ownership of the file. Finally it renames the file back to the filename you specified. If
it encounters errors at any of these steps it will attempt to unlink the temporary file and then
pass the error back to the caller.
+If multiple writes are concurrently issued to the same file, the write operations are put into a queue and serialized in the order they were called, using Promises. Native promises are used by default, but you can inject your own promise-like object with the **Promise** option. Writes to different files are still executed in parallel.
If provided, the **chown** option requires both **uid** and **gid** properties or else
you'll get an error.
diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js
index c677ee9622..3b5607d154 100644
--- a/deps/npm/node_modules/write-file-atomic/index.js
+++ b/deps/npm/node_modules/write-file-atomic/index.js
@@ -2,10 +2,13 @@
module.exports = writeFile
module.exports.sync = writeFileSync
module.exports._getTmpname = getTmpname // for testing
+module.exports._cleanupOnExit = cleanupOnExit
var fs = require('graceful-fs')
-var chain = require('slide').chain
var MurmurHash3 = require('imurmurhash')
+var onExit = require('signal-exit')
+var path = require('path')
+var activeFiles = {}
var invocations = 0
function getTmpname (filename) {
@@ -16,75 +19,134 @@ function getTmpname (filename) {
.result()
}
+function cleanupOnExit (tmpfile) {
+ return function () {
+ try {
+ fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile)
+ } catch (_) {}
+ }
+}
+
function writeFile (filename, data, options, callback) {
if (options instanceof Function) {
callback = options
options = null
}
if (!options) options = {}
- fs.realpath(filename, function (_, realname) {
- _writeFile(realname || filename, data, options, callback)
- })
-}
-function _writeFile (filename, data, options, callback) {
- var tmpfile = getTmpname(filename)
- if (options.mode && options.chown) {
- return thenWriteFile()
- } else {
- // Either mode or chown is not explicitly set
- // Default behavior is to copy it from original file
- return fs.stat(filename, function (err, stats) {
- if (err || !stats) return thenWriteFile()
+ var Promise = options.Promise || global.Promise
+ var truename
+ var fd
+ var tmpfile
+ var removeOnExit = cleanupOnExit(() => tmpfile)
+ var absoluteName = path.resolve(filename)
- options = Object.assign({}, options)
- if (!options.mode) {
- options.mode = stats.mode
- }
- if (!options.chown && process.getuid) {
- options.chown = { uid: stats.uid, gid: stats.gid }
- }
- return thenWriteFile()
- })
- }
+ new Promise(function serializeSameFile (resolve) {
+ // make a queue if it doesn't already exist
+ if (!activeFiles[absoluteName]) activeFiles[absoluteName] = []
- function thenWriteFile () {
- chain([
- [writeFileAsync, tmpfile, data, options.mode, options.encoding || 'utf8'],
- options.chown && [fs, fs.chown, tmpfile, options.chown.uid, options.chown.gid],
- options.mode && [fs, fs.chmod, tmpfile, options.mode],
- [fs, fs.rename, tmpfile, filename]
- ], function (err) {
- err ? fs.unlink(tmpfile, function () { callback(err) })
- : callback()
+ activeFiles[absoluteName].push(resolve) // add this job to the queue
+ if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one
+ }).then(function getRealPath () {
+ return new Promise(function (resolve) {
+ fs.realpath(filename, function (_, realname) {
+ truename = realname || filename
+ tmpfile = getTmpname(truename)
+ resolve()
+ })
})
- }
+ }).then(function stat () {
+ return new Promise(function stat (resolve) {
+ if (options.mode && options.chown) resolve()
+ else {
+ // Either mode or chown is not explicitly set
+ // Default behavior is to copy it from original file
+ fs.stat(truename, function (err, stats) {
+ if (err || !stats) resolve()
+ else {
+ options = Object.assign({}, options)
- // doing this instead of `fs.writeFile` in order to get the ability to
- // call `fsync`.
- function writeFileAsync (file, data, mode, encoding, cb) {
- fs.open(file, 'w', options.mode, function (err, fd) {
- if (err) return cb(err)
+ if (!options.mode) {
+ options.mode = stats.mode
+ }
+ if (!options.chown && process.getuid) {
+ options.chown = { uid: stats.uid, gid: stats.gid }
+ }
+ resolve()
+ }
+ })
+ }
+ })
+ }).then(function thenWriteFile () {
+ return new Promise(function (resolve, reject) {
+ fs.open(tmpfile, 'w', options.mode, function (err, _fd) {
+ fd = _fd
+ if (err) reject(err)
+ else resolve()
+ })
+ })
+ }).then(function write () {
+ return new Promise(function (resolve, reject) {
if (Buffer.isBuffer(data)) {
- return fs.write(fd, data, 0, data.length, 0, syncAndClose)
+ fs.write(fd, data, 0, data.length, 0, function (err) {
+ if (err) reject(err)
+ else resolve()
+ })
} else if (data != null) {
- return fs.write(fd, String(data), 0, String(encoding), syncAndClose)
- } else {
- return syncAndClose()
- }
- function syncAndClose (err) {
- if (err) return cb(err)
- if (options.fsync !== false) {
- fs.fsync(fd, function (err) {
- if (err) return cb(err)
- fs.close(fd, cb)
- })
- } else {
- fs.close(fd, cb)
- }
- }
+ fs.write(fd, String(data), 0, String(options.encoding || 'utf8'), function (err) {
+ if (err) reject(err)
+ else resolve()
+ })
+ } else resolve()
})
- }
+ }).then(function syncAndClose () {
+ if (options.fsync !== false) {
+ return new Promise(function (resolve, reject) {
+ fs.fsync(fd, function (err) {
+ if (err) reject(err)
+ else fs.close(fd, resolve)
+ })
+ })
+ }
+ }).then(function chown () {
+ if (options.chown) {
+ return new Promise(function (resolve, reject) {
+ fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) {
+ if (err) reject(err)
+ else resolve()
+ })
+ })
+ }
+ }).then(function chmod () {
+ if (options.mode) {
+ return new Promise(function (resolve, reject) {
+ fs.chmod(tmpfile, options.mode, function (err) {
+ if (err) reject(err)
+ else resolve()
+ })
+ })
+ }
+ }).then(function rename () {
+ return new Promise(function (resolve, reject) {
+ fs.rename(tmpfile, truename, function (err) {
+ if (err) reject(err)
+ else resolve()
+ })
+ })
+ }).then(function success () {
+ removeOnExit()
+ callback()
+ }).catch(function fail (err) {
+ removeOnExit()
+ fs.unlink(tmpfile, function () {
+ callback(err)
+ })
+ }).then(function checkQueue () {
+ activeFiles[absoluteName].shift() // remove the element added by serializeSameFile
+ if (activeFiles[absoluteName].length > 0) {
+ activeFiles[absoluteName][0]() // start next job if one is pending
+ } else delete activeFiles[absoluteName]
+ })
}
function writeFileSync (filename, data, options) {
@@ -114,6 +176,7 @@ function writeFileSync (filename, data, options) {
}
}
+ var removeOnExit = onExit(cleanupOnExit(tmpfile))
var fd = fs.openSync(tmpfile, 'w', options.mode)
if (Buffer.isBuffer(data)) {
fs.writeSync(fd, data, 0, data.length, 0)
@@ -127,7 +190,9 @@ function writeFileSync (filename, data, options) {
if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid)
if (options.mode) fs.chmodSync(tmpfile, options.mode)
fs.renameSync(tmpfile, filename)
+ removeOnExit()
} catch (err) {
+ removeOnExit()
try { fs.unlinkSync(tmpfile) } catch (e) {}
throw err
}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/CHANGELOG.md b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/CHANGELOG.md
new file mode 100644
index 0000000000..e2f70d2250
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/CHANGELOG.md
@@ -0,0 +1,27 @@
+# Change Log
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+<a name="3.0.1"></a>
+## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08)
+
+
+### Bug Fixes
+
+* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13)
+
+
+### Bug Fixes
+
+* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8))
+* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c))
+
+
+### BREAKING CHANGES
+
+* signal-exit no longer wires into SIGPROF
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/LICENSE.txt b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/LICENSE.txt
new file mode 100644
index 0000000000..eead04a121
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/LICENSE.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) 2015, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/README.md b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/README.md
new file mode 100644
index 0000000000..8ebccabeca
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/README.md
@@ -0,0 +1,40 @@
+# signal-exit
+
+[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit)
+[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master)
+[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
+[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
+
+When you want to fire an event no matter how a process exits:
+
+* reaching the end of execution.
+* explicitly having `process.exit(code)` called.
+* having `process.kill(pid, sig)` called.
+* receiving a fatal signal from outside the process
+
+Use `signal-exit`.
+
+```js
+var onExit = require('signal-exit')
+
+onExit(function (code, signal) {
+ console.log('process exited!')
+})
+```
+
+## API
+
+`var remove = onExit(function (code, signal) {}, options)`
+
+The return value of the function is a function that will remove the
+handler.
+
+Note that the function *only* fires for signals if the signal would
+cause the proces to exit. That is, there are no other listeners, and
+it is a fatal signal.
+
+## Options
+
+* `alwaysLast`: Run this handler after any other signal or exit
+ handlers. This causes `process.emit` to be monkeypatched.
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/index.js b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/index.js
new file mode 100644
index 0000000000..337f691ed2
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/index.js
@@ -0,0 +1,157 @@
+// Note: since nyc uses this module to output coverage, any lines
+// that are in the direct sync flow of nyc's outputCoverage are
+// ignored, since we can never get coverage for them.
+var assert = require('assert')
+var signals = require('./signals.js')
+
+var EE = require('events')
+/* istanbul ignore if */
+if (typeof EE !== 'function') {
+ EE = EE.EventEmitter
+}
+
+var emitter
+if (process.__signal_exit_emitter__) {
+ emitter = process.__signal_exit_emitter__
+} else {
+ emitter = process.__signal_exit_emitter__ = new EE()
+ emitter.count = 0
+ emitter.emitted = {}
+}
+
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+
+module.exports = function (cb, opts) {
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+
+ if (loaded === false) {
+ load()
+ }
+
+ var ev = 'exit'
+ if (opts && opts.alwaysLast) {
+ ev = 'afterexit'
+ }
+
+ var remove = function () {
+ emitter.removeListener(ev, cb)
+ if (emitter.listeners('exit').length === 0 &&
+ emitter.listeners('afterexit').length === 0) {
+ unload()
+ }
+ }
+ emitter.on(ev, cb)
+
+ return remove
+}
+
+module.exports.unload = unload
+function unload () {
+ if (!loaded) {
+ return
+ }
+ loaded = false
+
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+}
+
+function emit (event, code, signal) {
+ if (emitter.emitted[event]) {
+ return
+ }
+ emitter.emitted[event] = true
+ emitter.emit(event, code, signal)
+}
+
+// { <signal>: <listener fn>, ... }
+var sigListeners = {}
+signals.forEach(function (sig) {
+ sigListeners[sig] = function listener () {
+ // If there are no other listeners, an exit is coming!
+ // Simplest way: remove us and then re-send the signal.
+ // We know that this will kill the process, so we can
+ // safely emit now.
+ var listeners = process.listeners(sig)
+ if (listeners.length === emitter.count) {
+ unload()
+ emit('exit', null, sig)
+ /* istanbul ignore next */
+ emit('afterexit', null, sig)
+ /* istanbul ignore next */
+ process.kill(process.pid, sig)
+ }
+ }
+})
+
+module.exports.signals = function () {
+ return signals
+}
+
+module.exports.load = load
+
+var loaded = false
+
+function load () {
+ if (loaded) {
+ return
+ }
+ loaded = true
+
+ // This is the number of onSignalExit's that are in play.
+ // It's important so that we can count the correct number of
+ // listeners on signals, and don't wait for the other one to
+ // handle it instead of us.
+ emitter.count += 1
+
+ signals = signals.filter(function (sig) {
+ try {
+ process.on(sig, sigListeners[sig])
+ return true
+ } catch (er) {
+ return false
+ }
+ })
+
+ process.emit = processEmit
+ process.reallyExit = processReallyExit
+}
+
+var originalProcessReallyExit = process.reallyExit
+function processReallyExit (code) {
+ process.exitCode = code || 0
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ originalProcessReallyExit.call(process, process.exitCode)
+}
+
+var originalProcessEmit = process.emit
+function processEmit (ev, arg) {
+ if (ev === 'exit') {
+ if (arg !== undefined) {
+ process.exitCode = arg
+ }
+ var ret = originalProcessEmit.apply(this, arguments)
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ return ret
+ } else {
+ return originalProcessEmit.apply(this, arguments)
+ }
+}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/package.json b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/package.json
new file mode 100644
index 0000000000..d1ddc65ab5
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/package.json
@@ -0,0 +1,66 @@
+{
+ "_from": "signal-exit@^3.0.2",
+ "_id": "signal-exit@3.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "_location": "/write-file-atomic/signal-exit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "signal-exit@^3.0.2",
+ "name": "signal-exit",
+ "escapedName": "signal-exit",
+ "rawSpec": "^3.0.2",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.2"
+ },
+ "_requiredBy": [
+ "/write-file-atomic"
+ ],
+ "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d",
+ "_spec": "signal-exit@^3.0.2",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/write-file-atomic",
+ "author": {
+ "name": "Ben Coe",
+ "email": "ben@npmjs.com"
+ },
+ "bugs": {
+ "url": "https://github.com/tapjs/signal-exit/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "when you want to fire an event no matter how a process exits.",
+ "devDependencies": {
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.10",
+ "nyc": "^8.1.0",
+ "standard": "^7.1.2",
+ "standard-version": "^2.3.0",
+ "tap": "^8.0.1"
+ },
+ "files": [
+ "index.js",
+ "signals.js"
+ ],
+ "homepage": "https://github.com/tapjs/signal-exit",
+ "keywords": [
+ "signal",
+ "exit"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "signal-exit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tapjs/signal-exit.git"
+ },
+ "scripts": {
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "pretest": "standard",
+ "release": "standard-version",
+ "test": "tap --timeout=240 ./test/*.js --cov"
+ },
+ "version": "3.0.2"
+}
diff --git a/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/signals.js b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/signals.js
new file mode 100644
index 0000000000..3bd67a8a55
--- /dev/null
+++ b/deps/npm/node_modules/write-file-atomic/node_modules/signal-exit/signals.js
@@ -0,0 +1,53 @@
+// This is not the set of all possible signals.
+//
+// It IS, however, the set of all signals that trigger
+// an exit on either Linux or BSD systems. Linux is a
+// superset of the signal names supported on BSD, and
+// the unknown signals just fail to register, so we can
+// catch that easily enough.
+//
+// Don't bother with SIGKILL. It's uncatchable, which
+// means that we can't fire any callbacks anyway.
+//
+// If a user does happen to register a handler on a non-
+// fatal signal like SIGWINCH or something, and then
+// exit, it'll end up firing `process.emit('exit')`, so
+// the handler will be fired anyway.
+//
+// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
+// artificially, inherently leave the process in a
+// state from which it is not safe to try and enter JS
+// listeners.
+module.exports = [
+ 'SIGABRT',
+ 'SIGALRM',
+ 'SIGHUP',
+ 'SIGINT',
+ 'SIGTERM'
+]
+
+if (process.platform !== 'win32') {
+ module.exports.push(
+ 'SIGVTALRM',
+ 'SIGXCPU',
+ 'SIGXFSZ',
+ 'SIGUSR2',
+ 'SIGTRAP',
+ 'SIGSYS',
+ 'SIGQUIT',
+ 'SIGIOT'
+ // should detect profiler and enable/disable accordingly.
+ // see #21
+ // 'SIGPROF'
+ )
+}
+
+if (process.platform === 'linux') {
+ module.exports.push(
+ 'SIGIO',
+ 'SIGPOLL',
+ 'SIGPWR',
+ 'SIGSTKFLT',
+ 'SIGUNUSED'
+ )
+}
diff --git a/deps/npm/node_modules/write-file-atomic/package.json b/deps/npm/node_modules/write-file-atomic/package.json
index 7e4029a0ec..243c31bccc 100644
--- a/deps/npm/node_modules/write-file-atomic/package.json
+++ b/deps/npm/node_modules/write-file-atomic/package.json
@@ -1,29 +1,29 @@
{
- "_from": "write-file-atomic@2.1.0",
- "_id": "write-file-atomic@2.1.0",
+ "_from": "write-file-atomic@2.3.0",
+ "_id": "write-file-atomic@2.3.0",
"_inBundle": false,
- "_integrity": "sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ==",
+ "_integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
"_location": "/write-file-atomic",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "write-file-atomic@2.1.0",
+ "raw": "write-file-atomic@2.3.0",
"name": "write-file-atomic",
"escapedName": "write-file-atomic",
- "rawSpec": "2.1.0",
+ "rawSpec": "2.3.0",
"saveSpec": null,
- "fetchSpec": "2.1.0"
+ "fetchSpec": "2.3.0"
},
"_requiredBy": [
"#USER",
"/",
"/update-notifier/configstore"
],
- "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.1.0.tgz",
- "_shasum": "1769f4b551eedce419f0505deae2e26763542d37",
- "_spec": "write-file-atomic@2.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
+ "_shasum": "1ff61575c2e2a4e8e510d6fa4e243cce183999ab",
+ "_spec": "write-file-atomic@2.3.0",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -36,7 +36,7 @@
"dependencies": {
"graceful-fs": "^4.1.11",
"imurmurhash": "^0.1.4",
- "slide": "^1.1.5"
+ "signal-exit": "^3.0.2"
},
"deprecated": false,
"description": "Write files in an atomic fashion w/configurable ownership",
@@ -65,5 +65,5 @@
"scripts": {
"test": "standard && tap --100 test/*.js"
},
- "version": "2.1.0"
+ "version": "2.3.0"
}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index fb2b04c1b5..5e1a96d125 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "5.6.0",
+ "version": "5.8.0",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -33,7 +33,7 @@
"npx": "./bin/npx-cli.js"
},
"dependencies": {
- "JSONStream": "~1.3.1",
+ "JSONStream": "^1.3.2",
"abbrev": "~1.1.1",
"ansi-regex": "~3.0.0",
"ansicolors": "~0.3.2",
@@ -42,7 +42,7 @@
"archy": "~1.0.0",
"bin-links": "^1.1.0",
"bluebird": "~3.5.1",
- "cacache": "~10.0.1",
+ "cacache": "^10.0.4",
"call-limit": "~1.1.0",
"chownr": "~1.0.1",
"cli-table2": "~0.2.0",
@@ -50,24 +50,27 @@
"columnify": "~1.5.4",
"config-chain": "~1.1.11",
"detect-indent": "~5.0.0",
+ "detect-newline": "^2.1.0",
"dezalgo": "~1.0.3",
"editor": "~1.0.0",
- "find-npm-prefix": "~1.0.1",
+ "find-npm-prefix": "^1.0.2",
"fs-vacuum": "~1.2.10",
"fs-write-stream-atomic": "~1.0.10",
"gentle-fs": "^2.0.1",
"glob": "~7.1.2",
"graceful-fs": "~4.1.11",
"has-unicode": "~2.0.1",
- "hosted-git-info": "~2.5.0",
+ "hosted-git-info": "^2.6.0",
"iferr": "~0.1.5",
"inflight": "~1.0.6",
"inherits": "~2.0.3",
- "ini": "~1.3.4",
- "init-package-json": "~1.10.1",
+ "ini": "^1.3.5",
+ "init-package-json": "^1.10.3",
"is-cidr": "~1.0.0",
+ "json-parse-better-errors": "^1.0.1",
"lazy-property": "~1.0.0",
- "libnpx": "~9.7.1",
+ "libcipm": "^1.6.0",
+ "libnpx": "^10.0.1",
"lockfile": "~1.0.3",
"lodash._baseuniq": "~4.6.0",
"lodash.clonedeep": "~4.5.0",
@@ -76,59 +79,59 @@
"lodash.without": "~4.4.0",
"lru-cache": "~4.1.1",
"meant": "~1.0.1",
- "mississippi": "~1.3.0",
+ "mississippi": "^3.0.0",
"mkdirp": "~0.5.1",
"move-concurrently": "^1.0.1",
"nopt": "~4.0.1",
"normalize-package-data": "~2.4.0",
"npm-cache-filename": "~1.0.2",
"npm-install-checks": "~3.0.0",
- "npm-lifecycle": "~2.0.0",
+ "npm-lifecycle": "^2.0.1",
"npm-package-arg": "~6.0.0",
"npm-packlist": "~1.1.10",
- "npm-profile": "~2.0.5",
- "npm-registry-client": "~8.5.0",
+ "npm-profile": "^3.0.1",
+ "npm-registry-client": "^8.5.1",
"npm-user-validate": "~1.0.0",
"npmlog": "~4.1.2",
"once": "~1.4.0",
"opener": "~1.4.3",
- "osenv": "~0.1.4",
- "pacote": "^7.0.2",
+ "osenv": "^0.1.5",
+ "pacote": "^7.6.1",
"path-is-inside": "~1.0.2",
"promise-inflight": "~1.0.1",
"qrcode-terminal": "~0.11.0",
- "query-string": "~5.0.1",
+ "query-string": "^5.1.0",
"qw": "~1.0.1",
"read": "~1.0.7",
"read-cmd-shim": "~1.0.1",
"read-installed": "~4.0.3",
- "read-package-json": "~2.0.12",
+ "read-package-json": "^2.0.13",
"read-package-tree": "~5.1.6",
- "readable-stream": "~2.3.3",
+ "readable-stream": "^2.3.5",
"request": "~2.83.0",
"retry": "~0.10.1",
"rimraf": "~2.6.2",
"safe-buffer": "~5.1.1",
- "semver": "~5.4.1",
+ "semver": "^5.5.0",
"sha": "~2.0.1",
"slide": "~1.1.6",
"sorted-object": "~2.0.1",
"sorted-union-stream": "~2.1.3",
- "ssri": "~5.0.0",
+ "ssri": "^5.2.4",
"strip-ansi": "~4.0.0",
- "tar": "^4.0.2",
+ "tar": "^4.4.0",
"text-table": "~0.2.0",
"uid-number": "0.0.6",
"umask": "~1.1.0",
"unique-filename": "~1.1.0",
"unpipe": "~1.0.0",
"update-notifier": "~2.3.0",
- "uuid": "~3.1.0",
+ "uuid": "^3.2.1",
"validate-npm-package-name": "~3.0.0",
"which": "~1.3.0",
- "worker-farm": "~1.5.1",
+ "worker-farm": "^1.5.4",
"wrappy": "~1.0.2",
- "write-file-atomic": "~2.1.0"
+ "write-file-atomic": "^2.3.0"
},
"bundleDependencies": [
"abbrev",
@@ -148,6 +151,7 @@
"config-chain",
"debuglog",
"detect-indent",
+ "detect-newline",
"dezalgo",
"editor",
"find-npm-prefix",
@@ -165,8 +169,10 @@
"ini",
"init-package-json",
"is-cidr",
+ "json-parse-better-errors",
"JSONStream",
"lazy-property",
+ "libcipm",
"libnpx",
"lockfile",
"lodash._baseindexof",
@@ -240,15 +246,15 @@
],
"devDependencies": {
"deep-equal": "~1.0.1",
- "marked": "~0.3.6",
+ "marked": "^0.3.17",
"marked-man": "~0.2.1",
- "npm-registry-couchapp": "~2.7.0",
+ "npm-registry-couchapp": "^2.7.1",
"npm-registry-mock": "~1.1.0",
"require-inject": "~1.4.2",
"sprintf-js": "~1.1.1",
"standard": "~6.0.8",
"tacks": "~1.2.6",
- "tap": "~10.7.2"
+ "tap": "^11.1.2"
},
"scripts": {
"dumpconf": "env | grep npm | sort | uniq",
diff --git a/deps/npm/scripts/maketest b/deps/npm/scripts/maketest
index a71cadbc8c..e3105b5c0f 100755
--- a/deps/npm/scripts/maketest
+++ b/deps/npm/scripts/maketest
@@ -1,6 +1,6 @@
#!/usr/bin/env node
'use strict'
-var loadFromDir = require('tacks/load-from-dir.js')
+const loadFromDir = require('tacks/load-from-dir.js')
process.exit(main(process.argv.slice(2)))
@@ -9,7 +9,7 @@ function main (argv) {
console.error('Usage: maketest <fixturedir>')
return 1
}
- var fixturedir = process.argv[2]
+ const fixturedir = process.argv[2]
console.log(generateFromDir(fixturedir))
return 0
@@ -20,25 +20,25 @@ function indent (ind, str) {
}
function generateFromDir (dir) {
- var tacks = loadFromDir(dir)
+ const tacks = loadFromDir(dir)
return `'use strict'
-var path = require('path')
-var test = require('tap').test
-var mr = require('npm-registry-mock')
-var Tacks = require('tacks')
-var File = Tacks.File
-var Symlink = Tacks.Symlink
-var Dir = Tacks.Dir
-var extend = Object.assign || require('util')._extend
-var common = require('../common-tap.js')
+const path = require('path')
+const test = require('tap').test
+const mr = require('npm-registry-mock')
+const Tacks = require('tacks')
+const File = Tacks.File
+const Symlink = Tacks.Symlink
+const Dir = Tacks.Dir
+const extend = Object.assign || require('util')._extend
+const common = require('../common-tap.js')
-var basedir = path.join(__dirname, path.basename(__filename, '.js'))
-var testdir = path.join(basedir, 'testdir')
-var cachedir = path.join(basedir, 'cache')
-var globaldir = path.join(basedir, 'global')
-var tmpdir = path.join(basedir, 'tmp')
+const basedir = path.join(__dirname, path.basename(__filename, '.js'))
+const testdir = path.join(basedir, 'testdir')
+const cachedir = path.join(basedir, 'cache')
+const globaldir = path.join(basedir, 'global')
+const tmpdir = path.join(basedir, 'tmp')
-var conf = {
+const conf = {
cwd: testdir,
env: extend(extend({}, process.env), {
npm_config_cache: cachedir,
@@ -49,8 +49,8 @@ var conf = {
})
}
-var server
-var fixture = new Tacks(Dir({
+let server
+const fixture = new Tacks(Dir({
cache: Dir(),
global: Dir(),
tmp: Dir(),
diff --git a/deps/npm/test/broken-under-nyc-and-travis/lifecycle-path.js b/deps/npm/test/broken-under-nyc-and-travis/lifecycle-path.js
index 61fe229bcf..5804eb59a8 100644
--- a/deps/npm/test/broken-under-nyc-and-travis/lifecycle-path.js
+++ b/deps/npm/test/broken-under-nyc-and-travis/lifecycle-path.js
@@ -162,7 +162,7 @@ function checkPath (testconfig, t) {
})
// get the ones we tacked on, then the system-specific requirements
- var expectedPaths = ['{{ROOT}}/bin/node-gyp-bin',
+ var expectedPaths = ['{{ROOT}}/node_modules/npm-lifecycle/node-gyp-bin',
'{{PKG}}/node_modules/.bin']
// Check that the behaviour matches the configuration that was actually
diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js
index 375c3ab262..c0f302eef5 100644
--- a/deps/npm/test/tap/adduser-always-auth.js
+++ b/deps/npm/test/tap/adduser-always-auth.js
@@ -35,8 +35,11 @@ function mocks (server) {
server.filteringRequestBody(function (r) {
if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) {
return 'auth'
+ } else {
+ return 'invalid'
}
})
+ server.post('/-/v1/login', 'invalid').reply(404, 'not found')
server.put('/-/user/org.couchdb.user:u', 'auth')
.reply(201, { username: 'u', password: 'p', email: 'u@p.me' })
}
diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js
index 67292cf06a..677d378d89 100644
--- a/deps/npm/test/tap/adduser-legacy-auth.js
+++ b/deps/npm/test/tap/adduser-legacy-auth.js
@@ -25,8 +25,11 @@ function mocks (server) {
server.filteringRequestBody(function (r) {
if (r.match(/"_id":"org\.couchdb\.user:u"/)) {
return 'auth'
+ } else {
+ return 'invalid'
}
})
+ server.post('/-/v1/login', 'invalid').reply(404, 'not found')
server.put('/-/user/org.couchdb.user:u', 'auth')
.reply(409, { error: 'user exists' })
server.get('/-/user/org.couchdb.user:u?write=true')
diff --git a/deps/npm/test/tap/adduser-oauth.js b/deps/npm/test/tap/adduser-oauth.js
index dc4ff895e0..20159bcebd 100644
--- a/deps/npm/test/tap/adduser-oauth.js
+++ b/deps/npm/test/tap/adduser-oauth.js
@@ -20,8 +20,11 @@ function mocks (server) {
server.filteringRequestBody(function (r) {
if (r.match(/"_id":"org\.couchdb\.user:npm_oauth_auth_dummy_user"/)) {
return 'auth'
+ } else {
+ return 'invalid'
}
})
+ server.post('/-/v1/login', 'invalid').reply(404, 'not found')
server.put('/-/user/org.couchdb.user:npm_oauth_auth_dummy_user', 'auth')
.reply(201, { token: 'foo', sso: ssoUri })
}
diff --git a/deps/npm/test/tap/adduser-saml.js b/deps/npm/test/tap/adduser-saml.js
index 7fd1da2392..a7941f6d6a 100644
--- a/deps/npm/test/tap/adduser-saml.js
+++ b/deps/npm/test/tap/adduser-saml.js
@@ -20,8 +20,11 @@ function mocks (server) {
server.filteringRequestBody(function (r) {
if (r.match(/"_id":"org\.couchdb\.user:npm_saml_auth_dummy_user"/)) {
return 'auth'
+ } else {
+ return 'invalid'
}
})
+ server.post('/-/v1/login', 'invalid').reply(404, 'not found')
server.put('/-/user/org.couchdb.user:npm_saml_auth_dummy_user', 'auth')
.reply(201, { token: 'foo', sso: ssoUri })
}
diff --git a/deps/npm/test/tap/auto-prune.js b/deps/npm/test/tap/auto-prune.js
new file mode 100644
index 0000000000..00d01675c5
--- /dev/null
+++ b/deps/npm/test/tap/auto-prune.js
@@ -0,0 +1,148 @@
+'use strict'
+const path = require('path')
+const test = require('tap').test
+const mr = require('npm-registry-mock')
+const Tacks = require('tacks')
+const File = Tacks.File
+const Dir = Tacks.Dir
+const extend = Object.assign || require('util')._extend
+const common = require('../common-tap.js')
+
+const basedir = path.join(__dirname, path.basename(__filename, '.js'))
+const testdir = path.join(basedir, 'testdir')
+const cachedir = path.join(basedir, 'cache')
+const globaldir = path.join(basedir, 'global')
+const tmpdir = path.join(basedir, 'tmp')
+
+const conf = {
+ cwd: testdir,
+ env: extend(extend({}, process.env), {
+ npm_config_cache: cachedir,
+ npm_config_tmp: tmpdir,
+ npm_config_prefix: globaldir,
+ npm_config_registry: common.registry,
+ npm_config_loglevel: 'warn'
+ })
+}
+
+let server
+const fixture = new Tacks(Dir({
+ cache: Dir(),
+ global: Dir(),
+ tmp: Dir(),
+ testdir: Dir({
+ node_modules: Dir({
+ minimist: Dir({
+ 'package.json': File({
+ _integrity: 'sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=',
+ _resolved: 'https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz',
+ name: 'minimist',
+ version: '0.0.8'
+ })
+ }),
+ mkdirp: Dir({
+ 'package.json': File({
+ _integrity: 'sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=',
+ _resolved: 'https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz',
+ dependencies: {
+ minimist: '0.0.8'
+ },
+ name: 'mkdirp',
+ version: '0.5.1'
+ })
+ }),
+ null: Dir({
+ 'package.json': File({
+ _integrity: 'sha1-WoIdUnAxMlyG06AasQFzKgkfoew=',
+ _resolved: 'https://registry.npmjs.org/null/-/null-1.0.1.tgz',
+ _spec: 'null',
+ name: 'null',
+ version: '1.0.1'
+ })
+ })
+ }),
+ 'package-lock.json': File({
+ name: 'with-lock',
+ version: '1.0.0',
+ lockfileVersion: 1,
+ requires: true,
+ dependencies: {
+ minimist: {
+ version: '0.0.8',
+ resolved: 'https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz',
+ integrity: 'sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0='
+ },
+ mkdirp: {
+ version: '0.5.1',
+ resolved: 'https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz',
+ integrity: 'sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=',
+ requires: {
+ minimist: '0.0.8'
+ }
+ }
+ }
+ }),
+ 'package.json': File({
+ name: 'with-lock',
+ version: '1.0.0',
+ dependencies: {
+ mkdirp: '^0.5.1'
+ }
+ })
+ })
+}))
+
+function setup () {
+ cleanup()
+ fixture.create(basedir)
+}
+
+function cleanup () {
+ fixture.remove(basedir)
+}
+
+test('setup', function (t) {
+ setup()
+ mr({port: common.port, throwOnUnmatched: true}, function (err, s) {
+ if (err) throw err
+ server = s
+ t.done()
+ })
+})
+
+test('auto-prune w/ package-lock', function (t) {
+ common.npm(['install', '--dry-run', '--json'], conf, function (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'command ran ok')
+ t.comment(stderr.trim())
+ const result = JSON.parse(stdout)
+ t.is(result.added.length, 0, 'nothing added')
+ t.is(result.updated.length, 0, 'nothing updated')
+ t.is(result.moved.length, 0, 'nothing moved')
+ t.is(result.failed.length, 0, 'nothing failed')
+ t.is(result.removed.length, 1, 'pruned 1')
+ t.like(result, {'removed': [{'name': 'null'}]}, 'pruned the right one')
+ t.done()
+ })
+})
+
+test('auto-prune w/ --no-package-lock', function (t) {
+ common.npm(['install', '--dry-run', '--json', '--no-package-lock'], conf, function (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'command ran ok')
+ t.comment(stderr.trim())
+ const result = JSON.parse(stdout)
+ t.is(result.added.length, 0, 'nothing added')
+ t.is(result.updated.length, 0, 'nothing updated')
+ t.is(result.moved.length, 0, 'nothing moved')
+ t.is(result.failed.length, 0, 'nothing failed')
+ t.is(result.removed.length, 0, 'nothing pruned')
+ t.done()
+ })
+})
+
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+ t.done()
+})
diff --git a/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js b/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js
deleted file mode 100644
index a7056408a9..0000000000
--- a/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var test = require('tap').test
-var path = require('path')
-var fs = require('graceful-fs')
-
-var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
-var common = require('../common-tap.js')
-
-var dir = path.resolve(__dirname, 'bundled-dependencies-no-pkgjson')
-var pkg = path.resolve(dir, 'pkg-with-bundled-dep')
-var dep = path.resolve(pkg, 'node_modules', 'a-bundled-dep')
-
-var pkgJson = JSON.stringify({
- name: 'pkg-with-bundled-dep',
- version: '1.0.0',
- dependencies: {
- },
- bundledDependencies: [
- 'a-bundled-dep'
- ]
-}, null, 2) + '\n'
-var packed
-
-test('setup', function (t) {
- rimraf.sync(dir)
- mkdirp.sync(path.join(dir, 'node_modules'))
- mkdirp.sync(dep)
-
- fs.writeFileSync(path.resolve(pkg, 'package.json'), pkgJson)
- fs.writeFileSync(path.resolve(dep, 'index.js'), '')
- common.npm(['pack', pkg], {cwd: dir}, function (err, code, stdout, stderr) {
- if (err) throw err
- t.is(code, 0, 'packed ok')
- packed = stdout.trim()
- t.comment(stderr)
- t.end()
- })
-})
-
-test('proper error on bundled dep with no package.json', function (t) {
- t.plan(2)
- var npmArgs = ['install', packed]
-
- common.npm(npmArgs, { cwd: dir }, function (err, code, stdout, stderr) {
- if (err) throw err
- t.notEqual(code, 0, 'npm ended in error')
- t.like(stderr, /ENOENT/, 'ENOENT should be in stderr')
- t.end()
- })
-})
-
-test('cleanup', function (t) {
- rimraf.sync(dir)
- t.end()
-})
diff --git a/deps/npm/test/tap/ci.js b/deps/npm/test/tap/ci.js
new file mode 100644
index 0000000000..5a67b57e77
--- /dev/null
+++ b/deps/npm/test/tap/ci.js
@@ -0,0 +1,304 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const common = BB.promisifyAll(require('../common-tap.js'))
+const fs = BB.promisifyAll(require('fs'))
+const mr = BB.promisify(require('npm-registry-mock'))
+const path = require('path')
+const rimraf = BB.promisify(require('rimraf'))
+const Tacks = require('tacks')
+const test = require('tap').test
+
+const Dir = Tacks.Dir
+const File = Tacks.File
+const testDir = path.join(__dirname, 'ci')
+
+const EXEC_OPTS = { cwd: testDir }
+
+const PKG = {
+ name: 'top',
+ version: '1.2.3',
+ dependencies: {
+ optimist: '0.6.0',
+ clean: '2.1.6'
+ }
+}
+let RAW_LOCKFILE
+let SERVER
+let TREE
+
+function scrubFrom (tree) {
+ // npm ci and npm i write different `from` fields for dependency deps. This
+ // is fine any ok, but it messes with `t.deepEqual` comparisons.
+ function _scrubFrom (deps) {
+ Object.keys(deps).forEach((k) => {
+ deps[k].from = ''
+ if (deps[k].dependencies) { _scrubFrom(deps[k].dependencies) }
+ })
+ }
+ tree.dependencies && _scrubFrom(tree.dependencies)
+}
+
+test('setup', () => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG)
+ }))
+ fixture.create(testDir)
+ return mr({port: common.port})
+ .then((server) => {
+ SERVER = server
+ return common.npm([
+ 'install',
+ '--registry', common.registry
+ ], EXEC_OPTS)
+ .then(() => fs.readFileAsync(
+ path.join(testDir, 'package-lock.json'),
+ 'utf8')
+ )
+ .then((lock) => {
+ RAW_LOCKFILE = lock
+ })
+ .then(() => common.npm(['ls', '--json'], EXEC_OPTS))
+ .then((ret) => {
+ TREE = scrubFrom(JSON.parse(ret[1]))
+ })
+ })
+})
+
+test('basic installation', (t) => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG),
+ 'package-lock.json': File(RAW_LOCKFILE)
+ }))
+ return rimraf(testDir)
+ .then(() => fixture.create(testDir))
+ .then(() => common.npm([
+ 'ci',
+ '--registry', common.registry,
+ '--loglevel', 'warn'
+ ], EXEC_OPTS))
+ .then((ret) => {
+ const code = ret[0]
+ const stdout = ret[1]
+ const stderr = ret[2]
+ t.equal(code, 0, 'command completed without error')
+ t.equal(stdout.trim(), '', 'no output on stdout')
+ t.match(
+ stderr.trim(),
+ /^added 6 packages in \d+(?:\.\d+)?s$/,
+ 'no warnings on stderr, and final output has right number of packages'
+ )
+ return fs.readdirAsync(path.join(testDir, 'node_modules'))
+ })
+ .then((modules) => {
+ t.deepEqual(modules.sort(), [
+ 'async', 'checker', 'clean', 'minimist', 'optimist', 'wordwrap'
+ ], 'packages installed')
+ return BB.all(modules.map((mod) => {
+ return fs.readFileAsync(
+ path.join(testDir, 'node_modules', mod, 'package.json')
+ )
+ .then((f) => JSON.parse(f))
+ .then((pkgjson) => {
+ t.equal(pkgjson.name, mod, `${mod} package name correct`)
+ t.match(
+ pkgjson._integrity,
+ /sha\d+-[a-z0-9=+/]+$/i,
+ `${mod} pkgjson has _integrity`
+ )
+ t.match(
+ pkgjson._resolved,
+ new RegExp(`http.*/-/${mod}-${pkgjson.version}.tgz`),
+ `${mod} pkgjson has correct _resolved`
+ )
+ t.match(
+ pkgjson._from,
+ new RegExp(`${mod}@.*`),
+ `${mod} pkgjson has _from field`
+ )
+ })
+ }))
+ })
+ .then(() => fs.readFileAsync(
+ path.join(testDir, 'package-lock.json'),
+ 'utf8')
+ )
+ .then((lock) => t.equal(lock, RAW_LOCKFILE, 'package-lock.json unchanged'))
+ .then(() => common.npm(['ls', '--json'], EXEC_OPTS))
+ .then((ret) => {
+ const lsResult = JSON.parse(ret[1])
+ t.equal(ret[0], 0, 'ls exited successfully')
+ t.deepEqual(scrubFrom(lsResult), TREE, 'tree matches one from `install`')
+ })
+})
+
+test('supports npm-shrinkwrap.json as well', (t) => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG),
+ 'npm-shrinkwrap.json': File(RAW_LOCKFILE)
+ }))
+ return rimraf(testDir)
+ .then(() => fixture.create(testDir))
+ .then(() => common.npm([
+ 'ci',
+ '--registry', common.registry,
+ '--loglevel', 'warn'
+ ], EXEC_OPTS))
+ .then((ret) => {
+ const code = ret[0]
+ const stdout = ret[1]
+ const stderr = ret[2]
+ t.equal(code, 0, 'command completed without error')
+ t.equal(stdout.trim(), '', 'no output on stdout')
+ t.match(
+ stderr.trim(),
+ /^added 6 packages in \d+(?:\.\d+)?s$/,
+ 'no warnings on stderr, and final output has right number of packages'
+ )
+ })
+ .then(() => common.npm(['ls', '--json'], EXEC_OPTS))
+ .then((ret) => {
+ t.equal(ret[0], 0, 'ls exited successfully')
+ t.deepEqual(
+ scrubFrom(JSON.parse(ret[1])),
+ TREE,
+ 'tree matches one from `install`'
+ )
+ })
+ .then(() => fs.readFileAsync(
+ path.join(testDir, 'npm-shrinkwrap.json'),
+ 'utf8')
+ )
+ .then((lock) => t.equal(lock, RAW_LOCKFILE, 'npm-shrinkwrap.json unchanged'))
+ .then(() => fs.readdirAsync(path.join(testDir)))
+ .then((files) => t.notOk(
+ files.some((f) => f === 'package-lock.json'),
+ 'no package-lock.json created'
+ ))
+})
+
+test('removes existing node_modules/ before installing', (t) => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG),
+ 'package-lock.json': File(RAW_LOCKFILE),
+ 'node_modules': Dir({
+ foo: Dir({
+ 'index.js': File('"hello world"')
+ })
+ })
+ }))
+ return rimraf(testDir)
+ .then(() => fixture.create(testDir))
+ .then(() => common.npm([
+ 'ci',
+ '--registry', common.registry,
+ '--loglevel', 'warn'
+ ], EXEC_OPTS))
+ .then((ret) => {
+ const code = ret[0]
+ const stdout = ret[1]
+ const stderr = ret[2]
+ t.equal(code, 0, 'command completed without error')
+ t.equal(stdout.trim(), '', 'no output on stdout')
+ t.match(
+ stderr.trim(),
+ /^npm.*WARN.*removing existing node_modules/,
+ 'user warned that existing node_modules were removed'
+ )
+ return fs.readdirAsync(path.join(testDir, 'node_modules'))
+ })
+ .then((modules) => {
+ t.deepEqual(modules.sort(), [
+ 'async', 'checker', 'clean', 'minimist', 'optimist', 'wordwrap'
+ ], 'packages installed, with old node_modules dir gone')
+ })
+ .then(() => common.npm(['ls'], EXEC_OPTS))
+ .then((ret) => t.equal(ret[0], 0, 'ls exited successfully'))
+ .then(() => fs.readFileAsync(
+ path.join(testDir, 'package-lock.json'),
+ 'utf8')
+ )
+ .then((lock) => t.equal(lock, RAW_LOCKFILE, 'package-lock.json unchanged'))
+})
+
+test('installs all package types correctly')
+
+test('errors if package-lock.json missing', (t) => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG)
+ }))
+ return rimraf(testDir)
+ .then(() => fixture.create(testDir))
+ .then(() => common.npm([
+ 'ci',
+ '--registry', common.registry,
+ '--loglevel', 'warn'
+ ], EXEC_OPTS))
+ .then((ret) => {
+ const code = ret[0]
+ const stdout = ret[1]
+ const stderr = ret[2]
+ t.equal(code, 1, 'command errored')
+ t.equal(stdout.trim(), '', 'no output on stdout')
+ t.match(
+ stderr.trim(),
+ /can only install packages with an existing package-lock/i,
+ 'user informed about the issue'
+ )
+ return fs.readdirAsync(path.join(testDir))
+ })
+ .then((dir) => {
+ t.notOk(dir.some((f) => f === 'node_modules'), 'no node_modules installed')
+ t.notOk(
+ dir.some((f) => f === 'package-lock.json'),
+ 'no package-lock.json created'
+ )
+ })
+})
+
+test('errors if package-lock.json invalid', (t) => {
+ const badJson = JSON.parse(RAW_LOCKFILE)
+ delete badJson.dependencies.optimist
+ const fixture = new Tacks(Dir({
+ 'package.json': File(PKG),
+ 'package-lock.json': File(badJson)
+ }))
+ return rimraf(testDir)
+ .then(() => fixture.create(testDir))
+ .then(() => common.npm([
+ 'ci',
+ '--registry', common.registry,
+ '--loglevel', 'warn'
+ ], EXEC_OPTS))
+ .then((ret) => {
+ const code = ret[0]
+ const stdout = ret[1]
+ const stderr = ret[2]
+ t.equal(code, 1, 'command errored')
+ t.equal(stdout.trim(), '', 'no output on stdout')
+ t.match(
+ stderr.trim(),
+ /can only install packages when your package.json/i,
+ 'user informed about the issue'
+ )
+ return fs.readdirAsync(path.join(testDir))
+ })
+ .then((dir) => {
+ t.notOk(dir.some((f) => f === 'node_modules'), 'no node_modules installed')
+ })
+ .then(() => fs.readFileAsync(
+ path.join(testDir, 'package-lock.json'),
+ 'utf8')
+ )
+ .then((lock) => t.deepEqual(
+ JSON.parse(lock),
+ badJson,
+ 'bad package-lock.json left unchanged')
+ )
+})
+
+test('cleanup', () => {
+ SERVER.close()
+ return rimraf(testDir)
+})
diff --git a/deps/npm/test/tap/config-envReplace.js b/deps/npm/test/tap/config-envReplace.js
new file mode 100644
index 0000000000..edec9e40db
--- /dev/null
+++ b/deps/npm/test/tap/config-envReplace.js
@@ -0,0 +1,55 @@
+const fs = require('fs')
+const mkdirp = require('mkdirp')
+const rimraf = require('rimraf')
+const path = require('path')
+const ini = require('ini')
+const test = require('tap').test
+const npmconf = require('../../lib/config/core.js')
+
+const packagePath = path.resolve(__dirname, 'config-envReplace')
+
+const packageJsonFile = JSON.stringify({
+ name: 'config-envReplace'
+})
+
+const inputConfigFile = [
+ 'registry=${NPM_REGISTRY_URL}',
+ '//${NPM_REGISTRY_HOST}/:_authToken=${NPM_AUTH_TOKEN}',
+ 'always-auth=true',
+ ''
+].join('\n')
+
+const expectConfigFile = [
+ 'registry=http://my.registry.com/',
+ '//my.registry.com/:_authToken=xxxxxxxxxxxxxxx',
+ 'always-auth=true',
+ ''
+].join('\n')
+
+test('environment variables replacing in configs', function (t) {
+ process.env = Object.assign(process.env, {
+ NPM_REGISTRY_URL: 'http://my.registry.com/',
+ NPM_REGISTRY_HOST: 'my.registry.com',
+ NPM_AUTH_TOKEN: 'xxxxxxxxxxxxxxx'
+ })
+ mkdirp.sync(packagePath)
+ const packageJsonPath = path.resolve(packagePath, 'package.json')
+ const configPath = path.resolve(packagePath, '.npmrc')
+ fs.writeFileSync(packageJsonPath, packageJsonFile)
+ fs.writeFileSync(configPath, inputConfigFile)
+
+ const originalCwdPath = process.cwd()
+ process.chdir(packagePath)
+ npmconf.load(function (error, conf) {
+ if (error) throw error
+
+ const foundConfigFile = ini.stringify(conf.sources.project.data)
+ t.same(ini.parse(foundConfigFile), ini.parse(expectConfigFile))
+
+ fs.unlinkSync(packageJsonPath)
+ fs.unlinkSync(configPath)
+ rimraf.sync(packagePath)
+ process.chdir(originalCwdPath)
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/config-list.js b/deps/npm/test/tap/config-list.js
index b06dc154b2..05402d4bbe 100644
--- a/deps/npm/test/tap/config-list.js
+++ b/deps/npm/test/tap/config-list.js
@@ -6,7 +6,7 @@ var mkdirp = require('mkdirp')
var common = require('../common-tap.js')
var pkg = path.resolve(__dirname, 'config-list')
-var opts = { cwd: pkg }
+var opts = { cwd: pkg, env: common.emptyEnv() }
var npmrc = path.resolve(pkg, '.npmrc')
var npmrcContents = `
_private=private;
diff --git a/deps/npm/test/tap/install-contributors-count.js b/deps/npm/test/tap/install-contributors-count.js
new file mode 100644
index 0000000000..52fba0fd24
--- /dev/null
+++ b/deps/npm/test/tap/install-contributors-count.js
@@ -0,0 +1,70 @@
+'use strict'
+var path = require('path')
+var test = require('tap').test
+var Tacks = require('tacks')
+var Dir = Tacks.Dir
+var File = Tacks.File
+var common = require('../common-tap.js')
+
+var testdir = path.resolve(__dirname, path.basename(__filename, '.js'))
+var fixture = new Tacks(Dir({
+ node_modules: Dir({
+ a: Dir({
+ 'package.json': File({
+ name: 'a',
+ version: '1.0.0',
+ dependencies: {
+ b: '1.0.0'
+ }
+ }),
+ node_modules: Dir({
+ b: Dir({
+ 'package.json': File({
+ name: 'b',
+ version: '1.0.0'
+ })
+ })
+ })
+ })
+ }),
+ 'b-src': Dir({
+ 'package.json': File({
+ name: 'b',
+ author: 'Author Contributor',
+ contributors: [
+ {name: 'Author Contributor'},
+ 'Another Contributor'
+ ],
+ version: '1.0.0'
+ })
+ })
+}))
+
+function setup () {
+ cleanup()
+ fixture.create(testdir)
+}
+
+function cleanup () {
+ fixture.remove(testdir)
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('install', function (t) {
+ common.npm(['install', '--no-save', './b-src'], {cwd: testdir}, function (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'installed successfully')
+ t.is(stderr, '', 'no warnings')
+ t.includes(stdout, 'added 1 package from 2 contributors', 'lists number of unique contributors')
+ t.end()
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
diff --git a/deps/npm/test/tap/install-save-consistent-newlines.js b/deps/npm/test/tap/install-save-consistent-newlines.js
new file mode 100644
index 0000000000..6250377445
--- /dev/null
+++ b/deps/npm/test/tap/install-save-consistent-newlines.js
@@ -0,0 +1,122 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+
+const mkdirp = require('mkdirp')
+const mr = require('npm-registry-mock')
+const osenv = require('osenv')
+const rimraf = require('rimraf')
+const test = require('tap').test
+
+const common = require('../common-tap.js')
+
+const pkg = path.join(__dirname, 'install-save-consistent-newlines')
+
+const EXEC_OPTS = { cwd: pkg }
+
+const json = {
+ name: 'install-save-consistent-newlines',
+ version: '0.0.1',
+ description: 'fixture'
+}
+
+var server
+
+test('setup', function (t) {
+ setup('\n')
+ mr({ port: common.port }, function (er, s) {
+ server = s
+ t.end()
+ })
+})
+
+test('\'npm install --save\' should keep the original package.json line endings (LF)', function (t) {
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ '--save',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm install exited without raising an error code')
+
+ const pkgPath = path.resolve(pkg, 'package.json')
+ const pkgStr = fs.readFileSync(pkgPath, 'utf8')
+
+ t.match(pkgStr, '\n')
+ t.notMatch(pkgStr, '\r')
+
+ const pkgLockPath = path.resolve(pkg, 'package-lock.json')
+ const pkgLockStr = fs.readFileSync(pkgLockPath, 'utf8')
+
+ t.match(pkgLockStr, '\n')
+ t.notMatch(pkgLockStr, '\r')
+
+ t.end()
+ }
+ )
+})
+
+test('\'npm install --save\' should keep the original package.json line endings (CRLF)', function (t) {
+ setup('\r\n')
+
+ common.npm(
+ [
+ '--loglevel', 'silent',
+ '--registry', common.registry,
+ '--save',
+ 'install', 'underscore@1.3.1'
+ ],
+ EXEC_OPTS,
+ function (err, code) {
+ t.ifError(err, 'npm ran without issue')
+ t.notOk(code, 'npm install exited without raising an error code')
+
+ const pkgPath = path.resolve(pkg, 'package.json')
+ const pkgStr = fs.readFileSync(pkgPath, 'utf8')
+
+ t.match(pkgStr, '\r\n')
+ t.notMatch(pkgStr, /[^\r]\n/)
+
+ const pkgLockPath = path.resolve(pkg, 'package-lock.json')
+ const pkgLockStr = fs.readFileSync(pkgLockPath, 'utf8')
+
+ t.match(pkgLockStr, '\r\n')
+ t.notMatch(pkgLockStr, /[^\r]\n/)
+
+ t.end()
+ }
+ )
+})
+
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+ t.end()
+})
+
+function cleanup () {
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(pkg)
+}
+
+function setup (lineEnding) {
+ cleanup()
+ mkdirp.sync(path.resolve(pkg, 'node_modules'))
+
+ var jsonStr = JSON.stringify(json, null, 2)
+
+ if (lineEnding === '\r\n') {
+ jsonStr = jsonStr.replace(/\n/g, '\r\n')
+ }
+
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ jsonStr
+ )
+ process.chdir(pkg)
+}
diff --git a/deps/npm/test/tap/override-bundled.js b/deps/npm/test/tap/override-bundled.js
index cf6049a128..493ebf4a5d 100644
--- a/deps/npm/test/tap/override-bundled.js
+++ b/deps/npm/test/tap/override-bundled.js
@@ -15,7 +15,7 @@ var testtgz = testmod + '-1.0.0.tgz'
var bundleupdatesrc = path.resolve(testmod, 'bundle-update')
var bundleupdatetgz = bundleupdatesrc + '-1.0.0.tgz'
var bundleupdateNEW = path.resolve(bundleupdatesrc, 'NEW')
-var bundleupdateNEWpostinstall = path.resolve(testdir, 'node_modules', 'top-test', 'node_modules', 'bundle-update', 'NEW')
+var bundleupdateNEWpostinstall = path.resolve(testdir, 'node_modules', 'bundle-update', 'NEW')
var bundleupdatebad = path.resolve(testmod, 'node_modules', 'bundle-update')
var bundlekeepsrc = path.resolve(testmod, 'bundle-keep')
@@ -34,8 +34,7 @@ var bundledeepupdatesrc = path.resolve(testmod, 'bundle-deep-update')
var bundledeepupdatetgz = bundledeepupdatesrc + '-1.0.0.tgz'
var bundledeepupdate = path.resolve(bundledeep, 'node_modules', 'bundle-deep-update')
var bundledeepupdateNEW = path.resolve(bundledeepupdatesrc, 'NEW')
-var bundledeepupdateNEWpostinstall = path.resolve(testdir, 'node_modules', 'top-test',
- 'node_modules', 'bundle-deep', 'node_modules', 'bundle-deep-update', 'NEW')
+var bundledeepupdateNEWpostinstall = path.resolve(testdir, 'node_modules', 'bundle-deep-update', 'NEW')
var testjson = {
dependencies: {'top-test': 'file:' + testtgz}
@@ -56,7 +55,6 @@ var bundlejson = {
name: 'bundle-update',
version: '1.0.0',
files: ['OLD', 'NEW']
-
}
var bundlekeepjson = {
@@ -65,6 +63,8 @@ var bundlekeepjson = {
_requested: {
rawSpec: bundlekeeptgz
},
+ _resolved: bundlekeeptgz,
+ _shasum: 'baadf00d',
files: ['OLD', 'NEW']
}
@@ -77,6 +77,8 @@ var bundledeepjson = {
_requested: {
rawSpec: bundledeeptgz
},
+ _resolved: bundlekeeptgz,
+ _shasum: 'deadbeef',
files: ['OLD', 'NEW']
}
diff --git a/deps/npm/test/tap/shrinkwrap-resolve-conflict.js b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js
new file mode 100644
index 0000000000..c06be7d59e
--- /dev/null
+++ b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js
@@ -0,0 +1,117 @@
+'use strict'
+
+const BB = require('bluebird')
+
+const common = require('../common-tap.js')
+const fs = BB.promisifyAll(require('fs'))
+const path = require('path')
+const rimraf = BB.promisify(require('rimraf'))
+const test = require('tap').test
+const Tacks = require('tacks')
+
+const File = Tacks.File
+const Dir = Tacks.Dir
+
+const testDir = path.resolve(__dirname, path.basename(__filename, '.js'))
+const modAdir = path.resolve(testDir, 'modA')
+const modBdir = path.resolve(testDir, 'modB')
+const modCdir = path.resolve(testDir, 'modC')
+
+test('conflicts in shrinkwrap are auto-resolved on install', (t) => {
+ const fixture = new Tacks(Dir({
+ 'package.json': File({
+ name: 'foo',
+ dependencies: {
+ modA: 'file://' + modAdir,
+ modB: 'file://' + modBdir
+ },
+ devDependencies: {
+ modC: 'file://' + modCdir
+ }
+ }),
+ 'npm-shrinkwrap.json': File(
+`
+{
+ "name": "foo",
+ "requires": true,
+ "lockfileVersion": 1,
+ "dependencies": {
+<<<<<<< HEAD
+ "modA": {
+ "version": "file:modA"
+||||||| merged common ancestors
+ "modB": {
+ "version": "file:modB"
+=======
+ "modC": {
+ "version": "file:modC",
+ "dev": true
+>>>>>>> branch
+ }
+ }
+}
+`),
+ 'modA': Dir({
+ 'package.json': File({
+ name: 'modA',
+ version: '1.0.0'
+ })
+ }),
+ 'modB': Dir({
+ 'package.json': File({
+ name: 'modB',
+ version: '1.0.0'
+ })
+ }),
+ 'modC': Dir({
+ 'package.json': File({
+ name: 'modC',
+ version: '1.0.0'
+ })
+ })
+ }))
+ fixture.create(testDir)
+ function readJson (file) {
+ return fs.readFileAsync(path.join(testDir, file)).then(JSON.parse)
+ }
+ return BB.fromNode((cb) => {
+ common.npm([
+ 'install',
+ '--loglevel', 'warn'
+ ], {cwd: testDir}, (err, code, out, stderr) => {
+ t.comment(stderr)
+ t.match(stderr, /warn.*conflict/gi, 'warns about a conflict')
+ cb(err || (code && new Error('non-zero exit code')) || null, out)
+ })
+ })
+ .then(() => BB.join(
+ readJson('npm-shrinkwrap.json'),
+ readJson('node_modules/modA/package.json'),
+ readJson('node_modules/modB/package.json'),
+ readJson('node_modules/modC/package.json'),
+ (lockfile, A, B, C) => {
+ t.deepEqual(lockfile, {
+ name: 'foo',
+ requires: true,
+ lockfileVersion: 1,
+ dependencies: {
+ modA: {
+ version: 'file:modA'
+ },
+ modB: {
+ version: 'file:modB'
+ },
+ modC: {
+ version: 'file:modC',
+ dev: true
+ }
+ }
+ }, 'resolved lockfile matches expectations')
+ t.equal(A.name, 'modA', 'installed modA')
+ t.equal(B.name, 'modB', 'installed modB')
+ t.equal(C.name, 'modC', 'installed modC')
+ }
+ ))
+})
+
+test('cleanup', () => rimraf(testDir))
diff --git a/deps/npm/test/tap/tagged-version-matching.js b/deps/npm/test/tap/tagged-version-matching.js
index 9d3f5f38e9..a04e749146 100644
--- a/deps/npm/test/tap/tagged-version-matching.js
+++ b/deps/npm/test/tap/tagged-version-matching.js
@@ -46,24 +46,6 @@ var fixture = new Tacks(Dir({
'package.json': File({
_from: 'npm/example-gitdep',
_id: 'gitdep@1.0.0',
- _requested: {
- raw: 'gitdep@git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- scope: null,
- escapedName: 'gitdep',
- name: 'gitdep',
- rawSpec: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- spec: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- type: 'hosted',
- hosted: {
- type: 'github',
- ssh: 'git@github.com:npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- sshUrl: 'git+ssh://git@github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- httpsUrl: 'git+https://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- gitUrl: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- shortcut: 'github:npm/example-gitdep#da39a3ee5e6b4b0d3255bfef95601890afd80709',
- directUrl: 'https://raw.githubusercontent.com/npm/example-gitdep/da39a3ee5e6b4b0d3255bfef95601890afd80709/package.json'
- }
- },
_resolved: 'github:npm/example-gitdep#da39a3ee5e6b4b0d3255bfef95601890afd80709',
name: 'gitdep',
version: '1.0.0'
@@ -74,15 +56,7 @@ var fixture = new Tacks(Dir({
_from: 'tagdep@latest',
_id: 'tagdep@1.0.0',
_integrity: 'sha1-0EJSKmsdk39848LlrRg/hZQo2B8=',
- _requested: {
- raw: 'tagdep@https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz',
- scope: null,
- escapedName: 'tagdep',
- name: 'tagdep',
- rawSpec: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz',
- spec: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz',
- type: 'remote'
- },
+ _resolved: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz',
name: 'tagdep',
version: '1.0.0'
})
@@ -102,7 +76,7 @@ var fixture = new Tacks(Dir({
example: {
version: 'file:example',
requires: {
- tagdep: '1.0.0',
+ tagdep: '^1.0.0',
gitdep: 'github:npm/example-gitdep#da39a3ee5e6b4b0d3255bfef95601890afd80709'
}
},
diff --git a/deps/npm/test/tap/unit-deps-earliestInstallable.js b/deps/npm/test/tap/unit-deps-earliestInstallable.js
index 538cfe6c09..8c5ca06ad8 100644
--- a/deps/npm/test/tap/unit-deps-earliestInstallable.js
+++ b/deps/npm/test/tap/unit-deps-earliestInstallable.js
@@ -2,6 +2,7 @@
var test = require('tap').test
var requireInject = require('require-inject')
var npa = require('npm-package-arg')
+var log = require('npmlog')
// we're just mocking to avoid having to call `npm.load`
var deps = requireInject('../../lib/install/deps.js', {
@@ -66,7 +67,7 @@ test('earliestInstallable should consider devDependencies', function (t) {
dep2a.parent = dep1
dep2.parent = pkg
- var earliest = earliestInstallable(dep1, dep1, dep2a.package)
+ var earliest = earliestInstallable(dep1, dep1, dep2a.package, log)
t.isDeeply(earliest, dep1, 'should hoist package when an incompatible devDependency is present')
t.end()
})
@@ -107,7 +108,7 @@ test('earliestInstallable should reuse shared prod/dev deps when they are identi
dep1.parent = pkg
dep2.parent = pkg
- var earliest = earliestInstallable(dep1, dep1, dep2.package)
+ var earliest = earliestInstallable(dep1, dep1, dep2.package, log)
t.isDeeply(earliest, pkg, 'should reuse identical shared dev/prod deps when installing both')
t.end()
})
diff --git a/deps/npm/test/tap/unit-token-validate-cidr.js b/deps/npm/test/tap/unit-token-validate-cidr.js
new file mode 100644
index 0000000000..db963c31f3
--- /dev/null
+++ b/deps/npm/test/tap/unit-token-validate-cidr.js
@@ -0,0 +1,19 @@
+'use strict'
+const test = require('tap').test
+const requireInject = require('require-inject')
+const validateCIDRList = requireInject('../../lib/token.js', {'../../lib/npm.js': {}})._validateCIDRList
+
+test('validateCIDRList', (t) => {
+ t.plan(10)
+ const single = ['127.0.0.0/24']
+ const double = ['127.0.0.0/24', '192.168.0.0/16']
+ const ipv6 = '2620:0:2d0:200::7/32'
+ const ipv6Mixed = ['127.0.0/24', '2620:0:2d0:200::7/32', '192.168.0.0/16']
+ t.doesNotThrow(() => t.isDeeply(validateCIDRList(single.join(',')), single), 'single string ipv4')
+ t.doesNotThrow(() => t.isDeeply(validateCIDRList(single), single), 'single array ipv4')
+ t.doesNotThrow(() => t.isDeeply(validateCIDRList(double.join(',')), double), 'double string ipv4')
+ t.doesNotThrow(() => t.isDeeply(validateCIDRList(double), double), 'double array ipv4')
+ t.throws(() => validateCIDRList(ipv6))
+ t.throws(() => validateCIDRList(ipv6Mixed))
+ t.done()
+})
diff --git a/deps/npm/test/tap/version-consistent-newlines.js b/deps/npm/test/tap/version-consistent-newlines.js
new file mode 100644
index 0000000000..11020b2a70
--- /dev/null
+++ b/deps/npm/test/tap/version-consistent-newlines.js
@@ -0,0 +1,91 @@
+'use strict'
+
+const common = require('../common-tap.js')
+const test = require('tap').test
+const npm = require('../../')
+const osenv = require('osenv')
+const path = require('path')
+const fs = require('fs')
+const mkdirp = require('mkdirp')
+const rimraf = require('rimraf')
+const requireInject = require('require-inject')
+
+const pkg = path.resolve(__dirname, 'version-no-git')
+const cache = path.resolve(pkg, 'cache')
+const gitDir = path.resolve(pkg, '.git')
+
+test('npm version does not alter the line endings in package.json (LF)', function (t) {
+ setup('\n')
+
+ npm.load({cache: cache, registry: common.registry}, function () {
+ const version = requireInject('../../lib/version', {
+ which: function (cmd, cb) {
+ process.nextTick(function () {
+ cb(new Error('ENOGIT!'))
+ })
+ }
+ })
+
+ version(['patch'], function (err) {
+ if (!t.error(err)) return t.end()
+
+ const pkgPath = path.resolve(pkg, 'package.json')
+ const pkgStr = fs.readFileSync(pkgPath, 'utf8')
+
+ t.match(pkgStr, '\n')
+ t.notMatch(pkgStr, '\r')
+
+ t.end()
+ })
+ })
+})
+
+test('npm version does not alter the line endings in package.json (CRLF)', function (t) {
+ setup('\r\n')
+
+ npm.load({cache: cache, registry: common.registry}, function () {
+ const version = requireInject('../../lib/version', {
+ which: function (cmd, cb) {
+ process.nextTick(function () {
+ cb(new Error('ENOGIT!'))
+ })
+ }
+ })
+
+ version(['patch'], function (err) {
+ if (!t.error(err)) return t.end()
+
+ const pkgPath = path.resolve(pkg, 'package.json')
+ const pkgStr = fs.readFileSync(pkgPath, 'utf8')
+
+ t.match(pkgStr, '\r\n')
+ t.notMatch(pkgStr, /[^\r]\n/)
+
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
+
+ rimraf.sync(pkg)
+ t.end()
+})
+
+function setup (lineEnding) {
+ mkdirp.sync(pkg)
+ mkdirp.sync(cache)
+ mkdirp.sync(gitDir)
+ fs.writeFileSync(
+ path.resolve(pkg, 'package.json'),
+ JSON.stringify({
+ author: 'Terin Stock',
+ name: 'version-no-git-test',
+ version: '0.0.0',
+ description: "Test for npm version if git binary doesn't exist"
+ }, null, 2).replace(/\n/g, lineEnding),
+ 'utf8'
+ )
+ process.chdir(pkg)
+}