+
+
+# Request-Promise
+
+[](https://gitter.im/request/request-promise?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[](https://travis-ci.org/request/request-promise)
+[](https://coveralls.io/r/request/request-promise)
+[](https://david-dm.org/request/request-promise)
+[](https://snyk.io/test/npm/request-promise)
+
+# Deprecated!
+
+As of Feb 11th 2020, [`request`](https://github.com/request/request) is fully deprecated. No new changes are expected to land. In fact, none have landed for some time. This package is also deprecated because it depends on `request`.
+
+Fyi, here is the [reasoning of `request`'s deprecation](https://github.com/request/request/issues/3142) and a [list of alternative libraries](https://github.com/request/request/issues/3143).
+
+---
+
+The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
+
+[Request](https://github.com/request/request) and [Bluebird](https://github.com/petkaantonov/bluebird) are pretty awesome, but I found myself using the same design pattern. Request-Promise adds a Bluebird-powered `.then(...)` method to Request call objects. By default, http response codes other than 2xx will cause the promise to be rejected. This can be overwritten by setting `options.simple = false`.
+
+Also check out the new libraries that are **very similar to `request-promise` v4**:
+- [`request-promise-native`](https://github.com/request/request-promise-native) v1 – Does not depend on Bluebird and uses native ES6 promises instead.
+- [`request-promise-any`](https://github.com/request/request-promise-any) v1 – Allows you to register any Promise library supported by [`any-promise`](https://www.npmjs.com/package/any-promise).
+
+---
+
+## Migration from v3 to v4
+
+1. `request` became a peer dependency. Thus make sure that `request` is installed into your project as a direct dependency. (`npm install --save request`)
+2. Continuation Local Storage is no longer supported. However, you [can get back the support](https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage) by using `request-promise-any`.
+3. When you migrated your `transform` function to v3 and had to add `if (!(/^2/.test('' + response.statusCode))) { return resolveWithFullResponse ? response : body; }` you may now set the option `transform2xxOnly = true` instead.
+
+## Migration from v2 to v3
+
+1. The handling of the `transform` function got overhauled. This has two effects:
+ - `StatusCodeError.response` is the transformed instead of the original response now. This error is thrown for non-2xx responses when `options.simple` is `true` (default). Please update your `transform` functions to also cover the transformation of non-2xx responses. To get the old behavior you may add `if (!(/^2/.test('' + response.statusCode))) { return resolveWithFullResponse ? response : body; }` to the first line of your `transform` functions that are used for requests with `options.simple === true`. However, you may prefer updating your `transform` functions to being able to transform 2xx as well as non-2xx responses because this decouples their implementation from the use of the `simple` option when doing requests.
+ - If a transform operation throws an error, the request will be rejected with a `TransformError`. Its `cause` attribute contains the error thrown by the transform operation. Previously, the request was rejected directly with the error thrown by the transform operation. Wrapping it into a `TransformError` makes the error handling easier.
+
+2. Bluebird got updated from v2 to v3. This won't make a difference for most use cases. However, if you use advanced Promise chains starting with the Promise returned by Request-Promise, please check [Bluebird's new features and changes](http://bluebirdjs.com/docs/new-in-bluebird-3.html).
+
+---
+
+## Installation
+
+This module is installed via npm:
+
+```
+npm install --save request
+npm install --save request-promise
+```
+
+`request` is defined as a peer-dependency and thus has to be installed separately.
+
+## Cheat Sheet
+
+``` js
+var rp = require('request-promise');
+```
+
+Since `request-promise` wraps around `request` everything that works with `request` also works with `request-promise`. Also check out the [`request` docs](https://github.com/request/request) for more examples.
+
+### Crawl a webpage
+
+``` js
+rp('http://www.google.com')
+ .then(function (htmlString) {
+ // Process html...
+ })
+ .catch(function (err) {
+ // Crawling failed...
+ });
+```
+
+### Crawl a webpage better
+
+``` js
+var cheerio = require('cheerio'); // Basically jQuery for node.js
+
+var options = {
+ uri: 'http://www.google.com',
+ transform: function (body) {
+ return cheerio.load(body);
+ }
+};
+
+rp(options)
+ .then(function ($) {
+ // Process html like you would with jQuery...
+ })
+ .catch(function (err) {
+ // Crawling failed or Cheerio choked...
+ });
+```
+
+### GET something from a JSON REST API
+
+``` js
+var options = {
+ uri: 'https://api.github.com/user/repos',
+ qs: {
+ access_token: 'xxxxx xxxxx' // -> uri + '?access_token=xxxxx%20xxxxx'
+ },
+ headers: {
+ 'User-Agent': 'Request-Promise'
+ },
+ json: true // Automatically parses the JSON string in the response
+};
+
+rp(options)
+ .then(function (repos) {
+ console.log('User has %d repos', repos.length);
+ })
+ .catch(function (err) {
+ // API call failed...
+ });
+```
+
+### POST data to a JSON REST API
+
+Set `option.body` to your data and `json: true` to encode the body as JSON. See below for HTML forms.
+
+``` js
+var options = {
+ method: 'POST',
+ uri: 'http://api.posttestserver.com/post',
+ body: {
+ some: 'payload'
+ },
+ json: true // Automatically stringifies the body to JSON
+};
+
+rp(options)
+ .then(function (parsedBody) {
+ // POST succeeded...
+ })
+ .catch(function (err) {
+ // POST failed...
+ });
+```
+
+### POST like HTML forms do
+
+Pass your data to `options.form` to encode the body the same way as HTML forms do:
+
+``` js
+var options = {
+ method: 'POST',
+ uri: 'http://posttestserver.com/post.php',
+ form: {
+ // Like
+ name: 'Josh'
+ },
+ headers: {
+ /* 'content-type': 'application/x-www-form-urlencoded' */ // Is set automatically
+ }
+};
+
+rp(options)
+ .then(function (body) {
+ // POST succeeded...
+ })
+ .catch(function (err) {
+ // POST failed...
+ });
+```
+
+If you want to include a file upload then use `options.formData`:
+
+``` js
+var options = {
+ method: 'POST',
+ uri: 'http://posttestserver.com/post.php',
+ formData: {
+ // Like
+ name: 'Jenn',
+ // Like
+ file: {
+ value: fs.createReadStream('test/test.jpg'),
+ options: {
+ filename: 'test.jpg',
+ contentType: 'image/jpg'
+ }
+ }
+ },
+ headers: {
+ /* 'content-type': 'multipart/form-data' */ // Is set automatically
+ }
+};
+
+rp(options)
+ .then(function (body) {
+ // POST succeeded...
+ })
+ .catch(function (err) {
+ // POST failed...
+ });
+```
+
+### Include a cookie
+
+``` js
+var tough = require('tough-cookie');
+
+// Easy creation of the cookie - see tough-cookie docs for details
+let cookie = new tough.Cookie({
+ key: "some_key",
+ value: "some_value",
+ domain: 'api.mydomain.com',
+ httpOnly: true,
+ maxAge: 31536000
+});
+
+// Put cookie in an jar which can be used across multiple requests
+var cookiejar = rp.jar();
+cookiejar.setCookie(cookie, 'https://api.mydomain.com');
+// ...all requests to https://api.mydomain.com will include the cookie
+
+var options = {
+ uri: 'https://api.mydomain.com/...',
+ jar: cookiejar // Tells rp to include cookies in jar that match uri
+};
+
+rp(options)
+ .then(function (body) {
+ // Request succeeded...
+ })
+ .catch(function (err) {
+ // Request failed...
+ });
+```
+
+### Get the full response instead of just the body
+
+``` js
+var options = {
+ method: 'DELETE',
+ uri: 'http://my-server/path/to/resource/1234',
+ resolveWithFullResponse: true // <--- <--- <--- <---
+};
+
+rp(options)
+ .then(function (response) {
+ console.log("DELETE succeeded with status %d", response.statusCode);
+ })
+ .catch(function (err) {
+ // Delete failed...
+ });
+```
+
+### Get a rejection only if the request failed for technical reasons
+
+``` js
+var options = {
+ uri: 'http://www.google.com/this-page-does-not-exist.html',
+ simple: false // <--- <--- <--- <---
+};
+
+rp(options)
+ .then(function (body) {
+ // Request succeeded but might as well be a 404
+ // Usually combined with resolveWithFullResponse = true to check response.statusCode
+ })
+ .catch(function (err) {
+ // Request failed due to technical reasons...
+ });
+```
+
+---
+
+**For more options checkout the [Request docs](https://github.com/request/request#requestoptions-callback).**
+
+---
+
+## API in Detail
+
+Consider Request-Promise being:
+
+- A Request object
+ - With an [identical API](https://github.com/request/request): `require('request-promise') == require('request')` so to say
+ - However, **STREAMING THE RESPONSE** (e.g. `.pipe(...)`) is **DISCOURAGED** because Request-Promise would grow the memory footprint for large requests unnecessarily high. Use the original Request library for that. You can use both libraries in the same project.
+- Plus some methods on a request call object:
+ - `rp(...).then(...)` or e.g. `rp.post(...).then(...)` which turn `rp(...)` and `rp.post(...)` into promises
+ - `rp(...).catch(...)` or e.g. `rp.del(...).catch(...)` which is the same method as provided by Bluebird promises
+ - Errors that the `request` library would pass to the callback are wrapped by `request-promise` and then passed to the catch handler. See [code example](https://github.com/request/request-promise#thenonfulfilled-onrejected) below.
+ - `rp(...).finally(...)` or e.g. `rp.put(...).finally(...)` which is the same method as provided by Bluebird promises
+ - `rp(...).cancel()` or e.g. `rp.get(...).cancel()` which cancels the request
+ - `rp(...).promise()` or e.g. `rp.head(...).promise()` which returns the underlying promise so you can access the full [Bluebird API](https://github.com/petkaantonov/bluebird/blob/master/API.md)
+- Plus some additional options:
+ - `simple = true` which is a boolean to set whether status codes other than 2xx should also reject the promise
+ - `resolveWithFullResponse = false` which is a boolean to set whether the promise should be resolved with the full response or just the response body
+ - `transform` which takes a function to transform the response into a custom value with which the promise is resolved
+ - `transform2xxOnly = false` which is a boolean to set whether the transform function is applied to all responses or only to those with a 2xx status code
+
+The objects returned by request calls like `rp(...)` or e.g. `rp.post(...)` are regular Promises/A+ compliant promises and can be assimilated by any compatible promise library.
+
+The methods `.then(...)`, `.catch(...)`, and `.finally(...)` - which you can call on the request call objects - return a full-fledged Bluebird promise. That means you have the full [Bluebird API](https://github.com/petkaantonov/bluebird/blob/master/API.md) available for further chaining. E.g.: `rp(...).then(...).spread(...)` If, however, you need a method other than `.then(...)`, `.catch(...)`, or `.finally(...)` to be **FIRST** in the chain, use `.promise()`: `rp(...).promise().bind(...).then(...)`
+
+### .then(onFulfilled, onRejected)
+
+``` js
+// As a Request user you would write:
+var request = require('request');
+
+request('http://google.com', function (err, response, body) {
+ if (err) {
+ handleError({ error: err, response: response, ... });
+ } else if (!(/^2/.test('' + response.statusCode))) { // Status Codes other than 2xx
+ handleError({ error: body, response: response, ... });
+ } else {
+ process(body);
+ }
+});
+
+// As a Request-Promise user you can now write the equivalent code:
+var rp = require('request-promise');
+
+rp('http://google.com')
+ .then(process, handleError);
+```
+
+``` js
+// The same is available for all http method shortcuts:
+request.post('http://example.com/api', function (err, response, body) { ... });
+rp.post('http://example.com/api').then(...);
+```
+
+### .catch(onRejected)
+
+``` js
+rp('http://google.com')
+ .catch(handleError);
+
+// ... is syntactical sugar for:
+
+rp('http://google.com')
+ .then(null, handleError);
+
+
+// However, this:
+rp('http://google.com')
+ .then(process)
+ .catch(handleError);
+
+// ... is safer than:
+rp('http://google.com')
+ .then(process, handleError);
+```
+
+For more info on `.then(process).catch(handleError)` versus `.then(process, handleError)`, see Bluebird docs on [promise anti-patterns](http://bluebirdjs.com/docs/anti-patterns.html#the-.then).
+
+### .finally(onFinished)
+
+``` js
+rp('http://google.com')
+ .finally(function () {
+ // This is called after the request finishes either successful or not successful.
+ });
+```
+
+### .cancel()
+
+This method cancels the request using [Bluebird's cancellation feature](http://bluebirdjs.com/docs/api/cancellation.html).
+
+When `.cancel()` is called:
+
+- the promise will neither be resolved nor rejected and
+- the request is [aborted](https://nodejs.org/dist/latest-v6.x/docs/api/http.html#http_request_abort).
+
+### .promise() - For advanced use cases
+
+In order to not pollute the Request call objects with the methods of the underlying Bluebird promise, only `.then(...)`, `.catch(...)`, and `.finally(...)` were exposed to cover most use cases. The effect is that any methods of a Bluebird promise other than `.then(...)`, `.catch(...)`, or `.finally(...)` cannot be used as the **FIRST** method in the promise chain:
+
+``` js
+// This works:
+rp('http://google.com').then(function () { ... });
+rp('http://google.com').catch(function () { ... });
+
+// This works as well since additional methods are only used AFTER the FIRST call in the chain:
+rp('http://google.com').then(function () { ... }).spread(function () { ... });
+rp('http://google.com').catch(function () { ... }).error(function () { ... });
+
+// Using additional methods as the FIRST call in the chain does not work:
+// rp('http://google.com').bind(this).then(function () { ... });
+
+// Use .promise() in these cases:
+rp('http://google.com').promise().bind(this).then(function () { ... });
+```
+
+### Fulfilled promises and the `resolveWithFullResponse` option
+
+``` js
+// Per default the body is passed to the fulfillment handler:
+rp('http://google.com')
+ .then(function (body) {
+ // Process the html of the Google web page...
+ });
+
+// The resolveWithFullResponse options allows to pass the full response:
+rp({ uri: 'http://google.com', resolveWithFullResponse: true })
+ .then(function (response) {
+ // Access response.statusCode, response.body etc.
+ });
+
+```
+
+### Rejected promises and the `simple` option
+
+``` js
+// The rejection handler is called with a reason object...
+rp('http://google.com')
+ .catch(function (reason) {
+ // Handle failed request...
+ });
+
+// ... and would be equivalent to this Request-only implementation:
+var options = { uri: 'http://google.com' };
+
+request(options, function (err, response, body) {
+ var reason;
+ if (err) {
+ reason = {
+ cause: err,
+ error: err,
+ options: options,
+ response: response
+ };
+ } else if (!(/^2/.test('' + response.statusCode))) { // Status Codes other than 2xx
+ reason = {
+ statusCode: response.statusCode,
+ error: body,
+ options: options,
+ response: response
+ };
+ }
+
+ if (reason) {
+ // Handle failed request...
+ }
+});
+
+
+// If you pass the simple option as false...
+rp({ uri: 'http://google.com', simple: false })
+ .catch(function (reason) {
+ // Handle failed request...
+ });
+
+// ... the equivalent Request-only code would be:
+request(options, function (err, response, body) {
+ if (err) {
+ var reason = {
+ cause: err,
+ error: err,
+ options: options,
+ response: response
+ };
+ // Handle failed request...
+ }
+});
+// E.g. a 404 would now fulfill the promise.
+// Combine it with resolveWithFullResponse = true to check the status code in the fulfillment handler.
+```
+
+With version 0.4 the reason objects became Error objects with identical properties to ensure backwards compatibility. These new Error types allow targeted catch blocks:
+
+``` js
+var errors = require('request-promise/errors');
+
+rp('http://google.com')
+ .catch(errors.StatusCodeError, function (reason) {
+ // The server responded with a status codes other than 2xx.
+ // Check reason.statusCode
+ })
+ .catch(errors.RequestError, function (reason) {
+ // The request failed due to technical reasons.
+ // reason.cause is the Error object Request would pass into a callback.
+ });
+```
+
+### The `transform` function
+
+You can pass a function to `options.transform` to generate a custom fulfillment value when the promise gets resolved.
+
+``` js
+// Just for fun you could reverse the response body:
+var options = {
+ uri: 'http://google.com',
+ transform: function (body, response, resolveWithFullResponse) {
+ return body.split('').reverse().join('');
+ }
+};
+
+rp(options)
+ .then(function (reversedBody) {
+ // ;D
+ });
+
+
+// However, you could also do something useful:
+var $ = require('cheerio'); // Basically jQuery for node.js
+
+function autoParse(body, response, resolveWithFullResponse) {
+ // FIXME: The content type string could contain additional values like the charset.
+ // Consider using the `content-type` library for a robust comparison.
+ if (response.headers['content-type'] === 'application/json') {
+ return JSON.parse(body);
+ } else if (response.headers['content-type'] === 'text/html') {
+ return $.load(body);
+ } else {
+ return body;
+ }
+}
+
+options.transform = autoParse;
+
+rp(options)
+ .then(function (autoParsedBody) {
+ // :)
+ });
+
+
+// You can go one step further and set the transform as the default:
+var rpap = rp.defaults({ transform: autoParse });
+
+rpap('http://google.com')
+ .then(function (autoParsedBody) {
+ // :)
+ });
+
+rpap('http://echojs.com')
+ .then(function (autoParsedBody) {
+ // =)
+ });
+```
+
+The third `resolveWithFullResponse` parameter of the transform function is equivalent to the option passed with the request. This allows to distinguish whether just the transformed body or the whole response shall be returned by the transform function:
+
+``` js
+function reverseBody(body, response, resolveWithFullResponse) {
+ response.body = response.body.split('').reverse().join('');
+ return resolveWithFullResponse ? response : response.body;
+}
+```
+
+As of Request-Promise v3 the transform function is ALWAYS executed for non-2xx responses. When `options.simple` is set to `true` (default) then non-2xx responses are rejected with a `StatusCodeError`. In this case the error contains the transformed response:
+
+``` js
+var options = {
+ uri: 'http://the-server.com/will-return/404',
+ simple: true,
+ transform: function (body, response, resolveWithFullResponse) { /* ... */ }
+};
+
+rp(options)
+ .catch(errors.StatusCodeError, function (reason) {
+ // reason.response is the transformed response
+ });
+```
+
+You may set `options.transform2xxOnly = true` to only execute the transform function for responses with a 2xx status code. For other status codes – independent of any other settings, e.g. `options.simple` – the transform function is not executed.
+
+#### Error handling
+
+If the transform operation fails (throws an error) the request will be rejected with a `TransformError`:
+
+``` js
+var errors = require('request-promise/errors');
+
+var options = {
+ uri: 'http://google.com',
+ transform: function (body, response, resolveWithFullResponse) {
+ throw new Error('Transform failed!');
+ }
+};
+
+rp(options)
+ .catch(errors.TransformError, function (reason) {
+ console.log(reason.cause.message); // => Transform failed!
+ // reason.response is the original response for which the transform operation failed
+ });
+```
+
+## Experimental Support for Continuation Local Storage
+
+Continuation Local Storage is no longer supported. However, you [can get back the support](https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage) by using `request-promise-any`.
+
+## Debugging
+
+The ways to debug the operation of Request-Promise are the same [as described](https://github.com/request/request#debugging) for Request. These are:
+
+1. Launch the node process like `NODE_DEBUG=request node script.js` (`lib,request,otherlib` works too).
+2. Set `require('request-promise').debug = true` at any time (this does the same thing as #1).
+3. Use the [request-debug module](https://github.com/nylen/request-debug) to view request and response headers and bodies. Instrument Request-Promise with `require('request-debug')(rp);`.
+
+## Mocking Request-Promise
+
+Usually you want to mock the whole request function which is returned by `require('request-promise')`. This is not possible by using a mocking library like [sinon.js](http://sinonjs.org) alone. What you need is a library that ties into the module loader and makes sure that your mock is returned whenever the tested code is calling `require('request-promise')`. [Mockery](https://github.com/mfncooper/mockery) is one of such libraries.
+
+@florianschmidt1994 kindly shared his solution:
+```javascript
+before(function (done) {
+
+ var filename = "fileForResponse";
+ mockery.enable({
+ warnOnReplace: false,
+ warnOnUnregistered: false,
+ useCleanCache: true
+ });
+
+ mockery.registerMock('request-promise', function () {
+ var response = fs.readFileSync(__dirname + '/data/' + filename, 'utf8');
+ return Bluebird.resolve(response.trim());
+ });
+
+ done();
+});
+
+after(function (done) {
+ mockery.disable();
+ mockery.deregisterAll();
+ done();
+});
+
+describe('custom test case', function () {
+ // Test some function/module/... which uses request-promise
+ // and it will always receive the predefined "fileForResponse" as data, e.g.:
+ var rp = require('request-promise');
+ rp(...).then(function(data) {
+ // ➞ data is what is in fileForResponse
+ });
+});
+```
+
+Based on that you may now build a more sophisticated mock. [Sinon.js](http://sinonjs.org) may be of help as well.
+
+## Contributing
+
+To set up your development environment:
+
+1. clone the repo to your desktop,
+2. in the shell `cd` to the main folder,
+3. hit `npm install`,
+4. hit `npm install gulp -g` if you haven't installed gulp globally yet, and
+5. run `gulp dev`. (Or run `node ./node_modules/.bin/gulp dev` if you don't want to install gulp globally.)
+
+`gulp dev` watches all source files and if you save some changes it will lint the code and execute all tests. The test coverage report can be viewed from `./coverage/lcov-report/index.html`.
+
+If you want to debug a test you should use `gulp test-without-coverage` to run all tests without obscuring the code by the test coverage instrumentation.
+
+## Change History
+
+- v4.2.5 (2019-11-03)
+ - Security fix: bumped `request-promise-core` which bumps `lodash` to `^4.17.15`. See [vulnerabilty reports](https://snyk.io/vuln/search?q=lodash&type=npm).
+ *(Thanks to @rishabh-chowdhary for reporting this in pull request [#326](https://github.com/request/request-promise/pull/326).)*
+- v4.2.4 (2019-02-14)
+ - Corrected mistakenly set `tough-cookie` version, now `^2.3.3`
+ *(Thanks to @evocateur for pointing this out.)*
+ - If you installed `request-promise@4.2.3` please make sure after the upgrade that `request` and `request-promise` use the same physical copy of `tough-cookie`.
+- v4.2.3 (2019-02-14)
+ - Using stricter `tough-cookie@~2.3.3` to avoid installing `tough-cookie@3` which introduces breaking changes
+ *(Thanks to @aomdoa for pull request [#299](https://github.com/request/request-promise/pull/299))*
+ - Security fix: bumped `lodash` to `^4.17.11`, see [vulnerabilty reports](https://snyk.io/vuln/search?q=lodash&type=npm)
+- v4.2.2 (2017-09-22)
+ - Upgraded `tough-cookie` to a version without regex DoS vulnerability
+ *(Thanks to @rouanw for [pull request #226](https://github.com/request/request-promise/pull/226))*
+- v4.2.1 (2017-05-07)
+ - Fix that allows to use `tough-cookie` for cookie creation
+ *(Thanks to @ScottyMJacobson for reporting [issue #183](https://github.com/request/request-promise/issues/183))*
+ - Added [cookie handling example](https://github.com/request/request-promise#include-a-cookie) to the cheat sheet
+ *(Thanks to @chovy and @ProfessorTom for [asking for it](https://github.com/request/request-promise/issues/79))*
+- v4.2.0 (2017-03-16)
+ - Updated `bluebird` to v3.5
+ *(Thanks to @acinader for [pull request #181](https://github.com/request/request-promise/pull/181))*
+- v4.1.1 (2016-08-08)
+ - Renamed internally used package `@request/promise-core` to `request-promise-core` because there where [too](https://github.com/request/request-promise/issues/137) [many](https://github.com/request/request-promise/issues/141) issues with the scoped package name
+ *(Thanks to @cabrinoob, @crazy4groovy, @dsandor, @KpjComp, @lorenwest, @Reisyukaku, @tehChromic, @todd for providing helpful information.)*
+- v4.1.0 (2016-07-30)
+ - Added cancellation support
+ *(Thanks to @not-an-aardvark for [pull request #123](https://github.com/request/request-promise/pull/123))*
+- v4.0.2 (2016-07-18)
+ - Fix for using with module bundlers like Webpack and Browserify
+- v4.0.1 (2016-07-17)
+ - Fixed `@request/promise-core` version for safer versioning
+- v4.0.0 (2016-07-15)
+ - **Breaking Change**: `request` is declared as a peer dependency which has to be installed separately by the user now
+ - **Breaking Change**: Dropped support for Continuation Local Storage since [`request-promise-any`](https://github.com/request/request-promise-any) can be [used](https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage) for that now
+ - Introduced the `transform2xxOnly` option to ease the breaking change regarding the new `transform` handling in v3.0.0
+ *(Thanks to @stevage for pointing out the effect of the breaking change in [issue #131](https://github.com/request/request-promise/issues/131))*
+ - Resolved issues [#65](https://github.com/request/request-promise/issues/65) and [#71](https://github.com/request/request-promise/issues/71) by publishing nearly identical libraries to support other Promise implementations: [`request-promise-native`](https://github.com/request/request-promise-native) and [`request-promise-any`](https://github.com/request/request-promise-any)
+ *(Thanks to @benjamingr, @eilgin, @gillesdemey, @hildjj, @iggycoloma, @jonathanong, @knpwrs, @MarkHerhold, @massimocode, @mikeal, @niftylettuce, @raitucarp, @sherdeadlock, @tonylukasavage, and @vgoloviznin for the valuable discussions!)*
+ - Relicensed this library with the ISC license
+- v3.0.0 (2016-04-16)
+ - **Breaking Change**: Overhauled the handling of the `transform` function
+ *(Thanks to @Limess for explaining the need in [issue #86](https://github.com/request/request-promise/issues/86))*
+ - **Breaking Change**: Updated `bluebird` to v3
+ *(Thanks to @BrandonSmith for [pull request #103](https://github.com/request/request-promise/pull/103))*
+ - Improved `StatusCodeError.message`
+ - Updated `lodash` to v4.6
+ - Improved README in regard to `.catch(...)` best practice
+ *(Thanks to @RebootJeff for [pull request #98](https://github.com/request/request-promise/pull/98))*
+- v2.0.1 (2016-02-17)
+ - Updated `lodash` to v4
+ *(Thanks to @ratson for [pull request #94](https://github.com/request/request-promise/pull/94))*
+- v2.0.0 (2016-01-12)
+ - **Breaking Change**: Removed explicit `cls-bluebird` dependency which has to be installed by the user now
+ *(Thanks to @hildjj for his [pull request #75](https://github.com/request/request-promise/pull/75))*
+ - `npm shrinkwrap` now works for `npm@3` users who don't use `continuation-local-storage`
+ *(Thanks to @toboid and @rstacruz for reporting the issue in [issue #70](https://github.com/request/request-promise/issues/70) and [issue #82](https://github.com/request/request-promise/issues/82))*
+- v1.0.2 (2015-10-22)
+ - Removed `continuation-local-storage` from peer dependencies as it was unnecessary
+ *(Thanks to @mrhyde for working on a better solution discussed in [issue #70](https://github.com/request/request-promise/issues/70))*
+- v1.0.1 (2015-10-14)
+ - Fixed a npm warning by marking `continuation-local-storage` as a peer dependency
+- v1.0.0 (2015-10-11)
+ - **Breaking Change**: Some errors that were previously thrown synchronously - e.g. for wrong input parameters - are now passed to the rejected promise instead
+ *(Thanks to @josnidhin for suggesting that in [issue #43](https://github.com/request/request-promise/issues/43))*
+ - **Breaking Change**: Request-Promise does not load its own Bluebird prototype anymore. If you use Bluebird in your project and altered the prototype then Request-Promise may use your altered Bluebird prototype internally.
+ - For HEAD requests the headers instead of an empty body is returned (unless `resolveWithFullResponse = true` is used)
+ *(Thanks to @zcei for proposing the change in [issue #58](https://github.com/request/request-promise/issues/58))*
+ - Extended `transform` function by a third `resolveWithFullResponse` parameter
+ - Added experimental support for continuation local storage
+ *(Thanks to @silverbp preparing this in [issue #64](https://github.com/request/request-promise/issues/64))*
+ - Added node.js 4 to the Travis CI build
+ - Updated the README
+ *(Thanks to many people for their feedback in issues [#55](https://github.com/request/request-promise/issues/55) and [#59](https://github.com/request/request-promise/issues/59))*
+- v0.4.3 (2015-07-27)
+ - Reduced overhead by just requiring used lodash functions instead of the whole lodash library
+ *(Thanks to @luanmuniz for [pull request #54](https://github.com/request/request-promise/pull/54))*
+ - Updated dependencies
+- v0.4.2 (2015-04-12)
+ - Updated dependencies
+- v0.4.1 (2015-03-20)
+ - Improved Error types to work in browsers without v8 engine
+ *(Thanks to @nodiis for [pull request #40](https://github.com/request/request-promise/pull/40))*
+- v0.4.0 (2015-02-08)
+ - Introduced Error types used for the reject reasons (See last part [this section](#rejected-promises-and-the-simple-option))
+ *(Thanks to @jakecraige for starting the discussion in [issue #38](https://github.com/request/request-promise/issues/38))*
+ - **Minor Breaking Change:** The reject reason objects became actual Error objects. However, `typeof reason === 'object'` still holds true and the error objects have the same properties as the previous reason objects. If the reject handler only accesses the properties on the reason object - which is usually the case - no migration is required.
+ - Added io.js and node.js 0.12 to the Travis CI build
+- v0.3.3 (2015-01-19)
+ - Fixed handling possibly unhandled rejections to work with the latest version of Bluebird
+ *(Thanks to @slang800 for reporting this in [issue #36](https://github.com/request/request-promise/issues/36))*
+- v0.3.2 (2014-11-17)
+ - Exposed `.finally(...)` to allow using it as the first method in the promise chain
+ *(Thanks to @hjpbarcelos for his [pull request #28](https://github.com/request/request-promise/pull/28))*
+- v0.3.1 (2014-11-11)
+ - Added the `.promise()` method for advanced Bluebird API usage
+ *(Thanks to @devo-tox for his feedback in [issue #27](https://github.com/request/request-promise/issues/27))*
+- v0.3.0 (2014-11-10)
+ - Carefully rewritten from scratch to make Request-Promise a drop-in replacement for Request
+
+## License (ISC)
+
+In case you never heard about the [ISC license](http://en.wikipedia.org/wiki/ISC_license) it is functionally equivalent to the MIT license.
+
+See the [LICENSE file](LICENSE) for details.
diff --git a/node_modules/@cypress/request-promise/errors.js b/node_modules/@cypress/request-promise/errors.js
new file mode 100644
index 0000000..e1021bc
--- /dev/null
+++ b/node_modules/@cypress/request-promise/errors.js
@@ -0,0 +1,3 @@
+'use strict';
+
+module.exports = require('request-promise-core/errors');
diff --git a/node_modules/@cypress/request-promise/lib/rp.js b/node_modules/@cypress/request-promise/lib/rp.js
new file mode 100644
index 0000000..a2f6805
--- /dev/null
+++ b/node_modules/@cypress/request-promise/lib/rp.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var Bluebird = require('bluebird').getNewLibraryCopy(),
+ configure = require('request-promise-core/configure/request2'),
+ stealthyRequire = require('stealthy-require');
+
+try {
+
+ // Load Request freshly - so that users can require an unaltered request instance!
+ var request = stealthyRequire(require.cache, function () {
+ return require('@cypress/request');
+ },
+ function () {
+ require('tough-cookie');
+ }, module);
+
+} catch (err) {
+ /* istanbul ignore next */
+ var EOL = require('os').EOL;
+ /* istanbul ignore next */
+ console.error(EOL + '###' + EOL + '### The "request" library is not installed automatically anymore.' + EOL + '### But is a dependency of "request-promise".' + EOL + '### Please install it with:' + EOL + '### npm install request --save' + EOL + '###' + EOL);
+ /* istanbul ignore next */
+ throw err;
+}
+
+Bluebird.config({cancellation: true});
+
+configure({
+ request: request,
+ PromiseImpl: Bluebird,
+ expose: [
+ 'then',
+ 'catch',
+ 'finally',
+ 'cancel',
+ 'promise'
+ // Would you like to expose more Bluebird methods? Try e.g. `rp(...).promise().tap(...)` first. `.promise()` returns the full-fledged Bluebird promise.
+ ],
+ constructorMixin: function (resolve, reject, onCancel) {
+ var self = this;
+ onCancel(function () {
+ self.abort();
+ });
+ }
+});
+
+request.bindCLS = function RP$bindCLS() {
+ throw new Error('CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage');
+};
+
+
+module.exports = request;
diff --git a/node_modules/@cypress/request-promise/node_modules/tough-cookie/LICENSE b/node_modules/@cypress/request-promise/node_modules/tough-cookie/LICENSE
new file mode 100644
index 0000000..22204e8
--- /dev/null
+++ b/node_modules/@cypress/request-promise/node_modules/tough-cookie/LICENSE
@@ -0,0 +1,12 @@
+Copyright (c) 2015, Salesforce.com, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@cypress/request-promise/node_modules/tough-cookie/README.md b/node_modules/@cypress/request-promise/node_modules/tough-cookie/README.md
new file mode 100644
index 0000000..fb11f3c
--- /dev/null
+++ b/node_modules/@cypress/request-promise/node_modules/tough-cookie/README.md
@@ -0,0 +1,596 @@
+# tough-cookie
+
+[RFC 6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
+
+[](https://nodei.co/npm/tough-cookie/)
+
+[](https://travis-ci.org/salesforce/tough-cookie)
+
+## Synopsis
+
+```javascript
+var tough = require("tough-cookie");
+var Cookie = tough.Cookie;
+var cookie = Cookie.parse(header);
+cookie.value = "somethingdifferent";
+header = cookie.toString();
+var cookiejar = new tough.CookieJar();
+
+// Asynchronous!
+var cookie = await cookiejar.setCookie(
+ cookie,
+ "https://currentdomain.example.com/path"
+);
+var cookies = await cookiejar.getCookies("https://example.com/otherpath");
+
+// Or with callbacks!
+cookiejar.setCookie(
+ cookie,
+ "https://currentdomain.example.com/path",
+ function (err, cookie) {
+ /* ... */
+ }
+);
+cookiejar.getCookies("http://example.com/otherpath", function (err, cookies) {
+ /* ... */
+});
+```
+
+Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
+
+## Installation
+
+It's _so_ easy! Install with `npm` or your preferred package manager.
+
+```sh
+npm install tough-cookie
+```
+
+## Node.js Version Support
+
+We follow the [node.js release schedule](https://github.com/nodejs/Release#release-schedule) and support all versions that are in Active LTS or Maintenance. We will always do a major release when dropping support for older versions of node, and we will do so in consultation with our community.
+
+## API
+
+### tough
+
+The top-level exports from `require('tough-cookie')` can all be used as pure functions and don't need to be bound.
+
+#### `parseDate(string)`
+
+Parse a cookie date string into a `Date`. Parses according to [RFC 6265 Section 5.1.1](https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1), not `Date.parse()`.
+
+#### `formatDate(date)`
+
+Format a `Date` into an [RFC 822](https://datatracker.ietf.org/doc/html/rfc822#section-5) string (the RFC 6265 recommended format).
+
+#### `canonicalDomain(str)`
+
+Transforms a domain name into a canonical domain name. The canonical domain name is a domain name that has been trimmed, lowercased, stripped of leading dot, and optionally punycode-encoded ([Section 5.1.2 of RFC 6265](https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.2)). For the most part, this function is idempotent (calling the function with the output from a previous call returns the same output).
+
+#### `domainMatch(str, domStr[, canonicalize=true])`
+
+Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain name and the `domStr` is the "cookie" domain name. Matches according to [RFC 6265 Section 5.1.3](https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3), but it helps to think of it as a "suffix match".
+
+The `canonicalize` parameter toggles whether the domain parameters get normalized with `canonicalDomain` or not.
+
+#### `defaultPath(path)`
+
+Given a current request/response path, gives the path appropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by [Section 5.1.4 of the RFC](https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4).
+
+The `path` parameter MUST be _only_ the pathname part of a URI (excluding the hostname, query, fragment, and so on). This is the `.pathname` property of node's `uri.parse()` output.
+
+#### `pathMatch(reqPath, cookiePath)`
+
+Answers "does the request-path path-match a given cookie-path?" as per [RFC 6265 Section 5.1.4](https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4). Returns a boolean.
+
+This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
+
+#### `parse(cookieString[, options])`
+
+Alias for [`Cookie.parse(cookieString[, options])`](#cookieparsecookiestring-options).
+
+#### `fromJSON(string)`
+
+Alias for [`Cookie.fromJSON(string)`](#cookiefromjsonstrorobj).
+
+#### `getPublicSuffix(hostname)`
+
+Returns the public suffix of this hostname. The public suffix is the shortest domain name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.
+
+For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
+
+For further information, see the [Public Suffix List](http://publicsuffix.org/). This module derives its list from that site. This call is a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [`get` method](https://www.npmjs.com/package/psl##pslgetdomain).
+
+#### `cookieCompare(a, b)`
+
+For use with `.sort()`, sorts a list of cookies into the recommended order given in step 2 of ([RFC 6265 Section 5.4](https://datatracker.ietf.org/doc/html/rfc6265#section-5.4)). The sort algorithm is, in order of precedence:
+
+- Longest `.path`
+- oldest `.creation` (which has a 1-ms precision, same as `Date`)
+- lowest `.creationIndex` (to get beyond the 1-ms precision)
+
+```javascript
+var cookies = [
+ /* unsorted array of Cookie objects */
+];
+cookies = cookies.sort(cookieCompare);
+```
+
+> **Note**: Since the JavaScript `Date` is limited to a 1-ms precision, cookies within the same millisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`, which preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore` since `Set-Cookie` headers are parsed in order, but is not so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ so that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`.
+
+#### `permuteDomain(domain)`
+
+Generates a list of all possible domains that `domainMatch()` the parameter. Can be handy for implementing cookie stores.
+
+#### `permutePath(path)`
+
+Generates a list of all possible paths that `pathMatch()` the parameter. Can be handy for implementing cookie stores.
+
+### Cookie
+
+Exported via `tough.Cookie`.
+
+#### `Cookie.parse(cookieString[, options])`
+
+Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed.
+
+The options parameter is not required and currently has only one property:
+
+- _loose_ - boolean - if `true` enable parsing of keyless cookies like `=abc` and `=`, which are not RFC-compliant.
+
+If options is not an object it is ignored, which means it can be used with [`Array#map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+
+To process the Set-Cookie header(s) on a node HTTP/HTTPS response:
+
+```javascript
+if (Array.isArray(res.headers["set-cookie"]))
+ cookies = res.headers["set-cookie"].map(Cookie.parse);
+else cookies = [Cookie.parse(res.headers["set-cookie"])];
+```
+
+_Note:_ In version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation was removed in version 2.3.4.
+For more details, see [issue #92](https://github.com/salesforce/tough-cookie/issues/92).
+
+#### Properties
+
+Cookie object properties:
+
+- _key_ - string - the name or key of the cookie (default `""`)
+- _value_ - string - the value of the cookie (default `""`)
+- _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()`
+- _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. Can also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`
+- _domain_ - string - the `Domain=` attribute of the cookie
+- _path_ - string - the `Path=` of the cookie
+- _secure_ - boolean - the `Secure` cookie flag
+- _httpOnly_ - boolean - the `HttpOnly` cookie flag
+- _sameSite_ - string - the `SameSite` cookie attribute (from [RFC 6265bis](#rfc-6265bis)); must be one of `none`, `lax`, or `strict`
+- _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
+- _creation_ - `Date` - when this cookie was constructed
+- _creationIndex_ - number - set at construction, used to provide greater sort precision (see `cookieCompare(a,b)` for a full explanation)
+
+After a cookie has been passed through `CookieJar.setCookie()` it has the following additional attributes:
+
+- _hostOnly_ - boolean - is this a host-only cookie (that is, no Domain field was set, but was instead implied).
+- _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.
+- _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar.
+- _lastAccessed_ - `Date` - last time the cookie got accessed. Affects cookie cleaning after it is implemented. Using `cookiejar.getCookies(...)` updates this attribute.
+
+#### `new Cookie([properties])`
+
+Receives an options object that can contain any of the above Cookie properties. Uses the default for unspecified properties.
+
+#### `.toString()`
+
+Encodes to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
+
+#### `.cookieString()`
+
+Encodes to a Cookie header value (specifically, the `.key` and `.value` properties joined with `"="`).
+
+#### `.setExpires(string)`
+
+Sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (that is, can't parse this date string), `.expires` is set to `"Infinity"` (a string).
+
+#### `.setMaxAge(number)`
+
+Sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it correctly serializes to JSON.
+
+#### `.expiryDate([now=Date.now()])`
+
+`expiryTime()` computes the absolute unix-epoch milliseconds that this cookie expires. `expiryDate()` works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.
+
+Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute.
+
+If Expires (`.expires`) is set, that's returned.
+
+Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).
+
+#### `.TTL([now=Date.now()])`
+
+Computes the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.
+
+`Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
+
+#### `.canonicalizedDomain()`
+
+#### `.cdomain()`
+
+Returns the canonicalized `.domain` field. This is lower-cased and punycode ([RFC 3490](https://datatracker.ietf.org/doc/html/rfc3490)) encoded if the domain has any non-ASCII characters.
+
+#### `.toJSON()`
+
+For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized.
+
+Any `Date` properties (such as `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`).
+
+> **NOTE**: Custom `Cookie` properties are discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
+
+#### `Cookie.fromJSON(strOrObj)`
+
+Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first.
+
+Any `Date` properties (such as `.expires`, `.creation`, and `.lastAccessed`) are parsed via [`Date.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse), not tough-cookie's `parseDate`, since ISO timestamps are being handled at this layer.
+
+Returns `null` upon a JSON parsing error.
+
+#### `.clone()`
+
+Does a deep clone of this cookie, implemented exactly as `Cookie.fromJSON(cookie.toJSON())`.
+
+#### `.validate()`
+
+Status: _IN PROGRESS_. Works for a few things, but is by no means comprehensive.
+
+Validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string. Future-proof with this construct:
+
+```javascript
+if (cookie.validate() === true) {
+ // it's tasty
+} else {
+ // yuck!
+}
+```
+
+### CookieJar
+
+Exported via `tough.CookieJar`.
+
+#### `CookieJar([store][, options])`
+
+Simply use `new CookieJar()`. If a custom store is not passed to the constructor, a [`MemoryCookieStore`](#memorycookiestore) is created and used.
+
+The `options` object can be omitted and can have the following properties:
+
+- _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk"
+- _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.
+- _prefixSecurity_ - string - default `silent` - set to `'unsafe-disabled'`, `'silent'`, or `'strict'`. See [Cookie Prefixes](#cookie-prefixes) below.
+- _allowSpecialUseDomain_ - boolean - default `true` - accepts special-use domain suffixes, such as `local`. Useful for testing purposes.
+ This is not in the standard, but is used sometimes on the web and is accepted by most browsers.
+
+#### `.setCookie(cookieOrString, currentUrl[, options][, callback(err, cookie)])`
+
+Attempt to set the cookie in the cookie jar. The cookie has updated `.creation`, `.lastAccessed` and `.hostOnly` properties. And returns a promise if a callback is not provided.
+
+The `options` object can be omitted and can have the following properties:
+
+- _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects `HttpOnly` cookies.
+- _secure_ - boolean - autodetect from URL - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` this defaults to `true`, otherwise `false`.
+- _now_ - Date - default `new Date()` - what to use for the creation or access time of cookies.
+- _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option.
+- _sameSiteContext_ - string - default unset - set to `'none'`, `'lax'`, or `'strict'` See [SameSite Cookies](#samesite-cookies) below.
+
+As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).
+
+#### `.setCookieSync(cookieOrString, currentUrl[, options])`
+
+Synchronous version of [`setCookie`](#setcookiecookieorstring-currenturl-options-callbackerr-cookie); only works with synchronous stores (that is, the default `MemoryCookieStore`).
+
+#### `.getCookies(currentUrl[, options][, callback(err, cookies)])`
+
+Retrieve the list of cookies that can be sent in a Cookie header for the current URL. Returns a promise if a callback is not provided.
+
+Returns an array of `Cookie` objects, sorted by default using [`cookieCompare`](#cookiecomparea-b).
+
+If an error is encountered it's passed as `err` to the callback, otherwise an array of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.
+
+The `options` object can be omitted and can have the following properties:
+
+- _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects `HttpOnly` cookies.
+- _secure_ - boolean - autodetect from URL - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
+- _now_ - Date - default `new Date()` - what to use for the creation or access time of cookies
+- _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` returns expired cookies and does **not** remove them from the store (which is potentially useful for replaying Set-Cookie headers).
+- _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it).
+- _sameSiteContext_ - string - default unset - Set this to `'none'`, `'lax'`, or `'strict'` to enforce SameSite cookies upon retrieval. See [SameSite Cookies](#samesite-cookies) below.
+- _sort_ - boolean - whether to sort the list of cookies.
+
+The `.lastAccessed` property of the returned cookies will have been updated.
+
+#### `.getCookiesSync(currentUrl, [{options}])`
+
+Synchronous version of [`getCookies`](#getcookiescurrenturl-options-callbackerr-cookies); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+#### `.getCookieString(...)`
+
+Accepts the same options as [`.getCookies()`](#getcookiescurrenturl-options-callbackerr-cookies) but returns a string suitable for a Cookie header rather than an Array.
+
+#### `.getCookieStringSync(...)`
+
+Synchronous version of [`getCookieString`](#getcookiestring); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+#### `.getSetCookieStrings(...)`
+
+Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as [`.getCookies()`](#getcookiescurrenturl-options-callbackerr-cookies). Simply maps the cookie array via `.toString()`.
+
+#### `.getSetCookieStringsSync(...)`
+
+Synchronous version of [`getSetCookieStrings`](#getsetcookiestrings); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+#### `.serialize([callback(err, serializedObject)])`
+
+Returns a promise if a callback is not provided.
+
+Serialize the Jar if the underlying store supports `.getAllCookies`.
+
+> **NOTE**: Custom `Cookie` properties are discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
+
+See [Serialization Format](#serialization-format).
+
+#### `.serializeSync()`
+
+Synchronous version of [`serialize`](#serializecallbackerr-serializedobject); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+#### `.toJSON()`
+
+Alias of [`.serializeSync()`](#serializesync) for the convenience of `JSON.stringify(cookiejar)`.
+
+#### `CookieJar.deserialize(serialized[, store][, callback(err, object)])`
+
+A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. A promise is returned if a callback is not provided.
+
+The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created.
+
+As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first.
+
+#### `CookieJar.deserializeSync(serialized[, store])`
+
+Sync version of [`.deserialize`](#cookiejardeserializeserialized-store-callbackerr-object); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+#### `CookieJar.fromJSON(string)`
+
+Alias of [`.deserializeSync`](#cookiejardeserializesyncserialized-store) to provide consistency with [`Cookie.fromJSON()`](#cookiefromjsonstrorobj).
+
+#### `.clone([store][, callback(err, cloned))`
+
+Produces a deep clone of this jar. Modifications to the original do not affect the clone, and vice versa. Returns a promise if a callback is not provided.
+
+The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`.
+
+#### `.cloneSync([store])`
+
+Synchronous version of [`.clone`](#clonestore-callbackerr-cloned), returning a new `CookieJar` instance.
+
+The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used.
+
+The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.
+
+#### `.removeAllCookies([callback(err)])`
+
+Removes all cookies from the jar. Returns a promise if a callback is not provided.
+
+This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned.
+
+#### `.removeAllCookiesSync()`
+
+Sync version of [`.removeAllCookies()`](#removeallcookiescallbackerr); only works with synchronous stores (for example, the default `MemoryCookieStore`).
+
+### Store
+
+Base class for CookieJar stores. Available as `tough.Store`.
+
+### Store API
+
+The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in [`lib/memstore.js`](https://github.com/salesforce/tough-cookie/blob/master/lib/memstore.js). The API uses continuation-passing-style to allow for asynchronous stores.
+
+Stores should inherit from the base `Store` class, which is available as a top-level export.
+
+Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods of the containing `CookieJar` can be used.
+
+All `domain` parameters are normalized before calling.
+
+The Cookie store must have all of the following methods. Note that asynchronous implementations **must** support callback parameters.
+
+#### `store.findCookie(domain, path, key, callback(err, cookie))`
+
+Retrieve a cookie with the given domain, path, and key (name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest or newest such cookie should be returned.
+
+Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (that is, not an error).
+
+#### `store.findCookies(domain, path, allowSpecialUseDomain, callback(err, cookies))`
+
+Locates cookies matching the given domain and path. This is most often called in the context of [`cookiejar.getCookies()`](#getcookiescurrenturl-options-callbackerr-cookies).
+
+If no cookies are found, the callback MUST be passed an empty array.
+
+The resulting list is checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, and so on), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.
+
+As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above causes the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (that is, domain-matching only).
+
+#### `store.putCookie(cookie, callback(err))`
+
+Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties. Depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.
+
+The `cookie` object MUST NOT be modified; as the caller has already updated the `.creation` and `.lastAccessed` properties.
+
+Pass an error if the cookie cannot be stored.
+
+#### `store.updateCookie(oldCookie, newCookie, callback(err))`
+
+Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path`, and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.
+
+The `.lastAccessed` property is always different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (for example, least-recently-used, which is up to the store to implement).
+
+Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method, a stub that calls [`putCookie`](#storeputcookiecookie-callbackerr) is added to the store object.
+
+The `newCookie` and `oldCookie` objects MUST NOT be modified.
+
+Pass an error if the newCookie cannot be stored.
+
+#### `store.removeCookie(domain, path, key, callback(err))`
+
+Remove a cookie from the store (see notes on [`findCookie`](#storefindcookiedomain-path-key-callbackerr-cookie) about the uniqueness constraint).
+
+The implementation MUST NOT pass an error if the cookie doesn't exist, and only pass an error due to the failure to remove an existing cookie.
+
+#### `store.removeCookies(domain, path, callback(err))`
+
+Removes matching cookies from the store. The `path` parameter is optional and if missing, means all paths in a domain should be removed.
+
+Pass an error ONLY if removing any existing cookies failed.
+
+#### `store.removeAllCookies(callback(err))`
+
+_Optional_. Removes all cookies from the store.
+
+Pass an error if one or more cookies can't be removed.
+
+#### `store.getAllCookies(callback(err, cookies))`
+
+_Optional_. Produces an `Array` of all cookies during [`jar.serialize()`](#serializecallbackerr-serializedobject). The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format](#serialization-format) data structure.
+
+Cookies SHOULD be returned in creation order to preserve sorting via [`compareCookie()`](#cookiecomparea-b). For reference, `MemoryCookieStore` sorts by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1-ms. See `cookieCompare` for more detail.
+
+Pass an error if retrieval fails.
+
+**Note**: Not all Stores can implement this due to technical limitations, so it is optional.
+
+### MemoryCookieStore
+
+Inherits from `Store`.
+
+A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`.
+
+### Community Cookie Stores
+
+These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look:
+
+- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases
+- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk
+- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis
+- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk
+- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage
+
+## Serialization Format
+
+**NOTE**: If you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.
+
+```js
+ {
+ // The version of tough-cookie that serialized this jar.
+ version: 'tough-cookie@1.x.y',
+
+ // add the store type, to make humans happy:
+ storeType: 'MemoryCookieStore',
+
+ // CookieJar configuration:
+ rejectPublicSuffixes: true,
+ // ... future items go here
+
+ // Gets filled from jar.store.getAllCookies():
+ cookies: [
+ {
+ key: 'string',
+ value: 'string',
+ // ...
+ /* other Cookie.serializableProperties go here */
+ }
+ ]
+ }
+```
+
+## RFC 6265bis
+
+Support for RFC 6265bis revision 02 is being developed. Since this is a bit of an omnibus revision to the RFC 6252, support is broken up into the functional areas.
+
+### Leave Secure Cookies Alone
+
+Not yet supported.
+
+This change makes it so that if a cookie is sent from the server to the client with a `Secure` attribute, the channel must also be secure or the cookie is ignored.
+
+### SameSite Cookies
+
+Supported.
+
+This change makes it possible for servers, and supporting clients, to mitigate certain types of CSRF attacks by disallowing `SameSite` cookies from being sent cross-origin.
+
+On the Cookie object itself, you can get or set the `.sameSite` attribute, which is serialized into the `SameSite=` cookie attribute. When unset or `undefined`, no `SameSite=` attribute is serialized. The valid values of this attribute are `'none'`, `'lax'`, or `'strict'`. Other values are serialized as-is.
+
+When parsing cookies with a `SameSite` cookie attribute, values other than `'lax'` or `'strict'` are parsed as `'none'`. For example, `SomeCookie=SomeValue; SameSite=garbage` parses so that `cookie.sameSite === 'none'`.
+
+In order to support SameSite cookies, you must provide a `sameSiteContext` option to _both_ `setCookie` and `getCookies`. Valid values for this option are just like for the Cookie object, but have particular meanings:
+
+1. `'strict'` mode - If the request is on the same "site for cookies" (see the RFC draft for more information), pass this option to add a layer of defense against CSRF.
+2. `'lax'` mode - If the request is from another site, _but_ is directly because of navigation by the user, such as, `` or ``, pass `sameSiteContext: 'lax'`.
+3. `'none'` - Otherwise, pass `sameSiteContext: 'none'` (this indicates a cross-origin request).
+4. unset/`undefined` - SameSite **is not** be enforced! This can be a valid use-case for when CSRF isn't in the threat model of the system being built.
+
+It is highly recommended that you read RFC 6265bis for fine details on SameSite cookies. In particular [Section 8.8](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02##section-8.8) discusses security considerations and defense in depth.
+
+### Cookie Prefixes
+
+Supported.
+
+Cookie prefixes are a way to indicate that a given cookie was set with a set of attributes simply by inspecting the first few characters of the cookie's name.
+
+Cookie prefixes are defined in [Section 4.1.3 of 6265bis](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03##section-4.1.3).
+
+Two prefixes are defined:
+
+1. `"__Secure-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "\_\_Secure-", then the cookie was set with a "Secure" attribute.
+2. `"__Host-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "\_\_Host-", then the cookie was set with a "Secure" attribute, a "Path" attribute with a value of "/", and no "Domain" attribute.
+
+If `prefixSecurity` is enabled for `CookieJar`, then cookies that match the prefixes defined above but do not obey the attribute restrictions are not added.
+
+You can define this functionality by passing in the `prefixSecurity` option to `CookieJar`. It can be one of 3 values:
+
+1. `silent`: Enable cookie prefix checking but silently fail to add the cookie if conditions are not met. Default.
+2. `strict`: Enable cookie prefix checking and error out if conditions are not met.
+3. `unsafe-disabled`: Disable cookie prefix checking.
+
+Note that if `ignoreError` is passed in as `true` then the error is silent regardless of the `prefixSecurity` option (assuming it's enabled).
+
+## Copyright and License
+
+BSD-3-Clause:
+
+```text
+ Copyright (c) 2015, Salesforce.com, Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of Salesforce.com nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+```
diff --git a/node_modules/@cypress/request-promise/node_modules/tough-cookie/lib/cookie.js b/node_modules/@cypress/request-promise/node_modules/tough-cookie/lib/cookie.js
new file mode 100644
index 0000000..450ed51
--- /dev/null
+++ b/node_modules/@cypress/request-promise/node_modules/tough-cookie/lib/cookie.js
@@ -0,0 +1,1758 @@
+/*!
+ * Copyright (c) 2015-2020, Salesforce.com, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+"use strict";
+const punycode = require("punycode/");
+const urlParse = require("url-parse");
+const pubsuffix = require("./pubsuffix-psl");
+const Store = require("./store").Store;
+const MemoryCookieStore = require("./memstore").MemoryCookieStore;
+const pathMatch = require("./pathMatch").pathMatch;
+const validators = require("./validators.js");
+const VERSION = require("./version");
+const { fromCallback } = require("universalify");
+const { getCustomInspectSymbol } = require("./utilHelper");
+
+// From RFC6265 S4.1.1
+// note that it excludes \x3B ";"
+const COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/;
+
+const CONTROL_CHARS = /[\x00-\x1F]/;
+
+// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in
+// the "relaxed" mode, see:
+// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60
+const TERMINATORS = ["\n", "\r", "\0"];
+
+// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"'
+// Note ';' is \x3B
+const PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/;
+
+// date-time parsing constants (RFC6265 S5.1.1)
+
+const DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;
+
+const MONTH_TO_NUM = {
+ jan: 0,
+ feb: 1,
+ mar: 2,
+ apr: 3,
+ may: 4,
+ jun: 5,
+ jul: 6,
+ aug: 7,
+ sep: 8,
+ oct: 9,
+ nov: 10,
+ dec: 11
+};
+
+const MAX_TIME = 2147483647000; // 31-bit max
+const MIN_TIME = 0; // 31-bit min
+const SAME_SITE_CONTEXT_VAL_ERR =
+ 'Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"';
+
+function checkSameSiteContext(value) {
+ validators.validate(validators.isNonEmptyString(value), value);
+ const context = String(value).toLowerCase();
+ if (context === "none" || context === "lax" || context === "strict") {
+ return context;
+ } else {
+ return null;
+ }
+}
+
+const PrefixSecurityEnum = Object.freeze({
+ SILENT: "silent",
+ STRICT: "strict",
+ DISABLED: "unsafe-disabled"
+});
+
+// Dumped from ip-regex@4.0.0, with the following changes:
+// * all capturing groups converted to non-capturing -- "(?:)"
+// * support for IPv6 Scoped Literal ("%eth1") removed
+// * lowercase hexadecimal only
+const IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;
+const IP_V6_REGEX = `
+\\[?(?:
+(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|
+(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|
+(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|
+(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|
+(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|
+(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|
+(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|
+(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))
+)(?:%[0-9a-zA-Z]{1,})?\\]?
+`
+ .replace(/\s*\/\/.*$/gm, "")
+ .replace(/\n/g, "")
+ .trim();
+const IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}$`);
+
+/*
+ * Parses a Natural number (i.e., non-negative integer) with either the
+ *
+
+# Ajv: Another JSON Schema Validator
+
+The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07.
+
+[](https://travis-ci.org/ajv-validator/ajv)
+[](https://www.npmjs.com/package/ajv)
+[](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0)
+[](https://www.npmjs.com/package/ajv)
+[](https://coveralls.io/github/ajv-validator/ajv?branch=master)
+[](https://gitter.im/ajv-validator/ajv)
+[](https://github.com/sponsors/epoberezkin)
+
+
+## Ajv v7 beta is released
+
+[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes:
+
+- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements.
+- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe.
+- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas.
+- schemas are compiled to ES6 code (ES5 code generation is supported with an option).
+- to improve reliability and maintainability the code is migrated to TypeScript.
+
+**Please note**:
+
+- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021).
+- all formats are separated to ajv-formats package - they have to be explicitely added if you use them.
+
+See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details.
+
+To install the new version:
+
+```bash
+npm install ajv@beta
+```
+
+See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example.
+
+
+## Mozilla MOSS grant and OpenJS Foundation
+
+[
](https://www.mozilla.org/en-US/moss/) [
](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/)
+
+Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04).
+
+Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users.
+
+This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details.
+
+I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community.
+
+
+## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
+
+Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
+
+Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
+
+Please sponsor Ajv via:
+- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
+- [Ajv Open Collective️](https://opencollective.com/ajv)
+
+Thank you.
+
+
+#### Open Collective sponsors
+
+