summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules')
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md12
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js41
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js30
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json33
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml26
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md10
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js (renamed from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/http-proxy-agent.js)7
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js106
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js158
-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/README.md89
-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/dist/promise.js73
-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/dist/promisify.js85
-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.md122
-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/LICENSE19
-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.md82
-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/auto.js4
-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.js1159
-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.map1
-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.js1
-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.map1
-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.js1157
-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.map1
-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.js1
-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.map1
-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.ts74
-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.auto.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.js7
-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.js271
-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.js120
-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.js111
-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.js35
-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.js383
-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/all.js52
-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/race.js84
-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/reject.js46
-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/resolve.js48
-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/then.js32
-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/utils.js21
-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.json96
-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/package.json72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/README.md303
-rwxr-xr-xdeps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver133
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/package.json52
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js1200
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js173
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js698
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js181
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json32
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js64
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js347
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.jscs.json174
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.travis.yml179
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/CHANGELOG.md76
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/LICENSE22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/README.md80
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/component.json31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/index.js86
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/package.json79
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json34
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml26
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js (renamed from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/https-proxy-agent.js)26
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js106
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js158
-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/README.md89
-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/dist/promise.js73
-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/dist/promisify.js85
-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.md122
-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/LICENSE19
-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.md82
-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/auto.js4
-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.js1159
-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.map1
-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.js1
-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.map1
-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.js1157
-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.map1
-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.js1
-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.map1
-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.ts74
-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.auto.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.js7
-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.js271
-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.js120
-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.js111
-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.js35
-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.js383
-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/all.js52
-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/race.js84
-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/reject.js46
-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/resolve.js48
-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/then.js32
-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/utils.js21
-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.json96
-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/package.json72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/README.md303
-rwxr-xr-xdeps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver133
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/package.json52
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js1200
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js173
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js698
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js181
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json32
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js64
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js347
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.jscs.json174
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.travis.yml179
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/CHANGELOG.md76
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/LICENSE22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/README.md80
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/component.json31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/index.js86
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/package.json79
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js81
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js2
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json49
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml11
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md14
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/index.js (renamed from deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/socks-proxy-agent.js)32
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md37
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js106
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js158
-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/README.md89
-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/dist/promise.js73
-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/dist/promisify.js85
-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.md122
-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/LICENSE19
-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.md82
-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/auto.js4
-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.js1159
-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.map1
-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.js1
-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.map1
-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.js1157
-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.map1
-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.js1
-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.map1
-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.ts74
-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.auto.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.js7
-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.js271
-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.js120
-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.js111
-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.js35
-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.js383
-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/all.js52
-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/race.js84
-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/reject.js46
-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/resolve.js48
-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/then.js32
-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/utils.js21
-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.json96
-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/package.json72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml5
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE15
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/README.md303
-rwxr-xr-xdeps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver133
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/package.json52
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js1200
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js29
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js173
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js698
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js181
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js72
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json32
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js64
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js347
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.jscs.json174
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.npmignore1
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.travis.yml179
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/CHANGELOG.md76
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/LICENSE22
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/README.md80
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/component.json31
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/index.js86
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/package.json79
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json30
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js21
210 files changed, 14642 insertions, 11916 deletions
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 cbfd018266..e62374ef13 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,16 @@
+3.3.0 / 2017-06-20
+==================
+
+ * feat: add statusChanged getter (#51)
+ * chore: format License
+
+3.2.0 / 2017-06-10
+==================
+
+ * feat: add expiring active sockets
+ * test: add node 8 (#49)
+
3.1.0 / 2017-02-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 0dd51c7288..c8d8d2f3be 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
@@ -59,6 +59,9 @@ $ npm install agentkeepalive --save
* `maxFreeSockets` {Number} Maximum number of sockets to leave open
in a free state. Only relevant if `keepAlive` is set to `true`.
Default = `256`.
+ * `socketActiveTTL` {Number} Sets the socket active time to live, even if it's in use.
+ If not setted the behaviour continues the same (the socket will be released only when free)
+ Default = `null`.
## Usage
@@ -95,11 +98,17 @@ req.on('error', e => {
req.end();
setTimeout(() => {
- console.log('agent status: %j', keepaliveAgent.getCurrentStatus());
+ if (keepaliveAgent.statusChanged) {
+ console.log('[%s] agent status changed: %j', Date(), keepaliveAgent.getCurrentStatus());
+ }
}, 2000);
```
+### `getter agent.statusChanged`
+
+counters have change or not after last checkpoint.
+
### `agent.getCurrentStatus()`
`agent.getCurrentStatus()` will return a object to show the status of this agent:
@@ -212,10 +221,11 @@ Socket created:
## License
+```
(The MIT License)
-Copyright(c) 2012 - 2015 fengmk2 <fengmk2@gmail.com>
Copyright(c) node-modules and other contributors.
+Copyright(c) 2012 - 2015 fengmk2 <fengmk2@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -235,3 +245,4 @@ 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/agentkeepalive/lib/_http_agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
index 8b42294a98..57723d9c98 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
@@ -68,6 +68,8 @@ function Agent(options) {
self.freeSocketKeepAliveTimeout = self.options.freeSocketKeepAliveTimeout || 0;
// working socket timeout. By default working socket do not have a timeout.
self.timeout = self.options.timeout || 0;
+ // the socket active time to live, even if it's in use
+ this.socketActiveTTL = this.options.socketActiveTTL || null;
// [patch end]
self.on('free', function(socket, options) {
@@ -163,6 +165,20 @@ Agent.prototype.getName = function getName(options) {
return name;
};
+// [patch start]
+function handleSocketCreation(req) {
+ return function(err, newSocket) {
+ if (err) {
+ process.nextTick(function() {
+ req.emit('error', err);
+ });
+ return;
+ }
+ req.onSocket(newSocket);
+ }
+}
+// [patch end]
+
Agent.prototype.addRequest = function addRequest(req, options) {
// Legacy API: addRequest(req, host, port, localAddress)
if (typeof options === 'string') {
@@ -202,6 +218,12 @@ Agent.prototype.addRequest = function addRequest(req, options) {
socket.removeListener('error', freeSocketErrorListener);
// restart the default timer
socket.setTimeout(this.timeout);
+
+ if (this.socketActiveTTL && Date.now() - socket.createdTime > this.socketActiveTTL) {
+ debug(`socket ${socket.createdTime} expired`);
+ socket.destroy();
+ return this.createSocket(req, options, handleSocketCreation(req));
+ }
// [patch end]
// don't leak
@@ -214,15 +236,9 @@ Agent.prototype.addRequest = function addRequest(req, options) {
} else if (sockLen < this.maxSockets) {
debug('call onSocket', sockLen, freeLen);
// If we are under maxSockets create a new one.
- this.createSocket(req, options, function(err, newSocket) {
- if (err) {
- process.nextTick(function() {
- req.emit('error', err);
- });
- return;
- }
- req.onSocket(newSocket);
- });
+ // [patch start]
+ this.createSocket(req, options, handleSocketCreation(req));
+ // [patch end]
} else {
debug('wait for socket');
// We are over limit so we'll add it to the queue.
@@ -253,8 +269,11 @@ Agent.prototype.createSocket = function createSocket(req, options, cb) {
options.encoding = null;
var called = false;
const newSocket = self.createConnection(options, oncreate);
- if (newSocket)
- oncreate(null, newSocket);
+ // [patch start]
+ if (newSocket) {
+ oncreate(null, Object.assign(newSocket, { createdTime: Date.now() }));
+ }
+ // [patch end]
function oncreate(err, s) {
if (called)
return;
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js
index 3c8d984932..a51ad597bc 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js
@@ -39,12 +39,24 @@ class Agent extends OriginalAgent {
super(options);
this.createSocketCount = 0;
+ this.createSocketCountLastCheck = 0;
+
this.createSocketErrorCount = 0;
+ this.createSocketErrorCountLastCheck = 0;
+
this.closeSocketCount = 0;
+ this.closeSocketCountLastCheck = 0;
+
// socket error event count
this.errorSocketCount = 0;
+ this.errorSocketCountLastCheck = 0;
+
this.requestCount = 0;
+ this.requestCountLastCheck = 0;
+
this.timeoutSocketCount = 0;
+ this.timeoutSocketCountLastCheck = 0;
+
this.on('free', s => {
this.requestCount++;
// last enter free queue timestamp
@@ -77,6 +89,24 @@ class Agent extends OriginalAgent {
});
}
+ get statusChanged() {
+ const changed = this.createSocketCount !== this.createSocketCountLastCheck ||
+ this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||
+ this.closeSocketCount !== this.closeSocketCountLastCheck ||
+ this.errorSocketCount !== this.errorSocketCountLastCheck ||
+ this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||
+ this.requestCount !== this.requestCountLastCheck;
+ if (changed) {
+ this.createSocketCountLastCheck = this.createSocketCount;
+ this.createSocketErrorCountLastCheck = this.createSocketErrorCount;
+ this.closeSocketCountLastCheck = this.closeSocketCount;
+ this.errorSocketCountLastCheck = this.errorSocketCount;
+ this.timeoutSocketCountLastCheck = this.timeoutSocketCount;
+ this.requestCountLastCheck = this.requestCount;
+ }
+ return changed;
+ }
+
getCurrentStatus() {
return {
createSocketCount: this.createSocketCount,
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 d591433a74..2468ecf355 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,7 +1,8 @@
{
"_from": "agentkeepalive@^3.1.0",
- "_id": "agentkeepalive@3.1.0",
- "_integrity": "sha1-A5Ok8eaPhdNViHwucWgbKPO33zU=",
+ "_id": "agentkeepalive@3.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-9yhcpXti2ZQE7bxuCsjjWNIZoQOd9sZ1ZBovHG0YeCRohFv73SLvcm73PC9T3olM4GyozaQb+4MGdQpcD8m7NQ==",
"_location": "/pacote/make-fetch-happen/agentkeepalive",
"_phantomChildren": {},
"_requested": {
@@ -17,36 +18,35 @@
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.1.0.tgz",
- "_shasum": "0393a4f1e68f85d355887c2e71681b28f3b7df35",
- "_shrinkwrap": null,
+ "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.3.0.tgz",
+ "_shasum": "6d5de5829afd3be2712201a39275fd11c651857c",
"_spec": "agentkeepalive@^3.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
+ "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "fengmk2",
"email": "fengmk2@gmail.com",
"url": "https://fengmk2.com"
},
- "bin": null,
"browser": "browser.js",
"bugs": {
"url": "https://github.com/node-modules/agentkeepalive/issues"
},
"bundleDependencies": false,
"ci": {
- "version": "4.3.2, 4, 6, 7"
+ "version": "4.3.2, 4, 6, 7, 8"
},
"dependencies": {
- "humanize-ms": "^1.2.0"
+ "humanize-ms": "^1.2.1"
},
"deprecated": false,
"description": "Missing keepalive http.Agent",
"devDependencies": {
- "egg-bin": "^1.9.1",
- "egg-ci": "^1.1.0",
- "eslint": "^3.12.2",
- "eslint-config-egg": "^3.2.0",
- "pedding": "1"
+ "autod": "^2.8.0",
+ "egg-bin": "^1.10.3",
+ "egg-ci": "^1.7.0",
+ "eslint": "^3.19.0",
+ "eslint-config-egg": "^4.2.0",
+ "pedding": "^1.1.0"
},
"engines": {
"node": ">= 4.0.0"
@@ -67,17 +67,16 @@
"license": "MIT",
"main": "index.js",
"name": "agentkeepalive",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/node-modules/agentkeepalive.git"
},
"scripts": {
+ "autod": "autod",
"ci": "npm run lint && npm run cov",
"cov": "egg-bin cov",
"lint": "eslint lib test index.js",
"test": "egg-bin test"
},
- "version": "3.1.0"
+ "version": "3.3.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml
index 85a50123c6..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml
@@ -1,8 +1,22 @@
+sudo: false
+
language: node_js
+
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
-before_install:
- - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
- - npm install -g npm@latest
+ - "4"
+ - "5"
+ - "6"
+ - "7"
+ - "8"
+
+install:
+ - PATH="`npm bin`:`npm bin -g`:$PATH"
+ # Install dependencies and build
+ - npm install
+
+script:
+ # Output useful info for debugging
+ - node --version
+ - npm --version
+ # Run tests
+ - npm test
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 6765fcede9..5dabbc6950 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,14 @@
+2.0.0 / 2017-06-27
+==================
+
+ * drop support for Node.js < v4
+ * update "mocha" to v3
+ * update to "agent-base" v4
+ * rename http-proxy-agent.js to index.js
+ * remove `extend` dependency
+ * test Node.js 4, 5, 6, 7 and 8 on Travis-CI
+
1.0.0 / 2015-07-10
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/http-proxy-agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js
index b70e875f53..4bc9704a10 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/http-proxy-agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js
@@ -6,7 +6,6 @@
var net = require('net');
var tls = require('tls');
var url = require('url');
-var extend = require('extend');
var Agent = require('agent-base');
var inherits = require('util').inherits;
var debug = require('debug')('http-proxy-agent');
@@ -29,9 +28,9 @@ function HttpProxyAgent (opts) {
if ('string' == typeof opts) opts = url.parse(opts);
if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
debug('creating new HttpProxyAgent instance: %o', opts);
- Agent.call(this, connect);
+ Agent.call(this, opts);
- var proxy = extend({}, opts);
+ var proxy = Object.assign({}, opts);
// if `true`, then connect to the proxy server over TLS. defaults to `false`.
this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
@@ -58,7 +57,7 @@ inherits(HttpProxyAgent, Agent);
* @api public
*/
-function connect (req, opts, fn) {
+HttpProxyAgent.prototype.callback = function connect (req, opts, fn) {
var proxy = this.proxy;
// change the `http.ClientRequest` instance's "path" field
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore
index 07e6e472cc..c12f3a80c1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore
@@ -1 +1,2 @@
/node_modules
+/?.js
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
index 20b794051c..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml
@@ -3,21 +3,14 @@ sudo: false
language: node_js
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "1"
- - "2"
- - "3"
- "4"
- "5"
- "6"
- "7"
+ - "8"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
- # Node 0.8 comes with a too obsolete npm
- - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
# Install dependencies and build
- npm install
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 2191a9e801..b79a539629 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,8 +1,43 @@
+4.1.0 / 2017-06-26
+==================
+
+ * mix in Agent options into Request options
+ * throw when nothing is returned from agent-base callback
+ * do not modify the options object for https requests
+
+4.0.1 / 2017-06-13
+==================
+
+ * add `this` context tests and fixes
+
+4.0.0 / 2017-06-06
+==================
+
+ * drop support for Node.js < 4
+ * drop old versions of Node.js from Travis-CI
+ * specify Node.js >= 4.0.0 in `engines.node`
+ * remove more old code
+ * remove "extend" dependency
+ * remove "semver" dependency
+ * make the Promise logic a bit cleaner
+ * add async function pseudo-example to README
+ * use direct return in README example
+
+3.0.0 / 2017-06-02
+==================
+
+ * drop support for Node.js v0.8 and v0.10
+ * add support for async, Promises, and direct return
+ * add a couple `options` test cases
+ * implement a `"timeout"` option
+ * rename main file to `index.js`
+ * test Node 8 on Travis
+
2.1.1 / 2017-05-30
==================
- * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
+ * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
2.1.0 / 2017-05-26
==================
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 616b90cdbf..64175a43a4 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
@@ -1,6 +1,6 @@
agent-base
==========
-### Turn a function into an `http.Agent` instance
+### Turn a function into an [`http.Agent`][http.Agent] instance
[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base)
This module provides an `http.Agent` generator. That is, you pass it an async
@@ -34,7 +34,7 @@ Example
Here's a minimal example that creates a new `net.Socket` connection to the server
for every HTTP request (i.e. the equivalent of `agent: false` option):
-``` js
+```js
var net = require('net');
var tls = require('tls');
var url = require('url');
@@ -42,10 +42,10 @@ var http = require('http');
var agent = require('agent-base');
var endpoint = 'http://nodejs.org/api/';
-var opts = url.parse(endpoint);
+var parsed = url.parse(endpoint);
// This is the important part!
-opts.agent = agent(function (req, opts, fn) {
+parsed.agent = agent(function (req, opts) {
var socket;
// `secureEndpoint` is true when using the https module
if (opts.secureEndpoint) {
@@ -53,26 +53,40 @@ opts.agent = agent(function (req, opts, fn) {
} else {
socket = net.connect(opts);
}
- fn(null, socket);
+ return socket;
});
// Everything else works just like normal...
-http.get(opts, function (res) {
+http.get(parsed, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
```
+You can also return a Promise or use an `async` function:
+
+```js
+agent(async function (req, opts) {
+ await sleep(1000);
+ // etc…
+});
+```
+
+
API
---
-## Agent(Function callback) → http.Agent
+## Agent(Function callback[, Object options]) → [http.Agent][]
Creates a base `http.Agent` that will execute the callback function `callback`
for every HTTP request that it is used as the `agent` for. The callback function
is responsible for creating a `stream.Duplex` instance of some kind that will be
used as the underlying socket in the HTTP request.
+The `options` object accepts the following properties:
+
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
+
The callback function should have the following signature:
### callback(http.ClientRequest req, Object options, Function cb) → undefined
@@ -86,7 +100,7 @@ the callback function `cb` once created, and the HTTP request will
continue to proceed.
If the `https` module is used to invoke the HTTP request, then the
-`secureEndpoint` property on `options` will be set to `true`.
+`secureEndpoint` property on `options` _will be set to `true`_.
License
@@ -119,3 +133,4 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js
deleted file mode 100644
index 7ea91f886c..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/agent.js
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-require('./patch-core');
-var extend = require('extend');
-var inherits = require('util').inherits;
-var EventEmitter = require('events').EventEmitter;
-
-/**
- * Module exports.
- */
-
-module.exports = Agent;
-
-/**
- * Base `http.Agent` implementation.
- * No pooling/keep-alive is implemented by default.
- *
- * @param {Function} callback
- * @api public
- */
-
-function Agent (callback) {
- if (!(this instanceof Agent)) return new Agent(callback);
- EventEmitter.call(this);
- if ('function' === typeof callback) {
- this.callback = callback;
- }
-}
-inherits(Agent, EventEmitter);
-
-Agent.prototype.callback = function callback (req, opts, fn) {
- fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'));
-};
-
-/**
- * Called by node-core's "_http_client.js" module when creating
- * a new HTTP request with this Agent instance.
- *
- * @api public
- */
-
-Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) {
- var opts;
- if ('object' == typeof host) {
- // >= v0.11.x API
- opts = extend({}, req._options, host);
- } else {
- // <= v0.10.x API
- opts = extend({}, req._options, { host: host, port: port });
- if (null != localAddress) {
- opts.localAddress = localAddress;
- }
- }
-
- if (opts.host && opts.path) {
- // 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;
- }
-
- // set default `port` if none was explicitly specified
- if (null == opts.port) {
- opts.port = opts.secureEndpoint ? 443 : 80;
- }
-
- delete opts.agent;
- delete opts.hostname;
- delete opts._defaultAgent;
- delete opts.defaultPort;
- delete opts.createConnection;
-
- // hint to use "Connection: close"
- // XXX: non-documented `http` module API :(
- req._last = true;
- req.shouldKeepAlive = false;
-
- // clean up a bit of memory since we're no longer using this
- req._options = null;
-
- // create the `net.Socket` instance
- var sync = true;
- this.callback(req, opts, function (err, socket) {
- function emitErr () {
- req.emit('error', err);
- // For Safety. Some additional errors might fire later on
- // and we need to make sure we don't double-fire the error event.
- req._hadError = true;
- }
- if (err) {
- if (sync) {
- // need to defer the "error" event, when sync, because by now the `req`
- // instance hasn't event been passed back to the user yet...
- process.nextTick(emitErr);
- } else {
- emitErr();
- }
- } else {
- req.onSocket(socket);
- }
- });
- sync = false;
-};
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
new file mode 100644
index 0000000000..df3ca727a7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js
@@ -0,0 +1,158 @@
+'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;
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+
+function Agent(callback, _opts) {
+ if (!(this instanceof Agent)) {
+ return new Agent(callback, _opts);
+ }
+
+ EventEmitter.call(this);
+
+ let opts = _opts;
+ if ('function' === typeof callback) {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // timeout for the socket to be returned from the callback
+ this.timeout = (opts && opts.timeout) || null;
+
+ this.options = opts;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Override this function in your subclass!
+ */
+Agent.prototype.callback = function callback(req, opts) {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+};
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+
+Agent.prototype.addRequest = function addRequest(
+ req,
+ _opts
+) {
+ const ownOpts = Object.assign({}, _opts);
+
+ // set default `host` for HTTP to localhost
+ if (null == ownOpts.host) {
+ ownOpts.host = 'localhost';
+ }
+
+ // set default `port` for HTTP if none was explicitly specified
+ if (null == ownOpts.port) {
+ ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
+ }
+
+ 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
+ // 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;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ // create the `stream.Duplex` instance
+ let timeout;
+ let timedOut = false;
+ const timeoutMs = this.timeout;
+
+ function onerror(err) {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ }
+
+ function ontimeout() {
+ timedOut = true;
+ const err = new Error(
+ 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ }
+
+ function callbackError(err) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ onerror(err);
+ }
+
+ function onsocket(socket) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ if (socket) {
+ req.onSocket(socket);
+ } else {
+ 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
+ this.callback = promisify(this.callback, this);
+ }
+
+ if (timeoutMs > 0) {
+ timeout = setTimeout(ontimeout, timeoutMs);
+ }
+
+ try {
+ Promise.resolve(this.callback(req, opts))
+ .then(onsocket, callbackError);
+ } catch (err) {
+ 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/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/README.md
new file mode 100644
index 0000000000..4141cc840f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md
@@ -0,0 +1,89 @@
+[![Travis CI](https://travis-ci.org/digitaldesignlabs/es6-promisify.svg)](https://travis-ci.org/digitaldesignlabs/es6-promisify)
+
+# es6-promisify
+
+Converts callback-based functions to Promise-based functions.
+
+## Install
+
+Install with [npm](https://npmjs.org/package/es6-promisify)
+
+```bash
+npm install --save es6-promisify
+```
+
+## Example
+
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const fs = require("fs");
+
+// Convert the stat function
+const stat = promisify(fs.stat);
+
+// Now usable as a promise!
+stat("example.txt").then(function (stats) {
+ console.log("Got stats", stats);
+}).catch(function (err) {
+ console.error("Yikes!", err);
+});
+```
+
+## Promisify methods
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const redis = require("redis").createClient(6379, "localhost");
+
+// Create a promise-based version of send_command
+const client = promisify(redis.send_command, redis);
+
+// Send commands to redis and get a promise back
+client("ping").then(function (pong) {
+ console.log("Got", pong);
+}).catch(function (err) {
+ console.error("Unexpected error", err);
+}).then(function () {
+ redis.quit();
+});
+```
+
+## Handle callback multiple arguments
+```js
+"use strict";
+
+// Declare functions
+function test(cb) {
+ return cb(undefined, 1, 2, 3);
+}
+
+// Declare variables
+const promisify = require("es6-promisify");
+
+// Create promise-based version of test
+const single = promisify(test);
+const multi = promisify(test, {multiArgs: true});
+
+// Discards additional arguments
+single().then(function (result) {
+ console.log(result); // 1
+});
+
+// Returns all arguments as an array
+multi().then(function (result) {
+ console.log(result); // [1, 2, 3]
+});
+```
+
+### Tests
+Test with nodeunit
+```bash
+$ npm test
+```
+
+Published under the [MIT License](http://opensource.org/licenses/MIT).
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/dist/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/dist/promise.js
new file mode 100644
index 0000000000..2fe5c6103b
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js
@@ -0,0 +1,73 @@
+"use strict";
+
+/* global self, window, module, global, require */
+module.exports = function () {
+
+ "use strict";
+
+ var globalObject = void 0;
+
+ function isFunction(x) {
+ return typeof x === "function";
+ }
+
+ // Seek the global object
+ if (global !== undefined) {
+ globalObject = global;
+ } else if (window !== undefined && window.document) {
+ globalObject = window;
+ } else {
+ globalObject = self;
+ }
+
+ // Test for any native promise implementation, and if that
+ // implementation appears to conform to the specificaton.
+ // This code mostly nicked from the es6-promise module polyfill
+ // and then fooled with.
+ var hasPromiseSupport = function () {
+
+ // No promise object at all, and it's a non-starter
+ if (!globalObject.hasOwnProperty("Promise")) {
+ return false;
+ }
+
+ // There is a Promise object. Does it conform to the spec?
+ var P = globalObject.Promise;
+
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
+ return false;
+ }
+
+ if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
+ return false;
+ }
+
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ return function () {
+
+ var resolve = void 0;
+
+ var p = new globalObject.Promise(function (r) {
+ resolve = r;
+ });
+
+ if (p) {
+ return isFunction(resolve);
+ }
+
+ return false;
+ }();
+ }();
+
+ // Export the native Promise implementation if it
+ // looks like it matches the spec
+ if (hasPromiseSupport) {
+ return globalObject.Promise;
+ }
+
+ // Otherwise, return the es6-promise polyfill by @jaffathecake.
+ return require("es6-promise").Promise;
+}(); \ 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/dist/promisify.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/dist/promisify.js
new file mode 100644
index 0000000000..ce38041b07
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js
@@ -0,0 +1,85 @@
+"use strict";
+
+/* global module, require */
+module.exports = function () {
+
+ "use strict";
+
+ // Get a promise object. This may be native, or it may be polyfilled
+
+ var ES6Promise = require("./promise.js");
+
+ /**
+ * thatLooksLikeAPromiseToMe()
+ *
+ * Duck-types a promise.
+ *
+ * @param {object} o
+ * @return {bool} True if this resembles a promise
+ */
+ function thatLooksLikeAPromiseToMe(o) {
+ return o && typeof o.then === "function" && typeof o.catch === "function";
+ }
+
+ /**
+ * promisify()
+ *
+ * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
+ * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
+ * and rejects when `error` is truthy. You can also supply settings object as the second argument.
+ *
+ * @param {function} original - The function to promisify
+ * @param {object} settings - Settings object
+ * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
+ * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
+ * @return {function} A promisified version of `original`
+ */
+ return function promisify(original, settings) {
+
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var returnMultipleArguments = settings && settings.multiArgs;
+
+ var target = void 0;
+ if (settings && settings.thisArg) {
+ target = settings.thisArg;
+ } else if (settings) {
+ target = settings;
+ }
+
+ // Return the promisified function
+ return new ES6Promise(function (resolve, reject) {
+
+ // Append the callback bound to the context
+ args.push(function callback(err) {
+
+ if (err) {
+ return reject(err);
+ }
+
+ for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ values[_key2 - 1] = arguments[_key2];
+ }
+
+ if (false === !!returnMultipleArguments) {
+ return resolve(values[0]);
+ }
+
+ resolve(values);
+ });
+
+ // Call the function
+ var response = original.apply(target, args);
+
+ // If it looks like original already returns a promise,
+ // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
+ if (thatLooksLikeAPromiseToMe(response)) {
+ resolve(response);
+ }
+ });
+ };
+ };
+}(); \ 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/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
new file mode 100644
index 0000000000..6ff0013622
--- /dev/null
+++ 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
@@ -0,0 +1,122 @@
+# Master
+
+# 4.1.0
+
+* [BUGFIX] Fix memory leak [#269]
+* [BUGFIX] Auto Bundles within an AMD Environment [#263]
+
+# 4.0.5
+
+* fix require('es6-promise/auto') for Node < 4
+
+# 4.0.4
+
+* fix asap when using https://github.com/Kinvey/titanium-sdk
+
+# 4.0.3
+
+* fix Readme links
+
+# 4.0.2
+
+* fix require('es6-promise/auto');
+
+# 4.0.0
+
+* no longer polyfill automatically, if needed one can still invoke
+ `require('es6-promise/auto')` directly.
+
+# 3.3.1
+
+* fix links in readme
+
+# 3.3.0
+
+* support polyfil on WebMAF (playstation env)
+* fix tampering related bug global `constructor` was referenced by mistake.
+* provide TS Typings
+* increase compatibliity with sinon.useFakeTimers();
+* update build tools (use rollup)
+* directly export promise;
+
+# 3.2.2
+
+* IE8: use isArray
+* update build dependencies
+
+# 3.2.1
+
+* fix race tampering issue
+* use eslint
+* fix Promise.all tampering
+* remove unused code
+* fix issues with NWJS/electron
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.2
+
+* correctly bump both bower and package.json versions
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* #59: Automatic polyfill. No need to invoke `ES6Promise.polyfill()` anymore.
+* ... (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
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/LICENSE 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/LICENSE
new file mode 100644
index 0000000000..954ec5992d
--- /dev/null
+++ 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/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner 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/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
new file mode 100644
index 0000000000..bb07d25c17
--- /dev/null
+++ 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
@@ -0,0 +1,82 @@
+# 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).
+
+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.
+
+## Node.js
+
+To install:
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+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.
+
+However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+Or use `.then` instead:
+
+```js
+promise.then(undefined, function(err) {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Alternatively
+
+```js
+require('es6-promise/auto');
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
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/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/auto.js
new file mode 100644
index 0000000000..92bbf36e58
--- /dev/null
+++ 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/auto.js
@@ -0,0 +1,4 @@
+// This file can be required in Browserify and Node.js for automatic polyfill
+// To use it: require('es6-promise/auto');
+'use strict';
+module.exports = require('./').polyfill();
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
new file mode 100644
index 0000000000..51eb80a648
--- /dev/null
+++ 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
@@ -0,0 +1,1159 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
+ } else {
+ this._willSettleAt(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$3.prototype = {
+ constructor: Promise$3,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$3;
+}
+
+// Strange compat..
+Promise$3.polyfill = polyfill$1;
+Promise$3.Promise = Promise$3;
+
+Promise$3.polyfill();
+
+return Promise$3;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..1e06e2c73c
--- /dev/null
+++ 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
@@ -0,0 +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,C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I,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
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.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
new file mode 100644
index 0000000000..ba34fa7ced
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..3ada8df844
--- /dev/null
+++ 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
@@ -0,0 +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,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AG,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
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
new file mode 100644
index 0000000000..b3724141a8
--- /dev/null
+++ 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
@@ -0,0 +1,1157 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$2.prototype = {
+ constructor: Promise$2,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$2;
+}
+
+// Strange compat..
+Promise$2.polyfill = polyfill$1;
+Promise$2.Promise = Promise$2;
+
+return Promise$2;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..98c7af7ba4
--- /dev/null
+++ 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
@@ -0,0 +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,QA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AAGP,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
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
new file mode 100644
index 0000000000..7696ed71f1
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..ac752492db
--- /dev/null
+++ 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
@@ -0,0 +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,iB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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.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
new file mode 100644
index 0000000000..d90ab85a59
--- /dev/null
+++ 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
@@ -0,0 +1,74 @@
+export interface Thenable <R> {
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Thenable<U>;
+}
+
+export class Promise <R> implements Thenable <R> {
+ /**
+ * If you call resolve in the body of the callback passed to the constructor,
+ * your promise is fulfilled with result object passed to resolve.
+ * If you call reject your promise is rejected with the object passed to resolve.
+ * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
+ * Any errors thrown in the constructor callback will be implicitly passed to reject().
+ */
+ constructor (callback: (resolve : (value?: R | Thenable<R>) => void, reject: (error?: any) => void) => void);
+
+ /**
+ * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects.
+ * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called.
+ * Both callbacks have a single parameter , the fulfillment value or rejection reason.
+ * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve.
+ * If an error is thrown in the callback, the returned promise rejects with that error.
+ *
+ * @param onFulfilled called when/if "promise" resolves
+ * @param onRejected called when/if "promise" rejects
+ */
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Promise<U>;
+
+ /**
+ * Sugar for promise.then(undefined, onRejected)
+ *
+ * @param onRejected called when/if "promise" rejects
+ */
+ catch <U> (onRejected?: (error: 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.
+ */
+ static resolve (): Promise<void>;
+ static resolve <R> (value: R | Thenable<R>): Promise<R>;
+
+ /**
+ * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
+ */
+ static reject <R> (error: any): Promise<R>;
+
+ /**
+ * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
+ * the array passed to all can be a mixture of promise-like objects and other objects.
+ * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
+ */
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>, T10 | Thenable<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+ static all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+ static all<T1, T2, T3, T4, T5, T6>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+ static all<T1, T2, T3, T4, T5>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+ static all<T1, T2, T3, T4>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>]): Promise<[T1, T2, T3, T4]>;
+ static all<T1, T2, T3>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>]): Promise<[T1, T2, T3]>;
+ static all<T1, T2>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>]): Promise<[T1, T2]>;
+ static all<T1>(values: [T1 | Thenable<T1>]): Promise<[T1]>;
+ static all<TAll>(values: Array<TAll | Thenable<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
+ */
+ static race <R> (promises: (R | Thenable<R>)[]): Promise<R>;
+}
+
+/**
+ * The polyfill method will patch the global environment (in this case to the Promise name) when called.
+ */
+export function polyfill (): void;
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.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/lib/es6-promise.auto.js
new file mode 100644
index 0000000000..77997866f8
--- /dev/null
+++ 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.auto.js
@@ -0,0 +1,3 @@
+import Promise from './es6-promise';
+Promise.polyfill();
+export default Promise;
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.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.js
new file mode 100644
index 0000000000..4f4d840d09
--- /dev/null
+++ 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.js
@@ -0,0 +1,7 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+// Strange compat..
+Promise.polyfill = polyfill;
+Promise.Promise = Promise;
+export default Promise;
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
new file mode 100644
index 0000000000..038140d8d8
--- /dev/null
+++ 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
@@ -0,0 +1,271 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export const PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+const PENDING = void 0;
+const FULFILLED = 1;
+const REJECTED = 2;
+
+const GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(promise => {
+ var sealed = false;
+ var error = tryThen(then, thenable, value => {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, reason => {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, value => resolve(promise, value),
+ reason => reject(promise, reason))
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ maybeThenable.constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === GET_THEN_ERROR) {
+ reject(promise, GET_THEN_ERROR.error);
+ GET_THEN_ERROR.error = null;
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ let { _subscribers } = parent;
+ let { length } = _subscribers;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ let subscribers = promise._subscribers;
+ let settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ let child, callback, detail = promise._result;
+
+ for (let i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+const TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ let hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+let id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
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
new file mode 100644
index 0000000000..1055b92e75
--- /dev/null
+++ 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
@@ -0,0 +1,120 @@
+let len = 0;
+let vertxNext;
+let customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+const browserWindow = (typeof window !== 'undefined') ? window : undefined;
+const browserGlobal = browserWindow || {};
+const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+const isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+const isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return () => process.nextTick(flush);
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function() {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ let iterations = 0;
+ const observer = new BrowserMutationObserver(flush);
+ const node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return () => {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ const channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return () => channel.port2.postMessage(0);
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ const globalSetTimeout = setTimeout;
+ return () => globalSetTimeout(flush, 1);
+}
+
+const queue = new Array(1000);
+function flush() {
+ for (let i = 0; i < len; i+=2) {
+ let callback = queue[i];
+ let arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ const r = require;
+ const vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+let scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
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
new file mode 100644
index 0000000000..df4faca879
--- /dev/null
+++ 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
@@ -0,0 +1,111 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+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);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.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) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } 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);
+ }
+};
+
+Enumerator.prototype._eachEntry = function(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
+
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
+
+ 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);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+};
+
+Enumerator.prototype._settledAt = function(state, i, value) {
+ let { promise } = this;
+
+ 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);
+ }
+};
+
+Enumerator.prototype._willSettleAt = function(promise, i) {
+ let enumerator = this;
+
+ 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
new file mode 100644
index 0000000000..83ddf0662b
--- /dev/null
+++ 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
@@ -0,0 +1,35 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ let local;
+
+ 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');
+ }
+ }
+
+ let P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch(e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast){
+ return;
+ }
+ }
+
+ local.Promise = Promise;
+}
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
new file mode 100644
index 0000000000..20558cbeea
--- /dev/null
+++ 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
@@ -0,0 +1,383 @@
+import {
+ isFunction
+} from './utils';
+
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+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');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise.prototype = {
+ constructor: Promise,
+
+/**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+*/
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+*/
+ catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
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/all.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/all.js
new file mode 100644
index 0000000000..9ca3c063aa
--- /dev/null
+++ 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/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
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/race.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/race.js
new file mode 100644
index 0000000000..166dc820b5
--- /dev/null
+++ 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/race.js
@@ -0,0 +1,84 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor((_, reject) => reject(new TypeError('You must pass an array to race.')));
+ } else {
+ return new Constructor((resolve, reject) => {
+ let length = entries.length;
+ for (let i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
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/reject.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/reject.js
new file mode 100644
index 0000000000..cd55faabf5
--- /dev/null
+++ 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/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ let Constructor = this;
+ let promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
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/resolve.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/resolve.js
new file mode 100644
index 0000000000..f4642b630e
--- /dev/null
+++ 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/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ let promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
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/then.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/then.js
new file mode 100644
index 0000000000..b2b79f0a14
--- /dev/null
+++ 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/then.js
@@ -0,0 +1,32 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ const parent = this;
+
+ const child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ const { _state } = parent;
+
+ if (_state) {
+ const callback = arguments[_state - 1];
+ asap(() => invokeCallback(_state, child, callback, parent._result));
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
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/utils.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/utils.js
new file mode 100644
index 0000000000..72545c5e97
--- /dev/null
+++ 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/utils.js
@@ -0,0 +1,21 @@
+export function objectOrFunction(x) {
+ let type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return x !== null && typeof x === 'object';
+}
+
+let _isArray;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = x => Object.prototype.toString.call(x) === '[object Array]';
+}
+
+export const isArray = _isArray;
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
new file mode 100644
index 0000000000..26008ffa00
--- /dev/null
+++ 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
@@ -0,0 +1,96 @@
+{
+ "_from": "es6-promise@^4.0.3",
+ "_id": "es6-promise@4.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify/es6-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promise@^4.0.3",
+ "name": "es6-promise",
+ "escapedName": "es6-promise",
+ "rawSpec": "^4.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.3"
+ },
+ "_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",
+ "_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": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "bugs": {
+ "url": "https://github.com/stefanpenner/es6-promise/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "devDependencies": {
+ "broccoli-babel-transpiler": "^5.6.1",
+ "broccoli-concat": "^3.1.0",
+ "broccoli-merge-trees": "^1.2.3",
+ "broccoli-rollup": "^1.0.2",
+ "broccoli-stew": "^1.2.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",
+ "json3": "^3.3.2",
+ "mocha": "^3.1.0",
+ "promises-aplus-tests-phantom": "^2.1.0-revise",
+ "release-it": "2.7.1"
+ },
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "es6-promise.d.ts",
+ "auto.js",
+ "!dist/test"
+ ],
+ "homepage": "https://github.com/stefanpenner/es6-promise#readme",
+ "keywords": [
+ "promises",
+ "promise",
+ "polyfill",
+ "futures"
+ ],
+ "license": "MIT",
+ "main": "dist/es6-promise.js",
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stefanpenner/es6-promise.git"
+ },
+ "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",
+ "start": "ember s",
+ "test": "ember test",
+ "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:server": "ember test --server"
+ },
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "typings": "es6-promise.d.ts",
+ "version": "4.1.1"
+}
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/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/package.json
new file mode 100644
index 0000000000..7839fcf199
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "es6-promisify@^5.0.0",
+ "_id": "es6-promisify@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base/es6-promisify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promisify@^5.0.0",
+ "name": "es6-promisify",
+ "escapedName": "es6-promisify",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/http-proxy-agent/agent-base"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "_shasum": "5109d62f3e56ea967c4b63505aef08291c8a5203",
+ "_spec": "es6-promisify@^5.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base",
+ "author": {
+ "name": "Mike Hall",
+ "email": "mikehall314@gmail.com"
+ },
+ "bugs": {
+ "url": "http://github.com/digitaldesignlabs/es6-promisify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "es6-promise": "^4.0.3"
+ },
+ "deprecated": false,
+ "description": "Converts callback-based functions to ES6 Promises",
+ "devDependencies": {
+ "babel-preset-es2015": "^6.9.0",
+ "eslint": "^2.13.1",
+ "gulp": "^3.9.1",
+ "gulp-babel": "^6.1.2",
+ "nodeunit": "^0.10.0"
+ },
+ "files": [
+ "dist/promisify.js",
+ "dist/promise.js"
+ ],
+ "greenkeeper": {
+ "ignore": [
+ "eslint"
+ ]
+ },
+ "homepage": "https://github.com/digitaldesignlabs/es6-promisify#readme",
+ "keywords": [
+ "promises",
+ "es6",
+ "promisify"
+ ],
+ "license": "MIT",
+ "main": "dist/promisify.js",
+ "name": "es6-promisify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/digitaldesignlabs/es6-promisify.git"
+ },
+ "scripts": {
+ "pretest": "./node_modules/eslint/bin/eslint.js ./lib/*.js ./tests/*.js",
+ "test": "gulp && nodeunit tests"
+ },
+ "version": "5.0.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
deleted file mode 100644
index 534108e3f4..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules/
-coverage/
-.nyc_output/
-nyc_output/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
deleted file mode 100644
index 991d04b6e2..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - 'iojs'
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
deleted file mode 100644
index b5e35ff0b5..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
+++ /dev/null
@@ -1,303 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- 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
-
-As a command-line utility:
-
- $ semver -h
-
- Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
- Test if version(s) satisfy the supplied range(s), and sort them.
-
- Multiple versions or ranges may be supplied, unless increment
- option is specified. In that case, only a single version may
- be used, and it is incremented by the specified level
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no versions are valid, or ranges are not satisfied,
- then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'pre', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` 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/semver/bin/semver b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857e8..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
deleted file mode 100644
index afe0672029..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "_from": "semver@~5.0.1",
- "_id": "semver@5.0.3",
- "_integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=",
- "_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base/semver",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "semver@~5.0.1",
- "name": "semver",
- "escapedName": "semver",
- "rawSpec": "~5.0.1",
- "saveSpec": null,
- "fetchSpec": "~5.0.1"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/http-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
- "_shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a",
- "_shrinkwrap": null,
- "_spec": "semver@~5.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base",
- "bin": {
- "semver": "./bin/semver"
- },
- "bugs": {
- "url": "https://github.com/npm/node-semver/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "The semantic version parser used by npm.",
- "devDependencies": {
- "tap": "^1.3.4"
- },
- "homepage": "https://github.com/npm/node-semver#readme",
- "license": "ISC",
- "main": "semver.js",
- "name": "semver",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-semver.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "5.0.3"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
deleted file mode 100644
index 19392d8ff9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1200 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.inspect = function() {
- return '<SemVer "' + this + '">';
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.inspect = function() {
- return '<SemVer Comparator "' + this + '">';
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.inspect = function() {
- return '<SemVer Range "' + this.range + '">';
-};
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0- <1.3.0-
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm)
- M = +M + 1
- else
- m = +m + 1
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
deleted file mode 100644
index c051864bc9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tap').test
-var semver = require('../')
-
-test('long version is too long', function (t) {
- var v = '1.2.' + new Array(256).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('big number is like too long version', function (t) {
- var v = '1.2.' + new Array(100).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('parsing null does not throw', function (t) {
- t.equal(semver.parse(null), null)
- t.equal(semver.parse({}), null)
- t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
- t.end()
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
deleted file mode 100644
index 9e268de950..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var clean = semver.clean;
-
-test('\nclean tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', '1.2.3'],
- [' 1.2.3 ', '1.2.3'],
- [' 1.2.3-4 ', '1.2.3-4'],
- [' 1.2.3-pre ', '1.2.3-pre'],
- [' =v1.2.3 ', '1.2.3'],
- ['v1.2.3', '1.2.3'],
- [' v1.2.3 ', '1.2.3'],
- ['\t1.2.3', '1.2.3'],
- ['>1.2.3', null],
- ['~1.2.3', null],
- ['<=1.2.3', null],
- ['1.2.x', null]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var msg = 'clean(' + range + ') = ' + version;
- t.equal(clean(range), version, msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
deleted file mode 100644
index bbb87896c6..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
+++ /dev/null
@@ -1,173 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var gtr = semver.gtr;
-
-test('\ngtr tests', function(t) {
- // [range, version, loose]
- // Version should be greater than range
- [
- ['~1.2.2', '1.3.0'],
- ['~0.6.1-1', '0.7.1-1'],
- ['1.0.0 - 2.0.0', '2.0.1'],
- ['1.0.0', '1.0.1-beta1'],
- ['1.0.0', '2.0.0'],
- ['<=2.0.0', '2.1.1'],
- ['<=2.0.0', '3.2.9'],
- ['<2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '1.2.5'],
- ['2.x.x', '3.0.0'],
- ['1.2.x', '1.3.0'],
- ['1.2.x || 2.x', '3.0.0'],
- ['2.*.*', '5.0.1'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '4.0.0'],
- ['2', '3.0.0'],
- ['2.3', '2.4.2'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.5.5'],
- ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.4'],
- ['~> 1', '3.2.3'],
- ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.1.0'],
- ['<1.2', '1.2.0'],
- ['< 1.2', '1.2.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-pre', '0.6.0'],
- ['~v0.5.4-pre', '0.6.1-pre'],
- ['=0.7.x', '0.8.0'],
- ['=0.7.x', '0.8.0-asdf'],
- ['<0.7.x', '0.7.0'],
- ['~1.2.2', '1.3.0'],
- ['1.0.0 - 2.0.0', '2.2.3'],
- ['1.0.0', '1.0.1'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['2', '3.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['1', '2.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['=0.7.x', '0.8.2'],
- ['<0.7.x', '0.7.2']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(gtr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative gtr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be greater than range
- [
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '0.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['*', 'v1.2.3-foo'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['1', '1.0.0beta', true],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^1', '0.0.0-0'],
- ['^3.0.0', '2.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(gtr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
deleted file mode 100644
index 47c3f5f951..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
+++ /dev/null
@@ -1,698 +0,0 @@
-'use strict';
-
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var eq = semver.eq;
-var gt = semver.gt;
-var lt = semver.lt;
-var neq = semver.neq;
-var cmp = semver.cmp;
-var gte = semver.gte;
-var lte = semver.lte;
-var satisfies = semver.satisfies;
-var validRange = semver.validRange;
-var inc = semver.inc;
-var diff = semver.diff;
-var replaceStars = semver.replaceStars;
-var toComparators = semver.toComparators;
-var SemVer = semver.SemVer;
-var Range = semver.Range;
-
-test('\ncomparison tests', function(t) {
- // [version1, version2]
- // version1 should be greater than version2
- [['0.0.0', '0.0.0-foo'],
- ['0.0.1', '0.0.0'],
- ['1.0.0', '0.9.9'],
- ['0.10.0', '0.9.0'],
- ['0.99.0', '0.10.0'],
- ['2.0.0', '1.2.3'],
- ['v0.0.0', '0.0.0-foo', true],
- ['v0.0.1', '0.0.0', true],
- ['v1.0.0', '0.9.9', true],
- ['v0.10.0', '0.9.0', true],
- ['v0.99.0', '0.10.0', true],
- ['v2.0.0', '1.2.3', true],
- ['0.0.0', 'v0.0.0-foo', true],
- ['0.0.1', 'v0.0.0', true],
- ['1.0.0', 'v0.9.9', true],
- ['0.10.0', 'v0.9.0', true],
- ['0.99.0', 'v0.10.0', true],
- ['2.0.0', 'v1.2.3', true],
- ['1.2.3', '1.2.3-asdf'],
- ['1.2.3', '1.2.3-4'],
- ['1.2.3', '1.2.3-4-foo'],
- ['1.2.3-5-foo', '1.2.3-5'],
- ['1.2.3-5', '1.2.3-4'],
- ['1.2.3-5-foo', '1.2.3-5-Foo'],
- ['3.0.0', '2.7.2+asdf'],
- ['1.2.3-a.10', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a'],
- ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
- ['1.2.3-r2', '1.2.3-r100'],
- ['1.2.3-r100', '1.2.3-R2']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
- t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
- t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
- t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
- t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
- t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
- t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
- t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
- });
- t.end();
-});
-
-test('\nequality tests', function(t) {
- // [version1, version2]
- // version1 should be equivalent to version2
- [['1.2.3', 'v1.2.3', true],
- ['1.2.3', '=1.2.3', true],
- ['1.2.3', 'v 1.2.3', true],
- ['1.2.3', '= 1.2.3', true],
- ['1.2.3', ' v1.2.3', true],
- ['1.2.3', ' =1.2.3', true],
- ['1.2.3', ' v 1.2.3', true],
- ['1.2.3', ' = 1.2.3', true],
- ['1.2.3-0', 'v1.2.3-0', true],
- ['1.2.3-0', '=1.2.3-0', true],
- ['1.2.3-0', 'v 1.2.3-0', true],
- ['1.2.3-0', '= 1.2.3-0', true],
- ['1.2.3-0', ' v1.2.3-0', true],
- ['1.2.3-0', ' =1.2.3-0', true],
- ['1.2.3-0', ' v 1.2.3-0', true],
- ['1.2.3-0', ' = 1.2.3-0', true],
- ['1.2.3-1', 'v1.2.3-1', true],
- ['1.2.3-1', '=1.2.3-1', true],
- ['1.2.3-1', 'v 1.2.3-1', true],
- ['1.2.3-1', '= 1.2.3-1', true],
- ['1.2.3-1', ' v1.2.3-1', true],
- ['1.2.3-1', ' =1.2.3-1', true],
- ['1.2.3-1', ' v 1.2.3-1', true],
- ['1.2.3-1', ' = 1.2.3-1', true],
- ['1.2.3-beta', 'v1.2.3-beta', true],
- ['1.2.3-beta', '=1.2.3-beta', true],
- ['1.2.3-beta', 'v 1.2.3-beta', true],
- ['1.2.3-beta', '= 1.2.3-beta', true],
- ['1.2.3-beta', ' v1.2.3-beta', true],
- ['1.2.3-beta', ' =1.2.3-beta', true],
- ['1.2.3-beta', ' v 1.2.3-beta', true],
- ['1.2.3-beta', ' = 1.2.3-beta', true],
- ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
- ['1.2.3+build', ' = 1.2.3+otherbuild', true],
- ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
- ['1.2.3+build', '1.2.3+otherbuild'],
- [' v1.2.3+build', '1.2.3+otherbuild']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
- t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
- t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
- t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
- t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
- t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
- t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
- });
- t.end();
-});
-
-
-test('\nrange tests', function(t) {
- // [range, version]
- // version should be included by range
- [['1.0.0 - 2.0.0', '1.2.3'],
- ['^1.2.3+build', '1.2.3'],
- ['^1.2.3+build', '1.3.0'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
- ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0'],
- ['*', '1.2.3'],
- ['*', 'v1.2.3', true],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97', true],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
- ['~ 1.0', '1.0.2'],
- ['~ 1.0.3', '1.0.12'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['~1.2.1 >=1.2.3', '1.2.3'],
- ['~1.2.1 =1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['>=1.2.1 1.2.3', '1.2.3'],
- ['1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.1 >=1.2.3', '1.2.3'],
- ['>=1.2', '1.2.8'],
- ['^1.2.3', '1.8.1'],
- ['^0.1.2', '0.1.2'],
- ['^0.1', '0.1.2'],
- ['^1.2', '1.4.2'],
- ['^1.2 ^1', '1.4.2'],
- ['^1.2.3-alpha', '1.2.3-pre'],
- ['^1.2.0-alpha', '1.2.0-pre'],
- ['^0.0.1-alpha', '0.0.1-beta']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
- });
- t.end();
-});
-
-test('\nnegative range tests', function(t) {
- // [range, version]
- // version should not be included by range
- [['1.0.0 - 2.0.0', '2.2.3'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
- ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
- ['^1.2.3+build', '2.0.0'],
- ['^1.2.3+build', '1.2.0'],
- ['^1.2.3', '1.2.3-pre'],
- ['^1.2', '1.2.0-pre'],
- ['>1.2', '1.3.0-beta'],
- ['<=1.2.3', '1.2.3-beta'],
- ['^1.2.3', '1.2.3-beta'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['1.0.0', '1.0.1'],
- ['>=1.0.0', '0.0.0'],
- ['>=1.0.0', '0.0.1'],
- ['>=1.0.0', '0.1.0'],
- ['>1.0.0', '0.0.1'],
- ['>1.0.0', '0.1.0'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['>=0.1.97', 'v0.1.93', true],
- ['>=0.1.97', '0.1.93'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['>=0.2.3 || <0.0.1', '0.0.3'],
- ['>=0.2.3 || <0.0.1', '0.2.2'],
- ['2.x.x', '1.1.3'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.9'],
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['>=1.2', '1.1.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-beta', '0.5.4-alpha'],
- ['=0.7.x', '0.8.2'],
- ['>=0.7.x', '0.6.2'],
- ['<0.7.x', '0.7.2'],
- ['<1.2.3', '1.2.3-beta'],
- ['=1.2.3', '1.2.3-beta'],
- ['>1.2', '1.2.8'],
- ['^1.2.3', '2.0.0-alpha'],
- ['^1.2.3', '1.2.2'],
- ['^1.2', '1.1.9'],
- ['*', 'v1.2.3-foo', true],
- // invalid ranges never satisfied!
- ['blerg', '1.2.3'],
- ['git+https://user:password0123@github.com/foo', '123.0.0', true],
- ['^1.2.3', '2.0.0-pre']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- var found = satisfies(ver, range, loose);
- t.ok(!found, ver + ' not satisfied by ' + range);
- });
- t.end();
-});
-
-test('\nincrement versions test', function(t) {
-// [version, inc, result, identifier]
-// inc(version, inc) -> result
- [['1.2.3', 'major', '2.0.0'],
- ['1.2.3', 'minor', '1.3.0'],
- ['1.2.3', 'patch', '1.2.4'],
- ['1.2.3tag', 'major', '2.0.0', true],
- ['1.2.3-tag', 'major', '2.0.0'],
- ['1.2.3', 'fake', null],
- ['1.2.0-0', 'patch', '1.2.0'],
- ['fake', 'major', null],
- ['1.2.3-4', 'major', '2.0.0'],
- ['1.2.3-4', 'minor', '1.3.0'],
- ['1.2.3-4', 'patch', '1.2.3'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
- ['1.2.4', 'prerelease', '1.2.5-0'],
- ['1.2.3-0', 'prerelease', '1.2.3-1'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
- ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
- ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
- ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
- ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
- ['1.2.0', 'prepatch', '1.2.1-0'],
- ['1.2.0-1', 'prepatch', '1.2.1-0'],
- ['1.2.0', 'preminor', '1.3.0-0'],
- ['1.2.3-1', 'preminor', '1.3.0-0'],
- ['1.2.0', 'premajor', '2.0.0-0'],
- ['1.2.3-1', 'premajor', '2.0.0-0'],
- ['1.2.0-1', 'minor', '1.2.0'],
- ['1.0.0-1', 'major', '1.0.0'],
-
- ['1.2.3', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3', 'patch', '1.2.4', false, 'dev'],
- ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
- ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'fake', null, false, 'dev'],
- ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
- ['fake', 'major', null, false, 'dev'],
- ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
- ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
- ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
- ['1.2.0', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0-1', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.0', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.0-1', 'minor', '1.2.0', false, 'dev'],
- ['1.0.0-1', 'major', '1.0.0', false, 'dev'],
- ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
-
- ].forEach(function(v) {
- var pre = v[0];
- var what = v[1];
- var wanted = v[2];
- var loose = v[3];
- var id = v[4];
- var found = inc(pre, what, loose, id);
- var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
-
- var parsed = semver.parse(pre, loose);
- if (wanted) {
- parsed.inc(what, id);
- t.equal(parsed.version, wanted, cmd + ' object version updated');
- t.equal(parsed.raw, wanted, cmd + ' object raw field updated');
- } else if (parsed) {
- t.throws(function () {
- parsed.inc(what, id)
- })
- } else {
- t.equal(parsed, null)
- }
- });
-
- t.end();
-});
-
-test('\ndiff versions test', function(t) {
-// [version1, version2, result]
-// diff(version1, version2) -> result
- [['1.2.3', '0.2.3', 'major'],
- ['1.4.5', '0.2.3', 'major'],
- ['1.2.3', '2.0.0-pre', 'premajor'],
- ['1.2.3', '1.3.3', 'minor'],
- ['1.0.1', '1.1.0-pre', 'preminor'],
- ['1.2.3', '1.2.4', 'patch'],
- ['1.2.3', '1.2.4-pre', 'prepatch'],
- ['0.0.1', '0.0.1-pre', 'prerelease'],
- ['0.0.1', '0.0.1-pre-2', 'prerelease'],
- ['1.1.0', '1.1.0-pre', 'prerelease'],
- ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
- ['1.0.0', '1.0.0', null]
-
- ].forEach(function(v) {
- var version1 = v[0];
- var version2 = v[1];
- var wanted = v[2];
- var found = diff(version1, version2);
- var cmd = 'diff(' + version1 + ', ' + version2 + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
- });
-
- t.end();
-});
-
-test('\nvalid range test', function(t) {
- // [range, result]
- // validRange(range) -> result
- // translate ranges into their canonical form
- [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
- ['1.0.0', '1.0.0'],
- ['>=*', '*'],
- ['', '*'],
- ['*', '*'],
- ['*', '*'],
- ['>=1.0.0', '>=1.0.0'],
- ['>1.0.0', '>1.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['>=0.1.97', '>=0.1.97'],
- ['>=0.1.97', '>=0.1.97'],
- ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['||', '||'],
- ['2.x.x', '>=2.0.0 <3.0.0'],
- ['1.2.x', '>=1.2.0 <1.3.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['x', '*'],
- ['2.*.*', '>=2.0.0 <3.0.0'],
- ['1.2.*', '>=1.2.0 <1.3.0'],
- ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['*', '*'],
- ['2', '>=2.0.0 <3.0.0'],
- ['2.3', '>=2.3.0 <2.4.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~>3.2.1', '>=3.2.1 <3.3.0'],
- ['~1', '>=1.0.0 <2.0.0'],
- ['~>1', '>=1.0.0 <2.0.0'],
- ['~> 1', '>=1.0.0 <2.0.0'],
- ['~1.0', '>=1.0.0 <1.1.0'],
- ['~ 1.0', '>=1.0.0 <1.1.0'],
- ['^0', '>=0.0.0 <1.0.0'],
- ['^ 1', '>=1.0.0 <2.0.0'],
- ['^0.1', '>=0.1.0 <0.2.0'],
- ['^1.0', '>=1.0.0 <2.0.0'],
- ['^1.2', '>=1.2.0 <2.0.0'],
- ['^0.0.1', '>=0.0.1 <0.0.2'],
- ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
- ['^0.1.2', '>=0.1.2 <0.2.0'],
- ['^1.2.3', '>=1.2.3 <2.0.0'],
- ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
- ['<1', '<1.0.0'],
- ['< 1', '<1.0.0'],
- ['>=1', '>=1.0.0'],
- ['>= 1', '>=1.0.0'],
- ['<1.2', '<1.2.0'],
- ['< 1.2', '<1.2.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['>01.02.03', '>1.2.3', true],
- ['>01.02.03', null],
- ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
- ['~1.2.3beta', null],
- ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var loose = v[2];
- var found = validRange(pre, loose);
-
- t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
- });
-
- t.end();
-});
-
-test('\ncomparators test', function(t) {
- // [range, comparators]
- // turn range into a set of individual comparators
- [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
- ['1.0.0', [['1.0.0']]],
- ['>=*', [['']]],
- ['', [['']]],
- ['*', [['']]],
- ['*', [['']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['< 2.0.0', [['<2.0.0']]],
- ['<\t2.0.0', [['<2.0.0']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['||', [[''], ['']]],
- ['2.x.x', [['>=2.0.0', '<3.0.0']]],
- ['1.2.x', [['>=1.2.0', '<1.3.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['x', [['']]],
- ['2.*.*', [['>=2.0.0', '<3.0.0']]],
- ['1.2.*', [['>=1.2.0', '<1.3.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['*', [['']]],
- ['2', [['>=2.0.0', '<3.0.0']]],
- ['2.3', [['>=2.3.0', '<2.4.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
- ['~1', [['>=1.0.0', '<2.0.0']]],
- ['~>1', [['>=1.0.0', '<2.0.0']]],
- ['~> 1', [['>=1.0.0', '<2.0.0']]],
- ['~1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['<1', [['<1.0.0']]],
- ['< 1', [['<1.0.0']]],
- ['>=1', [['>=1.0.0']]],
- ['>= 1', [['>=1.0.0']]],
- ['<1.2', [['<1.2.0']]],
- ['< 1.2', [['<1.2.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
- ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
- ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
- ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
- ['>*', [['<0.0.0']]],
- ['<*', [['<0.0.0']]]
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var found = toComparators(v[0]);
- var jw = JSON.stringify(wanted);
- t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
- });
-
- t.end();
-});
-
-test('\ninvalid version numbers', function(t) {
- ['1.2.3.4',
- 'NOT VALID',
- 1.2,
- null,
- 'Infinity.NaN.Infinity'
- ].forEach(function(v) {
- t.throws(function() {
- new SemVer(v);
- }, {name:'TypeError', message:'Invalid Version: ' + v});
- });
-
- t.end();
-});
-
-test('\nstrict vs loose version numbers', function(t) {
- [['=1.2.3', '1.2.3'],
- ['01.02.03', '1.2.3'],
- ['1.2.3-beta.01', '1.2.3-beta.1'],
- [' =1.2.3', '1.2.3'],
- ['1.2.3foo', '1.2.3-foo']
- ].forEach(function(v) {
- var loose = v[0];
- var strict = v[1];
- t.throws(function() {
- new SemVer(loose);
- });
- var lv = new SemVer(loose, true);
- t.equal(lv.version, strict);
- t.ok(eq(loose, strict, true));
- t.throws(function() {
- eq(loose, strict);
- });
- t.throws(function() {
- new SemVer(strict).compare(loose);
- });
- });
- t.end();
-});
-
-test('\nstrict vs loose ranges', function(t) {
- [['>=01.02.03', '>=1.2.3'],
- ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
- ].forEach(function(v) {
- var loose = v[0];
- var comps = v[1];
- t.throws(function() {
- new Range(loose);
- });
- t.equal(new Range(loose, true).range, comps);
- });
- t.end();
-});
-
-test('\nmax satisfying', function(t) {
- [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
- [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
- [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
- [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
- ].forEach(function(v) {
- var versions = v[0];
- var range = v[1];
- var expect = v[2];
- var loose = v[3];
- var actual = semver.maxSatisfying(versions, range, loose);
- t.equal(actual, expect);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
deleted file mode 100644
index 0f7167d658..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var ltr = semver.ltr;
-
-test('\nltr tests', function(t) {
- // [range, version, loose]
- // Version should be less than range
- [
- ['~1.2.2', '1.2.1'],
- ['~0.6.1-1', '0.6.1-0'],
- ['1.0.0 - 2.0.0', '0.0.1'],
- ['1.0.0-beta.2', '1.0.0-beta.1'],
- ['1.0.0', '0.0.0'],
- ['>=2.0.0', '1.1.1'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '0.1.5'],
- ['2.x.x', '1.0.0'],
- ['1.2.x', '1.1.0'],
- ['1.2.x || 2.x', '1.0.0'],
- ['2.*.*', '1.0.1'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.9999'],
- ['2', '1.0.0'],
- ['2.3', '2.2.2'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.5'],
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.4'],
- ['~> 1', '0.2.3'],
- ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '0.1.0'],
- ['>1.2', '1.2.0'],
- ['> 1.2', '1.2.1'],
- ['1', '0.0.0beta', true],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['=0.7.x', '0.6.0'],
- ['=0.7.x', '0.6.0-asdf'],
- ['>=0.7.x', '0.6.0'],
- ['~1.2.2', '1.2.1'],
- ['1.0.0 - 2.0.0', '0.2.3'],
- ['1.0.0', '0.0.1'],
- ['>=2.0.0', '1.0.0'],
- ['>=2.0.0', '1.9999.9999'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['>2.0.0', '1.2.9'],
- ['2.x.x', '1.1.3'],
- ['1.2.x', '1.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.9999.9999'],
- ['2.3', '2.2.1'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.3'],
- ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
- ['>1', '1.0.0'],
- ['2', '1.0.0beta', true],
- ['>1', '1.0.0beta', true],
- ['> 1', '1.0.0beta', true],
- ['=0.7.x', '0.6.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['^1', '1.0.0-0'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['>=0.7.x', '0.6.2'],
- ['>1.2.3', '1.3.0-alpha']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(ltr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative ltr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be less than range
- [
- ['~ 1.0', '1.1.0'],
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '2.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^3.0.0', '4.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
- ['^1.0.0alpha', '1.0.0beta', true],
- ['~1.0.0alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0beta', true],
- ['~1.0.0-alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0-beta'],
- ['~1.0.0-alpha', '1.0.0-beta'],
- ['=0.1.0', '1.0.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(ltr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
deleted file mode 100644
index e9d4039c8b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-
-test('\nmajor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', 1],
- [' 1.2.3 ', 1],
- [' 2.2.3-4 ', 2],
- [' 3.2.3-pre ', 3],
- ['v5.2.3', 5],
- [' v8.2.3 ', 8],
- ['\t13.2.3', 13],
- ['=21.2.3', 21, true],
- ['v=34.2.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'major(' + range + ') = ' + version;
- t.equal(semver.major(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\nminor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.1.3', 1],
- [' 1.1.3 ', 1],
- [' 1.2.3-4 ', 2],
- [' 1.3.3-pre ', 3],
- ['v1.5.3', 5],
- [' v1.8.3 ', 8],
- ['\t1.13.3', 13],
- ['=1.21.3', 21, true],
- ['v=1.34.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'minor(' + range + ') = ' + version;
- t.equal(semver.minor(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\npatch tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.1', 1],
- [' 1.2.1 ', 1],
- [' 1.2.2-4 ', 2],
- [' 1.2.3-pre ', 3],
- ['v1.2.5', 5],
- [' v1.2.8 ', 8],
- ['\t1.2.13', 13],
- ['=1.2.21', 21, true],
- ['v=1.2.34', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'patch(' + range + ') = ' + version;
- t.equal(semver.patch(range, loose), version, msg);
- });
- t.end();
-});
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 f74df4fcb7..b123eaf34e 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,26 +1,26 @@
{
- "_from": "agent-base@2",
- "_id": "agent-base@2.1.1",
+ "_from": "agent-base@4",
+ "_id": "agent-base@4.1.0",
"_inBundle": false,
- "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
+ "_integrity": "sha1-IOF0Ac1Js8B2v1akvGxbQ2/6jVU=",
"_location": "/pacote/make-fetch-happen/http-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "agent-base@2",
+ "raw": "agent-base@4",
"name": "agent-base",
"escapedName": "agent-base",
- "rawSpec": "2",
+ "rawSpec": "4",
"saveSpec": null,
- "fetchSpec": "2"
+ "fetchSpec": "4"
},
"_requiredBy": [
"/pacote/make-fetch-happen/http-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
- "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7",
- "_spec": "agent-base@2",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.0.tgz",
+ "_shasum": "20e17401cd49b3c076bf56a4bc6c5b436ffa8d55",
+ "_spec": "agent-base@4",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent",
"author": {
"name": "Nathan Rajlich",
@@ -32,14 +32,16 @@
},
"bundleDependencies": false,
"dependencies": {
- "extend": "~3.0.0",
- "semver": "~5.0.1"
+ "es6-promisify": "^5.0.0"
},
"deprecated": false,
"description": "Turn a function into an `http.Agent` instance",
"devDependencies": {
- "mocha": "2",
- "ws": "0.8.0"
+ "mocha": "^3.4.2",
+ "ws": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
},
"homepage": "https://github.com/TooTallNate/node-agent-base#readme",
"keywords": [
@@ -50,7 +52,7 @@
"https"
],
"license": "MIT",
- "main": "agent.js",
+ "main": "./index.js",
"name": "agent-base",
"repository": {
"type": "git",
@@ -59,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.1"
+ "version": "4.1.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 7cdacafa3e..05cbaa1e70 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,53 +1,25 @@
-var url = require('url');
-var http = require('http');
-var https = require('https');
-var semver = require('semver');
-var inherits = require('util').inherits;
+'use strict';
+const url = require('url');
+const https = require('https');
-// we only need to patch the `http.request()` and
-// `http.ClientRequest` on older versions of Node.js
-if (semver.lt(process.version, '0.11.8')) {
- // subclass the native ClientRequest to include the
- // passed in `options` object.
- http.ClientRequest = (function (_ClientRequest) {
- function ClientRequest (options, cb) {
- this._options = options;
- _ClientRequest.call(this, options, cb);
- }
- inherits(ClientRequest, _ClientRequest);
-
- return ClientRequest;
- })(http.ClientRequest);
-
-
- // need to re-define the `request()` method, since on node v0.8/v0.10
- // the closure-local ClientRequest is used, rather than the monkey
- // patched version we have created here.
- http.request = (function (request) {
- return function (options, cb) {
- if (typeof options === 'string') {
- options = url.parse(options);
- }
- if (options.protocol && options.protocol !== 'http:') {
- throw new Error('Protocol:' + options.protocol + ' not supported.');
- }
- return new http.ClientRequest(options, cb);
- };
- })(http.request);
-}
-
-
-// this currently needs to be applied to all Node.js versions
-// (v0.8.x, v0.10.x, v0.12.x), in order to determine if the `req`
-// is an HTTP or HTTPS request. There is currently no PR attempting
-// to move this property upstream.
-https.request = (function (request) {
- return function (options, cb) {
+/**
+ * This currently needs to be applied to all Node.js versions
+ * in order to determine if the `req` is an HTTP or HTTPS request.
+ *
+ * There is currently no PR attempting to move this property upstream.
+ */
+https.request = (function(request) {
+ return function(_options, cb) {
+ let options
if (typeof options === 'string') {
- options = url.parse(options);
+ options = url.parse(_options);
+ } else {
+ options = Object.assign({}, _options);
+ }
+ if (null == options.port) {
+ options.port = 443;
}
- if (null == options.port) options.port = 443;
options.secureEndpoint = true;
return request.call(https, options, cb);
};
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 7d8dee66ce..43217d4273 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
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -13,18 +12,17 @@ var WebSocket = require('ws');
var assert = require('assert');
var events = require('events');
var inherits = require('util').inherits;
-var semver = require('semver');
var Agent = require('../');
-describe('Agent', function () {
- describe('subclass', function () {
- it('should be subclassable', function (done) {
- function MyAgent () {
+describe('Agent', function() {
+ describe('subclass', function() {
+ it('should be subclassable', function(done) {
+ function MyAgent() {
Agent.call(this);
}
inherits(MyAgent, Agent);
- MyAgent.prototype.callback = function (req, opts, fn) {
+ MyAgent.prototype.callback = function(req, opts, fn) {
assert.equal(req.path, '/foo');
assert.equal(req.getHeader('host'), '127.0.0.1:1234');
assert.equal(opts.secureEndpoint, true);
@@ -32,102 +30,177 @@ describe('Agent', function () {
};
var info = url.parse('https://127.0.0.1:1234/foo');
- info.agent = new MyAgent;
+ info.agent = new MyAgent();
https.get(info);
});
});
- describe('"error" event', function () {
- it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) {
+ describe('options', function() {
+ it('should support an options Object as first argument', function() {
+ var agent = new Agent({ timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should support an options Object as second argument', function() {
+ var agent = new Agent(function() {}, { timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should be mixed in with HTTP request options', function(done) {
+ var agent = new Agent({
+ host: 'my-proxy.com',
+ port: 3128,
+ foo: 'bar'
+ });
+ agent.callback = function(req, opts, fn) {
+ assert.equal('bar', opts.foo);
+ assert.equal('a', opts.b);
+
+ // `host` and `port` are special-cases, and should always be
+ // overwritten in the request `opts` inside the agent-base callback
+ assert.equal('localhost', opts.host);
+ assert.equal(80, opts.port);
+ done();
+ };
+ var opts = {
+ b: 'a',
+ agent: agent
+ };
+ http.get(opts);
+ });
+ });
+ describe('`this` context', function() {
+ it('should be the Agent instance', function(done) {
+ var called = false;
+ var agent = new Agent();
+ 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);
+ req.on('error', function(err) {
+ 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) {
+ 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);
+ req.on('error', function(err) {
+ 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
+ ) {
var agent = new Agent();
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
- assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message);
+ req.on('error', function(err) {
+ assert.equal(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`',
+ err.message
+ );
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
fn(new Error('is this caught?'));
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
- setTimeout(function () {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
+ setTimeout(function() {
fn(new Error('is this caught?'));
}, 10);
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
});
- describe('artificial "streams"', function () {
- it('should send a GET request', function (done) {
+ describe('artificial "streams"', function() {
+ it('should send a GET request', function(done) {
var stream = new events.EventEmitter();
// needed for the `http` module to call .write() on the stream
stream.writable = true;
- stream.write = function (str) {
+ stream.write = function(str) {
assert(0 == str.indexOf('GET / HTTP/1.1'));
done();
};
// needed for `http` module in Node.js 4
- stream.cork = function () {
- };
+ stream.cork = function() {};
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
var req = http.request(opts);
req.end();
});
- it('should receive a GET response', function (done) {
+ it('should receive a GET response', function(done) {
var stream = new events.EventEmitter();
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
- var req = http.request(opts, function (res) {
+ var req = http.request(opts, function(res) {
assert.equal('0.9', res.httpVersion);
assert.equal(111, res.statusCode);
assert.equal('bar', res.headers.foo);
done();
});
- req.end();
- // have to nextTick() since `http.ClientRequest` doesn't *actually*
- // attach the listeners to the "stream" until the next tick :\
- process.nextTick(function () {
- var buf = new Buffer('HTTP/0.9 111\r\n' +
- 'Foo: bar\r\n' +
- 'Set-Cookie: 1\r\n' +
- 'Set-Cookie: 2\r\n\r\n');
+ // have to wait for the "socket" event since `http.ClientRequest`
+ // doesn't *actually* attach the listeners to the "stream" until
+ // this happens
+ req.once('socket', function() {
+ var buf = new Buffer(
+ 'HTTP/0.9 111\r\n' +
+ 'Foo: bar\r\n' +
+ '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);
@@ -136,34 +209,36 @@ describe('Agent', function () {
stream.emit('data', buf);
}
});
+
+ req.end();
});
});
});
-describe('"http" module', function () {
+describe('"http" module', function() {
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
server = http.createServer();
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTP requests', function (done) {
+ it('should work for basic HTTP requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -171,7 +246,63 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support direct return in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ called = true;
+ return net.connect(opts);
+ });
+
+ // 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support returning a Promise in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ return new Promise(function(resolve, reject) {
+ called = true;
+ resolve(net.connect(opts));
+ });
+ });
+
+ // 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);
@@ -180,7 +311,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/foo');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -189,9 +320,9 @@ describe('"http" module', function () {
});
});
- it('should set the `Connection: close` response header', function (done) {
+ it('should set the `Connection: close` response header', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -199,7 +330,7 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Url', req.url);
assert.equal('close', req.headers.connection);
@@ -208,7 +339,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/bar');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('/bar', res.headers['x-url']);
assert.equal('close', res.headers.connection);
assert(gotReq);
@@ -217,8 +348,8 @@ describe('"http" module', function () {
});
});
- it('should pass through options from `http.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `http.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -231,8 +362,8 @@ describe('"http" module', function () {
});
});
- it('should default to port 80', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 80', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(80, opts.port);
done();
});
@@ -245,36 +376,76 @@ describe('"http" module', function () {
agent: agent
});
});
+
+ it('should support the "timeout" option', function(done) {
+ // ensure we timeout after the "error" event had a chance to trigger
+ this.timeout(1000);
+ this.slow(800);
+
+ var agent = new Agent(
+ function(req, opts, fn) {
+ // this function will time out
+ },
+ { timeout: 100 }
+ );
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function(err) {
+ assert.equal('ETIMEOUT', err.code);
+ req.abort();
+ done();
+ });
+ });
});
-describe('"https" module', function () {
+describe('"https" module', function() {
var server;
var port;
// setup test HTTPS server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTPS requests', function (done) {
+
+ it('should not modify the passed in Options object', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(443, opts.port);
+ assert.equal('localhost', opts.host);
+ });
+ var opts = { agent: agent };
+ var req = https.request(opts);
+ assert.equal(true, called);
+ assert.equal(false, 'secureEndpoint' in opts);
+ assert.equal(false, 'port' in opts);
+ done();
+ });
+
+ it('should work for basic HTTPS requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
assert(opts.secureEndpoint);
var socket = tls.connect(opts);
@@ -283,7 +454,7 @@ describe('"https" module', function () {
// add HTTPS server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Foo', 'bar');
res.setHeader('X-Url', req.url);
@@ -293,7 +464,7 @@ describe('"https" module', function () {
var info = url.parse('https://127.0.0.1:' + port + '/foo');
info.agent = agent;
info.rejectUnauthorized = false;
- https.get(info, function (res) {
+ https.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -302,8 +473,8 @@ describe('"https" module', function () {
});
});
- it('should pass through options from `https.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `https.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -316,8 +487,8 @@ describe('"https" module', function () {
});
});
- it('should default to port 443', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 443', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(true, opts.secureEndpoint);
assert.equal(false, opts.rejectUnauthorized);
assert.equal(443, opts.port);
@@ -335,39 +506,39 @@ describe('"https" module', function () {
});
});
-describe('"ws" server', function () {
+describe('"ws" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
- server = http.createServer()
+ before(function(done) {
+ server = http.createServer();
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic WebSocket connections', function (done) {
+ it('should work for basic WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = net.connect(opts);
fn(null, socket);
});
@@ -376,57 +547,56 @@ describe('"ws" server', function () {
agent: agent
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
-describe('"wss" server', function () {
+describe('"wss" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for secure WebSocket connections', function (done) {
+ it('should work for secure WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = tls.connect(opts);
fn(null, socket);
});
@@ -436,16 +606,15 @@ describe('"wss" server', function () {
rejectUnauthorized: false
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.jscs.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.jscs.json
deleted file mode 100644
index b1c6a99f97..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.jscs.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "es3": true,
-
- "additionalRules": [],
-
- "requireSemicolons": true,
-
- "disallowMultipleSpaces": true,
-
- "disallowIdentifierNames": [],
-
- "requireCurlyBraces": {
- "allExcept": [],
- "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
- },
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "disallowSpaceBeforeComma": true,
- "disallowSpaceAfterComma": false,
- "disallowSpaceBeforeSemicolon": true,
-
- "disallowNodeTypes": [
- "DebuggerStatement",
- "LabeledStatement",
- "SwitchCase",
- "SwitchStatement",
- "WithStatement"
- ],
-
- "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "requireSpaceBetweenArguments": true,
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "disallowTrailingComma": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "requireDotNotation": { "allExcept": ["keywords"] },
-
- "requireParenthesesAroundIIFE": true,
-
- "validateLineBreaks": "LF",
-
- "validateQuoteMarks": {
- "escape": true,
- "mark": "'"
- },
-
- "disallowOperatorBeforeLineBreak": [],
-
- "requireSpaceBeforeKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "finally",
- "while",
- "with",
- "return"
- ],
-
- "validateAlignedFunctionParameters": {
- "lineBreakAfterOpeningBraces": true,
- "lineBreakBeforeClosingBraces": true
- },
-
- "requirePaddingNewLinesBeforeExport": true,
-
- "validateNewlineAfterArrayElements": {
- "maximum": 6
- },
-
- "requirePaddingNewLinesAfterUseStrict": true,
-
- "disallowArrowFunctions": true,
-
- "disallowMultiLineTernary": true,
-
- "validateOrderInObjectKeys": false,
-
- "disallowIdenticalDestructuringNames": true,
-
- "disallowNestedTernaries": { "maxLevel": 1 },
-
- "requireSpaceAfterComma": { "allExcept": ["trailing"] },
- "requireAlignedMultilineParams": false,
-
- "requireSpacesInGenerator": {
- "afterStar": true
- },
-
- "disallowSpacesInGenerator": {
- "beforeStar": true
- },
-
- "disallowVar": false,
-
- "requireArrayDestructuring": false,
-
- "requireEnhancedObjectLiterals": false,
-
- "requireObjectDestructuring": false,
-
- "requireEarlyReturn": false,
-
- "requireCapitalizedConstructorsNew": {
- "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
- },
-
- "requireImportAlphabetized": false,
-
- "requireSpaceBeforeObjectValues": true,
- "requireSpaceBeforeDestructuredValues": true,
-
- "disallowSpacesInsideTemplateStringPlaceholders": true,
-
- "disallowArrayDestructuringReturn": false,
-
- "requireNewlineBeforeSingleStatementsInIf": false,
-
- "disallowUnusedVariables": true,
-
- "requireSpacesInsideImportedObjectBraces": true,
-
- "requireUseStrict": true
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.npmignore
deleted file mode 100644
index 30d74d2584..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test \ 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/extend/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.travis.yml
deleted file mode 100644
index 6bf696c87b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/.travis.yml
+++ /dev/null
@@ -1,179 +0,0 @@
-language: node_js
-os:
- - linux
-node_js:
- - "7.9"
- - "6.10"
- - "5.12"
- - "4.8"
- - "iojs-v3.3"
- - "iojs-v2.5"
- - "iojs-v1.8"
- - "0.12"
- - "0.10"
- - "0.8"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
-install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
-script:
- - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
- - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
- - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
-sudo: false
-env:
- - TEST=true
-matrix:
- fast_finish: true
- include:
- - node_js: "node"
- env: PRETEST=true
- - node_js: "node"
- env: COVERAGE=true
- - node_js: "7.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.10"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.4"
- env: TEST=true ALLOW_FAILURE=true
- ##- node_js: "7"
- #env: TEST=true
- #os: osx
- #- node_js: "6"
- #env: TEST=true
- #os: osx
- #- node_js: "5"
- #env: TEST=true
- #os: osx
- #- node_js: "4"
- #env: TEST=true
- #os: osx
- #- node_js: "iojs"
- #env: TEST=true
- #os: osx
- #- node_js: "0.12"
- #env: TEST=true
- #os: osx
- #- node_js: "0.10"
- #env: TEST=true
- #os: osx
- #- node_js: "0.8"
- #env: TEST=true
- #os: osx
- allow_failures:
- - os: osx
- - env: TEST=true ALLOW_FAILURE=true
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/CHANGELOG.md
deleted file mode 100644
index 7d2e5f3a50..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/CHANGELOG.md
+++ /dev/null
@@ -1,76 +0,0 @@
-3.0.1 / 2017-04-27
-==================
- * [Fix] deep extending should work with a non-object (#46)
- * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`
- * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix
- * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG.
- * [Docs] Add example to readme (#34)
-
-3.0.0 / 2015-07-01
-==================
- * [Possible breaking change] Use global "strict" directive (#32)
- * [Tests] `int` is an ES3 reserved word
- * [Tests] Test up to `io.js` `v2.3`
- * [Tests] Add `npm run eslint`
- * [Dev Deps] Update `covert`, `jscs`
-
-2.0.1 / 2015-04-25
-==================
- * Use an inline `isArray` check, for ES3 browsers. (#27)
- * Some old browsers fail when an identifier is `toString`
- * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
- * Add license info to package.json (#25)
- * Update `tape`, `jscs`
- * Adding a CHANGELOG
-
-2.0.0 / 2014-10-01
-==================
- * Increase code coverage to 100%; run code coverage as part of tests
- * Add `npm run lint`; Run linter as part of tests
- * Remove nodeType and setInterval checks in isPlainObject
- * Updating `tape`, `jscs`, `covert`
- * General style and README cleanup
-
-1.3.0 / 2014-06-20
-==================
- * Add component.json for browser support (#18)
- * Use SVG for badges in README (#16)
- * Updating `tape`, `covert`
- * Updating travis-ci to work with multiple node versions
- * Fix `deep === false` bug (returning target as {}) (#14)
- * Fixing constructor checks in isPlainObject
- * Adding additional test coverage
- * Adding `npm run coverage`
- * Add LICENSE (#13)
- * Adding a warning about `false`, per #11
- * General style and whitespace cleanup
-
-1.2.1 / 2013-09-14
-==================
- * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
- * Updating `tape`
-
-1.2.0 / 2013-09-02
-==================
- * Updating the README: add badges
- * Adding a missing variable reference.
- * Using `tape` instead of `buster` for tests; add more tests (#7)
- * Adding node 0.10 to Travis CI (#6)
- * Enabling "npm test" and cleaning up package.json (#5)
- * Add Travis CI.
-
-1.1.3 / 2012-12-06
-==================
- * Added unit tests.
- * Ensure extend function is named. (Looks nicer in a stack trace.)
- * README cleanup.
-
-1.1.1 / 2012-11-07
-==================
- * README cleanup.
- * Added installation instructions.
- * Added a missing semicolon
-
-1.0.0 / 2012-04-08
-==================
- * Initial commit
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/LICENSE
deleted file mode 100644
index 92d41503d3..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Stefan Thomas
-
-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/http-proxy-agent/node_modules/extend/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/README.md
deleted file mode 100644
index 947dda6aeb..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-[![Build Status][travis-svg]][travis-url]
-[![dependency status][deps-svg]][deps-url]
-[![dev dependency status][dev-deps-svg]][dev-deps-url]
-
-# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
-
-`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
-
-Notes:
-
-* Since Node.js >= 4,
- [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- now offers the same functionality natively (but without the "deep copy" option).
- See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
-* Some native implementations of `Object.assign` in both Node.js and many
- browsers (since NPM modules are for the browser too) may not be fully
- spec-compliant.
- Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
- a compliant candidate.
-
-## Installation
-
-This package is available on [npm][npm-url] as: `extend`
-
-``` sh
-npm install extend
-```
-
-## Usage
-
-**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
-
-*Extend one object with one or more others, returning the modified object.*
-
-**Example:**
-
-``` js
-var extend = require('extend');
-extend(targetObject, object1, object2);
-```
-
-Keep in mind that the target object will be modified, and will be returned from extend().
-
-If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
-Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
-Warning: passing `false` as the first argument is not supported.
-
-### Arguments
-
-* `deep` *Boolean* (optional)
-If set, the merge becomes recursive (i.e. deep copy).
-* `target` *Object*
-The object to extend.
-* `object1` *Object*
-The object that will be merged into the first.
-* `objectN` *Object* (Optional)
-More objects to merge into the first.
-
-## License
-
-`node-extend` is licensed under the [MIT License][mit-license-url].
-
-## Acknowledgements
-
-All credit to the jQuery authors for perfecting this amazing utility.
-
-Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
-
-[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
-[travis-url]: https://travis-ci.org/justmoon/node-extend
-[npm-url]: https://npmjs.org/package/extend
-[mit-license-url]: http://opensource.org/licenses/MIT
-[github-justmoon]: https://github.com/justmoon
-[github-insin]: https://github.com/insin
-[github-ljharb]: https://github.com/ljharb
-[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
-[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
-[deps-url]: https://david-dm.org/justmoon/node-extend
-[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
-[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/component.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/component.json
deleted file mode 100644
index 0f76b59305..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/component.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "extend",
- "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
- "version": "3.0.0",
- "description": "Port of jQuery.extend for node.js and the browser.",
- "scripts": [
- "index.js"
- ],
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "repository" : {
- "type": "git",
- "url": "https://github.com/justmoon/node-extend.git"
- },
- "dependencies": {
- },
- "devDependencies": {
- "tape" : "~3.0.0",
- "covert": "~0.4.0",
- "jscs": "~1.6.2"
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/index.js
deleted file mode 100644
index bbe53f6608..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/index.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
-
-var isArray = function isArray(arr) {
- if (typeof Array.isArray === 'function') {
- return Array.isArray(arr);
- }
-
- return toStr.call(arr) === '[object Array]';
-};
-
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
-
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) { /**/ }
-
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
-
-module.exports = function extend() {
- var options, name, src, copy, copyIsArray, clone;
- var target = arguments[0];
- var i = 1;
- var length = arguments.length;
- var deep = false;
-
- // Handle a deep copy situation
- if (typeof target === 'boolean') {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
- if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
- target = {};
- }
-
- for (; i < length; ++i) {
- options = arguments[i];
- // Only deal with non-null/undefined values
- if (options != null) {
- // Extend the base object
- for (name in options) {
- src = target[name];
- copy = options[name];
-
- // Prevent never-ending loop
- if (target !== copy) {
- // Recurse if we're merging plain objects or arrays
- if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
- if (copyIsArray) {
- copyIsArray = false;
- clone = src && isArray(src) ? src : [];
- } else {
- clone = src && isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[name] = extend(deep, clone, copy);
-
- // Don't bring in undefined values
- } else if (typeof copy !== 'undefined') {
- target[name] = copy;
- }
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/package.json
deleted file mode 100644
index dd5eb6968b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/extend/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_from": "extend@3",
- "_id": "extend@3.0.1",
- "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "_location": "/pacote/make-fetch-happen/http-proxy-agent/extend",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "extend@3",
- "name": "extend",
- "escapedName": "extend",
- "rawSpec": "3",
- "saveSpec": null,
- "fetchSpec": "3"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/http-proxy-agent",
- "/pacote/make-fetch-happen/http-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444",
- "_shrinkwrap": null,
- "_spec": "extend@3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/http-proxy-agent",
- "author": {
- "name": "Stefan Thomas",
- "email": "justmoon@members.fsf.org",
- "url": "http://www.justmoon.net"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/justmoon/node-extend/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "Port of jQuery.extend for node.js and the browser",
- "devDependencies": {
- "@ljharb/eslint-config": "^11.0.0",
- "covert": "^1.1.0",
- "eslint": "^3.19.0",
- "jscs": "^3.0.7",
- "tape": "^4.6.3"
- },
- "homepage": "https://github.com/justmoon/node-extend#readme",
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "license": "MIT",
- "main": "index",
- "name": "extend",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/justmoon/node-extend.git"
- },
- "scripts": {
- "coverage": "covert test/index.js",
- "coverage-quiet": "covert test/index.js --quiet",
- "eslint": "eslint *.js */*.js",
- "jscs": "jscs *.js */*.js",
- "lint": "npm run jscs && npm run eslint",
- "posttest": "npm run coverage-quiet",
- "pretest": "npm run lint",
- "test": "npm run tests-only",
- "tests-only": "node test"
- },
- "version": "3.0.1"
-}
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 90e421d9e4..38010f35e5 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,46 +1,44 @@
{
- "_from": "http-proxy-agent@^1.0.0",
- "_id": "http-proxy-agent@1.0.0",
- "_integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=",
+ "_from": "http-proxy-agent@^2.0.0",
+ "_id": "http-proxy-agent@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-RkgqLwUjpNYIJVFwn0acs+SoX/Q=",
"_location": "/pacote/make-fetch-happen/http-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "http-proxy-agent@^1.0.0",
+ "raw": "http-proxy-agent@^2.0.0",
"name": "http-proxy-agent",
"escapedName": "http-proxy-agent",
- "rawSpec": "^1.0.0",
+ "rawSpec": "^2.0.0",
"saveSpec": null,
- "fetchSpec": "^1.0.0"
+ "fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz",
- "_shasum": "cc1ce38e453bf984a0f7702d2dd59c73d081284a",
- "_shrinkwrap": null,
- "_spec": "http-proxy-agent@^1.0.0",
+ "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.0.0.tgz",
+ "_shasum": "46482a2f0523a4d6082551709f469cb3e4a85ff4",
+ "_spec": "http-proxy-agent@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
"url": "http://n8.io/"
},
- "bin": null,
"bugs": {
"url": "https://github.com/TooTallNate/node-http-proxy-agent/issues"
},
"bundleDependencies": false,
"dependencies": {
- "agent-base": "2",
- "debug": "2",
- "extend": "3"
+ "agent-base": "4",
+ "debug": "2"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTP",
"devDependencies": {
- "mocha": "2",
+ "mocha": "3",
"proxy": "~0.2.3"
},
"homepage": "https://github.com/TooTallNate/node-http-proxy-agent#readme",
@@ -51,10 +49,8 @@
"agent"
],
"license": "MIT",
- "main": "http-proxy-agent.js",
+ "main": "./index.js",
"name": "http-proxy-agent",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-http-proxy-agent.git"
@@ -62,5 +58,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "1.0.0"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml
index 85a50123c6..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml
@@ -1,8 +1,22 @@
+sudo: false
+
language: node_js
+
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
-before_install:
- - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
- - npm install -g npm@latest
+ - "4"
+ - "5"
+ - "6"
+ - "7"
+ - "8"
+
+install:
+ - PATH="`npm bin`:`npm bin -g`:$PATH"
+ # Install dependencies and build
+ - npm install
+
+script:
+ # Output useful info for debugging
+ - node --version
+ - npm --version
+ # Run tests
+ - npm test
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 0d882d4458..8f96c39490 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,19 @@
+2.0.0 / 2017-06-26
+==================
+
+ * rename https-proxy-agent.js to index.js
+ * update dependencies and remove semver-specific test case
+ * update `agent-base` to v4
+ * remove `extend` dependency
+ * :arrow_up: update minimum version of debug dependency
+ * opts/options
+ * drop Node versions < v4 from Travis-CI
+ * test Node.js 5, 6, 7 and 8 on Travis-CI
+ * README: remove outdated `secureEndpoint` reference
+ * README: remove `secureEndpoint` docs, add `headers`
+ * https-proxy-agent: add support for proxy "headers"
+
1.0.0 / 2015-07-10
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md
index b62d9c84bc..5e0419cf9c 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md
@@ -42,13 +42,13 @@ console.log('using proxy server %j', proxy);
// HTTPS endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
console.log('attempting to GET %j', endpoint);
-var opts = url.parse(endpoint);
+var options = url.parse(endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
var agent = new HttpsProxyAgent(proxy);
-opts.agent = agent;
+options.agent = agent;
-https.get(opts, function (res) {
+https.get(options, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
@@ -71,13 +71,9 @@ var parsed = url.parse(endpoint);
console.log('attempting to connect to WebSocket %j', endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
-var opts = url.parse(proxy);
+var options = url.parse(proxy);
-// IMPORTANT! Set the `secureEndpoint` option to `false` when connecting
-// over "ws://", but `true` when connecting over "wss://"
-opts.secureEndpoint = parsed.protocol ? parsed.protocol == 'wss:' : false;
-
-var agent = new HttpsProxyAgent(opts);
+var agent = new HttpsProxyAgent(options);
// finally, initiate the WebSocket connection
var socket = new WebSocket(endpoint, { agent: agent });
@@ -96,19 +92,19 @@ socket.on('message', function (data, flags) {
API
---
-### new HttpsProxyAgent(opts)
+### new HttpsProxyAgent(Object options)
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
-The `opts` argument may either be a string URI of the proxy server to use, or an
+The `options` argument may either be a string URI of the proxy server to use, or an
"options" object with more specific properties:
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
* `port` - Number - Proxy port to connect to. Required.
* `secureProxy` - Boolean - If `true`, then use TLS to connect to the proxy. Defaults to `false`.
- * `secureEndpoint` - Boolean - If `true` then a TLS connection to the endpoint will be established on top of the proxy socket. Defaults to `true`.
+ * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method.
* Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/https-proxy-agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js
index 6baaa9df2b..33207c1454 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/https-proxy-agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js
@@ -6,7 +6,6 @@
var net = require('net');
var tls = require('tls');
var url = require('url');
-var extend = require('extend');
var Agent = require('agent-base');
var inherits = require('util').inherits;
var debug = require('debug')('https-proxy-agent');
@@ -29,9 +28,9 @@ function HttpsProxyAgent (opts) {
if ('string' == typeof opts) opts = url.parse(opts);
if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
debug('creating new HttpsProxyAgent instance: %o', opts);
- Agent.call(this, connect);
+ Agent.call(this, opts);
- var proxy = extend({}, opts);
+ var proxy = Object.assign({}, opts);
// if `true`, then connect to the proxy server over TLS. defaults to `false`.
this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
@@ -58,8 +57,7 @@ inherits(HttpsProxyAgent, Agent);
* @api public
*/
-function connect (req, opts, fn) {
-
+HttpsProxyAgent.prototype.callback = function connect (req, opts, fn) {
var proxy = this.proxy;
// create a socket connection to the proxy server
@@ -191,12 +189,16 @@ function connect (req, opts, fn) {
var hostname = opts.host + ':' + opts.port;
var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n';
- var auth = proxy.auth;
- if (auth) {
- msg += 'Proxy-Authorization: Basic ' + new Buffer(auth).toString('base64') + '\r\n';
+
+ var headers = Object.assign({}, proxy.headers);
+ if (proxy.auth) {
+ headers['Proxy-Authorization'] = 'Basic ' + new Buffer(proxy.auth).toString('base64');
}
- msg += 'Host: ' + hostname + '\r\n' +
- 'Connection: close\r\n' +
- '\r\n';
- socket.write(msg);
+ headers['Host'] = hostname;
+ headers['Connection'] = 'close';
+ Object.keys(headers).forEach(function (name) {
+ msg += name + ': ' + headers[name] + '\r\n';
+ });
+
+ socket.write(msg + '\r\n');
};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore
index 07e6e472cc..c12f3a80c1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore
@@ -1 +1,2 @@
/node_modules
+/?.js
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
index 20b794051c..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml
@@ -3,21 +3,14 @@ sudo: false
language: node_js
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "1"
- - "2"
- - "3"
- "4"
- "5"
- "6"
- "7"
+ - "8"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
- # Node 0.8 comes with a too obsolete npm
- - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
# Install dependencies and build
- npm install
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 2191a9e801..b79a539629 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,8 +1,43 @@
+4.1.0 / 2017-06-26
+==================
+
+ * mix in Agent options into Request options
+ * throw when nothing is returned from agent-base callback
+ * do not modify the options object for https requests
+
+4.0.1 / 2017-06-13
+==================
+
+ * add `this` context tests and fixes
+
+4.0.0 / 2017-06-06
+==================
+
+ * drop support for Node.js < 4
+ * drop old versions of Node.js from Travis-CI
+ * specify Node.js >= 4.0.0 in `engines.node`
+ * remove more old code
+ * remove "extend" dependency
+ * remove "semver" dependency
+ * make the Promise logic a bit cleaner
+ * add async function pseudo-example to README
+ * use direct return in README example
+
+3.0.0 / 2017-06-02
+==================
+
+ * drop support for Node.js v0.8 and v0.10
+ * add support for async, Promises, and direct return
+ * add a couple `options` test cases
+ * implement a `"timeout"` option
+ * rename main file to `index.js`
+ * test Node 8 on Travis
+
2.1.1 / 2017-05-30
==================
- * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
+ * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
2.1.0 / 2017-05-26
==================
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 616b90cdbf..64175a43a4 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
@@ -1,6 +1,6 @@
agent-base
==========
-### Turn a function into an `http.Agent` instance
+### Turn a function into an [`http.Agent`][http.Agent] instance
[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base)
This module provides an `http.Agent` generator. That is, you pass it an async
@@ -34,7 +34,7 @@ Example
Here's a minimal example that creates a new `net.Socket` connection to the server
for every HTTP request (i.e. the equivalent of `agent: false` option):
-``` js
+```js
var net = require('net');
var tls = require('tls');
var url = require('url');
@@ -42,10 +42,10 @@ var http = require('http');
var agent = require('agent-base');
var endpoint = 'http://nodejs.org/api/';
-var opts = url.parse(endpoint);
+var parsed = url.parse(endpoint);
// This is the important part!
-opts.agent = agent(function (req, opts, fn) {
+parsed.agent = agent(function (req, opts) {
var socket;
// `secureEndpoint` is true when using the https module
if (opts.secureEndpoint) {
@@ -53,26 +53,40 @@ opts.agent = agent(function (req, opts, fn) {
} else {
socket = net.connect(opts);
}
- fn(null, socket);
+ return socket;
});
// Everything else works just like normal...
-http.get(opts, function (res) {
+http.get(parsed, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
```
+You can also return a Promise or use an `async` function:
+
+```js
+agent(async function (req, opts) {
+ await sleep(1000);
+ // etc…
+});
+```
+
+
API
---
-## Agent(Function callback) → http.Agent
+## Agent(Function callback[, Object options]) → [http.Agent][]
Creates a base `http.Agent` that will execute the callback function `callback`
for every HTTP request that it is used as the `agent` for. The callback function
is responsible for creating a `stream.Duplex` instance of some kind that will be
used as the underlying socket in the HTTP request.
+The `options` object accepts the following properties:
+
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
+
The callback function should have the following signature:
### callback(http.ClientRequest req, Object options, Function cb) → undefined
@@ -86,7 +100,7 @@ the callback function `cb` once created, and the HTTP request will
continue to proceed.
If the `https` module is used to invoke the HTTP request, then the
-`secureEndpoint` property on `options` will be set to `true`.
+`secureEndpoint` property on `options` _will be set to `true`_.
License
@@ -119,3 +133,4 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js
deleted file mode 100644
index 7ea91f886c..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/agent.js
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-require('./patch-core');
-var extend = require('extend');
-var inherits = require('util').inherits;
-var EventEmitter = require('events').EventEmitter;
-
-/**
- * Module exports.
- */
-
-module.exports = Agent;
-
-/**
- * Base `http.Agent` implementation.
- * No pooling/keep-alive is implemented by default.
- *
- * @param {Function} callback
- * @api public
- */
-
-function Agent (callback) {
- if (!(this instanceof Agent)) return new Agent(callback);
- EventEmitter.call(this);
- if ('function' === typeof callback) {
- this.callback = callback;
- }
-}
-inherits(Agent, EventEmitter);
-
-Agent.prototype.callback = function callback (req, opts, fn) {
- fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'));
-};
-
-/**
- * Called by node-core's "_http_client.js" module when creating
- * a new HTTP request with this Agent instance.
- *
- * @api public
- */
-
-Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) {
- var opts;
- if ('object' == typeof host) {
- // >= v0.11.x API
- opts = extend({}, req._options, host);
- } else {
- // <= v0.10.x API
- opts = extend({}, req._options, { host: host, port: port });
- if (null != localAddress) {
- opts.localAddress = localAddress;
- }
- }
-
- if (opts.host && opts.path) {
- // 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;
- }
-
- // set default `port` if none was explicitly specified
- if (null == opts.port) {
- opts.port = opts.secureEndpoint ? 443 : 80;
- }
-
- delete opts.agent;
- delete opts.hostname;
- delete opts._defaultAgent;
- delete opts.defaultPort;
- delete opts.createConnection;
-
- // hint to use "Connection: close"
- // XXX: non-documented `http` module API :(
- req._last = true;
- req.shouldKeepAlive = false;
-
- // clean up a bit of memory since we're no longer using this
- req._options = null;
-
- // create the `net.Socket` instance
- var sync = true;
- this.callback(req, opts, function (err, socket) {
- function emitErr () {
- req.emit('error', err);
- // For Safety. Some additional errors might fire later on
- // and we need to make sure we don't double-fire the error event.
- req._hadError = true;
- }
- if (err) {
- if (sync) {
- // need to defer the "error" event, when sync, because by now the `req`
- // instance hasn't event been passed back to the user yet...
- process.nextTick(emitErr);
- } else {
- emitErr();
- }
- } else {
- req.onSocket(socket);
- }
- });
- sync = false;
-};
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
new file mode 100644
index 0000000000..df3ca727a7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js
@@ -0,0 +1,158 @@
+'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;
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+
+function Agent(callback, _opts) {
+ if (!(this instanceof Agent)) {
+ return new Agent(callback, _opts);
+ }
+
+ EventEmitter.call(this);
+
+ let opts = _opts;
+ if ('function' === typeof callback) {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // timeout for the socket to be returned from the callback
+ this.timeout = (opts && opts.timeout) || null;
+
+ this.options = opts;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Override this function in your subclass!
+ */
+Agent.prototype.callback = function callback(req, opts) {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+};
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+
+Agent.prototype.addRequest = function addRequest(
+ req,
+ _opts
+) {
+ const ownOpts = Object.assign({}, _opts);
+
+ // set default `host` for HTTP to localhost
+ if (null == ownOpts.host) {
+ ownOpts.host = 'localhost';
+ }
+
+ // set default `port` for HTTP if none was explicitly specified
+ if (null == ownOpts.port) {
+ ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
+ }
+
+ 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
+ // 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;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ // create the `stream.Duplex` instance
+ let timeout;
+ let timedOut = false;
+ const timeoutMs = this.timeout;
+
+ function onerror(err) {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ }
+
+ function ontimeout() {
+ timedOut = true;
+ const err = new Error(
+ 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ }
+
+ function callbackError(err) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ onerror(err);
+ }
+
+ function onsocket(socket) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ if (socket) {
+ req.onSocket(socket);
+ } else {
+ 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
+ this.callback = promisify(this.callback, this);
+ }
+
+ if (timeoutMs > 0) {
+ timeout = setTimeout(ontimeout, timeoutMs);
+ }
+
+ try {
+ Promise.resolve(this.callback(req, opts))
+ .then(onsocket, callbackError);
+ } catch (err) {
+ 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/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/README.md
new file mode 100644
index 0000000000..4141cc840f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md
@@ -0,0 +1,89 @@
+[![Travis CI](https://travis-ci.org/digitaldesignlabs/es6-promisify.svg)](https://travis-ci.org/digitaldesignlabs/es6-promisify)
+
+# es6-promisify
+
+Converts callback-based functions to Promise-based functions.
+
+## Install
+
+Install with [npm](https://npmjs.org/package/es6-promisify)
+
+```bash
+npm install --save es6-promisify
+```
+
+## Example
+
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const fs = require("fs");
+
+// Convert the stat function
+const stat = promisify(fs.stat);
+
+// Now usable as a promise!
+stat("example.txt").then(function (stats) {
+ console.log("Got stats", stats);
+}).catch(function (err) {
+ console.error("Yikes!", err);
+});
+```
+
+## Promisify methods
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const redis = require("redis").createClient(6379, "localhost");
+
+// Create a promise-based version of send_command
+const client = promisify(redis.send_command, redis);
+
+// Send commands to redis and get a promise back
+client("ping").then(function (pong) {
+ console.log("Got", pong);
+}).catch(function (err) {
+ console.error("Unexpected error", err);
+}).then(function () {
+ redis.quit();
+});
+```
+
+## Handle callback multiple arguments
+```js
+"use strict";
+
+// Declare functions
+function test(cb) {
+ return cb(undefined, 1, 2, 3);
+}
+
+// Declare variables
+const promisify = require("es6-promisify");
+
+// Create promise-based version of test
+const single = promisify(test);
+const multi = promisify(test, {multiArgs: true});
+
+// Discards additional arguments
+single().then(function (result) {
+ console.log(result); // 1
+});
+
+// Returns all arguments as an array
+multi().then(function (result) {
+ console.log(result); // [1, 2, 3]
+});
+```
+
+### Tests
+Test with nodeunit
+```bash
+$ npm test
+```
+
+Published under the [MIT License](http://opensource.org/licenses/MIT).
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/dist/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/dist/promise.js
new file mode 100644
index 0000000000..2fe5c6103b
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js
@@ -0,0 +1,73 @@
+"use strict";
+
+/* global self, window, module, global, require */
+module.exports = function () {
+
+ "use strict";
+
+ var globalObject = void 0;
+
+ function isFunction(x) {
+ return typeof x === "function";
+ }
+
+ // Seek the global object
+ if (global !== undefined) {
+ globalObject = global;
+ } else if (window !== undefined && window.document) {
+ globalObject = window;
+ } else {
+ globalObject = self;
+ }
+
+ // Test for any native promise implementation, and if that
+ // implementation appears to conform to the specificaton.
+ // This code mostly nicked from the es6-promise module polyfill
+ // and then fooled with.
+ var hasPromiseSupport = function () {
+
+ // No promise object at all, and it's a non-starter
+ if (!globalObject.hasOwnProperty("Promise")) {
+ return false;
+ }
+
+ // There is a Promise object. Does it conform to the spec?
+ var P = globalObject.Promise;
+
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
+ return false;
+ }
+
+ if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
+ return false;
+ }
+
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ return function () {
+
+ var resolve = void 0;
+
+ var p = new globalObject.Promise(function (r) {
+ resolve = r;
+ });
+
+ if (p) {
+ return isFunction(resolve);
+ }
+
+ return false;
+ }();
+ }();
+
+ // Export the native Promise implementation if it
+ // looks like it matches the spec
+ if (hasPromiseSupport) {
+ return globalObject.Promise;
+ }
+
+ // Otherwise, return the es6-promise polyfill by @jaffathecake.
+ return require("es6-promise").Promise;
+}(); \ 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/dist/promisify.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/dist/promisify.js
new file mode 100644
index 0000000000..ce38041b07
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js
@@ -0,0 +1,85 @@
+"use strict";
+
+/* global module, require */
+module.exports = function () {
+
+ "use strict";
+
+ // Get a promise object. This may be native, or it may be polyfilled
+
+ var ES6Promise = require("./promise.js");
+
+ /**
+ * thatLooksLikeAPromiseToMe()
+ *
+ * Duck-types a promise.
+ *
+ * @param {object} o
+ * @return {bool} True if this resembles a promise
+ */
+ function thatLooksLikeAPromiseToMe(o) {
+ return o && typeof o.then === "function" && typeof o.catch === "function";
+ }
+
+ /**
+ * promisify()
+ *
+ * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
+ * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
+ * and rejects when `error` is truthy. You can also supply settings object as the second argument.
+ *
+ * @param {function} original - The function to promisify
+ * @param {object} settings - Settings object
+ * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
+ * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
+ * @return {function} A promisified version of `original`
+ */
+ return function promisify(original, settings) {
+
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var returnMultipleArguments = settings && settings.multiArgs;
+
+ var target = void 0;
+ if (settings && settings.thisArg) {
+ target = settings.thisArg;
+ } else if (settings) {
+ target = settings;
+ }
+
+ // Return the promisified function
+ return new ES6Promise(function (resolve, reject) {
+
+ // Append the callback bound to the context
+ args.push(function callback(err) {
+
+ if (err) {
+ return reject(err);
+ }
+
+ for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ values[_key2 - 1] = arguments[_key2];
+ }
+
+ if (false === !!returnMultipleArguments) {
+ return resolve(values[0]);
+ }
+
+ resolve(values);
+ });
+
+ // Call the function
+ var response = original.apply(target, args);
+
+ // If it looks like original already returns a promise,
+ // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
+ if (thatLooksLikeAPromiseToMe(response)) {
+ resolve(response);
+ }
+ });
+ };
+ };
+}(); \ 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/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
new file mode 100644
index 0000000000..6ff0013622
--- /dev/null
+++ 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
@@ -0,0 +1,122 @@
+# Master
+
+# 4.1.0
+
+* [BUGFIX] Fix memory leak [#269]
+* [BUGFIX] Auto Bundles within an AMD Environment [#263]
+
+# 4.0.5
+
+* fix require('es6-promise/auto') for Node < 4
+
+# 4.0.4
+
+* fix asap when using https://github.com/Kinvey/titanium-sdk
+
+# 4.0.3
+
+* fix Readme links
+
+# 4.0.2
+
+* fix require('es6-promise/auto');
+
+# 4.0.0
+
+* no longer polyfill automatically, if needed one can still invoke
+ `require('es6-promise/auto')` directly.
+
+# 3.3.1
+
+* fix links in readme
+
+# 3.3.0
+
+* support polyfil on WebMAF (playstation env)
+* fix tampering related bug global `constructor` was referenced by mistake.
+* provide TS Typings
+* increase compatibliity with sinon.useFakeTimers();
+* update build tools (use rollup)
+* directly export promise;
+
+# 3.2.2
+
+* IE8: use isArray
+* update build dependencies
+
+# 3.2.1
+
+* fix race tampering issue
+* use eslint
+* fix Promise.all tampering
+* remove unused code
+* fix issues with NWJS/electron
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.2
+
+* correctly bump both bower and package.json versions
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* #59: Automatic polyfill. No need to invoke `ES6Promise.polyfill()` anymore.
+* ... (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
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/LICENSE 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/LICENSE
new file mode 100644
index 0000000000..954ec5992d
--- /dev/null
+++ 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/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner 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/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
new file mode 100644
index 0000000000..bb07d25c17
--- /dev/null
+++ 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
@@ -0,0 +1,82 @@
+# 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).
+
+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.
+
+## Node.js
+
+To install:
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+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.
+
+However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+Or use `.then` instead:
+
+```js
+promise.then(undefined, function(err) {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Alternatively
+
+```js
+require('es6-promise/auto');
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
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/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/auto.js
new file mode 100644
index 0000000000..92bbf36e58
--- /dev/null
+++ 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/auto.js
@@ -0,0 +1,4 @@
+// This file can be required in Browserify and Node.js for automatic polyfill
+// To use it: require('es6-promise/auto');
+'use strict';
+module.exports = require('./').polyfill();
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
new file mode 100644
index 0000000000..51eb80a648
--- /dev/null
+++ 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
@@ -0,0 +1,1159 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
+ } else {
+ this._willSettleAt(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$3.prototype = {
+ constructor: Promise$3,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$3;
+}
+
+// Strange compat..
+Promise$3.polyfill = polyfill$1;
+Promise$3.Promise = Promise$3;
+
+Promise$3.polyfill();
+
+return Promise$3;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..1e06e2c73c
--- /dev/null
+++ 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
@@ -0,0 +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,IA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ED,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
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
new file mode 100644
index 0000000000..ba34fa7ced
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..3ada8df844
--- /dev/null
+++ 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
@@ -0,0 +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,IAA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J;;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
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
new file mode 100644
index 0000000000..b3724141a8
--- /dev/null
+++ 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
@@ -0,0 +1,1157 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$2.prototype = {
+ constructor: Promise$2,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$2;
+}
+
+// Strange compat..
+Promise$2.polyfill = polyfill$1;
+Promise$2.Promise = Promise$2;
+
+return Promise$2;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..98c7af7ba4
--- /dev/null
+++ 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
@@ -0,0 +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,CA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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
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
new file mode 100644
index 0000000000..7696ed71f1
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..ac752492db
--- /dev/null
+++ 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
@@ -0,0 +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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;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
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
new file mode 100644
index 0000000000..d90ab85a59
--- /dev/null
+++ 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
@@ -0,0 +1,74 @@
+export interface Thenable <R> {
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Thenable<U>;
+}
+
+export class Promise <R> implements Thenable <R> {
+ /**
+ * If you call resolve in the body of the callback passed to the constructor,
+ * your promise is fulfilled with result object passed to resolve.
+ * If you call reject your promise is rejected with the object passed to resolve.
+ * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
+ * Any errors thrown in the constructor callback will be implicitly passed to reject().
+ */
+ constructor (callback: (resolve : (value?: R | Thenable<R>) => void, reject: (error?: any) => void) => void);
+
+ /**
+ * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects.
+ * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called.
+ * Both callbacks have a single parameter , the fulfillment value or rejection reason.
+ * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve.
+ * If an error is thrown in the callback, the returned promise rejects with that error.
+ *
+ * @param onFulfilled called when/if "promise" resolves
+ * @param onRejected called when/if "promise" rejects
+ */
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Promise<U>;
+
+ /**
+ * Sugar for promise.then(undefined, onRejected)
+ *
+ * @param onRejected called when/if "promise" rejects
+ */
+ catch <U> (onRejected?: (error: 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.
+ */
+ static resolve (): Promise<void>;
+ static resolve <R> (value: R | Thenable<R>): Promise<R>;
+
+ /**
+ * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
+ */
+ static reject <R> (error: any): Promise<R>;
+
+ /**
+ * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
+ * the array passed to all can be a mixture of promise-like objects and other objects.
+ * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
+ */
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>, T10 | Thenable<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+ static all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+ static all<T1, T2, T3, T4, T5, T6>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+ static all<T1, T2, T3, T4, T5>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+ static all<T1, T2, T3, T4>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>]): Promise<[T1, T2, T3, T4]>;
+ static all<T1, T2, T3>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>]): Promise<[T1, T2, T3]>;
+ static all<T1, T2>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>]): Promise<[T1, T2]>;
+ static all<T1>(values: [T1 | Thenable<T1>]): Promise<[T1]>;
+ static all<TAll>(values: Array<TAll | Thenable<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
+ */
+ static race <R> (promises: (R | Thenable<R>)[]): Promise<R>;
+}
+
+/**
+ * The polyfill method will patch the global environment (in this case to the Promise name) when called.
+ */
+export function polyfill (): void;
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.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/lib/es6-promise.auto.js
new file mode 100644
index 0000000000..77997866f8
--- /dev/null
+++ 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.auto.js
@@ -0,0 +1,3 @@
+import Promise from './es6-promise';
+Promise.polyfill();
+export default Promise;
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.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.js
new file mode 100644
index 0000000000..4f4d840d09
--- /dev/null
+++ 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.js
@@ -0,0 +1,7 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+// Strange compat..
+Promise.polyfill = polyfill;
+Promise.Promise = Promise;
+export default Promise;
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
new file mode 100644
index 0000000000..038140d8d8
--- /dev/null
+++ 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
@@ -0,0 +1,271 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export const PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+const PENDING = void 0;
+const FULFILLED = 1;
+const REJECTED = 2;
+
+const GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(promise => {
+ var sealed = false;
+ var error = tryThen(then, thenable, value => {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, reason => {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, value => resolve(promise, value),
+ reason => reject(promise, reason))
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ maybeThenable.constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === GET_THEN_ERROR) {
+ reject(promise, GET_THEN_ERROR.error);
+ GET_THEN_ERROR.error = null;
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ let { _subscribers } = parent;
+ let { length } = _subscribers;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ let subscribers = promise._subscribers;
+ let settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ let child, callback, detail = promise._result;
+
+ for (let i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+const TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ let hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+let id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
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
new file mode 100644
index 0000000000..1055b92e75
--- /dev/null
+++ 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
@@ -0,0 +1,120 @@
+let len = 0;
+let vertxNext;
+let customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+const browserWindow = (typeof window !== 'undefined') ? window : undefined;
+const browserGlobal = browserWindow || {};
+const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+const isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+const isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return () => process.nextTick(flush);
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function() {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ let iterations = 0;
+ const observer = new BrowserMutationObserver(flush);
+ const node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return () => {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ const channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return () => channel.port2.postMessage(0);
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ const globalSetTimeout = setTimeout;
+ return () => globalSetTimeout(flush, 1);
+}
+
+const queue = new Array(1000);
+function flush() {
+ for (let i = 0; i < len; i+=2) {
+ let callback = queue[i];
+ let arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ const r = require;
+ const vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+let scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
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
new file mode 100644
index 0000000000..df4faca879
--- /dev/null
+++ 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
@@ -0,0 +1,111 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+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);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.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) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } 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);
+ }
+};
+
+Enumerator.prototype._eachEntry = function(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
+
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
+
+ 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);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+};
+
+Enumerator.prototype._settledAt = function(state, i, value) {
+ let { promise } = this;
+
+ 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);
+ }
+};
+
+Enumerator.prototype._willSettleAt = function(promise, i) {
+ let enumerator = this;
+
+ 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
new file mode 100644
index 0000000000..83ddf0662b
--- /dev/null
+++ 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
@@ -0,0 +1,35 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ let local;
+
+ 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');
+ }
+ }
+
+ let P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch(e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast){
+ return;
+ }
+ }
+
+ local.Promise = Promise;
+}
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
new file mode 100644
index 0000000000..20558cbeea
--- /dev/null
+++ 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
@@ -0,0 +1,383 @@
+import {
+ isFunction
+} from './utils';
+
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+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');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise.prototype = {
+ constructor: Promise,
+
+/**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+*/
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+*/
+ catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
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/all.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/all.js
new file mode 100644
index 0000000000..9ca3c063aa
--- /dev/null
+++ 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/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
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/race.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/race.js
new file mode 100644
index 0000000000..166dc820b5
--- /dev/null
+++ 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/race.js
@@ -0,0 +1,84 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor((_, reject) => reject(new TypeError('You must pass an array to race.')));
+ } else {
+ return new Constructor((resolve, reject) => {
+ let length = entries.length;
+ for (let i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
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/reject.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/reject.js
new file mode 100644
index 0000000000..cd55faabf5
--- /dev/null
+++ 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/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ let Constructor = this;
+ let promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
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/resolve.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/resolve.js
new file mode 100644
index 0000000000..f4642b630e
--- /dev/null
+++ 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/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ let promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
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/then.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/then.js
new file mode 100644
index 0000000000..b2b79f0a14
--- /dev/null
+++ 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/then.js
@@ -0,0 +1,32 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ const parent = this;
+
+ const child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ const { _state } = parent;
+
+ if (_state) {
+ const callback = arguments[_state - 1];
+ asap(() => invokeCallback(_state, child, callback, parent._result));
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
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/utils.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/utils.js
new file mode 100644
index 0000000000..72545c5e97
--- /dev/null
+++ 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/utils.js
@@ -0,0 +1,21 @@
+export function objectOrFunction(x) {
+ let type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return x !== null && typeof x === 'object';
+}
+
+let _isArray;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = x => Object.prototype.toString.call(x) === '[object Array]';
+}
+
+export const isArray = _isArray;
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
new file mode 100644
index 0000000000..5ed6cbbf62
--- /dev/null
+++ 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
@@ -0,0 +1,96 @@
+{
+ "_from": "es6-promise@^4.0.3",
+ "_id": "es6-promise@4.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify/es6-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promise@^4.0.3",
+ "name": "es6-promise",
+ "escapedName": "es6-promise",
+ "rawSpec": "^4.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.3"
+ },
+ "_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",
+ "_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": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "bugs": {
+ "url": "https://github.com/stefanpenner/es6-promise/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "devDependencies": {
+ "broccoli-babel-transpiler": "^5.6.1",
+ "broccoli-concat": "^3.1.0",
+ "broccoli-merge-trees": "^1.2.3",
+ "broccoli-rollup": "^1.0.2",
+ "broccoli-stew": "^1.2.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",
+ "json3": "^3.3.2",
+ "mocha": "^3.1.0",
+ "promises-aplus-tests-phantom": "^2.1.0-revise",
+ "release-it": "2.7.1"
+ },
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "es6-promise.d.ts",
+ "auto.js",
+ "!dist/test"
+ ],
+ "homepage": "https://github.com/stefanpenner/es6-promise#readme",
+ "keywords": [
+ "promises",
+ "promise",
+ "polyfill",
+ "futures"
+ ],
+ "license": "MIT",
+ "main": "dist/es6-promise.js",
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stefanpenner/es6-promise.git"
+ },
+ "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",
+ "start": "ember s",
+ "test": "ember test",
+ "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:server": "ember test --server"
+ },
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "typings": "es6-promise.d.ts",
+ "version": "4.1.1"
+}
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/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/package.json
new file mode 100644
index 0000000000..bc6cd3bc2e
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "es6-promisify@^5.0.0",
+ "_id": "es6-promisify@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base/es6-promisify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promisify@^5.0.0",
+ "name": "es6-promisify",
+ "escapedName": "es6-promisify",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/https-proxy-agent/agent-base"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "_shasum": "5109d62f3e56ea967c4b63505aef08291c8a5203",
+ "_spec": "es6-promisify@^5.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base",
+ "author": {
+ "name": "Mike Hall",
+ "email": "mikehall314@gmail.com"
+ },
+ "bugs": {
+ "url": "http://github.com/digitaldesignlabs/es6-promisify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "es6-promise": "^4.0.3"
+ },
+ "deprecated": false,
+ "description": "Converts callback-based functions to ES6 Promises",
+ "devDependencies": {
+ "babel-preset-es2015": "^6.9.0",
+ "eslint": "^2.13.1",
+ "gulp": "^3.9.1",
+ "gulp-babel": "^6.1.2",
+ "nodeunit": "^0.10.0"
+ },
+ "files": [
+ "dist/promisify.js",
+ "dist/promise.js"
+ ],
+ "greenkeeper": {
+ "ignore": [
+ "eslint"
+ ]
+ },
+ "homepage": "https://github.com/digitaldesignlabs/es6-promisify#readme",
+ "keywords": [
+ "promises",
+ "es6",
+ "promisify"
+ ],
+ "license": "MIT",
+ "main": "dist/promisify.js",
+ "name": "es6-promisify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/digitaldesignlabs/es6-promisify.git"
+ },
+ "scripts": {
+ "pretest": "./node_modules/eslint/bin/eslint.js ./lib/*.js ./tests/*.js",
+ "test": "gulp && nodeunit tests"
+ },
+ "version": "5.0.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
deleted file mode 100644
index 534108e3f4..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules/
-coverage/
-.nyc_output/
-nyc_output/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
deleted file mode 100644
index 991d04b6e2..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - 'iojs'
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
deleted file mode 100644
index b5e35ff0b5..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
+++ /dev/null
@@ -1,303 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- 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
-
-As a command-line utility:
-
- $ semver -h
-
- Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
- Test if version(s) satisfy the supplied range(s), and sort them.
-
- Multiple versions or ranges may be supplied, unless increment
- option is specified. In that case, only a single version may
- be used, and it is incremented by the specified level
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no versions are valid, or ranges are not satisfied,
- then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'pre', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` 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/semver/bin/semver b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857e8..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
deleted file mode 100644
index 9f13c61eab..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "_from": "semver@~5.0.1",
- "_id": "semver@5.0.3",
- "_integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=",
- "_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base/semver",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "semver@~5.0.1",
- "name": "semver",
- "escapedName": "semver",
- "rawSpec": "~5.0.1",
- "saveSpec": null,
- "fetchSpec": "~5.0.1"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/https-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
- "_shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a",
- "_shrinkwrap": null,
- "_spec": "semver@~5.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base",
- "bin": {
- "semver": "./bin/semver"
- },
- "bugs": {
- "url": "https://github.com/npm/node-semver/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "The semantic version parser used by npm.",
- "devDependencies": {
- "tap": "^1.3.4"
- },
- "homepage": "https://github.com/npm/node-semver#readme",
- "license": "ISC",
- "main": "semver.js",
- "name": "semver",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-semver.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "5.0.3"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
deleted file mode 100644
index 19392d8ff9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1200 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.inspect = function() {
- return '<SemVer "' + this + '">';
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.inspect = function() {
- return '<SemVer Comparator "' + this + '">';
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.inspect = function() {
- return '<SemVer Range "' + this.range + '">';
-};
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0- <1.3.0-
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm)
- M = +M + 1
- else
- m = +m + 1
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
deleted file mode 100644
index c051864bc9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tap').test
-var semver = require('../')
-
-test('long version is too long', function (t) {
- var v = '1.2.' + new Array(256).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('big number is like too long version', function (t) {
- var v = '1.2.' + new Array(100).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('parsing null does not throw', function (t) {
- t.equal(semver.parse(null), null)
- t.equal(semver.parse({}), null)
- t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
- t.end()
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
deleted file mode 100644
index 9e268de950..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var clean = semver.clean;
-
-test('\nclean tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', '1.2.3'],
- [' 1.2.3 ', '1.2.3'],
- [' 1.2.3-4 ', '1.2.3-4'],
- [' 1.2.3-pre ', '1.2.3-pre'],
- [' =v1.2.3 ', '1.2.3'],
- ['v1.2.3', '1.2.3'],
- [' v1.2.3 ', '1.2.3'],
- ['\t1.2.3', '1.2.3'],
- ['>1.2.3', null],
- ['~1.2.3', null],
- ['<=1.2.3', null],
- ['1.2.x', null]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var msg = 'clean(' + range + ') = ' + version;
- t.equal(clean(range), version, msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
deleted file mode 100644
index bbb87896c6..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
+++ /dev/null
@@ -1,173 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var gtr = semver.gtr;
-
-test('\ngtr tests', function(t) {
- // [range, version, loose]
- // Version should be greater than range
- [
- ['~1.2.2', '1.3.0'],
- ['~0.6.1-1', '0.7.1-1'],
- ['1.0.0 - 2.0.0', '2.0.1'],
- ['1.0.0', '1.0.1-beta1'],
- ['1.0.0', '2.0.0'],
- ['<=2.0.0', '2.1.1'],
- ['<=2.0.0', '3.2.9'],
- ['<2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '1.2.5'],
- ['2.x.x', '3.0.0'],
- ['1.2.x', '1.3.0'],
- ['1.2.x || 2.x', '3.0.0'],
- ['2.*.*', '5.0.1'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '4.0.0'],
- ['2', '3.0.0'],
- ['2.3', '2.4.2'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.5.5'],
- ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.4'],
- ['~> 1', '3.2.3'],
- ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.1.0'],
- ['<1.2', '1.2.0'],
- ['< 1.2', '1.2.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-pre', '0.6.0'],
- ['~v0.5.4-pre', '0.6.1-pre'],
- ['=0.7.x', '0.8.0'],
- ['=0.7.x', '0.8.0-asdf'],
- ['<0.7.x', '0.7.0'],
- ['~1.2.2', '1.3.0'],
- ['1.0.0 - 2.0.0', '2.2.3'],
- ['1.0.0', '1.0.1'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['2', '3.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['1', '2.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['=0.7.x', '0.8.2'],
- ['<0.7.x', '0.7.2']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(gtr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative gtr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be greater than range
- [
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '0.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['*', 'v1.2.3-foo'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['1', '1.0.0beta', true],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^1', '0.0.0-0'],
- ['^3.0.0', '2.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(gtr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
deleted file mode 100644
index 47c3f5f951..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
+++ /dev/null
@@ -1,698 +0,0 @@
-'use strict';
-
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var eq = semver.eq;
-var gt = semver.gt;
-var lt = semver.lt;
-var neq = semver.neq;
-var cmp = semver.cmp;
-var gte = semver.gte;
-var lte = semver.lte;
-var satisfies = semver.satisfies;
-var validRange = semver.validRange;
-var inc = semver.inc;
-var diff = semver.diff;
-var replaceStars = semver.replaceStars;
-var toComparators = semver.toComparators;
-var SemVer = semver.SemVer;
-var Range = semver.Range;
-
-test('\ncomparison tests', function(t) {
- // [version1, version2]
- // version1 should be greater than version2
- [['0.0.0', '0.0.0-foo'],
- ['0.0.1', '0.0.0'],
- ['1.0.0', '0.9.9'],
- ['0.10.0', '0.9.0'],
- ['0.99.0', '0.10.0'],
- ['2.0.0', '1.2.3'],
- ['v0.0.0', '0.0.0-foo', true],
- ['v0.0.1', '0.0.0', true],
- ['v1.0.0', '0.9.9', true],
- ['v0.10.0', '0.9.0', true],
- ['v0.99.0', '0.10.0', true],
- ['v2.0.0', '1.2.3', true],
- ['0.0.0', 'v0.0.0-foo', true],
- ['0.0.1', 'v0.0.0', true],
- ['1.0.0', 'v0.9.9', true],
- ['0.10.0', 'v0.9.0', true],
- ['0.99.0', 'v0.10.0', true],
- ['2.0.0', 'v1.2.3', true],
- ['1.2.3', '1.2.3-asdf'],
- ['1.2.3', '1.2.3-4'],
- ['1.2.3', '1.2.3-4-foo'],
- ['1.2.3-5-foo', '1.2.3-5'],
- ['1.2.3-5', '1.2.3-4'],
- ['1.2.3-5-foo', '1.2.3-5-Foo'],
- ['3.0.0', '2.7.2+asdf'],
- ['1.2.3-a.10', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a'],
- ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
- ['1.2.3-r2', '1.2.3-r100'],
- ['1.2.3-r100', '1.2.3-R2']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
- t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
- t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
- t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
- t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
- t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
- t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
- t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
- });
- t.end();
-});
-
-test('\nequality tests', function(t) {
- // [version1, version2]
- // version1 should be equivalent to version2
- [['1.2.3', 'v1.2.3', true],
- ['1.2.3', '=1.2.3', true],
- ['1.2.3', 'v 1.2.3', true],
- ['1.2.3', '= 1.2.3', true],
- ['1.2.3', ' v1.2.3', true],
- ['1.2.3', ' =1.2.3', true],
- ['1.2.3', ' v 1.2.3', true],
- ['1.2.3', ' = 1.2.3', true],
- ['1.2.3-0', 'v1.2.3-0', true],
- ['1.2.3-0', '=1.2.3-0', true],
- ['1.2.3-0', 'v 1.2.3-0', true],
- ['1.2.3-0', '= 1.2.3-0', true],
- ['1.2.3-0', ' v1.2.3-0', true],
- ['1.2.3-0', ' =1.2.3-0', true],
- ['1.2.3-0', ' v 1.2.3-0', true],
- ['1.2.3-0', ' = 1.2.3-0', true],
- ['1.2.3-1', 'v1.2.3-1', true],
- ['1.2.3-1', '=1.2.3-1', true],
- ['1.2.3-1', 'v 1.2.3-1', true],
- ['1.2.3-1', '= 1.2.3-1', true],
- ['1.2.3-1', ' v1.2.3-1', true],
- ['1.2.3-1', ' =1.2.3-1', true],
- ['1.2.3-1', ' v 1.2.3-1', true],
- ['1.2.3-1', ' = 1.2.3-1', true],
- ['1.2.3-beta', 'v1.2.3-beta', true],
- ['1.2.3-beta', '=1.2.3-beta', true],
- ['1.2.3-beta', 'v 1.2.3-beta', true],
- ['1.2.3-beta', '= 1.2.3-beta', true],
- ['1.2.3-beta', ' v1.2.3-beta', true],
- ['1.2.3-beta', ' =1.2.3-beta', true],
- ['1.2.3-beta', ' v 1.2.3-beta', true],
- ['1.2.3-beta', ' = 1.2.3-beta', true],
- ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
- ['1.2.3+build', ' = 1.2.3+otherbuild', true],
- ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
- ['1.2.3+build', '1.2.3+otherbuild'],
- [' v1.2.3+build', '1.2.3+otherbuild']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
- t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
- t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
- t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
- t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
- t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
- t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
- });
- t.end();
-});
-
-
-test('\nrange tests', function(t) {
- // [range, version]
- // version should be included by range
- [['1.0.0 - 2.0.0', '1.2.3'],
- ['^1.2.3+build', '1.2.3'],
- ['^1.2.3+build', '1.3.0'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
- ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0'],
- ['*', '1.2.3'],
- ['*', 'v1.2.3', true],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97', true],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
- ['~ 1.0', '1.0.2'],
- ['~ 1.0.3', '1.0.12'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['~1.2.1 >=1.2.3', '1.2.3'],
- ['~1.2.1 =1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['>=1.2.1 1.2.3', '1.2.3'],
- ['1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.1 >=1.2.3', '1.2.3'],
- ['>=1.2', '1.2.8'],
- ['^1.2.3', '1.8.1'],
- ['^0.1.2', '0.1.2'],
- ['^0.1', '0.1.2'],
- ['^1.2', '1.4.2'],
- ['^1.2 ^1', '1.4.2'],
- ['^1.2.3-alpha', '1.2.3-pre'],
- ['^1.2.0-alpha', '1.2.0-pre'],
- ['^0.0.1-alpha', '0.0.1-beta']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
- });
- t.end();
-});
-
-test('\nnegative range tests', function(t) {
- // [range, version]
- // version should not be included by range
- [['1.0.0 - 2.0.0', '2.2.3'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
- ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
- ['^1.2.3+build', '2.0.0'],
- ['^1.2.3+build', '1.2.0'],
- ['^1.2.3', '1.2.3-pre'],
- ['^1.2', '1.2.0-pre'],
- ['>1.2', '1.3.0-beta'],
- ['<=1.2.3', '1.2.3-beta'],
- ['^1.2.3', '1.2.3-beta'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['1.0.0', '1.0.1'],
- ['>=1.0.0', '0.0.0'],
- ['>=1.0.0', '0.0.1'],
- ['>=1.0.0', '0.1.0'],
- ['>1.0.0', '0.0.1'],
- ['>1.0.0', '0.1.0'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['>=0.1.97', 'v0.1.93', true],
- ['>=0.1.97', '0.1.93'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['>=0.2.3 || <0.0.1', '0.0.3'],
- ['>=0.2.3 || <0.0.1', '0.2.2'],
- ['2.x.x', '1.1.3'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.9'],
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['>=1.2', '1.1.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-beta', '0.5.4-alpha'],
- ['=0.7.x', '0.8.2'],
- ['>=0.7.x', '0.6.2'],
- ['<0.7.x', '0.7.2'],
- ['<1.2.3', '1.2.3-beta'],
- ['=1.2.3', '1.2.3-beta'],
- ['>1.2', '1.2.8'],
- ['^1.2.3', '2.0.0-alpha'],
- ['^1.2.3', '1.2.2'],
- ['^1.2', '1.1.9'],
- ['*', 'v1.2.3-foo', true],
- // invalid ranges never satisfied!
- ['blerg', '1.2.3'],
- ['git+https://user:password0123@github.com/foo', '123.0.0', true],
- ['^1.2.3', '2.0.0-pre']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- var found = satisfies(ver, range, loose);
- t.ok(!found, ver + ' not satisfied by ' + range);
- });
- t.end();
-});
-
-test('\nincrement versions test', function(t) {
-// [version, inc, result, identifier]
-// inc(version, inc) -> result
- [['1.2.3', 'major', '2.0.0'],
- ['1.2.3', 'minor', '1.3.0'],
- ['1.2.3', 'patch', '1.2.4'],
- ['1.2.3tag', 'major', '2.0.0', true],
- ['1.2.3-tag', 'major', '2.0.0'],
- ['1.2.3', 'fake', null],
- ['1.2.0-0', 'patch', '1.2.0'],
- ['fake', 'major', null],
- ['1.2.3-4', 'major', '2.0.0'],
- ['1.2.3-4', 'minor', '1.3.0'],
- ['1.2.3-4', 'patch', '1.2.3'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
- ['1.2.4', 'prerelease', '1.2.5-0'],
- ['1.2.3-0', 'prerelease', '1.2.3-1'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
- ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
- ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
- ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
- ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
- ['1.2.0', 'prepatch', '1.2.1-0'],
- ['1.2.0-1', 'prepatch', '1.2.1-0'],
- ['1.2.0', 'preminor', '1.3.0-0'],
- ['1.2.3-1', 'preminor', '1.3.0-0'],
- ['1.2.0', 'premajor', '2.0.0-0'],
- ['1.2.3-1', 'premajor', '2.0.0-0'],
- ['1.2.0-1', 'minor', '1.2.0'],
- ['1.0.0-1', 'major', '1.0.0'],
-
- ['1.2.3', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3', 'patch', '1.2.4', false, 'dev'],
- ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
- ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'fake', null, false, 'dev'],
- ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
- ['fake', 'major', null, false, 'dev'],
- ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
- ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
- ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
- ['1.2.0', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0-1', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.0', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.0-1', 'minor', '1.2.0', false, 'dev'],
- ['1.0.0-1', 'major', '1.0.0', false, 'dev'],
- ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
-
- ].forEach(function(v) {
- var pre = v[0];
- var what = v[1];
- var wanted = v[2];
- var loose = v[3];
- var id = v[4];
- var found = inc(pre, what, loose, id);
- var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
-
- var parsed = semver.parse(pre, loose);
- if (wanted) {
- parsed.inc(what, id);
- t.equal(parsed.version, wanted, cmd + ' object version updated');
- t.equal(parsed.raw, wanted, cmd + ' object raw field updated');
- } else if (parsed) {
- t.throws(function () {
- parsed.inc(what, id)
- })
- } else {
- t.equal(parsed, null)
- }
- });
-
- t.end();
-});
-
-test('\ndiff versions test', function(t) {
-// [version1, version2, result]
-// diff(version1, version2) -> result
- [['1.2.3', '0.2.3', 'major'],
- ['1.4.5', '0.2.3', 'major'],
- ['1.2.3', '2.0.0-pre', 'premajor'],
- ['1.2.3', '1.3.3', 'minor'],
- ['1.0.1', '1.1.0-pre', 'preminor'],
- ['1.2.3', '1.2.4', 'patch'],
- ['1.2.3', '1.2.4-pre', 'prepatch'],
- ['0.0.1', '0.0.1-pre', 'prerelease'],
- ['0.0.1', '0.0.1-pre-2', 'prerelease'],
- ['1.1.0', '1.1.0-pre', 'prerelease'],
- ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
- ['1.0.0', '1.0.0', null]
-
- ].forEach(function(v) {
- var version1 = v[0];
- var version2 = v[1];
- var wanted = v[2];
- var found = diff(version1, version2);
- var cmd = 'diff(' + version1 + ', ' + version2 + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
- });
-
- t.end();
-});
-
-test('\nvalid range test', function(t) {
- // [range, result]
- // validRange(range) -> result
- // translate ranges into their canonical form
- [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
- ['1.0.0', '1.0.0'],
- ['>=*', '*'],
- ['', '*'],
- ['*', '*'],
- ['*', '*'],
- ['>=1.0.0', '>=1.0.0'],
- ['>1.0.0', '>1.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['>=0.1.97', '>=0.1.97'],
- ['>=0.1.97', '>=0.1.97'],
- ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['||', '||'],
- ['2.x.x', '>=2.0.0 <3.0.0'],
- ['1.2.x', '>=1.2.0 <1.3.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['x', '*'],
- ['2.*.*', '>=2.0.0 <3.0.0'],
- ['1.2.*', '>=1.2.0 <1.3.0'],
- ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['*', '*'],
- ['2', '>=2.0.0 <3.0.0'],
- ['2.3', '>=2.3.0 <2.4.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~>3.2.1', '>=3.2.1 <3.3.0'],
- ['~1', '>=1.0.0 <2.0.0'],
- ['~>1', '>=1.0.0 <2.0.0'],
- ['~> 1', '>=1.0.0 <2.0.0'],
- ['~1.0', '>=1.0.0 <1.1.0'],
- ['~ 1.0', '>=1.0.0 <1.1.0'],
- ['^0', '>=0.0.0 <1.0.0'],
- ['^ 1', '>=1.0.0 <2.0.0'],
- ['^0.1', '>=0.1.0 <0.2.0'],
- ['^1.0', '>=1.0.0 <2.0.0'],
- ['^1.2', '>=1.2.0 <2.0.0'],
- ['^0.0.1', '>=0.0.1 <0.0.2'],
- ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
- ['^0.1.2', '>=0.1.2 <0.2.0'],
- ['^1.2.3', '>=1.2.3 <2.0.0'],
- ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
- ['<1', '<1.0.0'],
- ['< 1', '<1.0.0'],
- ['>=1', '>=1.0.0'],
- ['>= 1', '>=1.0.0'],
- ['<1.2', '<1.2.0'],
- ['< 1.2', '<1.2.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['>01.02.03', '>1.2.3', true],
- ['>01.02.03', null],
- ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
- ['~1.2.3beta', null],
- ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var loose = v[2];
- var found = validRange(pre, loose);
-
- t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
- });
-
- t.end();
-});
-
-test('\ncomparators test', function(t) {
- // [range, comparators]
- // turn range into a set of individual comparators
- [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
- ['1.0.0', [['1.0.0']]],
- ['>=*', [['']]],
- ['', [['']]],
- ['*', [['']]],
- ['*', [['']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['< 2.0.0', [['<2.0.0']]],
- ['<\t2.0.0', [['<2.0.0']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['||', [[''], ['']]],
- ['2.x.x', [['>=2.0.0', '<3.0.0']]],
- ['1.2.x', [['>=1.2.0', '<1.3.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['x', [['']]],
- ['2.*.*', [['>=2.0.0', '<3.0.0']]],
- ['1.2.*', [['>=1.2.0', '<1.3.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['*', [['']]],
- ['2', [['>=2.0.0', '<3.0.0']]],
- ['2.3', [['>=2.3.0', '<2.4.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
- ['~1', [['>=1.0.0', '<2.0.0']]],
- ['~>1', [['>=1.0.0', '<2.0.0']]],
- ['~> 1', [['>=1.0.0', '<2.0.0']]],
- ['~1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['<1', [['<1.0.0']]],
- ['< 1', [['<1.0.0']]],
- ['>=1', [['>=1.0.0']]],
- ['>= 1', [['>=1.0.0']]],
- ['<1.2', [['<1.2.0']]],
- ['< 1.2', [['<1.2.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
- ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
- ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
- ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
- ['>*', [['<0.0.0']]],
- ['<*', [['<0.0.0']]]
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var found = toComparators(v[0]);
- var jw = JSON.stringify(wanted);
- t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
- });
-
- t.end();
-});
-
-test('\ninvalid version numbers', function(t) {
- ['1.2.3.4',
- 'NOT VALID',
- 1.2,
- null,
- 'Infinity.NaN.Infinity'
- ].forEach(function(v) {
- t.throws(function() {
- new SemVer(v);
- }, {name:'TypeError', message:'Invalid Version: ' + v});
- });
-
- t.end();
-});
-
-test('\nstrict vs loose version numbers', function(t) {
- [['=1.2.3', '1.2.3'],
- ['01.02.03', '1.2.3'],
- ['1.2.3-beta.01', '1.2.3-beta.1'],
- [' =1.2.3', '1.2.3'],
- ['1.2.3foo', '1.2.3-foo']
- ].forEach(function(v) {
- var loose = v[0];
- var strict = v[1];
- t.throws(function() {
- new SemVer(loose);
- });
- var lv = new SemVer(loose, true);
- t.equal(lv.version, strict);
- t.ok(eq(loose, strict, true));
- t.throws(function() {
- eq(loose, strict);
- });
- t.throws(function() {
- new SemVer(strict).compare(loose);
- });
- });
- t.end();
-});
-
-test('\nstrict vs loose ranges', function(t) {
- [['>=01.02.03', '>=1.2.3'],
- ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
- ].forEach(function(v) {
- var loose = v[0];
- var comps = v[1];
- t.throws(function() {
- new Range(loose);
- });
- t.equal(new Range(loose, true).range, comps);
- });
- t.end();
-});
-
-test('\nmax satisfying', function(t) {
- [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
- [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
- [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
- [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
- ].forEach(function(v) {
- var versions = v[0];
- var range = v[1];
- var expect = v[2];
- var loose = v[3];
- var actual = semver.maxSatisfying(versions, range, loose);
- t.equal(actual, expect);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
deleted file mode 100644
index 0f7167d658..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var ltr = semver.ltr;
-
-test('\nltr tests', function(t) {
- // [range, version, loose]
- // Version should be less than range
- [
- ['~1.2.2', '1.2.1'],
- ['~0.6.1-1', '0.6.1-0'],
- ['1.0.0 - 2.0.0', '0.0.1'],
- ['1.0.0-beta.2', '1.0.0-beta.1'],
- ['1.0.0', '0.0.0'],
- ['>=2.0.0', '1.1.1'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '0.1.5'],
- ['2.x.x', '1.0.0'],
- ['1.2.x', '1.1.0'],
- ['1.2.x || 2.x', '1.0.0'],
- ['2.*.*', '1.0.1'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.9999'],
- ['2', '1.0.0'],
- ['2.3', '2.2.2'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.5'],
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.4'],
- ['~> 1', '0.2.3'],
- ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '0.1.0'],
- ['>1.2', '1.2.0'],
- ['> 1.2', '1.2.1'],
- ['1', '0.0.0beta', true],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['=0.7.x', '0.6.0'],
- ['=0.7.x', '0.6.0-asdf'],
- ['>=0.7.x', '0.6.0'],
- ['~1.2.2', '1.2.1'],
- ['1.0.0 - 2.0.0', '0.2.3'],
- ['1.0.0', '0.0.1'],
- ['>=2.0.0', '1.0.0'],
- ['>=2.0.0', '1.9999.9999'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['>2.0.0', '1.2.9'],
- ['2.x.x', '1.1.3'],
- ['1.2.x', '1.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.9999.9999'],
- ['2.3', '2.2.1'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.3'],
- ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
- ['>1', '1.0.0'],
- ['2', '1.0.0beta', true],
- ['>1', '1.0.0beta', true],
- ['> 1', '1.0.0beta', true],
- ['=0.7.x', '0.6.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['^1', '1.0.0-0'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['>=0.7.x', '0.6.2'],
- ['>1.2.3', '1.3.0-alpha']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(ltr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative ltr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be less than range
- [
- ['~ 1.0', '1.1.0'],
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '2.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^3.0.0', '4.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
- ['^1.0.0alpha', '1.0.0beta', true],
- ['~1.0.0alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0beta', true],
- ['~1.0.0-alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0-beta'],
- ['~1.0.0-alpha', '1.0.0-beta'],
- ['=0.1.0', '1.0.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(ltr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
deleted file mode 100644
index e9d4039c8b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-
-test('\nmajor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', 1],
- [' 1.2.3 ', 1],
- [' 2.2.3-4 ', 2],
- [' 3.2.3-pre ', 3],
- ['v5.2.3', 5],
- [' v8.2.3 ', 8],
- ['\t13.2.3', 13],
- ['=21.2.3', 21, true],
- ['v=34.2.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'major(' + range + ') = ' + version;
- t.equal(semver.major(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\nminor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.1.3', 1],
- [' 1.1.3 ', 1],
- [' 1.2.3-4 ', 2],
- [' 1.3.3-pre ', 3],
- ['v1.5.3', 5],
- [' v1.8.3 ', 8],
- ['\t1.13.3', 13],
- ['=1.21.3', 21, true],
- ['v=1.34.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'minor(' + range + ') = ' + version;
- t.equal(semver.minor(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\npatch tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.1', 1],
- [' 1.2.1 ', 1],
- [' 1.2.2-4 ', 2],
- [' 1.2.3-pre ', 3],
- ['v1.2.5', 5],
- [' v1.2.8 ', 8],
- ['\t1.2.13', 13],
- ['=1.2.21', 21, true],
- ['v=1.2.34', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'patch(' + range + ') = ' + version;
- t.equal(semver.patch(range, loose), version, msg);
- });
- t.end();
-});
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 9dedd7231d..4b0d6c182c 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,26 +1,26 @@
{
- "_from": "agent-base@2",
- "_id": "agent-base@2.1.1",
+ "_from": "agent-base@^4.1.0",
+ "_id": "agent-base@4.1.0",
"_inBundle": false,
- "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
+ "_integrity": "sha1-IOF0Ac1Js8B2v1akvGxbQ2/6jVU=",
"_location": "/pacote/make-fetch-happen/https-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "agent-base@2",
+ "raw": "agent-base@^4.1.0",
"name": "agent-base",
"escapedName": "agent-base",
- "rawSpec": "2",
+ "rawSpec": "^4.1.0",
"saveSpec": null,
- "fetchSpec": "2"
+ "fetchSpec": "^4.1.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen/https-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
- "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7",
- "_spec": "agent-base@2",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.0.tgz",
+ "_shasum": "20e17401cd49b3c076bf56a4bc6c5b436ffa8d55",
+ "_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": {
"name": "Nathan Rajlich",
@@ -32,14 +32,16 @@
},
"bundleDependencies": false,
"dependencies": {
- "extend": "~3.0.0",
- "semver": "~5.0.1"
+ "es6-promisify": "^5.0.0"
},
"deprecated": false,
"description": "Turn a function into an `http.Agent` instance",
"devDependencies": {
- "mocha": "2",
- "ws": "0.8.0"
+ "mocha": "^3.4.2",
+ "ws": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
},
"homepage": "https://github.com/TooTallNate/node-agent-base#readme",
"keywords": [
@@ -50,7 +52,7 @@
"https"
],
"license": "MIT",
- "main": "agent.js",
+ "main": "./index.js",
"name": "agent-base",
"repository": {
"type": "git",
@@ -59,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.1"
+ "version": "4.1.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 7cdacafa3e..05cbaa1e70 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,53 +1,25 @@
-var url = require('url');
-var http = require('http');
-var https = require('https');
-var semver = require('semver');
-var inherits = require('util').inherits;
+'use strict';
+const url = require('url');
+const https = require('https');
-// we only need to patch the `http.request()` and
-// `http.ClientRequest` on older versions of Node.js
-if (semver.lt(process.version, '0.11.8')) {
- // subclass the native ClientRequest to include the
- // passed in `options` object.
- http.ClientRequest = (function (_ClientRequest) {
- function ClientRequest (options, cb) {
- this._options = options;
- _ClientRequest.call(this, options, cb);
- }
- inherits(ClientRequest, _ClientRequest);
-
- return ClientRequest;
- })(http.ClientRequest);
-
-
- // need to re-define the `request()` method, since on node v0.8/v0.10
- // the closure-local ClientRequest is used, rather than the monkey
- // patched version we have created here.
- http.request = (function (request) {
- return function (options, cb) {
- if (typeof options === 'string') {
- options = url.parse(options);
- }
- if (options.protocol && options.protocol !== 'http:') {
- throw new Error('Protocol:' + options.protocol + ' not supported.');
- }
- return new http.ClientRequest(options, cb);
- };
- })(http.request);
-}
-
-
-// this currently needs to be applied to all Node.js versions
-// (v0.8.x, v0.10.x, v0.12.x), in order to determine if the `req`
-// is an HTTP or HTTPS request. There is currently no PR attempting
-// to move this property upstream.
-https.request = (function (request) {
- return function (options, cb) {
+/**
+ * This currently needs to be applied to all Node.js versions
+ * in order to determine if the `req` is an HTTP or HTTPS request.
+ *
+ * There is currently no PR attempting to move this property upstream.
+ */
+https.request = (function(request) {
+ return function(_options, cb) {
+ let options
if (typeof options === 'string') {
- options = url.parse(options);
+ options = url.parse(_options);
+ } else {
+ options = Object.assign({}, _options);
+ }
+ if (null == options.port) {
+ options.port = 443;
}
- if (null == options.port) options.port = 443;
options.secureEndpoint = true;
return request.call(https, options, cb);
};
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 7d8dee66ce..43217d4273 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
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -13,18 +12,17 @@ var WebSocket = require('ws');
var assert = require('assert');
var events = require('events');
var inherits = require('util').inherits;
-var semver = require('semver');
var Agent = require('../');
-describe('Agent', function () {
- describe('subclass', function () {
- it('should be subclassable', function (done) {
- function MyAgent () {
+describe('Agent', function() {
+ describe('subclass', function() {
+ it('should be subclassable', function(done) {
+ function MyAgent() {
Agent.call(this);
}
inherits(MyAgent, Agent);
- MyAgent.prototype.callback = function (req, opts, fn) {
+ MyAgent.prototype.callback = function(req, opts, fn) {
assert.equal(req.path, '/foo');
assert.equal(req.getHeader('host'), '127.0.0.1:1234');
assert.equal(opts.secureEndpoint, true);
@@ -32,102 +30,177 @@ describe('Agent', function () {
};
var info = url.parse('https://127.0.0.1:1234/foo');
- info.agent = new MyAgent;
+ info.agent = new MyAgent();
https.get(info);
});
});
- describe('"error" event', function () {
- it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) {
+ describe('options', function() {
+ it('should support an options Object as first argument', function() {
+ var agent = new Agent({ timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should support an options Object as second argument', function() {
+ var agent = new Agent(function() {}, { timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should be mixed in with HTTP request options', function(done) {
+ var agent = new Agent({
+ host: 'my-proxy.com',
+ port: 3128,
+ foo: 'bar'
+ });
+ agent.callback = function(req, opts, fn) {
+ assert.equal('bar', opts.foo);
+ assert.equal('a', opts.b);
+
+ // `host` and `port` are special-cases, and should always be
+ // overwritten in the request `opts` inside the agent-base callback
+ assert.equal('localhost', opts.host);
+ assert.equal(80, opts.port);
+ done();
+ };
+ var opts = {
+ b: 'a',
+ agent: agent
+ };
+ http.get(opts);
+ });
+ });
+ describe('`this` context', function() {
+ it('should be the Agent instance', function(done) {
+ var called = false;
+ var agent = new Agent();
+ 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);
+ req.on('error', function(err) {
+ 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) {
+ 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);
+ req.on('error', function(err) {
+ 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
+ ) {
var agent = new Agent();
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
- assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message);
+ req.on('error', function(err) {
+ assert.equal(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`',
+ err.message
+ );
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
fn(new Error('is this caught?'));
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
- setTimeout(function () {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
+ setTimeout(function() {
fn(new Error('is this caught?'));
}, 10);
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
});
- describe('artificial "streams"', function () {
- it('should send a GET request', function (done) {
+ describe('artificial "streams"', function() {
+ it('should send a GET request', function(done) {
var stream = new events.EventEmitter();
// needed for the `http` module to call .write() on the stream
stream.writable = true;
- stream.write = function (str) {
+ stream.write = function(str) {
assert(0 == str.indexOf('GET / HTTP/1.1'));
done();
};
// needed for `http` module in Node.js 4
- stream.cork = function () {
- };
+ stream.cork = function() {};
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
var req = http.request(opts);
req.end();
});
- it('should receive a GET response', function (done) {
+ it('should receive a GET response', function(done) {
var stream = new events.EventEmitter();
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
- var req = http.request(opts, function (res) {
+ var req = http.request(opts, function(res) {
assert.equal('0.9', res.httpVersion);
assert.equal(111, res.statusCode);
assert.equal('bar', res.headers.foo);
done();
});
- req.end();
- // have to nextTick() since `http.ClientRequest` doesn't *actually*
- // attach the listeners to the "stream" until the next tick :\
- process.nextTick(function () {
- var buf = new Buffer('HTTP/0.9 111\r\n' +
- 'Foo: bar\r\n' +
- 'Set-Cookie: 1\r\n' +
- 'Set-Cookie: 2\r\n\r\n');
+ // have to wait for the "socket" event since `http.ClientRequest`
+ // doesn't *actually* attach the listeners to the "stream" until
+ // this happens
+ req.once('socket', function() {
+ var buf = new Buffer(
+ 'HTTP/0.9 111\r\n' +
+ 'Foo: bar\r\n' +
+ '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);
@@ -136,34 +209,36 @@ describe('Agent', function () {
stream.emit('data', buf);
}
});
+
+ req.end();
});
});
});
-describe('"http" module', function () {
+describe('"http" module', function() {
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
server = http.createServer();
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTP requests', function (done) {
+ it('should work for basic HTTP requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -171,7 +246,63 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support direct return in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ called = true;
+ return net.connect(opts);
+ });
+
+ // 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support returning a Promise in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ return new Promise(function(resolve, reject) {
+ called = true;
+ resolve(net.connect(opts));
+ });
+ });
+
+ // 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);
@@ -180,7 +311,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/foo');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -189,9 +320,9 @@ describe('"http" module', function () {
});
});
- it('should set the `Connection: close` response header', function (done) {
+ it('should set the `Connection: close` response header', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -199,7 +330,7 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Url', req.url);
assert.equal('close', req.headers.connection);
@@ -208,7 +339,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/bar');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('/bar', res.headers['x-url']);
assert.equal('close', res.headers.connection);
assert(gotReq);
@@ -217,8 +348,8 @@ describe('"http" module', function () {
});
});
- it('should pass through options from `http.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `http.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -231,8 +362,8 @@ describe('"http" module', function () {
});
});
- it('should default to port 80', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 80', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(80, opts.port);
done();
});
@@ -245,36 +376,76 @@ describe('"http" module', function () {
agent: agent
});
});
+
+ it('should support the "timeout" option', function(done) {
+ // ensure we timeout after the "error" event had a chance to trigger
+ this.timeout(1000);
+ this.slow(800);
+
+ var agent = new Agent(
+ function(req, opts, fn) {
+ // this function will time out
+ },
+ { timeout: 100 }
+ );
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function(err) {
+ assert.equal('ETIMEOUT', err.code);
+ req.abort();
+ done();
+ });
+ });
});
-describe('"https" module', function () {
+describe('"https" module', function() {
var server;
var port;
// setup test HTTPS server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTPS requests', function (done) {
+
+ it('should not modify the passed in Options object', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(443, opts.port);
+ assert.equal('localhost', opts.host);
+ });
+ var opts = { agent: agent };
+ var req = https.request(opts);
+ assert.equal(true, called);
+ assert.equal(false, 'secureEndpoint' in opts);
+ assert.equal(false, 'port' in opts);
+ done();
+ });
+
+ it('should work for basic HTTPS requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
assert(opts.secureEndpoint);
var socket = tls.connect(opts);
@@ -283,7 +454,7 @@ describe('"https" module', function () {
// add HTTPS server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Foo', 'bar');
res.setHeader('X-Url', req.url);
@@ -293,7 +464,7 @@ describe('"https" module', function () {
var info = url.parse('https://127.0.0.1:' + port + '/foo');
info.agent = agent;
info.rejectUnauthorized = false;
- https.get(info, function (res) {
+ https.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -302,8 +473,8 @@ describe('"https" module', function () {
});
});
- it('should pass through options from `https.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `https.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -316,8 +487,8 @@ describe('"https" module', function () {
});
});
- it('should default to port 443', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 443', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(true, opts.secureEndpoint);
assert.equal(false, opts.rejectUnauthorized);
assert.equal(443, opts.port);
@@ -335,39 +506,39 @@ describe('"https" module', function () {
});
});
-describe('"ws" server', function () {
+describe('"ws" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
- server = http.createServer()
+ before(function(done) {
+ server = http.createServer();
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic WebSocket connections', function (done) {
+ it('should work for basic WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = net.connect(opts);
fn(null, socket);
});
@@ -376,57 +547,56 @@ describe('"ws" server', function () {
agent: agent
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
-describe('"wss" server', function () {
+describe('"wss" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for secure WebSocket connections', function (done) {
+ it('should work for secure WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = tls.connect(opts);
fn(null, socket);
});
@@ -436,16 +606,15 @@ describe('"wss" server', function () {
rejectUnauthorized: false
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.jscs.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.jscs.json
deleted file mode 100644
index b1c6a99f97..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.jscs.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "es3": true,
-
- "additionalRules": [],
-
- "requireSemicolons": true,
-
- "disallowMultipleSpaces": true,
-
- "disallowIdentifierNames": [],
-
- "requireCurlyBraces": {
- "allExcept": [],
- "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
- },
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "disallowSpaceBeforeComma": true,
- "disallowSpaceAfterComma": false,
- "disallowSpaceBeforeSemicolon": true,
-
- "disallowNodeTypes": [
- "DebuggerStatement",
- "LabeledStatement",
- "SwitchCase",
- "SwitchStatement",
- "WithStatement"
- ],
-
- "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "requireSpaceBetweenArguments": true,
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "disallowTrailingComma": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "requireDotNotation": { "allExcept": ["keywords"] },
-
- "requireParenthesesAroundIIFE": true,
-
- "validateLineBreaks": "LF",
-
- "validateQuoteMarks": {
- "escape": true,
- "mark": "'"
- },
-
- "disallowOperatorBeforeLineBreak": [],
-
- "requireSpaceBeforeKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "finally",
- "while",
- "with",
- "return"
- ],
-
- "validateAlignedFunctionParameters": {
- "lineBreakAfterOpeningBraces": true,
- "lineBreakBeforeClosingBraces": true
- },
-
- "requirePaddingNewLinesBeforeExport": true,
-
- "validateNewlineAfterArrayElements": {
- "maximum": 6
- },
-
- "requirePaddingNewLinesAfterUseStrict": true,
-
- "disallowArrowFunctions": true,
-
- "disallowMultiLineTernary": true,
-
- "validateOrderInObjectKeys": false,
-
- "disallowIdenticalDestructuringNames": true,
-
- "disallowNestedTernaries": { "maxLevel": 1 },
-
- "requireSpaceAfterComma": { "allExcept": ["trailing"] },
- "requireAlignedMultilineParams": false,
-
- "requireSpacesInGenerator": {
- "afterStar": true
- },
-
- "disallowSpacesInGenerator": {
- "beforeStar": true
- },
-
- "disallowVar": false,
-
- "requireArrayDestructuring": false,
-
- "requireEnhancedObjectLiterals": false,
-
- "requireObjectDestructuring": false,
-
- "requireEarlyReturn": false,
-
- "requireCapitalizedConstructorsNew": {
- "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
- },
-
- "requireImportAlphabetized": false,
-
- "requireSpaceBeforeObjectValues": true,
- "requireSpaceBeforeDestructuredValues": true,
-
- "disallowSpacesInsideTemplateStringPlaceholders": true,
-
- "disallowArrayDestructuringReturn": false,
-
- "requireNewlineBeforeSingleStatementsInIf": false,
-
- "disallowUnusedVariables": true,
-
- "requireSpacesInsideImportedObjectBraces": true,
-
- "requireUseStrict": true
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.npmignore
deleted file mode 100644
index 30d74d2584..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test \ 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/extend/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.travis.yml
deleted file mode 100644
index 6bf696c87b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/.travis.yml
+++ /dev/null
@@ -1,179 +0,0 @@
-language: node_js
-os:
- - linux
-node_js:
- - "7.9"
- - "6.10"
- - "5.12"
- - "4.8"
- - "iojs-v3.3"
- - "iojs-v2.5"
- - "iojs-v1.8"
- - "0.12"
- - "0.10"
- - "0.8"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
-install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
-script:
- - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
- - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
- - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
-sudo: false
-env:
- - TEST=true
-matrix:
- fast_finish: true
- include:
- - node_js: "node"
- env: PRETEST=true
- - node_js: "node"
- env: COVERAGE=true
- - node_js: "7.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.10"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.4"
- env: TEST=true ALLOW_FAILURE=true
- ##- node_js: "7"
- #env: TEST=true
- #os: osx
- #- node_js: "6"
- #env: TEST=true
- #os: osx
- #- node_js: "5"
- #env: TEST=true
- #os: osx
- #- node_js: "4"
- #env: TEST=true
- #os: osx
- #- node_js: "iojs"
- #env: TEST=true
- #os: osx
- #- node_js: "0.12"
- #env: TEST=true
- #os: osx
- #- node_js: "0.10"
- #env: TEST=true
- #os: osx
- #- node_js: "0.8"
- #env: TEST=true
- #os: osx
- allow_failures:
- - os: osx
- - env: TEST=true ALLOW_FAILURE=true
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/CHANGELOG.md
deleted file mode 100644
index 7d2e5f3a50..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/CHANGELOG.md
+++ /dev/null
@@ -1,76 +0,0 @@
-3.0.1 / 2017-04-27
-==================
- * [Fix] deep extending should work with a non-object (#46)
- * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`
- * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix
- * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG.
- * [Docs] Add example to readme (#34)
-
-3.0.0 / 2015-07-01
-==================
- * [Possible breaking change] Use global "strict" directive (#32)
- * [Tests] `int` is an ES3 reserved word
- * [Tests] Test up to `io.js` `v2.3`
- * [Tests] Add `npm run eslint`
- * [Dev Deps] Update `covert`, `jscs`
-
-2.0.1 / 2015-04-25
-==================
- * Use an inline `isArray` check, for ES3 browsers. (#27)
- * Some old browsers fail when an identifier is `toString`
- * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
- * Add license info to package.json (#25)
- * Update `tape`, `jscs`
- * Adding a CHANGELOG
-
-2.0.0 / 2014-10-01
-==================
- * Increase code coverage to 100%; run code coverage as part of tests
- * Add `npm run lint`; Run linter as part of tests
- * Remove nodeType and setInterval checks in isPlainObject
- * Updating `tape`, `jscs`, `covert`
- * General style and README cleanup
-
-1.3.0 / 2014-06-20
-==================
- * Add component.json for browser support (#18)
- * Use SVG for badges in README (#16)
- * Updating `tape`, `covert`
- * Updating travis-ci to work with multiple node versions
- * Fix `deep === false` bug (returning target as {}) (#14)
- * Fixing constructor checks in isPlainObject
- * Adding additional test coverage
- * Adding `npm run coverage`
- * Add LICENSE (#13)
- * Adding a warning about `false`, per #11
- * General style and whitespace cleanup
-
-1.2.1 / 2013-09-14
-==================
- * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
- * Updating `tape`
-
-1.2.0 / 2013-09-02
-==================
- * Updating the README: add badges
- * Adding a missing variable reference.
- * Using `tape` instead of `buster` for tests; add more tests (#7)
- * Adding node 0.10 to Travis CI (#6)
- * Enabling "npm test" and cleaning up package.json (#5)
- * Add Travis CI.
-
-1.1.3 / 2012-12-06
-==================
- * Added unit tests.
- * Ensure extend function is named. (Looks nicer in a stack trace.)
- * README cleanup.
-
-1.1.1 / 2012-11-07
-==================
- * README cleanup.
- * Added installation instructions.
- * Added a missing semicolon
-
-1.0.0 / 2012-04-08
-==================
- * Initial commit
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/LICENSE
deleted file mode 100644
index 92d41503d3..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Stefan Thomas
-
-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/https-proxy-agent/node_modules/extend/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/README.md
deleted file mode 100644
index 947dda6aeb..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-[![Build Status][travis-svg]][travis-url]
-[![dependency status][deps-svg]][deps-url]
-[![dev dependency status][dev-deps-svg]][dev-deps-url]
-
-# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
-
-`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
-
-Notes:
-
-* Since Node.js >= 4,
- [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- now offers the same functionality natively (but without the "deep copy" option).
- See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
-* Some native implementations of `Object.assign` in both Node.js and many
- browsers (since NPM modules are for the browser too) may not be fully
- spec-compliant.
- Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
- a compliant candidate.
-
-## Installation
-
-This package is available on [npm][npm-url] as: `extend`
-
-``` sh
-npm install extend
-```
-
-## Usage
-
-**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
-
-*Extend one object with one or more others, returning the modified object.*
-
-**Example:**
-
-``` js
-var extend = require('extend');
-extend(targetObject, object1, object2);
-```
-
-Keep in mind that the target object will be modified, and will be returned from extend().
-
-If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
-Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
-Warning: passing `false` as the first argument is not supported.
-
-### Arguments
-
-* `deep` *Boolean* (optional)
-If set, the merge becomes recursive (i.e. deep copy).
-* `target` *Object*
-The object to extend.
-* `object1` *Object*
-The object that will be merged into the first.
-* `objectN` *Object* (Optional)
-More objects to merge into the first.
-
-## License
-
-`node-extend` is licensed under the [MIT License][mit-license-url].
-
-## Acknowledgements
-
-All credit to the jQuery authors for perfecting this amazing utility.
-
-Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
-
-[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
-[travis-url]: https://travis-ci.org/justmoon/node-extend
-[npm-url]: https://npmjs.org/package/extend
-[mit-license-url]: http://opensource.org/licenses/MIT
-[github-justmoon]: https://github.com/justmoon
-[github-insin]: https://github.com/insin
-[github-ljharb]: https://github.com/ljharb
-[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
-[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
-[deps-url]: https://david-dm.org/justmoon/node-extend
-[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
-[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/component.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/component.json
deleted file mode 100644
index 0f76b59305..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/component.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "extend",
- "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
- "version": "3.0.0",
- "description": "Port of jQuery.extend for node.js and the browser.",
- "scripts": [
- "index.js"
- ],
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "repository" : {
- "type": "git",
- "url": "https://github.com/justmoon/node-extend.git"
- },
- "dependencies": {
- },
- "devDependencies": {
- "tape" : "~3.0.0",
- "covert": "~0.4.0",
- "jscs": "~1.6.2"
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/index.js
deleted file mode 100644
index bbe53f6608..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/index.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
-
-var isArray = function isArray(arr) {
- if (typeof Array.isArray === 'function') {
- return Array.isArray(arr);
- }
-
- return toStr.call(arr) === '[object Array]';
-};
-
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
-
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) { /**/ }
-
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
-
-module.exports = function extend() {
- var options, name, src, copy, copyIsArray, clone;
- var target = arguments[0];
- var i = 1;
- var length = arguments.length;
- var deep = false;
-
- // Handle a deep copy situation
- if (typeof target === 'boolean') {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
- if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
- target = {};
- }
-
- for (; i < length; ++i) {
- options = arguments[i];
- // Only deal with non-null/undefined values
- if (options != null) {
- // Extend the base object
- for (name in options) {
- src = target[name];
- copy = options[name];
-
- // Prevent never-ending loop
- if (target !== copy) {
- // Recurse if we're merging plain objects or arrays
- if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
- if (copyIsArray) {
- copyIsArray = false;
- clone = src && isArray(src) ? src : [];
- } else {
- clone = src && isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[name] = extend(deep, clone, copy);
-
- // Don't bring in undefined values
- } else if (typeof copy !== 'undefined') {
- target[name] = copy;
- }
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/package.json
deleted file mode 100644
index ae1374362f..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/extend/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_from": "extend@3",
- "_id": "extend@3.0.1",
- "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "_location": "/pacote/make-fetch-happen/https-proxy-agent/extend",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "extend@3",
- "name": "extend",
- "escapedName": "extend",
- "rawSpec": "3",
- "saveSpec": null,
- "fetchSpec": "3"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/https-proxy-agent",
- "/pacote/make-fetch-happen/https-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444",
- "_shrinkwrap": null,
- "_spec": "extend@3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent",
- "author": {
- "name": "Stefan Thomas",
- "email": "justmoon@members.fsf.org",
- "url": "http://www.justmoon.net"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/justmoon/node-extend/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "Port of jQuery.extend for node.js and the browser",
- "devDependencies": {
- "@ljharb/eslint-config": "^11.0.0",
- "covert": "^1.1.0",
- "eslint": "^3.19.0",
- "jscs": "^3.0.7",
- "tape": "^4.6.3"
- },
- "homepage": "https://github.com/justmoon/node-extend#readme",
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "license": "MIT",
- "main": "index",
- "name": "extend",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/justmoon/node-extend.git"
- },
- "scripts": {
- "coverage": "covert test/index.js",
- "coverage-quiet": "covert test/index.js --quiet",
- "eslint": "eslint *.js */*.js",
- "jscs": "jscs *.js */*.js",
- "lint": "npm run jscs && npm run eslint",
- "posttest": "npm run coverage-quiet",
- "pretest": "npm run lint",
- "test": "npm run tests-only",
- "tests-only": "node test"
- },
- "version": "3.0.1"
-}
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 51ff9397f8..1e84640b0a 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,48 +1,45 @@
{
- "_from": "https-proxy-agent@^1.0.0",
- "_id": "https-proxy-agent@1.0.0",
- "_integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=",
+ "_from": "https-proxy-agent@^2.0.0",
+ "_id": "https-proxy-agent@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-/6pLb69YasNAwYoUBDHna31/KUQ=",
"_location": "/pacote/make-fetch-happen/https-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "https-proxy-agent@^1.0.0",
+ "raw": "https-proxy-agent@^2.0.0",
"name": "https-proxy-agent",
"escapedName": "https-proxy-agent",
- "rawSpec": "^1.0.0",
+ "rawSpec": "^2.0.0",
"saveSpec": null,
- "fetchSpec": "^1.0.0"
+ "fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
- "_shasum": "35f7da6c48ce4ddbfa264891ac593ee5ff8671e6",
- "_shrinkwrap": null,
- "_spec": "https-proxy-agent@^1.0.0",
+ "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.0.0.tgz",
+ "_shasum": "ffaa4b6faf586ac340c18a140431e76b7d7f2944",
+ "_spec": "https-proxy-agent@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
"url": "http://n8.io/"
},
- "bin": null,
"bugs": {
"url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
},
"bundleDependencies": false,
"dependencies": {
- "agent-base": "2",
- "debug": "2",
- "extend": "3"
+ "agent-base": "^4.1.0",
+ "debug": "^2.4.1"
},
"deprecated": false,
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"devDependencies": {
- "mocha": "2",
- "proxy": "~0.2.3",
- "semver": "~2.2.1"
+ "mocha": "^3.4.2",
+ "proxy": "^0.2.4"
},
"homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme",
"keywords": [
@@ -52,10 +49,8 @@
"agent"
],
"license": "MIT",
- "main": "https-proxy-agent.js",
+ "main": "./index.js",
"name": "https-proxy-agent",
- "optionalDependencies": {},
- "peerDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
@@ -63,5 +58,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "1.0.0"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js
index 2ee6724ea1..9017701f55 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js
@@ -9,8 +9,6 @@ var http = require('http');
var https = require('https');
var assert = require('assert');
var Proxy = require('proxy');
-var Semver = require('semver');
-var version = new Semver(process.version);
var HttpsProxyAgent = require('../');
describe('HttpsProxyAgent', function () {
@@ -181,7 +179,6 @@ describe('HttpsProxyAgent', function () {
});
res.on('end', function () {
data = JSON.parse(data);
- console.log(data);
assert.equal('127.0.0.1:' + serverPort, data.host);
done();
});
@@ -224,6 +221,31 @@ describe('HttpsProxyAgent', function () {
done();
});
});
+
+ it('should allow custom proxy "headers"', function (done) {
+ server.once('connect', function (req, socket, head) {
+ assert.equal('CONNECT', req.method);
+ assert.equal('bar', req.headers.foo);
+ socket.destroy();
+ done();
+ });
+
+ var uri = 'http://127.0.0.1:' + serverPort;
+ var proxyOpts = url.parse(uri);
+ proxyOpts.headers = {
+ 'Foo': 'bar'
+ };
+ var agent = new HttpsProxyAgent(proxyOpts);
+
+ var opts = {};
+ // `host` and `port` don't really matter since the proxy will reject anyways
+ opts.host = '127.0.0.1';
+ opts.port = 80;
+ opts.agent = agent;
+
+ http.get(opts);
+ });
+
});
describe('"https" module', function () {
@@ -253,40 +275,33 @@ describe('HttpsProxyAgent', function () {
});
});
- if (version.compare('0.11.3') < 0 || version.compare('0.11.8') >= 0) {
- // This test is disabled on node >= 0.11.3 && < 0.11.8, since it segfaults :(
- // See: https://github.com/joyent/node/issues/6204
+ it('should work over an HTTPS proxy', function (done) {
+ sslServer.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
- it('should work over an HTTPS proxy', function (done) {
- sslServer.once('request', function (req, res) {
- res.end(JSON.stringify(req.headers));
- });
+ var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort;
+ proxy = url.parse(proxy);
+ proxy.rejectUnauthorized = false;
+ var agent = new HttpsProxyAgent(proxy);
+
+ var opts = url.parse('https://127.0.0.1:' + sslServerPort);
+ opts.agent = agent;
+ opts.rejectUnauthorized = false;
- var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort;
- proxy = url.parse(proxy);
- proxy.rejectUnauthorized = false;
- var agent = new HttpsProxyAgent(proxy);
-
- var opts = url.parse('https://127.0.0.1:' + sslServerPort);
- opts.agent = agent;
- opts.rejectUnauthorized = false;
-
- https.get(opts, function (res) {
- var data = '';
- res.setEncoding('utf8');
- res.on('data', function (b) {
- data += b;
- });
- res.on('end', function () {
- data = JSON.parse(data);
- assert.equal('127.0.0.1:' + sslServerPort, data.host);
- done();
- });
+ https.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + sslServerPort, data.host);
+ done();
});
});
- } else {
- it('should work over an HTTPS proxy');
- }
+ });
});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml
index cf55443ae2..636d8d9123 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml
@@ -7,6 +7,7 @@
- "iojs"
- "4"
- "6"
+ - "8"
- "node"
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md
index 3679f2bf41..ee8a05c44a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md
@@ -1,4 +1,9 @@
+# 0.4.18 / 2017-06-13
+
+ * Fixed CESU-8 regression in Node v8.
+
+
# 0.4.17 / 2017-04-22
* Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn)
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js
index 6bb64c59b2..e5aeefd6fb 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js
@@ -35,7 +35,7 @@ function InternalCodec(codecOptions, iconv) {
this.encoder = InternalEncoderCesu8;
// Add decoder for versions of Node not supporting CESU-8
- if (new Buffer("eda080", 'hex').toString().length == 3) {
+ if (new Buffer('eda0bdedb2a9', 'hex').toString() !== '💩') {
this.decoder = InternalDecoderCesu8;
this.defaultCharUnicode = iconv.defaultCharUnicode;
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json
index 9dfb46a968..3ec29a66e9 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json
@@ -1,36 +1,27 @@
{
- "_args": [
- [
- {
- "type": "remote",
- "raw": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "name": "iconv-lite",
- "escapedName": "iconv-lite",
- "rawSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "saveSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "fetchSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz"
- },
- "/Users/zkat/Documents/code/npm"
- ]
- ],
- "_from": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "_id": "iconv-lite@0.4.17",
- "_integrity": "sha1-T9qjs4rLwsAxsEXQ7c3+HsqxjI0=",
+ "_from": "iconv-lite@~0.4.13",
+ "_id": "iconv-lite@0.4.18",
+ "_inBundle": false,
+ "_integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==",
"_location": "/pacote/make-fetch-happen/node-fetch-npm/encoding/iconv-lite",
"_phantomChildren": {},
"_requested": {
- "type": "remote",
- "raw": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
+ "type": "range",
+ "registry": true,
+ "raw": "iconv-lite@~0.4.13",
"name": "iconv-lite",
"escapedName": "iconv-lite",
- "rawSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "saveSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "fetchSpec": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz"
+ "rawSpec": "~0.4.13",
+ "saveSpec": null,
+ "fetchSpec": "~0.4.13"
},
- "_requiredBy": [],
- "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "_spec": "iconv-lite@https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/node-fetch-npm/encoding"
+ ],
+ "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz",
+ "_shasum": "23d8656b16aae6742ac29732ea8f0336a4789cf2",
+ "_spec": "iconv-lite@~0.4.13",
+ "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding",
"author": {
"name": "Alexander Shtuchkin",
"email": "ashtuchkin@gmail.com"
@@ -42,6 +33,7 @@
"bugs": {
"url": "https://github.com/ashtuchkin/iconv-lite/issues"
},
+ "bundleDependencies": false,
"contributors": [
{
"name": "Jinwu Zhan",
@@ -92,7 +84,7 @@
"url": "https://github.com/nleush"
}
],
- "dependencies": {},
+ "deprecated": false,
"description": "Convert character encodings in pure javascript.",
"devDependencies": {
"async": "*",
@@ -117,7 +109,6 @@
"license": "MIT",
"main": "./lib/index.js",
"name": "iconv-lite",
- "optionalDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/ashtuchkin/iconv-lite.git"
@@ -128,5 +119,5 @@
"test": "mocha --reporter spec --grep ."
},
"typings": "./lib/index.d.ts",
- "version": "0.4.17"
+ "version": "0.4.18"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml
index 41840cb357..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml
@@ -3,19 +3,14 @@ sudo: false
language: node_js
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "1"
- - "2"
- - "3"
- "4"
- "5"
+ - "6"
+ - "7"
+ - "8"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
- # Node 0.8 comes with a too obsolete npm
- - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
# Install dependencies and build
- npm install
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md
index 7c464a63d6..c4161db723 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md
@@ -1,4 +1,18 @@
+3.0.0 / 2017-06-13
+==================
+
+ * [BREAKING] drop support for Node < 4
+ * update deps, remove `extend` dependency
+ * rename `socks-proxy-agent.js` to `index.js`
+
+2.1.1 / 2017-06-13
+==================
+
+ * fix a bug where `close` would emit before `end`
+ * use "raw-body" module for tests
+ * prettier
+
2.1.0 / 2017-05-24
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/socks-proxy-agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/index.js
index c1f769e24e..f9cfc3281a 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/socks-proxy-agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/index.js
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -6,7 +5,6 @@
var tls; // lazy-loaded...
var url = require('url');
var dns = require('dns');
-var extend = require('extend');
var Agent = require('agent-base');
var SocksClient = require('socks');
var inherits = require('util').inherits;
@@ -23,13 +21,16 @@ module.exports = SocksProxyAgent;
* @api public
*/
-function SocksProxyAgent (opts) {
+function SocksProxyAgent(opts) {
if (!(this instanceof SocksProxyAgent)) return new SocksProxyAgent(opts);
if ('string' == typeof opts) opts = url.parse(opts);
- if (!opts) throw new Error('a SOCKS proxy server `host` and `port` must be specified!');
+ if (!opts)
+ throw new Error(
+ 'a SOCKS proxy server `host` and `port` must be specified!'
+ );
Agent.call(this, connect);
- var proxy = extend({}, opts);
+ var proxy = Object.assign({}, opts);
// prefer `hostname` over `host`, because of `url.parse()`
proxy.host = proxy.hostname || proxy.host;
@@ -52,24 +53,26 @@ function SocksProxyAgent (opts) {
switch (proxy.protocol) {
case 'socks4:':
proxy.lookup = true;
- // pass through
+ // pass through
case 'socks4a:':
proxy.version = 4;
break;
case 'socks5:':
proxy.lookup = true;
- // pass through
+ // pass through
case 'socks:': // no version specified, default to 5h
case 'socks5h:':
proxy.version = 5;
break;
default:
- throw new TypeError('A "socks" protocol must be specified! Got: ' + proxy.protocol);
+ throw new TypeError(
+ 'A "socks" protocol must be specified! Got: ' + proxy.protocol
+ );
}
if (proxy.auth) {
var auth = proxy.auth.split(':');
- proxy.authentication = {username: auth[0], password: auth[1]};
+ proxy.authentication = { username: auth[0], password: auth[1] };
proxy.userid = auth[0];
}
this.proxy = proxy;
@@ -83,12 +86,11 @@ inherits(SocksProxyAgent, Agent);
* @api public
*/
-function connect (req, opts, fn) {
-
+function connect(req, opts, fn) {
var proxy = this.proxy;
// called once the SOCKS proxy has connected to the specified remote endpoint
- function onhostconnect (err, socket) {
+ function onhostconnect(err, socket) {
if (err) return fn(err);
var s = socket;
if (opts.secureEndpoint) {
@@ -101,13 +103,13 @@ function connect (req, opts, fn) {
opts.hostname = null;
opts.port = null;
s = tls.connect(opts);
- socket.resume();
}
+ socket.resume();
fn(null, s);
}
// called for the `dns.lookup()` callback
- function onlookup (err, ip) {
+ function onlookup(err, ip) {
if (err) return fn(err);
options.target.host = ip;
SocksClient.createConnection(options, onhostconnect);
@@ -134,6 +136,6 @@ function connect (req, opts, fn) {
dns.lookup(opts.host, onlookup);
} else {
// proxy hostname DNS resolution for "4a" and "5h" socks proxy servers
- onlookup(null, opts.host)
+ onlookup(null, opts.host);
}
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore
index 07e6e472cc..c12f3a80c1 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore
@@ -1 +1,2 @@
/node_modules
+/?.js
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
index 20b794051c..805d3d50d2 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
@@ -3,21 +3,14 @@ sudo: false
language: node_js
node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "1"
- - "2"
- - "3"
- "4"
- "5"
- "6"
- "7"
+ - "8"
install:
- PATH="`npm bin`:`npm bin -g`:$PATH"
- # Node 0.8 comes with a too obsolete npm
- - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
# Install dependencies and build
- npm install
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 2191a9e801..b79a539629 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,8 +1,43 @@
+4.1.0 / 2017-06-26
+==================
+
+ * mix in Agent options into Request options
+ * throw when nothing is returned from agent-base callback
+ * do not modify the options object for https requests
+
+4.0.1 / 2017-06-13
+==================
+
+ * add `this` context tests and fixes
+
+4.0.0 / 2017-06-06
+==================
+
+ * drop support for Node.js < 4
+ * drop old versions of Node.js from Travis-CI
+ * specify Node.js >= 4.0.0 in `engines.node`
+ * remove more old code
+ * remove "extend" dependency
+ * remove "semver" dependency
+ * make the Promise logic a bit cleaner
+ * add async function pseudo-example to README
+ * use direct return in README example
+
+3.0.0 / 2017-06-02
+==================
+
+ * drop support for Node.js v0.8 and v0.10
+ * add support for async, Promises, and direct return
+ * add a couple `options` test cases
+ * implement a `"timeout"` option
+ * rename main file to `index.js`
+ * test Node 8 on Travis
+
2.1.1 / 2017-05-30
==================
- * Revert [fe2162e0ba18123f5b301cba4de1e9dd74e437cd](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [270bdc92eb8e3bd0444d1e5266e8e9390aeb3095](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
+ * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7)
2.1.0 / 2017-05-26
==================
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 616b90cdbf..64175a43a4 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
@@ -1,6 +1,6 @@
agent-base
==========
-### Turn a function into an `http.Agent` instance
+### Turn a function into an [`http.Agent`][http.Agent] instance
[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base)
This module provides an `http.Agent` generator. That is, you pass it an async
@@ -34,7 +34,7 @@ Example
Here's a minimal example that creates a new `net.Socket` connection to the server
for every HTTP request (i.e. the equivalent of `agent: false` option):
-``` js
+```js
var net = require('net');
var tls = require('tls');
var url = require('url');
@@ -42,10 +42,10 @@ var http = require('http');
var agent = require('agent-base');
var endpoint = 'http://nodejs.org/api/';
-var opts = url.parse(endpoint);
+var parsed = url.parse(endpoint);
// This is the important part!
-opts.agent = agent(function (req, opts, fn) {
+parsed.agent = agent(function (req, opts) {
var socket;
// `secureEndpoint` is true when using the https module
if (opts.secureEndpoint) {
@@ -53,26 +53,40 @@ opts.agent = agent(function (req, opts, fn) {
} else {
socket = net.connect(opts);
}
- fn(null, socket);
+ return socket;
});
// Everything else works just like normal...
-http.get(opts, function (res) {
+http.get(parsed, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
```
+You can also return a Promise or use an `async` function:
+
+```js
+agent(async function (req, opts) {
+ await sleep(1000);
+ // etc…
+});
+```
+
+
API
---
-## Agent(Function callback) → http.Agent
+## Agent(Function callback[, Object options]) → [http.Agent][]
Creates a base `http.Agent` that will execute the callback function `callback`
for every HTTP request that it is used as the `agent` for. The callback function
is responsible for creating a `stream.Duplex` instance of some kind that will be
used as the underlying socket in the HTTP request.
+The `options` object accepts the following properties:
+
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
+
The callback function should have the following signature:
### callback(http.ClientRequest req, Object options, Function cb) → undefined
@@ -86,7 +100,7 @@ the callback function `cb` once created, and the HTTP request will
continue to proceed.
If the `https` module is used to invoke the HTTP request, then the
-`secureEndpoint` property on `options` will be set to `true`.
+`secureEndpoint` property on `options` _will be set to `true`_.
License
@@ -119,3 +133,4 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js
deleted file mode 100644
index 7ea91f886c..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/agent.js
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-require('./patch-core');
-var extend = require('extend');
-var inherits = require('util').inherits;
-var EventEmitter = require('events').EventEmitter;
-
-/**
- * Module exports.
- */
-
-module.exports = Agent;
-
-/**
- * Base `http.Agent` implementation.
- * No pooling/keep-alive is implemented by default.
- *
- * @param {Function} callback
- * @api public
- */
-
-function Agent (callback) {
- if (!(this instanceof Agent)) return new Agent(callback);
- EventEmitter.call(this);
- if ('function' === typeof callback) {
- this.callback = callback;
- }
-}
-inherits(Agent, EventEmitter);
-
-Agent.prototype.callback = function callback (req, opts, fn) {
- fn(new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'));
-};
-
-/**
- * Called by node-core's "_http_client.js" module when creating
- * a new HTTP request with this Agent instance.
- *
- * @api public
- */
-
-Agent.prototype.addRequest = function addRequest (req, host, port, localAddress) {
- var opts;
- if ('object' == typeof host) {
- // >= v0.11.x API
- opts = extend({}, req._options, host);
- } else {
- // <= v0.10.x API
- opts = extend({}, req._options, { host: host, port: port });
- if (null != localAddress) {
- opts.localAddress = localAddress;
- }
- }
-
- if (opts.host && opts.path) {
- // 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;
- }
-
- // set default `port` if none was explicitly specified
- if (null == opts.port) {
- opts.port = opts.secureEndpoint ? 443 : 80;
- }
-
- delete opts.agent;
- delete opts.hostname;
- delete opts._defaultAgent;
- delete opts.defaultPort;
- delete opts.createConnection;
-
- // hint to use "Connection: close"
- // XXX: non-documented `http` module API :(
- req._last = true;
- req.shouldKeepAlive = false;
-
- // clean up a bit of memory since we're no longer using this
- req._options = null;
-
- // create the `net.Socket` instance
- var sync = true;
- this.callback(req, opts, function (err, socket) {
- function emitErr () {
- req.emit('error', err);
- // For Safety. Some additional errors might fire later on
- // and we need to make sure we don't double-fire the error event.
- req._hadError = true;
- }
- if (err) {
- if (sync) {
- // need to defer the "error" event, when sync, because by now the `req`
- // instance hasn't event been passed back to the user yet...
- process.nextTick(emitErr);
- } else {
- emitErr();
- }
- } else {
- req.onSocket(socket);
- }
- });
- sync = false;
-};
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
new file mode 100644
index 0000000000..df3ca727a7
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js
@@ -0,0 +1,158 @@
+'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;
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+
+function Agent(callback, _opts) {
+ if (!(this instanceof Agent)) {
+ return new Agent(callback, _opts);
+ }
+
+ EventEmitter.call(this);
+
+ let opts = _opts;
+ if ('function' === typeof callback) {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // timeout for the socket to be returned from the callback
+ this.timeout = (opts && opts.timeout) || null;
+
+ this.options = opts;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Override this function in your subclass!
+ */
+Agent.prototype.callback = function callback(req, opts) {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+};
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+
+Agent.prototype.addRequest = function addRequest(
+ req,
+ _opts
+) {
+ const ownOpts = Object.assign({}, _opts);
+
+ // set default `host` for HTTP to localhost
+ if (null == ownOpts.host) {
+ ownOpts.host = 'localhost';
+ }
+
+ // set default `port` for HTTP if none was explicitly specified
+ if (null == ownOpts.port) {
+ ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
+ }
+
+ 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
+ // 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;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ // create the `stream.Duplex` instance
+ let timeout;
+ let timedOut = false;
+ const timeoutMs = this.timeout;
+
+ function onerror(err) {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ }
+
+ function ontimeout() {
+ timedOut = true;
+ const err = new Error(
+ 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ }
+
+ function callbackError(err) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ onerror(err);
+ }
+
+ function onsocket(socket) {
+ if (timedOut) return;
+ if (timeout != null) {
+ clearTimeout(timeout);
+ }
+ if (socket) {
+ req.onSocket(socket);
+ } else {
+ 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
+ this.callback = promisify(this.callback, this);
+ }
+
+ if (timeoutMs > 0) {
+ timeout = setTimeout(ontimeout, timeoutMs);
+ }
+
+ try {
+ Promise.resolve(this.callback(req, opts))
+ .then(onsocket, callbackError);
+ } catch (err) {
+ 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/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/README.md
new file mode 100644
index 0000000000..4141cc840f
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md
@@ -0,0 +1,89 @@
+[![Travis CI](https://travis-ci.org/digitaldesignlabs/es6-promisify.svg)](https://travis-ci.org/digitaldesignlabs/es6-promisify)
+
+# es6-promisify
+
+Converts callback-based functions to Promise-based functions.
+
+## Install
+
+Install with [npm](https://npmjs.org/package/es6-promisify)
+
+```bash
+npm install --save es6-promisify
+```
+
+## Example
+
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const fs = require("fs");
+
+// Convert the stat function
+const stat = promisify(fs.stat);
+
+// Now usable as a promise!
+stat("example.txt").then(function (stats) {
+ console.log("Got stats", stats);
+}).catch(function (err) {
+ console.error("Yikes!", err);
+});
+```
+
+## Promisify methods
+```js
+"use strict";
+
+// Declare variables
+const promisify = require("es6-promisify");
+const redis = require("redis").createClient(6379, "localhost");
+
+// Create a promise-based version of send_command
+const client = promisify(redis.send_command, redis);
+
+// Send commands to redis and get a promise back
+client("ping").then(function (pong) {
+ console.log("Got", pong);
+}).catch(function (err) {
+ console.error("Unexpected error", err);
+}).then(function () {
+ redis.quit();
+});
+```
+
+## Handle callback multiple arguments
+```js
+"use strict";
+
+// Declare functions
+function test(cb) {
+ return cb(undefined, 1, 2, 3);
+}
+
+// Declare variables
+const promisify = require("es6-promisify");
+
+// Create promise-based version of test
+const single = promisify(test);
+const multi = promisify(test, {multiArgs: true});
+
+// Discards additional arguments
+single().then(function (result) {
+ console.log(result); // 1
+});
+
+// Returns all arguments as an array
+multi().then(function (result) {
+ console.log(result); // [1, 2, 3]
+});
+```
+
+### Tests
+Test with nodeunit
+```bash
+$ npm test
+```
+
+Published under the [MIT License](http://opensource.org/licenses/MIT).
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/dist/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/dist/promise.js
new file mode 100644
index 0000000000..2fe5c6103b
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js
@@ -0,0 +1,73 @@
+"use strict";
+
+/* global self, window, module, global, require */
+module.exports = function () {
+
+ "use strict";
+
+ var globalObject = void 0;
+
+ function isFunction(x) {
+ return typeof x === "function";
+ }
+
+ // Seek the global object
+ if (global !== undefined) {
+ globalObject = global;
+ } else if (window !== undefined && window.document) {
+ globalObject = window;
+ } else {
+ globalObject = self;
+ }
+
+ // Test for any native promise implementation, and if that
+ // implementation appears to conform to the specificaton.
+ // This code mostly nicked from the es6-promise module polyfill
+ // and then fooled with.
+ var hasPromiseSupport = function () {
+
+ // No promise object at all, and it's a non-starter
+ if (!globalObject.hasOwnProperty("Promise")) {
+ return false;
+ }
+
+ // There is a Promise object. Does it conform to the spec?
+ var P = globalObject.Promise;
+
+ // Some of these methods are missing from
+ // Firefox/Chrome experimental implementations
+ if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
+ return false;
+ }
+
+ if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
+ return false;
+ }
+
+ // Older version of the spec had a resolver object
+ // as the arg rather than a function
+ return function () {
+
+ var resolve = void 0;
+
+ var p = new globalObject.Promise(function (r) {
+ resolve = r;
+ });
+
+ if (p) {
+ return isFunction(resolve);
+ }
+
+ return false;
+ }();
+ }();
+
+ // Export the native Promise implementation if it
+ // looks like it matches the spec
+ if (hasPromiseSupport) {
+ return globalObject.Promise;
+ }
+
+ // Otherwise, return the es6-promise polyfill by @jaffathecake.
+ return require("es6-promise").Promise;
+}(); \ 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/dist/promisify.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/dist/promisify.js
new file mode 100644
index 0000000000..ce38041b07
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js
@@ -0,0 +1,85 @@
+"use strict";
+
+/* global module, require */
+module.exports = function () {
+
+ "use strict";
+
+ // Get a promise object. This may be native, or it may be polyfilled
+
+ var ES6Promise = require("./promise.js");
+
+ /**
+ * thatLooksLikeAPromiseToMe()
+ *
+ * Duck-types a promise.
+ *
+ * @param {object} o
+ * @return {bool} True if this resembles a promise
+ */
+ function thatLooksLikeAPromiseToMe(o) {
+ return o && typeof o.then === "function" && typeof o.catch === "function";
+ }
+
+ /**
+ * promisify()
+ *
+ * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
+ * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
+ * and rejects when `error` is truthy. You can also supply settings object as the second argument.
+ *
+ * @param {function} original - The function to promisify
+ * @param {object} settings - Settings object
+ * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
+ * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
+ * @return {function} A promisified version of `original`
+ */
+ return function promisify(original, settings) {
+
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var returnMultipleArguments = settings && settings.multiArgs;
+
+ var target = void 0;
+ if (settings && settings.thisArg) {
+ target = settings.thisArg;
+ } else if (settings) {
+ target = settings;
+ }
+
+ // Return the promisified function
+ return new ES6Promise(function (resolve, reject) {
+
+ // Append the callback bound to the context
+ args.push(function callback(err) {
+
+ if (err) {
+ return reject(err);
+ }
+
+ for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ values[_key2 - 1] = arguments[_key2];
+ }
+
+ if (false === !!returnMultipleArguments) {
+ return resolve(values[0]);
+ }
+
+ resolve(values);
+ });
+
+ // Call the function
+ var response = original.apply(target, args);
+
+ // If it looks like original already returns a promise,
+ // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
+ if (thatLooksLikeAPromiseToMe(response)) {
+ resolve(response);
+ }
+ });
+ };
+ };
+}(); \ 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/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
new file mode 100644
index 0000000000..6ff0013622
--- /dev/null
+++ 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
@@ -0,0 +1,122 @@
+# Master
+
+# 4.1.0
+
+* [BUGFIX] Fix memory leak [#269]
+* [BUGFIX] Auto Bundles within an AMD Environment [#263]
+
+# 4.0.5
+
+* fix require('es6-promise/auto') for Node < 4
+
+# 4.0.4
+
+* fix asap when using https://github.com/Kinvey/titanium-sdk
+
+# 4.0.3
+
+* fix Readme links
+
+# 4.0.2
+
+* fix require('es6-promise/auto');
+
+# 4.0.0
+
+* no longer polyfill automatically, if needed one can still invoke
+ `require('es6-promise/auto')` directly.
+
+# 3.3.1
+
+* fix links in readme
+
+# 3.3.0
+
+* support polyfil on WebMAF (playstation env)
+* fix tampering related bug global `constructor` was referenced by mistake.
+* provide TS Typings
+* increase compatibliity with sinon.useFakeTimers();
+* update build tools (use rollup)
+* directly export promise;
+
+# 3.2.2
+
+* IE8: use isArray
+* update build dependencies
+
+# 3.2.1
+
+* fix race tampering issue
+* use eslint
+* fix Promise.all tampering
+* remove unused code
+* fix issues with NWJS/electron
+
+# 3.2.0
+
+* improve tamper resistence of Promise.all Promise.race and
+ Promise.prototype.then (note, this isn't complete, but addresses an exception
+ when used \w core-js, follow up work will address entirely)
+* remove spec incompatible then chaining fast-path
+* add eslint
+* update build deps
+
+# 3.1.2
+
+* fix node detection issues with NWJS/electron
+
+# 3.1.0
+
+* improve performance of Promise.all when it encounters a non-promise input object input
+* then/resolve tamper protection
+* reduce AST size of promise constructor, to facilitate more inlining
+* Update README.md with details about PhantomJS requirement for running tests
+* Mangle and compress the minified version
+
+# 3.0.2
+
+* correctly bump both bower and package.json versions
+
+# 3.0.1
+
+* no longer include dist/test in npm releases
+
+# 3.0.0
+
+* use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of
+ nodes are not affected as they were already using nextTick(). Note that using nextTick() might
+ trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410.
+ The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask
+ instead of a microtask and might result in a different scheduling.
+ If needed you can revert to the former behavior as follow:
+
+ var Promise = require('es6-promise').Promise;
+ Promise._setScheduler(setImmediate);
+
+# 2.3.0
+
+* #121: Ability to override the internal asap implementation
+* #120: Use an ascii character for an apostrophe, for source maps
+
+# 2.2.0
+
+* #116: Expose asap() and a way to override the scheduling mechanism on Promise
+* Lock to v0.2.3 of ember-cli
+
+# 2.1.1
+
+* Fix #100 via #105: tell browserify to ignore vertx require
+* Fix #101 via #102: "follow thenable state, not own state"
+
+# 2.1.0
+
+* #59: Automatic polyfill. No need to invoke `ES6Promise.polyfill()` anymore.
+* ... (see the commit log)
+
+# 2.0.0
+
+* re-sync with RSVP. Many large performance improvements and bugfixes.
+
+# 1.0.0
+
+* first subset of RSVP
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/LICENSE 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/LICENSE
new file mode 100644
index 0000000000..954ec5992d
--- /dev/null
+++ 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/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner 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/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
new file mode 100644
index 0000000000..bb07d25c17
--- /dev/null
+++ 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
@@ -0,0 +1,82 @@
+# 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).
+
+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.
+
+## Node.js
+
+To install:
+
+```sh
+npm install es6-promise
+```
+
+To use:
+
+```js
+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.
+
+However, please remember that such technique is already provided by most common minifiers, making the resulting code safe for old browsers and production:
+
+```js
+promise['catch'](function(err) {
+ // ...
+});
+```
+
+Or use `.then` instead:
+
+```js
+promise.then(undefined, function(err) {
+ // ...
+});
+```
+
+## Auto-polyfill
+
+To polyfill the global environment (either in Node or in the browser via CommonJS) use the following code snippet:
+
+```js
+require('es6-promise').polyfill();
+```
+
+Alternatively
+
+```js
+require('es6-promise/auto');
+```
+
+Notice that we don't assign the result of `polyfill()` to any variable. The `polyfill()` method will patch the global environment (in this case to the `Promise` name) when called.
+
+## Building & Testing
+
+You will need to have PhantomJS installed globally in order to run the tests.
+
+`npm install -g phantomjs`
+
+* `npm run build` to build
+* `npm test` to run tests
+* `npm start` to run a build watcher, and webserver to test
+* `npm run test:server` for a testem test runner and watching builder
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/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/auto.js
new file mode 100644
index 0000000000..92bbf36e58
--- /dev/null
+++ 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/auto.js
@@ -0,0 +1,4 @@
+// This file can be required in Browserify and Node.js for automatic polyfill
+// To use it: require('es6-promise/auto');
+'use strict';
+module.exports = require('./').polyfill();
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
new file mode 100644
index 0000000000..51eb80a648
--- /dev/null
+++ 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
@@ -0,0 +1,1159 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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);
+ } else {
+ this._willSettleAt(new c(function (resolve$$1) {
+ return resolve$$1(entry);
+ }), i);
+ }
+ } else {
+ this._willSettleAt(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$3.prototype = {
+ constructor: Promise$3,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$3;
+}
+
+// Strange compat..
+Promise$3.polyfill = polyfill$1;
+Promise$3.Promise = Promise$3;
+
+Promise$3.polyfill();
+
+return Promise$3;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..1e06e2c73c
--- /dev/null
+++ 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
@@ -0,0 +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,S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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
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
new file mode 100644
index 0000000000..ba34fa7ced
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..3ada8df844
--- /dev/null
+++ 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
@@ -0,0 +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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GO,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
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
new file mode 100644
index 0000000000..b3724141a8
--- /dev/null
+++ 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
@@ -0,0 +1,1157 @@
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @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
+ */
+
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.ES6Promise = factory());
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+ var type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+ return typeof x === 'function';
+}
+
+var _isArray = undefined;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = function (x) {
+ return Object.prototype.toString.call(x) === '[object Array]';
+ };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = undefined;
+var customSchedulerFn = undefined;
+
+var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+};
+
+function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+ asap = 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]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return function () {
+ return process.nextTick(flush);
+ };
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function () {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ var iterations = 0;
+ var observer = new BrowserMutationObserver(flush);
+ var node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return function () {
+ node.data = iterations = ++iterations % 2;
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return function () {
+ return channel.port2.postMessage(0);
+ };
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var globalSetTimeout = setTimeout;
+ return function () {
+ return globalSetTimeout(flush, 1);
+ };
+}
+
+var queue = new Array(1000);
+function flush() {
+ for (var i = 0; i < len; i += 2) {
+ var callback = queue[i];
+ var arg = queue[i + 1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i + 1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ var r = require;
+ var vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch (e) {
+ return useSetTimeout();
+ }
+}
+
+var scheduleFlush = undefined;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+ var _arguments = arguments;
+
+ var parent = this;
+
+ var child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ var _state = parent._state;
+
+ if (_state) {
+ (function () {
+ var callback = _arguments[_state - 1];
+ asap(function () {
+ return invokeCallback(_state, child, callback, parent._result);
+ });
+ })();
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+function resolve$1(object) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ var promise = new Constructor(noop);
+ resolve(promise, object);
+ return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+var GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch (error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
+ } catch (e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+ asap(function (promise) {
+ var sealed = false;
+ var error = tryThen(then$$1, thenable, function (value) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, function (reason) {
+ if (sealed) {
+ return;
+ }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, function (value) {
+ return resolve(promise, value);
+ }, function (reason) {
+ return reject(promise, reason);
+ });
+ }
+}
+
+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;
+ } else if (then$$1 === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then$$1)) {
+ handleForeignThenable(promise, maybeThenable, then$$1);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) {
+ return;
+ }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ var _subscribers = parent._subscribers;
+ var length = _subscribers.length;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ var subscribers = promise._subscribers;
+ var settled = promise._state;
+
+ if (subscribers.length === 0) {
+ return;
+ }
+
+ var child = undefined,
+ callback = undefined,
+ detail = promise._result;
+
+ for (var i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+var TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch (e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ var hasCallback = isFunction(callback),
+ value = undefined,
+ error = undefined,
+ succeeded = undefined,
+ failed = undefined;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value) {
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch (e) {
+ reject(promise, e);
+ }
+}
+
+var id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+function Enumerator$1(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;
+
+ 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());
+ }
+}
+
+function validationError() {
+ return new Error('Array Methods must be provided an Array');
+}
+
+Enumerator$1.prototype._enumerate = function (input) {
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
+ this._eachEntry(input[i], i);
+ }
+};
+
+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 (_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(resolve$$1(entry), i);
+ }
+};
+
+Enumerator$1.prototype._settledAt = function (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 (this._remaining === 0) {
+ fulfill(promise, this._result);
+ }
+};
+
+Enumerator$1.prototype._willSettleAt = function (promise, i) {
+ var enumerator = this;
+
+ subscribe(promise, undefined, function (value) {
+ return enumerator._settledAt(FULFILLED, i, value);
+ }, function (reason) {
+ return enumerator._settledAt(REJECTED, i, reason);
+ });
+};
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+function all$1(entries) {
+ return new Enumerator$1(this, entries).promise;
+}
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+function race$1(entries) {
+ /*jshint validthis:true */
+ var Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor(function (_, reject) {
+ return reject(new TypeError('You must pass an array to race.'));
+ });
+ } else {
+ return new Constructor(function (resolve, reject) {
+ var length = entries.length;
+ for (var i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+ /*jshint validthis:true */
+ var Constructor = this;
+ var promise = new Constructor(noop);
+ reject(promise, reason);
+ return promise;
+}
+
+function needsResolver() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise$2.prototype = {
+ constructor: Promise$2,
+
+ /**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+ */
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+ */
+ 'catch': function _catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
+
+/*global self*/
+function polyfill$1() {
+ var local = undefined;
+
+ 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;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch (e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast) {
+ return;
+ }
+ }
+
+ local.Promise = Promise$2;
+}
+
+// Strange compat..
+Promise$2.polyfill = polyfill$1;
+Promise$2.Promise = Promise$2;
+
+return Promise$2;
+
+})));
+
+//# 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
new file mode 100644
index 0000000000..98c7af7ba4
--- /dev/null
+++ 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
@@ -0,0 +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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E,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
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
new file mode 100644
index 0000000000..7696ed71f1
--- /dev/null
+++ 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
@@ -0,0 +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
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
new file mode 100644
index 0000000000..ac752492db
--- /dev/null
+++ 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
@@ -0,0 +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;E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AW,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
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
new file mode 100644
index 0000000000..d90ab85a59
--- /dev/null
+++ 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
@@ -0,0 +1,74 @@
+export interface Thenable <R> {
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Thenable<U>;
+}
+
+export class Promise <R> implements Thenable <R> {
+ /**
+ * If you call resolve in the body of the callback passed to the constructor,
+ * your promise is fulfilled with result object passed to resolve.
+ * If you call reject your promise is rejected with the object passed to resolve.
+ * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
+ * Any errors thrown in the constructor callback will be implicitly passed to reject().
+ */
+ constructor (callback: (resolve : (value?: R | Thenable<R>) => void, reject: (error?: any) => void) => void);
+
+ /**
+ * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects.
+ * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called.
+ * Both callbacks have a single parameter , the fulfillment value or rejection reason.
+ * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve.
+ * If an error is thrown in the callback, the returned promise rejects with that error.
+ *
+ * @param onFulfilled called when/if "promise" resolves
+ * @param onRejected called when/if "promise" rejects
+ */
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Promise<U>;
+ then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => void): Promise<U>;
+
+ /**
+ * Sugar for promise.then(undefined, onRejected)
+ *
+ * @param onRejected called when/if "promise" rejects
+ */
+ catch <U> (onRejected?: (error: 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.
+ */
+ static resolve (): Promise<void>;
+ static resolve <R> (value: R | Thenable<R>): Promise<R>;
+
+ /**
+ * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
+ */
+ static reject <R> (error: any): Promise<R>;
+
+ /**
+ * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
+ * the array passed to all can be a mixture of promise-like objects and other objects.
+ * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
+ */
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>, T10 | Thenable<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>, T9 | Thenable<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+ static all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>, T8 | Thenable<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+ static all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>, T7 | Thenable<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+ static all<T1, T2, T3, T4, T5, T6>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>, T6 | Thenable<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+ static all<T1, T2, T3, T4, T5>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>, T5 | Thenable<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+ static all<T1, T2, T3, T4>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>, T4 | Thenable <T4>]): Promise<[T1, T2, T3, T4]>;
+ static all<T1, T2, T3>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>, T3 | Thenable<T3>]): Promise<[T1, T2, T3]>;
+ static all<T1, T2>(values: [T1 | Thenable<T1>, T2 | Thenable<T2>]): Promise<[T1, T2]>;
+ static all<T1>(values: [T1 | Thenable<T1>]): Promise<[T1]>;
+ static all<TAll>(values: Array<TAll | Thenable<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
+ */
+ static race <R> (promises: (R | Thenable<R>)[]): Promise<R>;
+}
+
+/**
+ * The polyfill method will patch the global environment (in this case to the Promise name) when called.
+ */
+export function polyfill (): void;
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.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/lib/es6-promise.auto.js
new file mode 100644
index 0000000000..77997866f8
--- /dev/null
+++ 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.auto.js
@@ -0,0 +1,3 @@
+import Promise from './es6-promise';
+Promise.polyfill();
+export default Promise;
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.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.js
new file mode 100644
index 0000000000..4f4d840d09
--- /dev/null
+++ 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.js
@@ -0,0 +1,7 @@
+import Promise from './es6-promise/promise';
+import polyfill from './es6-promise/polyfill';
+
+// Strange compat..
+Promise.polyfill = polyfill;
+Promise.Promise = Promise;
+export default Promise;
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
new file mode 100644
index 0000000000..038140d8d8
--- /dev/null
+++ 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
@@ -0,0 +1,271 @@
+import {
+ objectOrFunction,
+ isFunction
+} from './utils';
+
+import {
+ asap
+} from './asap';
+
+import originalThen from './then';
+import originalResolve from './promise/resolve';
+
+export const PROMISE_ID = Math.random().toString(36).substring(16);
+
+function noop() {}
+
+const PENDING = void 0;
+const FULFILLED = 1;
+const REJECTED = 2;
+
+const GET_THEN_ERROR = new ErrorObject();
+
+function selfFulfillment() {
+ return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+ return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function getThen(promise) {
+ try {
+ return promise.then;
+ } catch(error) {
+ GET_THEN_ERROR.error = error;
+ return GET_THEN_ERROR;
+ }
+}
+
+function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
+ try {
+ then.call(value, fulfillmentHandler, rejectionHandler);
+ } catch(e) {
+ return e;
+ }
+}
+
+function handleForeignThenable(promise, thenable, then) {
+ asap(promise => {
+ var sealed = false;
+ var error = tryThen(then, thenable, value => {
+ if (sealed) { return; }
+ sealed = true;
+ if (thenable !== value) {
+ resolve(promise, value);
+ } else {
+ fulfill(promise, value);
+ }
+ }, reason => {
+ if (sealed) { return; }
+ sealed = true;
+
+ reject(promise, reason);
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+ if (!sealed && error) {
+ sealed = true;
+ reject(promise, error);
+ }
+ }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+ if (thenable._state === FULFILLED) {
+ fulfill(promise, thenable._result);
+ } else if (thenable._state === REJECTED) {
+ reject(promise, thenable._result);
+ } else {
+ subscribe(thenable, undefined, value => resolve(promise, value),
+ reason => reject(promise, reason))
+ }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then) {
+ if (maybeThenable.constructor === promise.constructor &&
+ then === originalThen &&
+ maybeThenable.constructor.resolve === originalResolve) {
+ handleOwnThenable(promise, maybeThenable);
+ } else {
+ if (then === GET_THEN_ERROR) {
+ reject(promise, GET_THEN_ERROR.error);
+ GET_THEN_ERROR.error = null;
+ } else if (then === undefined) {
+ fulfill(promise, maybeThenable);
+ } else if (isFunction(then)) {
+ handleForeignThenable(promise, maybeThenable, then);
+ } else {
+ fulfill(promise, maybeThenable);
+ }
+ }
+}
+
+function resolve(promise, value) {
+ if (promise === value) {
+ reject(promise, selfFulfillment());
+ } else if (objectOrFunction(value)) {
+ handleMaybeThenable(promise, value, getThen(value));
+ } else {
+ fulfill(promise, value);
+ }
+}
+
+function publishRejection(promise) {
+ if (promise._onerror) {
+ promise._onerror(promise._result);
+ }
+
+ publish(promise);
+}
+
+function fulfill(promise, value) {
+ if (promise._state !== PENDING) { return; }
+
+ promise._result = value;
+ promise._state = FULFILLED;
+
+ if (promise._subscribers.length !== 0) {
+ asap(publish, promise);
+ }
+}
+
+function reject(promise, reason) {
+ if (promise._state !== PENDING) { return; }
+ promise._state = REJECTED;
+ promise._result = reason;
+
+ asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+ let { _subscribers } = parent;
+ let { length } = _subscribers;
+
+ parent._onerror = null;
+
+ _subscribers[length] = child;
+ _subscribers[length + FULFILLED] = onFulfillment;
+ _subscribers[length + REJECTED] = onRejection;
+
+ if (length === 0 && parent._state) {
+ asap(publish, parent);
+ }
+}
+
+function publish(promise) {
+ let subscribers = promise._subscribers;
+ let settled = promise._state;
+
+ if (subscribers.length === 0) { return; }
+
+ let child, callback, detail = promise._result;
+
+ for (let i = 0; i < subscribers.length; i += 3) {
+ child = subscribers[i];
+ callback = subscribers[i + settled];
+
+ if (child) {
+ invokeCallback(settled, child, callback, detail);
+ } else {
+ callback(detail);
+ }
+ }
+
+ promise._subscribers.length = 0;
+}
+
+function ErrorObject() {
+ this.error = null;
+}
+
+const TRY_CATCH_ERROR = new ErrorObject();
+
+function tryCatch(callback, detail) {
+ try {
+ return callback(detail);
+ } catch(e) {
+ TRY_CATCH_ERROR.error = e;
+ return TRY_CATCH_ERROR;
+ }
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+ let hasCallback = isFunction(callback),
+ value, error, succeeded, failed;
+
+ if (hasCallback) {
+ value = tryCatch(callback, detail);
+
+ if (value === TRY_CATCH_ERROR) {
+ failed = true;
+ error = value.error;
+ value.error = null;
+ } else {
+ succeeded = true;
+ }
+
+ if (promise === value) {
+ reject(promise, cannotReturnOwn());
+ return;
+ }
+
+ } else {
+ value = detail;
+ succeeded = true;
+ }
+
+ 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);
+ }
+}
+
+function initializePromise(promise, resolver) {
+ try {
+ resolver(function resolvePromise(value){
+ resolve(promise, value);
+ }, function rejectPromise(reason) {
+ reject(promise, reason);
+ });
+ } catch(e) {
+ reject(promise, e);
+ }
+}
+
+let id = 0;
+function nextId() {
+ return id++;
+}
+
+function makePromise(promise) {
+ promise[PROMISE_ID] = id++;
+ promise._state = undefined;
+ promise._result = undefined;
+ promise._subscribers = [];
+}
+
+export {
+ nextId,
+ makePromise,
+ getThen,
+ noop,
+ resolve,
+ reject,
+ fulfill,
+ subscribe,
+ publish,
+ publishRejection,
+ initializePromise,
+ invokeCallback,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ handleMaybeThenable
+};
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
new file mode 100644
index 0000000000..1055b92e75
--- /dev/null
+++ 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
@@ -0,0 +1,120 @@
+let len = 0;
+let vertxNext;
+let customSchedulerFn;
+
+export var asap = function asap(callback, arg) {
+ queue[len] = callback;
+ queue[len + 1] = arg;
+ len += 2;
+ if (len === 2) {
+ // If len is 2, that means that we need to schedule an async flush.
+ // If additional callbacks are queued before the queue is flushed, they
+ // will be processed by this flush that we are scheduling.
+ if (customSchedulerFn) {
+ customSchedulerFn(flush);
+ } else {
+ scheduleFlush();
+ }
+ }
+}
+
+export function setScheduler(scheduleFn) {
+ customSchedulerFn = scheduleFn;
+}
+
+export function setAsap(asapFn) {
+ asap = asapFn;
+}
+
+const browserWindow = (typeof window !== 'undefined') ? window : undefined;
+const browserGlobal = browserWindow || {};
+const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+const isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+const isWorker = typeof Uint8ClampedArray !== 'undefined' &&
+ typeof importScripts !== 'undefined' &&
+ typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+ // see https://github.com/cujojs/when/issues/410 for details
+ return () => process.nextTick(flush);
+}
+
+// vertx
+function useVertxTimer() {
+ if (typeof vertxNext !== 'undefined') {
+ return function() {
+ vertxNext(flush);
+ };
+ }
+
+ return useSetTimeout();
+}
+
+function useMutationObserver() {
+ let iterations = 0;
+ const observer = new BrowserMutationObserver(flush);
+ const node = document.createTextNode('');
+ observer.observe(node, { characterData: true });
+
+ return () => {
+ node.data = (iterations = ++iterations % 2);
+ };
+}
+
+// web worker
+function useMessageChannel() {
+ const channel = new MessageChannel();
+ channel.port1.onmessage = flush;
+ return () => channel.port2.postMessage(0);
+}
+
+function useSetTimeout() {
+ // Store setTimeout reference so es6-promise will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ const globalSetTimeout = setTimeout;
+ return () => globalSetTimeout(flush, 1);
+}
+
+const queue = new Array(1000);
+function flush() {
+ for (let i = 0; i < len; i+=2) {
+ let callback = queue[i];
+ let arg = queue[i+1];
+
+ callback(arg);
+
+ queue[i] = undefined;
+ queue[i+1] = undefined;
+ }
+
+ len = 0;
+}
+
+function attemptVertx() {
+ try {
+ const r = require;
+ const vertx = r('vertx');
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
+ return useVertxTimer();
+ } catch(e) {
+ return useSetTimeout();
+ }
+}
+
+let scheduleFlush;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+ scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+ scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+ scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && typeof require === 'function') {
+ scheduleFlush = attemptVertx();
+} else {
+ scheduleFlush = useSetTimeout();
+}
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
new file mode 100644
index 0000000000..df4faca879
--- /dev/null
+++ 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
@@ -0,0 +1,111 @@
+import {
+ isArray,
+ isMaybeThenable
+} from './utils';
+
+import {
+ noop,
+ reject,
+ fulfill,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ PENDING,
+ getThen,
+ handleMaybeThenable
+} from './-internal';
+
+import then from './then';
+import Promise from './promise';
+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);
+
+ if (!this.promise[PROMISE_ID]) {
+ makePromise(this.promise);
+ }
+
+ if (isArray(input)) {
+ this.length = input.length;
+ this._remaining = input.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) {
+ fulfill(this.promise, this._result);
+ }
+ }
+ } 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);
+ }
+};
+
+Enumerator.prototype._eachEntry = function(entry, i) {
+ let c = this._instanceConstructor;
+ let { resolve } = c;
+
+ if (resolve === originalResolve) {
+ let then = getThen(entry);
+
+ 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);
+ } else {
+ this._willSettleAt(new c(resolve => resolve(entry)), i);
+ }
+ } else {
+ this._willSettleAt(resolve(entry), i);
+ }
+};
+
+Enumerator.prototype._settledAt = function(state, i, value) {
+ let { promise } = this;
+
+ 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);
+ }
+};
+
+Enumerator.prototype._willSettleAt = function(promise, i) {
+ let enumerator = this;
+
+ 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
new file mode 100644
index 0000000000..83ddf0662b
--- /dev/null
+++ 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
@@ -0,0 +1,35 @@
+/*global self*/
+import Promise from './promise';
+
+export default function polyfill() {
+ let local;
+
+ 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');
+ }
+ }
+
+ let P = local.Promise;
+
+ if (P) {
+ var promiseToString = null;
+ try {
+ promiseToString = Object.prototype.toString.call(P.resolve());
+ } catch(e) {
+ // silently ignored
+ }
+
+ if (promiseToString === '[object Promise]' && !P.cast){
+ return;
+ }
+ }
+
+ local.Promise = Promise;
+}
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
new file mode 100644
index 0000000000..20558cbeea
--- /dev/null
+++ 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
@@ -0,0 +1,383 @@
+import {
+ isFunction
+} from './utils';
+
+import {
+ noop,
+ nextId,
+ PROMISE_ID,
+ initializePromise
+} from './-internal';
+
+import {
+ asap,
+ setAsap,
+ setScheduler
+} from './asap';
+
+import all from './promise/all';
+import race from './promise/race';
+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');
+}
+
+function needsNew() {
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+ Promise objects represent the eventual result of an asynchronous operation. 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.
+
+ Terminology
+ -----------
+
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+ - `thenable` is an object or function that defines a `then` method.
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+ - `exception` is a value that is thrown using the throw statement.
+ - `reason` is a value that indicates why a promise was rejected.
+ - `settled` the final resting state of a promise, fulfilled or rejected.
+
+ A promise can be in one of three states: pending, fulfilled, or rejected.
+
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
+ state. Promises that are rejected have a rejection reason and are in the
+ rejected state. A fulfillment value is never a thenable.
+
+ Promises can also be said to *resolve* a value. If this value is also a
+ promise, then the original promise's settled state will match the value's
+ settled state. So a promise that *resolves* a promise that rejects will
+ itself reject, and a promise that *resolves* a promise that fulfills will
+ itself fulfill.
+
+
+ Basic Usage:
+ ------------
+
+ ```js
+ let promise = new Promise(function(resolve, reject) {
+ // on success
+ resolve(value);
+
+ // on failure
+ reject(reason);
+ });
+
+ promise.then(function(value) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Advanced Usage:
+ ---------------
+
+ Promises shine when abstracting away asynchronous interactions such as
+ `XMLHttpRequest`s.
+
+ ```js
+ function getJSON(url) {
+ return new Promise(function(resolve, reject){
+ let xhr = new XMLHttpRequest();
+
+ xhr.open('GET', url);
+ xhr.onreadystatechange = handler;
+ xhr.responseType = 'json';
+ xhr.setRequestHeader('Accept', 'application/json');
+ xhr.send();
+
+ function handler() {
+ if (this.readyState === this.DONE) {
+ if (this.status === 200) {
+ resolve(this.response);
+ } else {
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+ }
+ }
+ };
+ });
+ }
+
+ getJSON('/posts.json').then(function(json) {
+ // on fulfillment
+ }, function(reason) {
+ // on rejection
+ });
+ ```
+
+ Unlike callbacks, promises are great composable primitives.
+
+ ```js
+ Promise.all([
+ getJSON('/posts'),
+ getJSON('/comments')
+ ]).then(function(values){
+ values[0] // => postsJSON
+ values[1] // => commentsJSON
+
+ return values;
+ });
+ ```
+
+ @class Promise
+ @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;
+
+Promise.prototype = {
+ constructor: Promise,
+
+/**
+ 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
+ }
+ });
+ ```
+
+ 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);
+ }
+ // success
+ }
+ });
+ ```
+
+ 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}
+*/
+ 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
+ }
+
+ // async with promises
+ findAuthor().catch(function(reason){
+ // something went wrong
+ });
+ ```
+
+ @method catch
+ @param {Function} onRejection
+ Useful for tooling.
+ @return {Promise}
+*/
+ catch(onRejection) {
+ return this.then(null, onRejection);
+ }
+};
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/all.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/all.js
new file mode 100644
index 0000000000..9ca3c063aa
--- /dev/null
+++ 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/all.js
@@ -0,0 +1,52 @@
+import Enumerator from '../enumerator';
+
+/**
+ `Promise.all` accepts an array of promises, and returns a new promise which
+ is fulfilled with an array of fulfillment values for the passed promises, or
+ rejected with the reason of the first passed promise to be rejected. It casts all
+ elements of the passed iterable to promises as it runs this algorithm.
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = resolve(2);
+ let promise3 = resolve(3);
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // The array here would be [ 1, 2, 3 ];
+ });
+ ```
+
+ If any of the `promises` given to `all` are rejected, the first promise
+ that is rejected will be given as an argument to the returned promises's
+ rejection handler. For example:
+
+ Example:
+
+ ```javascript
+ let promise1 = resolve(1);
+ let promise2 = reject(new Error("2"));
+ let promise3 = reject(new Error("3"));
+ let promises = [ promise1, promise2, promise3 ];
+
+ Promise.all(promises).then(function(array){
+ // Code here never runs because there are rejected promises!
+ }, function(error) {
+ // error.message === "2"
+ });
+ ```
+
+ @method all
+ @static
+ @param {Array} entries array of promises
+ @param {String} label optional string for labeling the promise.
+ Useful for tooling.
+ @return {Promise} promise that is fulfilled when all `promises` have been
+ fulfilled, or rejected if any of them become rejected.
+ @static
+*/
+export default function all(entries) {
+ return new Enumerator(this, entries).promise;
+}
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/race.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/race.js
new file mode 100644
index 0000000000..166dc820b5
--- /dev/null
+++ 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/race.js
@@ -0,0 +1,84 @@
+import {
+ isArray
+} from "../utils";
+
+/**
+ `Promise.race` returns a new promise which is settled in the same way as the
+ first passed promise to settle.
+
+ Example:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 2');
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // result === 'promise 2' because it was resolved before promise1
+ // was resolved.
+ });
+ ```
+
+ `Promise.race` is deterministic in that only the state of the first
+ settled promise matters. For example, even if other promises given to the
+ `promises` array argument are resolved, but the first settled promise has
+ become rejected before the other promises became fulfilled, the returned
+ promise will become rejected:
+
+ ```javascript
+ let promise1 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ resolve('promise 1');
+ }, 200);
+ });
+
+ let promise2 = new Promise(function(resolve, reject){
+ setTimeout(function(){
+ reject(new Error('promise 2'));
+ }, 100);
+ });
+
+ Promise.race([promise1, promise2]).then(function(result){
+ // Code here never runs
+ }, function(reason){
+ // reason.message === 'promise 2' because promise 2 became rejected before
+ // promise 1 became fulfilled
+ });
+ ```
+
+ An example real-world use case is implementing timeouts:
+
+ ```javascript
+ Promise.race([ajax('foo.json'), timeout(5000)])
+ ```
+
+ @method race
+ @static
+ @param {Array} promises array of promises to observe
+ Useful for tooling.
+ @return {Promise} a promise which settles in the same way as the first passed
+ promise to settle.
+*/
+export default function race(entries) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (!isArray(entries)) {
+ return new Constructor((_, reject) => reject(new TypeError('You must pass an array to race.')));
+ } else {
+ return new Constructor((resolve, reject) => {
+ let length = entries.length;
+ for (let i = 0; i < length; i++) {
+ Constructor.resolve(entries[i]).then(resolve, reject);
+ }
+ });
+ }
+}
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/reject.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/reject.js
new file mode 100644
index 0000000000..cd55faabf5
--- /dev/null
+++ 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/reject.js
@@ -0,0 +1,46 @@
+import {
+ noop,
+ reject as _reject
+} from '../-internal';
+
+/**
+ `Promise.reject` returns a promise rejected with the passed `reason`.
+ It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ reject(new Error('WHOOPS'));
+ });
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.reject(new Error('WHOOPS'));
+
+ promise.then(function(value){
+ // Code here doesn't run because the promise is rejected!
+ }, function(reason){
+ // reason.message === 'WHOOPS'
+ });
+ ```
+
+ @method reject
+ @static
+ @param {Any} reason value that the returned promise will be rejected with.
+ Useful for tooling.
+ @return {Promise} a promise rejected with the given `reason`.
+*/
+export default function reject(reason) {
+ /*jshint validthis:true */
+ let Constructor = this;
+ let promise = new Constructor(noop);
+ _reject(promise, reason);
+ return promise;
+}
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/resolve.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/resolve.js
new file mode 100644
index 0000000000..f4642b630e
--- /dev/null
+++ 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/resolve.js
@@ -0,0 +1,48 @@
+import {
+ noop,
+ resolve as _resolve
+} from '../-internal';
+
+/**
+ `Promise.resolve` returns a promise that will become resolved with the
+ passed `value`. It is shorthand for the following:
+
+ ```javascript
+ let promise = new Promise(function(resolve, reject){
+ resolve(1);
+ });
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ Instead of writing the above, your code now simply becomes the following:
+
+ ```javascript
+ let promise = Promise.resolve(1);
+
+ promise.then(function(value){
+ // value === 1
+ });
+ ```
+
+ @method resolve
+ @static
+ @param {Any} value value that the returned promise will be resolved with
+ Useful for tooling.
+ @return {Promise} a promise that will become fulfilled with the given
+ `value`
+*/
+export default function resolve(object) {
+ /*jshint validthis:true */
+ let Constructor = this;
+
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
+ return object;
+ }
+
+ let promise = new Constructor(noop);
+ _resolve(promise, object);
+ return promise;
+}
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/then.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/then.js
new file mode 100644
index 0000000000..b2b79f0a14
--- /dev/null
+++ 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/then.js
@@ -0,0 +1,32 @@
+import {
+ invokeCallback,
+ subscribe,
+ FULFILLED,
+ REJECTED,
+ noop,
+ makePromise,
+ PROMISE_ID
+} from './-internal';
+
+import { asap } from './asap';
+
+export default function then(onFulfillment, onRejection) {
+ const parent = this;
+
+ const child = new this.constructor(noop);
+
+ if (child[PROMISE_ID] === undefined) {
+ makePromise(child);
+ }
+
+ const { _state } = parent;
+
+ if (_state) {
+ const callback = arguments[_state - 1];
+ asap(() => invokeCallback(_state, child, callback, parent._result));
+ } else {
+ subscribe(parent, child, onFulfillment, onRejection);
+ }
+
+ return child;
+}
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/utils.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/utils.js
new file mode 100644
index 0000000000..72545c5e97
--- /dev/null
+++ 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/utils.js
@@ -0,0 +1,21 @@
+export function objectOrFunction(x) {
+ let type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+export function isFunction(x) {
+ return typeof x === 'function';
+}
+
+export function isMaybeThenable(x) {
+ return x !== null && typeof x === 'object';
+}
+
+let _isArray;
+if (Array.isArray) {
+ _isArray = Array.isArray;
+} else {
+ _isArray = x => Object.prototype.toString.call(x) === '[object Array]';
+}
+
+export const isArray = _isArray;
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
new file mode 100644
index 0000000000..3eeaa7e3d6
--- /dev/null
+++ 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
@@ -0,0 +1,96 @@
+{
+ "_from": "es6-promise@^4.0.3",
+ "_id": "es6-promise@4.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==",
+ "_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify/es6-promise",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promise@^4.0.3",
+ "name": "es6-promise",
+ "escapedName": "es6-promise",
+ "rawSpec": "^4.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^4.0.3"
+ },
+ "_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",
+ "_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": {
+ "name": "Yehuda Katz, Tom Dale, Stefan Penner and contributors",
+ "url": "Conversion to ES6 API by Jake Archibald"
+ },
+ "browser": {
+ "vertx": false
+ },
+ "bugs": {
+ "url": "https://github.com/stefanpenner/es6-promise/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A lightweight library that provides tools for organizing asynchronous code",
+ "devDependencies": {
+ "broccoli-babel-transpiler": "^5.6.1",
+ "broccoli-concat": "^3.1.0",
+ "broccoli-merge-trees": "^1.2.3",
+ "broccoli-rollup": "^1.0.2",
+ "broccoli-stew": "^1.2.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",
+ "json3": "^3.3.2",
+ "mocha": "^3.1.0",
+ "promises-aplus-tests-phantom": "^2.1.0-revise",
+ "release-it": "2.7.1"
+ },
+ "directories": {
+ "lib": "lib"
+ },
+ "files": [
+ "dist",
+ "lib",
+ "es6-promise.d.ts",
+ "auto.js",
+ "!dist/test"
+ ],
+ "homepage": "https://github.com/stefanpenner/es6-promise#readme",
+ "keywords": [
+ "promises",
+ "promise",
+ "polyfill",
+ "futures"
+ ],
+ "license": "MIT",
+ "main": "dist/es6-promise.js",
+ "name": "es6-promise",
+ "namespace": "es6-promise",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stefanpenner/es6-promise.git"
+ },
+ "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",
+ "start": "ember s",
+ "test": "ember test",
+ "test:node": "ember build && mocha ./dist/test/browserify",
+ "test:server": "ember test --server"
+ },
+ "spm": {
+ "main": "dist/es6-promise.js"
+ },
+ "typings": "es6-promise.d.ts",
+ "version": "4.1.1"
+}
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/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/package.json
new file mode 100644
index 0000000000..c0fdd1680a
--- /dev/null
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "es6-promisify@^5.0.0",
+ "_id": "es6-promisify@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base/es6-promisify",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "es6-promisify@^5.0.0",
+ "name": "es6-promisify",
+ "escapedName": "es6-promisify",
+ "rawSpec": "^5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^5.0.0"
+ },
+ "_requiredBy": [
+ "/pacote/make-fetch-happen/socks-proxy-agent/agent-base"
+ ],
+ "_resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "_shasum": "5109d62f3e56ea967c4b63505aef08291c8a5203",
+ "_spec": "es6-promisify@^5.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base",
+ "author": {
+ "name": "Mike Hall",
+ "email": "mikehall314@gmail.com"
+ },
+ "bugs": {
+ "url": "http://github.com/digitaldesignlabs/es6-promisify/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "es6-promise": "^4.0.3"
+ },
+ "deprecated": false,
+ "description": "Converts callback-based functions to ES6 Promises",
+ "devDependencies": {
+ "babel-preset-es2015": "^6.9.0",
+ "eslint": "^2.13.1",
+ "gulp": "^3.9.1",
+ "gulp-babel": "^6.1.2",
+ "nodeunit": "^0.10.0"
+ },
+ "files": [
+ "dist/promisify.js",
+ "dist/promise.js"
+ ],
+ "greenkeeper": {
+ "ignore": [
+ "eslint"
+ ]
+ },
+ "homepage": "https://github.com/digitaldesignlabs/es6-promisify#readme",
+ "keywords": [
+ "promises",
+ "es6",
+ "promisify"
+ ],
+ "license": "MIT",
+ "main": "dist/promisify.js",
+ "name": "es6-promisify",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/digitaldesignlabs/es6-promisify.git"
+ },
+ "scripts": {
+ "pretest": "./node_modules/eslint/bin/eslint.js ./lib/*.js ./tests/*.js",
+ "test": "gulp && nodeunit tests"
+ },
+ "version": "5.0.0"
+}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
deleted file mode 100644
index 534108e3f4..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules/
-coverage/
-.nyc_output/
-nyc_output/
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
deleted file mode 100644
index 991d04b6e2..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - 'iojs'
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
deleted file mode 100644
index b5e35ff0b5..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/README.md
+++ /dev/null
@@ -1,303 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- 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
-
-As a command-line utility:
-
- $ semver -h
-
- Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
- Test if version(s) satisfy the supplied range(s), and sort them.
-
- Multiple versions or ranges may be supplied, unless increment
- option is specified. In that case, only a single version may
- be used, and it is incremented by the specified level
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no versions are valid, or ranges are not satisfied,
- then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'pre', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` 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/semver/bin/semver b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857e8..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
deleted file mode 100644
index 29aeddec1f..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "_from": "semver@~5.0.1",
- "_id": "semver@5.0.3",
- "_integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=",
- "_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base/semver",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "semver@~5.0.1",
- "name": "semver",
- "escapedName": "semver",
- "rawSpec": "~5.0.1",
- "saveSpec": null,
- "fetchSpec": "~5.0.1"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/socks-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
- "_shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a",
- "_shrinkwrap": null,
- "_spec": "semver@~5.0.1",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base",
- "bin": {
- "semver": "./bin/semver"
- },
- "bugs": {
- "url": "https://github.com/npm/node-semver/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "The semantic version parser used by npm.",
- "devDependencies": {
- "tap": "^1.3.4"
- },
- "homepage": "https://github.com/npm/node-semver#readme",
- "license": "ISC",
- "main": "semver.js",
- "name": "semver",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-semver.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "5.0.3"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
deleted file mode 100644
index 19392d8ff9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1200 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.inspect = function() {
- return '<SemVer "' + this + '">';
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.inspect = function() {
- return '<SemVer Comparator "' + this + '">';
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.inspect = function() {
- return '<SemVer Range "' + this.range + '">';
-};
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0- <1.3.0-
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm)
- M = +M + 1
- else
- m = +m + 1
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
deleted file mode 100644
index c051864bc9..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tap').test
-var semver = require('../')
-
-test('long version is too long', function (t) {
- var v = '1.2.' + new Array(256).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('big number is like too long version', function (t) {
- var v = '1.2.' + new Array(100).join('1')
- t.throws(function () {
- new semver.SemVer(v)
- })
- t.equal(semver.valid(v, false), null)
- t.equal(semver.valid(v, true), null)
- t.equal(semver.inc(v, 'patch'), null)
- t.end()
-})
-
-test('parsing null does not throw', function (t) {
- t.equal(semver.parse(null), null)
- t.equal(semver.parse({}), null)
- t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
- t.end()
-})
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
deleted file mode 100644
index 9e268de950..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var clean = semver.clean;
-
-test('\nclean tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', '1.2.3'],
- [' 1.2.3 ', '1.2.3'],
- [' 1.2.3-4 ', '1.2.3-4'],
- [' 1.2.3-pre ', '1.2.3-pre'],
- [' =v1.2.3 ', '1.2.3'],
- ['v1.2.3', '1.2.3'],
- [' v1.2.3 ', '1.2.3'],
- ['\t1.2.3', '1.2.3'],
- ['>1.2.3', null],
- ['~1.2.3', null],
- ['<=1.2.3', null],
- ['1.2.x', null]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var msg = 'clean(' + range + ') = ' + version;
- t.equal(clean(range), version, msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
deleted file mode 100644
index bbb87896c6..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
+++ /dev/null
@@ -1,173 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var gtr = semver.gtr;
-
-test('\ngtr tests', function(t) {
- // [range, version, loose]
- // Version should be greater than range
- [
- ['~1.2.2', '1.3.0'],
- ['~0.6.1-1', '0.7.1-1'],
- ['1.0.0 - 2.0.0', '2.0.1'],
- ['1.0.0', '1.0.1-beta1'],
- ['1.0.0', '2.0.0'],
- ['<=2.0.0', '2.1.1'],
- ['<=2.0.0', '3.2.9'],
- ['<2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '1.2.5'],
- ['2.x.x', '3.0.0'],
- ['1.2.x', '1.3.0'],
- ['1.2.x || 2.x', '3.0.0'],
- ['2.*.*', '5.0.1'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '4.0.0'],
- ['2', '3.0.0'],
- ['2.3', '2.4.2'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.5.5'],
- ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.4'],
- ['~> 1', '3.2.3'],
- ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.1.0'],
- ['<1.2', '1.2.0'],
- ['< 1.2', '1.2.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-pre', '0.6.0'],
- ['~v0.5.4-pre', '0.6.1-pre'],
- ['=0.7.x', '0.8.0'],
- ['=0.7.x', '0.8.0-asdf'],
- ['<0.7.x', '0.7.0'],
- ['~1.2.2', '1.3.0'],
- ['1.0.0 - 2.0.0', '2.2.3'],
- ['1.0.0', '1.0.1'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['2', '3.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~1', '2.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['1', '2.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['=0.7.x', '0.8.2'],
- ['<0.7.x', '0.7.2']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(gtr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative gtr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be greater than range
- [
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '0.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['*', 'v1.2.3-foo'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['1', '1.0.0beta', true],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^1', '0.0.0-0'],
- ['^3.0.0', '2.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(gtr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
deleted file mode 100644
index 47c3f5f951..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
+++ /dev/null
@@ -1,698 +0,0 @@
-'use strict';
-
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var eq = semver.eq;
-var gt = semver.gt;
-var lt = semver.lt;
-var neq = semver.neq;
-var cmp = semver.cmp;
-var gte = semver.gte;
-var lte = semver.lte;
-var satisfies = semver.satisfies;
-var validRange = semver.validRange;
-var inc = semver.inc;
-var diff = semver.diff;
-var replaceStars = semver.replaceStars;
-var toComparators = semver.toComparators;
-var SemVer = semver.SemVer;
-var Range = semver.Range;
-
-test('\ncomparison tests', function(t) {
- // [version1, version2]
- // version1 should be greater than version2
- [['0.0.0', '0.0.0-foo'],
- ['0.0.1', '0.0.0'],
- ['1.0.0', '0.9.9'],
- ['0.10.0', '0.9.0'],
- ['0.99.0', '0.10.0'],
- ['2.0.0', '1.2.3'],
- ['v0.0.0', '0.0.0-foo', true],
- ['v0.0.1', '0.0.0', true],
- ['v1.0.0', '0.9.9', true],
- ['v0.10.0', '0.9.0', true],
- ['v0.99.0', '0.10.0', true],
- ['v2.0.0', '1.2.3', true],
- ['0.0.0', 'v0.0.0-foo', true],
- ['0.0.1', 'v0.0.0', true],
- ['1.0.0', 'v0.9.9', true],
- ['0.10.0', 'v0.9.0', true],
- ['0.99.0', 'v0.10.0', true],
- ['2.0.0', 'v1.2.3', true],
- ['1.2.3', '1.2.3-asdf'],
- ['1.2.3', '1.2.3-4'],
- ['1.2.3', '1.2.3-4-foo'],
- ['1.2.3-5-foo', '1.2.3-5'],
- ['1.2.3-5', '1.2.3-4'],
- ['1.2.3-5-foo', '1.2.3-5-Foo'],
- ['3.0.0', '2.7.2+asdf'],
- ['1.2.3-a.10', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a.5'],
- ['1.2.3-a.b', '1.2.3-a'],
- ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
- ['1.2.3-r2', '1.2.3-r100'],
- ['1.2.3-r100', '1.2.3-R2']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
- t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
- t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
- t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
- t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
- t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
- t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
- t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
- });
- t.end();
-});
-
-test('\nequality tests', function(t) {
- // [version1, version2]
- // version1 should be equivalent to version2
- [['1.2.3', 'v1.2.3', true],
- ['1.2.3', '=1.2.3', true],
- ['1.2.3', 'v 1.2.3', true],
- ['1.2.3', '= 1.2.3', true],
- ['1.2.3', ' v1.2.3', true],
- ['1.2.3', ' =1.2.3', true],
- ['1.2.3', ' v 1.2.3', true],
- ['1.2.3', ' = 1.2.3', true],
- ['1.2.3-0', 'v1.2.3-0', true],
- ['1.2.3-0', '=1.2.3-0', true],
- ['1.2.3-0', 'v 1.2.3-0', true],
- ['1.2.3-0', '= 1.2.3-0', true],
- ['1.2.3-0', ' v1.2.3-0', true],
- ['1.2.3-0', ' =1.2.3-0', true],
- ['1.2.3-0', ' v 1.2.3-0', true],
- ['1.2.3-0', ' = 1.2.3-0', true],
- ['1.2.3-1', 'v1.2.3-1', true],
- ['1.2.3-1', '=1.2.3-1', true],
- ['1.2.3-1', 'v 1.2.3-1', true],
- ['1.2.3-1', '= 1.2.3-1', true],
- ['1.2.3-1', ' v1.2.3-1', true],
- ['1.2.3-1', ' =1.2.3-1', true],
- ['1.2.3-1', ' v 1.2.3-1', true],
- ['1.2.3-1', ' = 1.2.3-1', true],
- ['1.2.3-beta', 'v1.2.3-beta', true],
- ['1.2.3-beta', '=1.2.3-beta', true],
- ['1.2.3-beta', 'v 1.2.3-beta', true],
- ['1.2.3-beta', '= 1.2.3-beta', true],
- ['1.2.3-beta', ' v1.2.3-beta', true],
- ['1.2.3-beta', ' =1.2.3-beta', true],
- ['1.2.3-beta', ' v 1.2.3-beta', true],
- ['1.2.3-beta', ' = 1.2.3-beta', true],
- ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
- ['1.2.3+build', ' = 1.2.3+otherbuild', true],
- ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
- ['1.2.3+build', '1.2.3+otherbuild'],
- [' v1.2.3+build', '1.2.3+otherbuild']
- ].forEach(function(v) {
- var v0 = v[0];
- var v1 = v[1];
- var loose = v[2];
- t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
- t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
- t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
- t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
- t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
- t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
- t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
- t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
- t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
- t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
- });
- t.end();
-});
-
-
-test('\nrange tests', function(t) {
- // [range, version]
- // version should be included by range
- [['1.0.0 - 2.0.0', '1.2.3'],
- ['^1.2.3+build', '1.2.3'],
- ['^1.2.3+build', '1.3.0'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
- ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
- ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0'],
- ['*', '1.2.3'],
- ['*', 'v1.2.3', true],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97', true],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
- ['~ 1.0', '1.0.2'],
- ['~ 1.0.3', '1.0.12'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['~1.2.1 >=1.2.3', '1.2.3'],
- ['~1.2.1 =1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
- ['~1.2.1 1.2.3', '1.2.3'],
- ['>=1.2.1 1.2.3', '1.2.3'],
- ['1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.3 >=1.2.1', '1.2.3'],
- ['>=1.2.1 >=1.2.3', '1.2.3'],
- ['>=1.2', '1.2.8'],
- ['^1.2.3', '1.8.1'],
- ['^0.1.2', '0.1.2'],
- ['^0.1', '0.1.2'],
- ['^1.2', '1.4.2'],
- ['^1.2 ^1', '1.4.2'],
- ['^1.2.3-alpha', '1.2.3-pre'],
- ['^1.2.0-alpha', '1.2.0-pre'],
- ['^0.0.1-alpha', '0.0.1-beta']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
- });
- t.end();
-});
-
-test('\nnegative range tests', function(t) {
- // [range, version]
- // version should not be included by range
- [['1.0.0 - 2.0.0', '2.2.3'],
- ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
- ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
- ['^1.2.3+build', '2.0.0'],
- ['^1.2.3+build', '1.2.0'],
- ['^1.2.3', '1.2.3-pre'],
- ['^1.2', '1.2.0-pre'],
- ['>1.2', '1.3.0-beta'],
- ['<=1.2.3', '1.2.3-beta'],
- ['^1.2.3', '1.2.3-beta'],
- ['=0.7.x', '0.7.0-asdf'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['<1', '1.0.0beta', true],
- ['< 1', '1.0.0beta', true],
- ['1.0.0', '1.0.1'],
- ['>=1.0.0', '0.0.0'],
- ['>=1.0.0', '0.0.1'],
- ['>=1.0.0', '0.1.0'],
- ['>1.0.0', '0.0.1'],
- ['>1.0.0', '0.1.0'],
- ['<=2.0.0', '3.0.0'],
- ['<=2.0.0', '2.9999.9999'],
- ['<=2.0.0', '2.2.9'],
- ['<2.0.0', '2.9999.9999'],
- ['<2.0.0', '2.2.9'],
- ['>=0.1.97', 'v0.1.93', true],
- ['>=0.1.97', '0.1.93'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['>=0.2.3 || <0.0.1', '0.0.3'],
- ['>=0.2.3 || <0.0.1', '0.2.2'],
- ['2.x.x', '1.1.3'],
- ['2.x.x', '3.1.3'],
- ['1.2.x', '1.3.3'],
- ['1.2.x || 2.x', '3.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['2.*.*', '3.1.3'],
- ['1.2.*', '1.3.3'],
- ['1.2.* || 2.*', '3.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.1.2'],
- ['2.3', '2.4.1'],
- ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.9'],
- ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '2.2.3'],
- ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
- ['<1', '1.0.0'],
- ['>=1.2', '1.1.1'],
- ['1', '2.0.0beta', true],
- ['~v0.5.4-beta', '0.5.4-alpha'],
- ['=0.7.x', '0.8.2'],
- ['>=0.7.x', '0.6.2'],
- ['<0.7.x', '0.7.2'],
- ['<1.2.3', '1.2.3-beta'],
- ['=1.2.3', '1.2.3-beta'],
- ['>1.2', '1.2.8'],
- ['^1.2.3', '2.0.0-alpha'],
- ['^1.2.3', '1.2.2'],
- ['^1.2', '1.1.9'],
- ['*', 'v1.2.3-foo', true],
- // invalid ranges never satisfied!
- ['blerg', '1.2.3'],
- ['git+https://user:password0123@github.com/foo', '123.0.0', true],
- ['^1.2.3', '2.0.0-pre']
- ].forEach(function(v) {
- var range = v[0];
- var ver = v[1];
- var loose = v[2];
- var found = satisfies(ver, range, loose);
- t.ok(!found, ver + ' not satisfied by ' + range);
- });
- t.end();
-});
-
-test('\nincrement versions test', function(t) {
-// [version, inc, result, identifier]
-// inc(version, inc) -> result
- [['1.2.3', 'major', '2.0.0'],
- ['1.2.3', 'minor', '1.3.0'],
- ['1.2.3', 'patch', '1.2.4'],
- ['1.2.3tag', 'major', '2.0.0', true],
- ['1.2.3-tag', 'major', '2.0.0'],
- ['1.2.3', 'fake', null],
- ['1.2.0-0', 'patch', '1.2.0'],
- ['fake', 'major', null],
- ['1.2.3-4', 'major', '2.0.0'],
- ['1.2.3-4', 'minor', '1.3.0'],
- ['1.2.3-4', 'patch', '1.2.3'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
- ['1.2.4', 'prerelease', '1.2.5-0'],
- ['1.2.3-0', 'prerelease', '1.2.3-1'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
- ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
- ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
- ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
- ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
- ['1.2.0', 'prepatch', '1.2.1-0'],
- ['1.2.0-1', 'prepatch', '1.2.1-0'],
- ['1.2.0', 'preminor', '1.3.0-0'],
- ['1.2.3-1', 'preminor', '1.3.0-0'],
- ['1.2.0', 'premajor', '2.0.0-0'],
- ['1.2.3-1', 'premajor', '2.0.0-0'],
- ['1.2.0-1', 'minor', '1.2.0'],
- ['1.0.0-1', 'major', '1.0.0'],
-
- ['1.2.3', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3', 'patch', '1.2.4', false, 'dev'],
- ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
- ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
- ['1.2.3', 'fake', null, false, 'dev'],
- ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
- ['fake', 'major', null, false, 'dev'],
- ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
- ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
- ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
- ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
- ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
- ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
- ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
- ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
- ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
- ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
- ['1.2.0', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0-1', 'prepatch', '1.2.1-dev.0', false, 'dev'],
- ['1.2.0', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'preminor', '1.3.0-dev.0', false, 'dev'],
- ['1.2.0', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.3-1', 'premajor', '2.0.0-dev.0', false, 'dev'],
- ['1.2.0-1', 'minor', '1.2.0', false, 'dev'],
- ['1.0.0-1', 'major', '1.0.0', false, 'dev'],
- ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
-
- ].forEach(function(v) {
- var pre = v[0];
- var what = v[1];
- var wanted = v[2];
- var loose = v[3];
- var id = v[4];
- var found = inc(pre, what, loose, id);
- var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
-
- var parsed = semver.parse(pre, loose);
- if (wanted) {
- parsed.inc(what, id);
- t.equal(parsed.version, wanted, cmd + ' object version updated');
- t.equal(parsed.raw, wanted, cmd + ' object raw field updated');
- } else if (parsed) {
- t.throws(function () {
- parsed.inc(what, id)
- })
- } else {
- t.equal(parsed, null)
- }
- });
-
- t.end();
-});
-
-test('\ndiff versions test', function(t) {
-// [version1, version2, result]
-// diff(version1, version2) -> result
- [['1.2.3', '0.2.3', 'major'],
- ['1.4.5', '0.2.3', 'major'],
- ['1.2.3', '2.0.0-pre', 'premajor'],
- ['1.2.3', '1.3.3', 'minor'],
- ['1.0.1', '1.1.0-pre', 'preminor'],
- ['1.2.3', '1.2.4', 'patch'],
- ['1.2.3', '1.2.4-pre', 'prepatch'],
- ['0.0.1', '0.0.1-pre', 'prerelease'],
- ['0.0.1', '0.0.1-pre-2', 'prerelease'],
- ['1.1.0', '1.1.0-pre', 'prerelease'],
- ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
- ['1.0.0', '1.0.0', null]
-
- ].forEach(function(v) {
- var version1 = v[0];
- var version2 = v[1];
- var wanted = v[2];
- var found = diff(version1, version2);
- var cmd = 'diff(' + version1 + ', ' + version2 + ')';
- t.equal(found, wanted, cmd + ' === ' + wanted);
- });
-
- t.end();
-});
-
-test('\nvalid range test', function(t) {
- // [range, result]
- // validRange(range) -> result
- // translate ranges into their canonical form
- [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
- ['1.0.0', '1.0.0'],
- ['>=*', '*'],
- ['', '*'],
- ['*', '*'],
- ['*', '*'],
- ['>=1.0.0', '>=1.0.0'],
- ['>1.0.0', '>1.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<=2.0.0', '<=2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['<2.0.0', '<2.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['>= 1.0.0', '>=1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['> 1.0.0', '>1.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['<= 2.0.0', '<=2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['< 2.0.0', '<2.0.0'],
- ['>=0.1.97', '>=0.1.97'],
- ['>=0.1.97', '>=0.1.97'],
- ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
- ['||', '||'],
- ['2.x.x', '>=2.0.0 <3.0.0'],
- ['1.2.x', '>=1.2.0 <1.3.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['x', '*'],
- ['2.*.*', '>=2.0.0 <3.0.0'],
- ['1.2.*', '>=1.2.0 <1.3.0'],
- ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
- ['*', '*'],
- ['2', '>=2.0.0 <3.0.0'],
- ['2.3', '>=2.3.0 <2.4.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~2.4', '>=2.4.0 <2.5.0'],
- ['~>3.2.1', '>=3.2.1 <3.3.0'],
- ['~1', '>=1.0.0 <2.0.0'],
- ['~>1', '>=1.0.0 <2.0.0'],
- ['~> 1', '>=1.0.0 <2.0.0'],
- ['~1.0', '>=1.0.0 <1.1.0'],
- ['~ 1.0', '>=1.0.0 <1.1.0'],
- ['^0', '>=0.0.0 <1.0.0'],
- ['^ 1', '>=1.0.0 <2.0.0'],
- ['^0.1', '>=0.1.0 <0.2.0'],
- ['^1.0', '>=1.0.0 <2.0.0'],
- ['^1.2', '>=1.2.0 <2.0.0'],
- ['^0.0.1', '>=0.0.1 <0.0.2'],
- ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
- ['^0.1.2', '>=0.1.2 <0.2.0'],
- ['^1.2.3', '>=1.2.3 <2.0.0'],
- ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
- ['<1', '<1.0.0'],
- ['< 1', '<1.0.0'],
- ['>=1', '>=1.0.0'],
- ['>= 1', '>=1.0.0'],
- ['<1.2', '<1.2.0'],
- ['< 1.2', '<1.2.0'],
- ['1', '>=1.0.0 <2.0.0'],
- ['>01.02.03', '>1.2.3', true],
- ['>01.02.03', null],
- ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
- ['~1.2.3beta', null],
- ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var loose = v[2];
- var found = validRange(pre, loose);
-
- t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
- });
-
- t.end();
-});
-
-test('\ncomparators test', function(t) {
- // [range, comparators]
- // turn range into a set of individual comparators
- [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
- ['1.0.0', [['1.0.0']]],
- ['>=*', [['']]],
- ['', [['']]],
- ['*', [['']]],
- ['*', [['']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>=1.0.0', [['>=1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['>1.0.0', [['>1.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<=2.0.0', [['<=2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['<2.0.0', [['<2.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['>= 1.0.0', [['>=1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['> 1.0.0', [['>1.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['<= 2.0.0', [['<=2.0.0']]],
- ['< 2.0.0', [['<2.0.0']]],
- ['<\t2.0.0', [['<2.0.0']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['>=0.1.97', [['>=0.1.97']]],
- ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
- ['||', [[''], ['']]],
- ['2.x.x', [['>=2.0.0', '<3.0.0']]],
- ['1.2.x', [['>=1.2.0', '<1.3.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['x', [['']]],
- ['2.*.*', [['>=2.0.0', '<3.0.0']]],
- ['1.2.*', [['>=1.2.0', '<1.3.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
- ['*', [['']]],
- ['2', [['>=2.0.0', '<3.0.0']]],
- ['2.3', [['>=2.3.0', '<2.4.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~2.4', [['>=2.4.0', '<2.5.0']]],
- ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
- ['~1', [['>=1.0.0', '<2.0.0']]],
- ['~>1', [['>=1.0.0', '<2.0.0']]],
- ['~> 1', [['>=1.0.0', '<2.0.0']]],
- ['~1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
- ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
- ['<1', [['<1.0.0']]],
- ['< 1', [['<1.0.0']]],
- ['>=1', [['>=1.0.0']]],
- ['>= 1', [['>=1.0.0']]],
- ['<1.2', [['<1.2.0']]],
- ['< 1.2', [['<1.2.0']]],
- ['1', [['>=1.0.0', '<2.0.0']]],
- ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
- ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
- ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
- ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
- ['>*', [['<0.0.0']]],
- ['<*', [['<0.0.0']]]
- ].forEach(function(v) {
- var pre = v[0];
- var wanted = v[1];
- var found = toComparators(v[0]);
- var jw = JSON.stringify(wanted);
- t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
- });
-
- t.end();
-});
-
-test('\ninvalid version numbers', function(t) {
- ['1.2.3.4',
- 'NOT VALID',
- 1.2,
- null,
- 'Infinity.NaN.Infinity'
- ].forEach(function(v) {
- t.throws(function() {
- new SemVer(v);
- }, {name:'TypeError', message:'Invalid Version: ' + v});
- });
-
- t.end();
-});
-
-test('\nstrict vs loose version numbers', function(t) {
- [['=1.2.3', '1.2.3'],
- ['01.02.03', '1.2.3'],
- ['1.2.3-beta.01', '1.2.3-beta.1'],
- [' =1.2.3', '1.2.3'],
- ['1.2.3foo', '1.2.3-foo']
- ].forEach(function(v) {
- var loose = v[0];
- var strict = v[1];
- t.throws(function() {
- new SemVer(loose);
- });
- var lv = new SemVer(loose, true);
- t.equal(lv.version, strict);
- t.ok(eq(loose, strict, true));
- t.throws(function() {
- eq(loose, strict);
- });
- t.throws(function() {
- new SemVer(strict).compare(loose);
- });
- });
- t.end();
-});
-
-test('\nstrict vs loose ranges', function(t) {
- [['>=01.02.03', '>=1.2.3'],
- ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
- ].forEach(function(v) {
- var loose = v[0];
- var comps = v[1];
- t.throws(function() {
- new Range(loose);
- });
- t.equal(new Range(loose, true).range, comps);
- });
- t.end();
-});
-
-test('\nmax satisfying', function(t) {
- [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
- [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
- [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
- [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
- ].forEach(function(v) {
- var versions = v[0];
- var range = v[1];
- var expect = v[2];
- var loose = v[3];
- var actual = semver.maxSatisfying(versions, range, loose);
- t.equal(actual, expect);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
deleted file mode 100644
index 0f7167d658..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-var ltr = semver.ltr;
-
-test('\nltr tests', function(t) {
- // [range, version, loose]
- // Version should be less than range
- [
- ['~1.2.2', '1.2.1'],
- ['~0.6.1-1', '0.6.1-0'],
- ['1.0.0 - 2.0.0', '0.0.1'],
- ['1.0.0-beta.2', '1.0.0-beta.1'],
- ['1.0.0', '0.0.0'],
- ['>=2.0.0', '1.1.1'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['0.1.20 || 1.2.4', '0.1.5'],
- ['2.x.x', '1.0.0'],
- ['1.2.x', '1.1.0'],
- ['1.2.x || 2.x', '1.0.0'],
- ['2.*.*', '1.0.1'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.9999'],
- ['2', '1.0.0'],
- ['2.3', '2.2.2'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.3.5'],
- ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.4'],
- ['~> 1', '0.2.3'],
- ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '0.1.0'],
- ['>1.2', '1.2.0'],
- ['> 1.2', '1.2.1'],
- ['1', '0.0.0beta', true],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['~v0.5.4-pre', '0.5.4-alpha'],
- ['=0.7.x', '0.6.0'],
- ['=0.7.x', '0.6.0-asdf'],
- ['>=0.7.x', '0.6.0'],
- ['~1.2.2', '1.2.1'],
- ['1.0.0 - 2.0.0', '0.2.3'],
- ['1.0.0', '0.0.1'],
- ['>=2.0.0', '1.0.0'],
- ['>=2.0.0', '1.9999.9999'],
- ['>=2.0.0', '1.2.9'],
- ['>2.0.0', '2.0.0'],
- ['>2.0.0', '1.2.9'],
- ['2.x.x', '1.1.3'],
- ['1.2.x', '1.1.3'],
- ['1.2.x || 2.x', '1.1.3'],
- ['2.*.*', '1.1.3'],
- ['1.2.*', '1.1.3'],
- ['1.2.* || 2.*', '1.1.3'],
- ['2', '1.9999.9999'],
- ['2.3', '2.2.1'],
- ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
- ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
- ['~1', '0.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '0.2.3'],
- ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
- ['>1', '1.0.0'],
- ['2', '1.0.0beta', true],
- ['>1', '1.0.0beta', true],
- ['> 1', '1.0.0beta', true],
- ['=0.7.x', '0.6.2'],
- ['=0.7.x', '0.7.0-asdf'],
- ['^1', '1.0.0-0'],
- ['>=0.7.x', '0.7.0-asdf'],
- ['1', '1.0.0beta', true],
- ['>=0.7.x', '0.6.2'],
- ['>1.2.3', '1.3.0-alpha']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.ok(ltr(version, range, loose), msg);
- });
- t.end();
-});
-
-test('\nnegative ltr tests', function(t) {
- // [range, version, loose]
- // Version should NOT be less than range
- [
- ['~ 1.0', '1.1.0'],
- ['~0.6.1-1', '0.6.1-1'],
- ['1.0.0 - 2.0.0', '1.2.3'],
- ['1.0.0 - 2.0.0', '2.9.9'],
- ['1.0.0', '1.0.0'],
- ['>=*', '0.2.4'],
- ['', '1.0.0', true],
- ['*', '1.2.3'],
- ['>=1.0.0', '1.0.0'],
- ['>=1.0.0', '1.0.1'],
- ['>=1.0.0', '1.1.0'],
- ['>1.0.0', '1.0.1'],
- ['>1.0.0', '1.1.0'],
- ['<=2.0.0', '2.0.0'],
- ['<=2.0.0', '1.9999.9999'],
- ['<=2.0.0', '0.2.9'],
- ['<2.0.0', '1.9999.9999'],
- ['<2.0.0', '0.2.9'],
- ['>= 1.0.0', '1.0.0'],
- ['>= 1.0.0', '1.0.1'],
- ['>= 1.0.0', '1.1.0'],
- ['> 1.0.0', '1.0.1'],
- ['> 1.0.0', '1.1.0'],
- ['<= 2.0.0', '2.0.0'],
- ['<= 2.0.0', '1.9999.9999'],
- ['<= 2.0.0', '0.2.9'],
- ['< 2.0.0', '1.9999.9999'],
- ['<\t2.0.0', '0.2.9'],
- ['>=0.1.97', 'v0.1.97'],
- ['>=0.1.97', '0.1.97'],
- ['0.1.20 || 1.2.4', '1.2.4'],
- ['0.1.20 || >1.2.4', '1.2.4'],
- ['0.1.20 || 1.2.4', '1.2.3'],
- ['0.1.20 || 1.2.4', '0.1.20'],
- ['>=0.2.3 || <0.0.1', '0.0.0'],
- ['>=0.2.3 || <0.0.1', '0.2.3'],
- ['>=0.2.3 || <0.0.1', '0.2.4'],
- ['||', '1.3.4'],
- ['2.x.x', '2.1.3'],
- ['1.2.x', '1.2.3'],
- ['1.2.x || 2.x', '2.1.3'],
- ['1.2.x || 2.x', '1.2.3'],
- ['x', '1.2.3'],
- ['2.*.*', '2.1.3'],
- ['1.2.*', '1.2.3'],
- ['1.2.* || 2.*', '2.1.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['1.2.* || 2.*', '1.2.3'],
- ['*', '1.2.3'],
- ['2', '2.1.2'],
- ['2.3', '2.3.1'],
- ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
- ['~2.4', '2.4.5'],
- ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
- ['~1', '1.2.3'], // >=1.0.0 <2.0.0
- ['~>1', '1.2.3'],
- ['~> 1', '1.2.3'],
- ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
- ['~ 1.0', '1.0.2'],
- ['>=1', '1.0.0'],
- ['>= 1', '1.0.0'],
- ['<1.2', '1.1.1'],
- ['< 1.2', '1.1.1'],
- ['~v0.5.4-pre', '0.5.5'],
- ['~v0.5.4-pre', '0.5.4'],
- ['=0.7.x', '0.7.2'],
- ['>=0.7.x', '0.7.2'],
- ['<=0.7.x', '0.6.2'],
- ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
- ['>=0.2.3 <=0.2.4', '0.2.4'],
- ['1.0.0 - 2.0.0', '2.0.0'],
- ['^3.0.0', '4.0.0'],
- ['^1.0.0 || ~2.0.1', '2.0.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
- ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
- ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
- ['^1.0.0alpha', '1.0.0beta', true],
- ['~1.0.0alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0beta', true],
- ['~1.0.0-alpha', '1.0.0beta', true],
- ['^1.0.0-alpha', '1.0.0-beta'],
- ['~1.0.0-alpha', '1.0.0-beta'],
- ['=0.1.0', '1.0.0']
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
- t.notOk(ltr(version, range, loose), msg);
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
deleted file mode 100644
index e9d4039c8b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
+++ /dev/null
@@ -1,72 +0,0 @@
-var tap = require('tap');
-var test = tap.test;
-var semver = require('../semver.js');
-
-test('\nmajor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.3', 1],
- [' 1.2.3 ', 1],
- [' 2.2.3-4 ', 2],
- [' 3.2.3-pre ', 3],
- ['v5.2.3', 5],
- [' v8.2.3 ', 8],
- ['\t13.2.3', 13],
- ['=21.2.3', 21, true],
- ['v=34.2.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'major(' + range + ') = ' + version;
- t.equal(semver.major(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\nminor tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.1.3', 1],
- [' 1.1.3 ', 1],
- [' 1.2.3-4 ', 2],
- [' 1.3.3-pre ', 3],
- ['v1.5.3', 5],
- [' v1.8.3 ', 8],
- ['\t1.13.3', 13],
- ['=1.21.3', 21, true],
- ['v=1.34.3', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'minor(' + range + ') = ' + version;
- t.equal(semver.minor(range, loose), version, msg);
- });
- t.end();
-});
-
-test('\npatch tests', function(t) {
- // [range, version]
- // Version should be detectable despite extra characters
- [
- ['1.2.1', 1],
- [' 1.2.1 ', 1],
- [' 1.2.2-4 ', 2],
- [' 1.2.3-pre ', 3],
- ['v1.2.5', 5],
- [' v1.2.8 ', 8],
- ['\t1.2.13', 13],
- ['=1.2.21', 21, true],
- ['v=1.2.34', 34, true]
- ].forEach(function(tuple) {
- var range = tuple[0];
- var version = tuple[1];
- var loose = tuple[2] || false;
- var msg = 'patch(' + range + ') = ' + version;
- t.equal(semver.patch(range, loose), version, msg);
- });
- t.end();
-});
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 e204131537..c0b4c066a2 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,26 +1,26 @@
{
- "_from": "agent-base@2",
- "_id": "agent-base@2.1.1",
+ "_from": "agent-base@^4.0.1",
+ "_id": "agent-base@4.1.0",
"_inBundle": false,
- "_integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
+ "_integrity": "sha1-IOF0Ac1Js8B2v1akvGxbQ2/6jVU=",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "agent-base@2",
+ "raw": "agent-base@^4.0.1",
"name": "agent-base",
"escapedName": "agent-base",
- "rawSpec": "2",
+ "rawSpec": "^4.0.1",
"saveSpec": null,
- "fetchSpec": "2"
+ "fetchSpec": "^4.0.1"
},
"_requiredBy": [
"/pacote/make-fetch-happen/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
- "_shasum": "d6de10d5af6132d5bd692427d46fc538539094c7",
- "_spec": "agent-base@2",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.0.tgz",
+ "_shasum": "20e17401cd49b3c076bf56a4bc6c5b436ffa8d55",
+ "_spec": "agent-base@^4.0.1",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
"author": {
"name": "Nathan Rajlich",
@@ -32,14 +32,16 @@
},
"bundleDependencies": false,
"dependencies": {
- "extend": "~3.0.0",
- "semver": "~5.0.1"
+ "es6-promisify": "^5.0.0"
},
"deprecated": false,
"description": "Turn a function into an `http.Agent` instance",
"devDependencies": {
- "mocha": "2",
- "ws": "0.8.0"
+ "mocha": "^3.4.2",
+ "ws": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
},
"homepage": "https://github.com/TooTallNate/node-agent-base#readme",
"keywords": [
@@ -50,7 +52,7 @@
"https"
],
"license": "MIT",
- "main": "agent.js",
+ "main": "./index.js",
"name": "agent-base",
"repository": {
"type": "git",
@@ -59,5 +61,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.1"
+ "version": "4.1.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 7cdacafa3e..05cbaa1e70 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,53 +1,25 @@
-var url = require('url');
-var http = require('http');
-var https = require('https');
-var semver = require('semver');
-var inherits = require('util').inherits;
+'use strict';
+const url = require('url');
+const https = require('https');
-// we only need to patch the `http.request()` and
-// `http.ClientRequest` on older versions of Node.js
-if (semver.lt(process.version, '0.11.8')) {
- // subclass the native ClientRequest to include the
- // passed in `options` object.
- http.ClientRequest = (function (_ClientRequest) {
- function ClientRequest (options, cb) {
- this._options = options;
- _ClientRequest.call(this, options, cb);
- }
- inherits(ClientRequest, _ClientRequest);
-
- return ClientRequest;
- })(http.ClientRequest);
-
-
- // need to re-define the `request()` method, since on node v0.8/v0.10
- // the closure-local ClientRequest is used, rather than the monkey
- // patched version we have created here.
- http.request = (function (request) {
- return function (options, cb) {
- if (typeof options === 'string') {
- options = url.parse(options);
- }
- if (options.protocol && options.protocol !== 'http:') {
- throw new Error('Protocol:' + options.protocol + ' not supported.');
- }
- return new http.ClientRequest(options, cb);
- };
- })(http.request);
-}
-
-
-// this currently needs to be applied to all Node.js versions
-// (v0.8.x, v0.10.x, v0.12.x), in order to determine if the `req`
-// is an HTTP or HTTPS request. There is currently no PR attempting
-// to move this property upstream.
-https.request = (function (request) {
- return function (options, cb) {
+/**
+ * This currently needs to be applied to all Node.js versions
+ * in order to determine if the `req` is an HTTP or HTTPS request.
+ *
+ * There is currently no PR attempting to move this property upstream.
+ */
+https.request = (function(request) {
+ return function(_options, cb) {
+ let options
if (typeof options === 'string') {
- options = url.parse(options);
+ options = url.parse(_options);
+ } else {
+ options = Object.assign({}, _options);
+ }
+ if (null == options.port) {
+ options.port = 443;
}
- if (null == options.port) options.port = 443;
options.secureEndpoint = true;
return request.call(https, options, cb);
};
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 7d8dee66ce..43217d4273 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
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -13,18 +12,17 @@ var WebSocket = require('ws');
var assert = require('assert');
var events = require('events');
var inherits = require('util').inherits;
-var semver = require('semver');
var Agent = require('../');
-describe('Agent', function () {
- describe('subclass', function () {
- it('should be subclassable', function (done) {
- function MyAgent () {
+describe('Agent', function() {
+ describe('subclass', function() {
+ it('should be subclassable', function(done) {
+ function MyAgent() {
Agent.call(this);
}
inherits(MyAgent, Agent);
- MyAgent.prototype.callback = function (req, opts, fn) {
+ MyAgent.prototype.callback = function(req, opts, fn) {
assert.equal(req.path, '/foo');
assert.equal(req.getHeader('host'), '127.0.0.1:1234');
assert.equal(opts.secureEndpoint, true);
@@ -32,102 +30,177 @@ describe('Agent', function () {
};
var info = url.parse('https://127.0.0.1:1234/foo');
- info.agent = new MyAgent;
+ info.agent = new MyAgent();
https.get(info);
});
});
- describe('"error" event', function () {
- it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function (done) {
+ describe('options', function() {
+ it('should support an options Object as first argument', function() {
+ var agent = new Agent({ timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should support an options Object as second argument', function() {
+ var agent = new Agent(function() {}, { timeout: 1000 });
+ assert.equal(1000, agent.timeout);
+ });
+ it('should be mixed in with HTTP request options', function(done) {
+ var agent = new Agent({
+ host: 'my-proxy.com',
+ port: 3128,
+ foo: 'bar'
+ });
+ agent.callback = function(req, opts, fn) {
+ assert.equal('bar', opts.foo);
+ assert.equal('a', opts.b);
+
+ // `host` and `port` are special-cases, and should always be
+ // overwritten in the request `opts` inside the agent-base callback
+ assert.equal('localhost', opts.host);
+ assert.equal(80, opts.port);
+ done();
+ };
+ var opts = {
+ b: 'a',
+ agent: agent
+ };
+ http.get(opts);
+ });
+ });
+ describe('`this` context', function() {
+ it('should be the Agent instance', function(done) {
+ var called = false;
+ var agent = new Agent();
+ 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);
+ req.on('error', function(err) {
+ 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) {
+ 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);
+ req.on('error', function(err) {
+ 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
+ ) {
var agent = new Agent();
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
- assert.equal('"agent-base" has no default implementation, you must subclass and override `callback()`', err.message);
+ req.on('error', function(err) {
+ assert.equal(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`',
+ err.message
+ );
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
fn(new Error('is this caught?'));
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
- it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function (done) {
- var agent = new Agent(function (req, opts, fn) {
- setTimeout(function () {
+ it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function(
+ done
+ ) {
+ var agent = new Agent(function(req, opts, fn) {
+ setTimeout(function() {
fn(new Error('is this caught?'));
}, 10);
});
var info = url.parse('http://127.0.0.1/foo');
info.agent = agent;
var req = http.get(info);
- req.on('error', function (err) {
+ req.on('error', function(err) {
assert.equal('is this caught?', err.message);
done();
});
});
});
- describe('artificial "streams"', function () {
- it('should send a GET request', function (done) {
+ describe('artificial "streams"', function() {
+ it('should send a GET request', function(done) {
var stream = new events.EventEmitter();
// needed for the `http` module to call .write() on the stream
stream.writable = true;
- stream.write = function (str) {
+ stream.write = function(str) {
assert(0 == str.indexOf('GET / HTTP/1.1'));
done();
};
// needed for `http` module in Node.js 4
- stream.cork = function () {
- };
+ stream.cork = function() {};
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
var req = http.request(opts);
req.end();
});
- it('should receive a GET response', function (done) {
+ it('should receive a GET response', function(done) {
var stream = new events.EventEmitter();
var opts = {
method: 'GET',
host: '127.0.0.1',
path: '/',
port: 80,
- agent: new Agent(function (req, opts, fn) {
+ agent: new Agent(function(req, opts, fn) {
fn(null, stream);
})
};
- var req = http.request(opts, function (res) {
+ var req = http.request(opts, function(res) {
assert.equal('0.9', res.httpVersion);
assert.equal(111, res.statusCode);
assert.equal('bar', res.headers.foo);
done();
});
- req.end();
- // have to nextTick() since `http.ClientRequest` doesn't *actually*
- // attach the listeners to the "stream" until the next tick :\
- process.nextTick(function () {
- var buf = new Buffer('HTTP/0.9 111\r\n' +
- 'Foo: bar\r\n' +
- 'Set-Cookie: 1\r\n' +
- 'Set-Cookie: 2\r\n\r\n');
+ // have to wait for the "socket" event since `http.ClientRequest`
+ // doesn't *actually* attach the listeners to the "stream" until
+ // this happens
+ req.once('socket', function() {
+ var buf = new Buffer(
+ 'HTTP/0.9 111\r\n' +
+ 'Foo: bar\r\n' +
+ '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);
@@ -136,34 +209,36 @@ describe('Agent', function () {
stream.emit('data', buf);
}
});
+
+ req.end();
});
});
});
-describe('"http" module', function () {
+describe('"http" module', function() {
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
server = http.createServer();
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTP requests', function (done) {
+ it('should work for basic HTTP requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -171,7 +246,63 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support direct return in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ called = true;
+ return net.connect(opts);
+ });
+
+ // 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 = agent;
+ http.get(info, function(res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should support returning a Promise in `connect()`', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts) {
+ return new Promise(function(resolve, reject) {
+ called = true;
+ resolve(net.connect(opts));
+ });
+ });
+
+ // 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);
@@ -180,7 +311,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/foo');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -189,9 +320,9 @@ describe('"http" module', function () {
});
});
- it('should set the `Connection: close` response header', function (done) {
+ it('should set the `Connection: close` response header', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
var socket = net.connect(opts);
fn(null, socket);
@@ -199,7 +330,7 @@ describe('"http" module', function () {
// add HTTP server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Url', req.url);
assert.equal('close', req.headers.connection);
@@ -208,7 +339,7 @@ describe('"http" module', function () {
var info = url.parse('http://127.0.0.1:' + port + '/bar');
info.agent = agent;
- http.get(info, function (res) {
+ http.get(info, function(res) {
assert.equal('/bar', res.headers['x-url']);
assert.equal('close', res.headers.connection);
assert(gotReq);
@@ -217,8 +348,8 @@ describe('"http" module', function () {
});
});
- it('should pass through options from `http.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `http.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -231,8 +362,8 @@ describe('"http" module', function () {
});
});
- it('should default to port 80', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 80', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(80, opts.port);
done();
});
@@ -245,36 +376,76 @@ describe('"http" module', function () {
agent: agent
});
});
+
+ it('should support the "timeout" option', function(done) {
+ // ensure we timeout after the "error" event had a chance to trigger
+ this.timeout(1000);
+ this.slow(800);
+
+ var agent = new Agent(
+ function(req, opts, fn) {
+ // this function will time out
+ },
+ { timeout: 100 }
+ );
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function(err) {
+ assert.equal('ETIMEOUT', err.code);
+ req.abort();
+ done();
+ });
+ });
});
-describe('"https" module', function () {
+describe('"https" module', function() {
var server;
var port;
// setup test HTTPS server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic HTTPS requests', function (done) {
+
+ it('should not modify the passed in Options object', function(done) {
+ var called = false;
+ var agent = new Agent(function(req, opts, fn) {
+ called = true;
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(443, opts.port);
+ assert.equal('localhost', opts.host);
+ });
+ var opts = { agent: agent };
+ var req = https.request(opts);
+ assert.equal(true, called);
+ assert.equal(false, 'secureEndpoint' in opts);
+ assert.equal(false, 'port' in opts);
+ done();
+ });
+
+ it('should work for basic HTTPS requests', function(done) {
var called = false;
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
called = true;
assert(opts.secureEndpoint);
var socket = tls.connect(opts);
@@ -283,7 +454,7 @@ describe('"https" module', function () {
// add HTTPS server "request" listener
var gotReq = false;
- server.once('request', function (req, res) {
+ server.once('request', function(req, res) {
gotReq = true;
res.setHeader('X-Foo', 'bar');
res.setHeader('X-Url', req.url);
@@ -293,7 +464,7 @@ describe('"https" module', function () {
var info = url.parse('https://127.0.0.1:' + port + '/foo');
info.agent = agent;
info.rejectUnauthorized = false;
- https.get(info, function (res) {
+ https.get(info, function(res) {
assert.equal('bar', res.headers['x-foo']);
assert.equal('/foo', res.headers['x-url']);
assert(gotReq);
@@ -302,8 +473,8 @@ describe('"https" module', function () {
});
});
- it('should pass through options from `https.request()`', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should pass through options from `https.request()`', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal('google.com', opts.host);
assert.equal('bar', opts.foo);
done();
@@ -316,8 +487,8 @@ describe('"https" module', function () {
});
});
- it('should default to port 443', function (done) {
- var agent = new Agent(function (req, opts, fn) {
+ it('should default to port 443', function(done) {
+ var agent = new Agent(function(req, opts, fn) {
assert.equal(true, opts.secureEndpoint);
assert.equal(false, opts.rejectUnauthorized);
assert.equal(443, opts.port);
@@ -335,39 +506,39 @@ describe('"https" module', function () {
});
});
-describe('"ws" server', function () {
+describe('"ws" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
- server = http.createServer()
+ before(function(done) {
+ server = http.createServer();
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for basic WebSocket connections', function (done) {
+ it('should work for basic WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = net.connect(opts);
fn(null, socket);
});
@@ -376,57 +547,56 @@ describe('"ws" server', function () {
agent: agent
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
-describe('"wss" server', function () {
+describe('"wss" server', function() {
var wss;
var server;
var port;
// setup test HTTP server
- before(function (done) {
+ before(function(done) {
var options = {
key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
};
server = https.createServer(options);
wss = new WebSocket.Server({ server: server });
- server.listen(0, function () {
+ server.listen(0, function() {
port = server.address().port;
done();
});
});
// shut down test HTTP server
- after(function (done) {
- server.once('close', function () {
+ after(function(done) {
+ server.once('close', function() {
done();
});
server.close();
});
- it('should work for secure WebSocket connections', function (done) {
+ it('should work for secure WebSocket connections', function(done) {
function onconnection(ws) {
- ws.on('message', function (data) {
+ ws.on('message', function(data) {
assert.equal('ping', data);
ws.send('pong');
});
}
wss.on('connection', onconnection);
- var agent = new Agent(function (req, opts, fn) {
+ var agent = new Agent(function(req, opts, fn) {
var socket = tls.connect(opts);
fn(null, socket);
});
@@ -436,16 +606,15 @@ describe('"wss" server', function () {
rejectUnauthorized: false
});
- client.on('open', function () {
+ client.on('open', function() {
client.send('ping');
});
- client.on('message', function (data) {
+ client.on('message', function(data) {
assert.equal('pong', data);
client.close();
wss.removeListener('connection', onconnection);
done();
});
});
-
});
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.jscs.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.jscs.json
deleted file mode 100644
index b1c6a99f97..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.jscs.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "es3": true,
-
- "additionalRules": [],
-
- "requireSemicolons": true,
-
- "disallowMultipleSpaces": true,
-
- "disallowIdentifierNames": [],
-
- "requireCurlyBraces": {
- "allExcept": [],
- "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
- },
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "disallowSpaceBeforeComma": true,
- "disallowSpaceAfterComma": false,
- "disallowSpaceBeforeSemicolon": true,
-
- "disallowNodeTypes": [
- "DebuggerStatement",
- "LabeledStatement",
- "SwitchCase",
- "SwitchStatement",
- "WithStatement"
- ],
-
- "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "requireSpaceBetweenArguments": true,
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "disallowTrailingComma": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "requireDotNotation": { "allExcept": ["keywords"] },
-
- "requireParenthesesAroundIIFE": true,
-
- "validateLineBreaks": "LF",
-
- "validateQuoteMarks": {
- "escape": true,
- "mark": "'"
- },
-
- "disallowOperatorBeforeLineBreak": [],
-
- "requireSpaceBeforeKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "finally",
- "while",
- "with",
- "return"
- ],
-
- "validateAlignedFunctionParameters": {
- "lineBreakAfterOpeningBraces": true,
- "lineBreakBeforeClosingBraces": true
- },
-
- "requirePaddingNewLinesBeforeExport": true,
-
- "validateNewlineAfterArrayElements": {
- "maximum": 6
- },
-
- "requirePaddingNewLinesAfterUseStrict": true,
-
- "disallowArrowFunctions": true,
-
- "disallowMultiLineTernary": true,
-
- "validateOrderInObjectKeys": false,
-
- "disallowIdenticalDestructuringNames": true,
-
- "disallowNestedTernaries": { "maxLevel": 1 },
-
- "requireSpaceAfterComma": { "allExcept": ["trailing"] },
- "requireAlignedMultilineParams": false,
-
- "requireSpacesInGenerator": {
- "afterStar": true
- },
-
- "disallowSpacesInGenerator": {
- "beforeStar": true
- },
-
- "disallowVar": false,
-
- "requireArrayDestructuring": false,
-
- "requireEnhancedObjectLiterals": false,
-
- "requireObjectDestructuring": false,
-
- "requireEarlyReturn": false,
-
- "requireCapitalizedConstructorsNew": {
- "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
- },
-
- "requireImportAlphabetized": false,
-
- "requireSpaceBeforeObjectValues": true,
- "requireSpaceBeforeDestructuredValues": true,
-
- "disallowSpacesInsideTemplateStringPlaceholders": true,
-
- "disallowArrayDestructuringReturn": false,
-
- "requireNewlineBeforeSingleStatementsInIf": false,
-
- "disallowUnusedVariables": true,
-
- "requireSpacesInsideImportedObjectBraces": true,
-
- "requireUseStrict": true
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.npmignore b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.npmignore
deleted file mode 100644
index 30d74d2584..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test \ 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/extend/.travis.yml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.travis.yml
deleted file mode 100644
index 6bf696c87b..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/.travis.yml
+++ /dev/null
@@ -1,179 +0,0 @@
-language: node_js
-os:
- - linux
-node_js:
- - "7.9"
- - "6.10"
- - "5.12"
- - "4.8"
- - "iojs-v3.3"
- - "iojs-v2.5"
- - "iojs-v1.8"
- - "0.12"
- - "0.10"
- - "0.8"
-before_install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
-install:
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
-script:
- - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
- - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
- - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
- - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
-sudo: false
-env:
- - TEST=true
-matrix:
- fast_finish: true
- include:
- - node_js: "node"
- env: PRETEST=true
- - node_js: "node"
- env: COVERAGE=true
- - node_js: "7.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "7.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "6.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.10"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.8"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "5.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "4.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v3.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v2.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.7"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.5"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.4"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.3"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.2"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.1"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "iojs-v1.0"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.11"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.9"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.6"
- env: TEST=true ALLOW_FAILURE=true
- - node_js: "0.4"
- env: TEST=true ALLOW_FAILURE=true
- ##- node_js: "7"
- #env: TEST=true
- #os: osx
- #- node_js: "6"
- #env: TEST=true
- #os: osx
- #- node_js: "5"
- #env: TEST=true
- #os: osx
- #- node_js: "4"
- #env: TEST=true
- #os: osx
- #- node_js: "iojs"
- #env: TEST=true
- #os: osx
- #- node_js: "0.12"
- #env: TEST=true
- #os: osx
- #- node_js: "0.10"
- #env: TEST=true
- #os: osx
- #- node_js: "0.8"
- #env: TEST=true
- #os: osx
- allow_failures:
- - os: osx
- - env: TEST=true ALLOW_FAILURE=true
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/CHANGELOG.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/CHANGELOG.md
deleted file mode 100644
index 7d2e5f3a50..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/CHANGELOG.md
+++ /dev/null
@@ -1,76 +0,0 @@
-3.0.1 / 2017-04-27
-==================
- * [Fix] deep extending should work with a non-object (#46)
- * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`
- * [Tests] up to `node` `v7.9`, `v6.10`, `v4.8`; improve matrix
- * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG.
- * [Docs] Add example to readme (#34)
-
-3.0.0 / 2015-07-01
-==================
- * [Possible breaking change] Use global "strict" directive (#32)
- * [Tests] `int` is an ES3 reserved word
- * [Tests] Test up to `io.js` `v2.3`
- * [Tests] Add `npm run eslint`
- * [Dev Deps] Update `covert`, `jscs`
-
-2.0.1 / 2015-04-25
-==================
- * Use an inline `isArray` check, for ES3 browsers. (#27)
- * Some old browsers fail when an identifier is `toString`
- * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
- * Add license info to package.json (#25)
- * Update `tape`, `jscs`
- * Adding a CHANGELOG
-
-2.0.0 / 2014-10-01
-==================
- * Increase code coverage to 100%; run code coverage as part of tests
- * Add `npm run lint`; Run linter as part of tests
- * Remove nodeType and setInterval checks in isPlainObject
- * Updating `tape`, `jscs`, `covert`
- * General style and README cleanup
-
-1.3.0 / 2014-06-20
-==================
- * Add component.json for browser support (#18)
- * Use SVG for badges in README (#16)
- * Updating `tape`, `covert`
- * Updating travis-ci to work with multiple node versions
- * Fix `deep === false` bug (returning target as {}) (#14)
- * Fixing constructor checks in isPlainObject
- * Adding additional test coverage
- * Adding `npm run coverage`
- * Add LICENSE (#13)
- * Adding a warning about `false`, per #11
- * General style and whitespace cleanup
-
-1.2.1 / 2013-09-14
-==================
- * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
- * Updating `tape`
-
-1.2.0 / 2013-09-02
-==================
- * Updating the README: add badges
- * Adding a missing variable reference.
- * Using `tape` instead of `buster` for tests; add more tests (#7)
- * Adding node 0.10 to Travis CI (#6)
- * Enabling "npm test" and cleaning up package.json (#5)
- * Add Travis CI.
-
-1.1.3 / 2012-12-06
-==================
- * Added unit tests.
- * Ensure extend function is named. (Looks nicer in a stack trace.)
- * README cleanup.
-
-1.1.1 / 2012-11-07
-==================
- * README cleanup.
- * Added installation instructions.
- * Added a missing semicolon
-
-1.0.0 / 2012-04-08
-==================
- * Initial commit
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/LICENSE b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/LICENSE
deleted file mode 100644
index 92d41503d3..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Stefan Thomas
-
-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/socks-proxy-agent/node_modules/extend/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/README.md
deleted file mode 100644
index 947dda6aeb..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-[![Build Status][travis-svg]][travis-url]
-[![dependency status][deps-svg]][deps-url]
-[![dev dependency status][dev-deps-svg]][dev-deps-url]
-
-# extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
-
-`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
-
-Notes:
-
-* Since Node.js >= 4,
- [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- now offers the same functionality natively (but without the "deep copy" option).
- See [ECMAScript 2015 (ES6) in Node.js](https://nodejs.org/en/docs/es6).
-* Some native implementations of `Object.assign` in both Node.js and many
- browsers (since NPM modules are for the browser too) may not be fully
- spec-compliant.
- Check [`object.assign`](https://www.npmjs.com/package/object.assign) module for
- a compliant candidate.
-
-## Installation
-
-This package is available on [npm][npm-url] as: `extend`
-
-``` sh
-npm install extend
-```
-
-## Usage
-
-**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
-
-*Extend one object with one or more others, returning the modified object.*
-
-**Example:**
-
-``` js
-var extend = require('extend');
-extend(targetObject, object1, object2);
-```
-
-Keep in mind that the target object will be modified, and will be returned from extend().
-
-If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
-Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
-Warning: passing `false` as the first argument is not supported.
-
-### Arguments
-
-* `deep` *Boolean* (optional)
-If set, the merge becomes recursive (i.e. deep copy).
-* `target` *Object*
-The object to extend.
-* `object1` *Object*
-The object that will be merged into the first.
-* `objectN` *Object* (Optional)
-More objects to merge into the first.
-
-## License
-
-`node-extend` is licensed under the [MIT License][mit-license-url].
-
-## Acknowledgements
-
-All credit to the jQuery authors for perfecting this amazing utility.
-
-Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
-
-[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
-[travis-url]: https://travis-ci.org/justmoon/node-extend
-[npm-url]: https://npmjs.org/package/extend
-[mit-license-url]: http://opensource.org/licenses/MIT
-[github-justmoon]: https://github.com/justmoon
-[github-insin]: https://github.com/insin
-[github-ljharb]: https://github.com/ljharb
-[npm-version-png]: http://versionbadg.es/justmoon/node-extend.svg
-[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
-[deps-url]: https://david-dm.org/justmoon/node-extend
-[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
-[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/component.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/component.json
deleted file mode 100644
index 0f76b59305..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/component.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "extend",
- "author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
- "version": "3.0.0",
- "description": "Port of jQuery.extend for node.js and the browser.",
- "scripts": [
- "index.js"
- ],
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "repository" : {
- "type": "git",
- "url": "https://github.com/justmoon/node-extend.git"
- },
- "dependencies": {
- },
- "devDependencies": {
- "tape" : "~3.0.0",
- "covert": "~0.4.0",
- "jscs": "~1.6.2"
- }
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/index.js
deleted file mode 100644
index bbe53f6608..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/index.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
-
-var isArray = function isArray(arr) {
- if (typeof Array.isArray === 'function') {
- return Array.isArray(arr);
- }
-
- return toStr.call(arr) === '[object Array]';
-};
-
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
-
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) { /**/ }
-
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
-
-module.exports = function extend() {
- var options, name, src, copy, copyIsArray, clone;
- var target = arguments[0];
- var i = 1;
- var length = arguments.length;
- var deep = false;
-
- // Handle a deep copy situation
- if (typeof target === 'boolean') {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
- if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
- target = {};
- }
-
- for (; i < length; ++i) {
- options = arguments[i];
- // Only deal with non-null/undefined values
- if (options != null) {
- // Extend the base object
- for (name in options) {
- src = target[name];
- copy = options[name];
-
- // Prevent never-ending loop
- if (target !== copy) {
- // Recurse if we're merging plain objects or arrays
- if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
- if (copyIsArray) {
- copyIsArray = false;
- clone = src && isArray(src) ? src : [];
- } else {
- clone = src && isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[name] = extend(deep, clone, copy);
-
- // Don't bring in undefined values
- } else if (typeof copy !== 'undefined') {
- target[name] = copy;
- }
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/package.json
deleted file mode 100644
index f617c01d62..0000000000
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/extend/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "_from": "extend@3",
- "_id": "extend@3.0.1",
- "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "_location": "/pacote/make-fetch-happen/socks-proxy-agent/extend",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "extend@3",
- "name": "extend",
- "escapedName": "extend",
- "rawSpec": "3",
- "saveSpec": null,
- "fetchSpec": "3"
- },
- "_requiredBy": [
- "/pacote/make-fetch-happen/socks-proxy-agent",
- "/pacote/make-fetch-happen/socks-proxy-agent/agent-base"
- ],
- "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444",
- "_shrinkwrap": null,
- "_spec": "extend@3",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent",
- "author": {
- "name": "Stefan Thomas",
- "email": "justmoon@members.fsf.org",
- "url": "http://www.justmoon.net"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/justmoon/node-extend/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "dependencies": {},
- "deprecated": false,
- "description": "Port of jQuery.extend for node.js and the browser",
- "devDependencies": {
- "@ljharb/eslint-config": "^11.0.0",
- "covert": "^1.1.0",
- "eslint": "^3.19.0",
- "jscs": "^3.0.7",
- "tape": "^4.6.3"
- },
- "homepage": "https://github.com/justmoon/node-extend#readme",
- "keywords": [
- "extend",
- "clone",
- "merge"
- ],
- "license": "MIT",
- "main": "index",
- "name": "extend",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/justmoon/node-extend.git"
- },
- "scripts": {
- "coverage": "covert test/index.js",
- "coverage-quiet": "covert test/index.js --quiet",
- "eslint": "eslint *.js */*.js",
- "jscs": "jscs *.js */*.js",
- "lint": "npm run jscs && npm run eslint",
- "posttest": "npm run coverage-quiet",
- "pretest": "npm run lint",
- "test": "npm run tests-only",
- "tests-only": "node test"
- },
- "version": "3.0.1"
-}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json
index ff492a2788..27c335d688 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json
@@ -1,26 +1,26 @@
{
- "_from": "socks-proxy-agent@^2.0.0",
- "_id": "socks-proxy-agent@2.1.0",
+ "_from": "socks-proxy-agent@^3.0.0",
+ "_id": "socks-proxy-agent@3.0.0",
"_inBundle": false,
- "_integrity": "sha1-3fsBtdvqX8h5SQyjiiX+h9PRWRI=",
+ "_integrity": "sha512-YJcT+SNNBgFoK/NpO20PChz0VnBOhkjG3X10BwlrYujd0NZlSsH1jbxSQ1S0njt3sOvzwQ2PvGqqUIvP4rNk/w==",
"_location": "/pacote/make-fetch-happen/socks-proxy-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "socks-proxy-agent@^2.0.0",
+ "raw": "socks-proxy-agent@^3.0.0",
"name": "socks-proxy-agent",
"escapedName": "socks-proxy-agent",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^3.0.0",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.0.tgz",
- "_shasum": "ddfb01b5dbea5fc879490ca38a25fe87d3d15912",
- "_spec": "socks-proxy-agent@^2.0.0",
+ "_resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.0.tgz",
+ "_shasum": "ea23085cd2bde94d084a62448f31139ca7ed6245",
+ "_spec": "socks-proxy-agent@^3.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
"name": "Nathan Rajlich",
@@ -32,14 +32,14 @@
},
"bundleDependencies": false,
"dependencies": {
- "agent-base": "2",
- "extend": "3",
- "socks": "~1.1.5"
+ "agent-base": "^4.0.1",
+ "socks": "^1.1.10"
},
"deprecated": false,
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
"devDependencies": {
- "mocha": "2",
+ "mocha": "^3.4.2",
+ "raw-body": "^2.2.0",
"socksv5": "0.0.6"
},
"homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
@@ -53,7 +53,7 @@
"agent"
],
"license": "MIT",
- "main": "socks-proxy-agent.js",
+ "main": "./index.js",
"name": "socks-proxy-agent",
"repository": {
"type": "git",
@@ -62,5 +62,5 @@
"scripts": {
"test": "mocha --reporter spec"
},
- "version": "2.1.0"
+ "version": "3.0.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js
index cc3375334e..968ef650fb 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js
@@ -9,6 +9,7 @@ var http = require('http');
var https = require('https');
var assert = require('assert');
var socks = require('socksv5');
+var getRawBody = require('raw-body');
var SocksProxyAgent = require('../');
describe('SocksProxyAgent', function () {
@@ -102,13 +103,9 @@ describe('SocksProxyAgent', function () {
opts.headers = { foo: 'bar' };
var req = http.get(opts, function (res) {
assert.equal(404, res.statusCode);
- var data = '';
- res.setEncoding('utf8');
- res.on('data', function (b) {
- data += b;
- });
- res.on('end', function () {
- data = JSON.parse(data);
+ getRawBody(res, 'utf8', function (err, buf) {
+ if (err) return done(err);
+ var data = JSON.parse(buf);
assert.equal('bar', data.foo);
done();
});
@@ -133,13 +130,9 @@ describe('SocksProxyAgent', function () {
opts.headers = { foo: 'bar' };
var req = https.get(opts, function (res) {
assert.equal(404, res.statusCode);
- var data = '';
- res.setEncoding('utf8');
- res.on('data', function (b) {
- data += b;
- });
- res.on('end', function () {
- data = JSON.parse(data);
+ getRawBody(res, 'utf8', function (err, buf) {
+ if (err) return done(err);
+ var data = JSON.parse(buf);
assert.equal('bar', data.foo);
done();
});