-
-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/node_modules/z-schema/node_modules/bluebird/README.md b/node_modules/z-schema/node_modules/bluebird/README.md
deleted file mode 100644
index a35a5b56..00000000
--- a/node_modules/z-schema/node_modules/bluebird/README.md
+++ /dev/null
@@ -1,659 +0,0 @@
-[![Build Status](https://travis-ci.org/petkaantonov/bluebird.png?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
-
-
-
-
-
-
-
-#Introduction
-
-Bluebird is a fully featured [promise](#what-are-promises-and-why-should-i-use-them) library with focus on innovative features and performance
-
-
-
-#Topics
-
-- [Features](#features)
-- [Quick start](#quick-start)
-- [API Reference and examples](API.md)
-- [Support](#support)
-- [What are promises and why should I use them?](#what-are-promises-and-why-should-i-use-them)
-- [Questions and issues](#questions-and-issues)
-- [Error handling](#error-handling)
-- [Development](#development)
- - [Testing](#testing)
- - [Benchmarking](#benchmarks)
- - [Custom builds](#custom-builds)
- - [For library authors](#for-library-authors)
-- [What is the sync build?](#what-is-the-sync-build)
-- [License](#license)
-- [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
-- [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
-- [Changelog](changelog.md)
-- [Optimization guide](#optimization-guide)
-
-
-
-#Features:
-
-- [Promises A+](http://promisesaplus.com)
-- [Synchronous inspection](API.md#synchronous-inspection)
-- [Concurrency coordination](API.md#collections)
-- [Promisification on steroids](API.md#promisification)
-- [Resource management through a parallel of python `with`/C# `using`](API.md#resource-management)
-- [Cancellation and timeouts](API.md#cancellation)
-- [Parallel for C# `async` and `await`](API.md#generators)
-- Mind blowing utilities such as
- - [`.bind()`](API.md#binddynamic-thisarg---promise)
- - [`.call()`](API.md#callstring-propertyname--dynamic-arg---promise)
- - [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise)
- - [And](API.md#core) [much](API.md#timers) [more](API.md#utility)!
-- [Practical debugging solutions and sane defaults](#error-handling)
-- [Sick performance](benchmark/stats/latest.md)
-
-
-
-#Quick start
-
-##Node.js
-
- npm install bluebird
-
-Then:
-
-```js
-var Promise = require("bluebird");
-```
-
-##Browsers
-
-Download the [bluebird.js](https://github.com/petkaantonov/bluebird/tree/master/js/browser) file. And then use a script tag:
-
-```html
-
-```
-
-The global variable `Promise` becomes available after the above script tag.
-
-A [minimal bluebird browser build](#custom-builds) is ̃38.92KB minified*, 11.65KB gzipped and has no external dependencies.
-
-*Google Closure Compiler using Simple.
-
-####Browser support
-
-Browsers that [implement ECMA-262, edition 3](http://en.wikipedia.org/wiki/Ecmascript#Implementations) and later are supported.
-
-[![Selenium Test Status](https://saucelabs.com/browser-matrix/petka_antonov.svg)](https://saucelabs.com/u/petka_antonov)
-
-*IE7 and IE8 had to be removed from tests due to SauceLabs bug but are supported and pass all tests*
-
-**Note** that in ECMA-262, edition 3 (IE7, IE8 etc) it is not possible to use methods that have keyword names like `.catch` and `.finally`. The [API documentation](API.md) always lists a compatible alternative name that you can use if you need to support these browsers. For example `.catch` is replaced with `.caught` and `.finally` with `.lastly`.
-
-Also, [long stack trace](API.md#promiselongstacktraces---void) support is only available in Chrome and Firefox.
-
-Previously bluebird required es5-shim.js and es5-sham.js to support Edition 3 - these are **no longer required** as of **0.10.4**.
-
-After quick start, see [API Reference and examples](API.md)
-
-
-
-#Support
-
-- IRC: #promises @freenode
-- StackOverflow: [bluebird tag](http://stackoverflow.com/questions/tagged/bluebird)
-- Bugs and feature requests: [github issue tracker](https://github.com/petkaantonov/bluebird/issues?state=open)
-
-
-
-#What are promises and why should I use them?
-
-You should use promises to turn this:
-
-```js
-fs.readFile("file.json", function(err, val) {
- if( err ) {
- console.error("unable to read file");
- }
- else {
- try {
- val = JSON.parse(val);
- console.log(val.success);
- }
- catch( e ) {
- console.error("invalid json in file");
- }
- }
-});
-```
-
-Into this:
-
-```js
-fs.readFileAsync("file.json").then(JSON.parse).then(function(val) {
- console.log(val.success);
-})
-.catch(SyntaxError, function(e) {
- console.error("invalid json in file");
-})
-.catch(function(e){
- console.error("unable to read file")
-});
-```
-
-*If you are wondering "there is no `readFileAsync` method on `fs` that returns a promise", see [promisification](API.md#promisification)*
-
-Actually you might notice the latter has a lot in common with code that would do the same using synchronous I/O:
-
-```js
-try {
- var val = JSON.parse(fs.readFileSync("file.json"));
- console.log(val.success);
-}
-//Syntax actually not supported in JS but drives the point
-catch(SyntaxError e) {
- console.error("invalid json in file");
-}
-catch(Error e) {
- console.error("unable to read file")
-}
-```
-
-And that is the point - being able to have something that is a lot like `return` and `throw` in synchronous code.
-
-You can also use promises to improve code that was written with callback helpers:
-
-
-```js
-//Copyright Plato http://stackoverflow.com/a/19385911/995876
-//CC BY-SA 2.5
-mapSeries(URLs, function (URL, done) {
- var options = {};
- needle.get(URL, options, function (error, response, body) {
- if (error) {
- return done(error)
- }
- try {
- var ret = JSON.parse(body);
- return done(null, ret);
- }
- catch (e) {
- done(e);
- }
- });
-}, function (err, results) {
- if (err) {
- console.log(err)
- } else {
- console.log('All Needle requests successful');
- // results is a 1 to 1 mapping in order of URLs > needle.body
- processAndSaveAllInDB(results, function (err) {
- if (err) {
- return done(err)
- }
- console.log('All Needle requests saved');
- done(null);
- });
- }
-});
-```
-
-Is more pleasing to the eye when done with promises:
-
-```js
-Promise.promisifyAll(needle);
-var options = {};
-
-var current = Promise.resolve();
-Promise.map(URLs, function(URL) {
- current = current.then(function () {
- return needle.getAsync(URL, options);
- });
- return current;
-}).map(function(responseAndBody){
- return JSON.parse(responseAndBody[1]);
-}).then(function (results) {
- return processAndSaveAllInDB(results);
-}).then(function(){
- console.log('All Needle requests saved');
-}).catch(function (e) {
- console.log(e);
-});
-```
-
-Also promises don't just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators.
-
-More reading:
-
- - [Promise nuggets](http://spion.github.io/promise-nuggets/)
- - [Why I am switching to promises](http://spion.github.io/posts/why-i-am-switching-to-promises.html)
- - [What is the the point of promises](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/#toc_1)
- - [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)
- - [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)
-
-#Questions and issues
-
-If you find a bug in bluebird or have a feature request, file an issue in the [github issue tracker](https://github.com/petkaantonov/bluebird/issues). Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
-
-#Error handling
-
-This is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled.
-
-There are two common pragmatic attempts at solving the problem that promise libraries do.
-
-The more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so:
-
-```js
-download().then(...).then(...).done();
-```
-
-For handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call `.done` and that cannot be justified when the problem is forgetting to create an error handler in the first place.
-
-The second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to `stderr` or `console.error` in browsers. This is close to what happens with synchronous code - your code doesn't work as expected and you open console and see a stack trace. Nice.
-
-Of course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the `.done()` method to signal that any hanging exceptions should be thrown.
-
-If you want to override the default handler for these possibly unhandled rejections, you can pass yours like so:
-
-```js
-Promise.onPossiblyUnhandledRejection(function(error){
- throw error;
-});
-```
-
-If you want to also enable long stack traces, call:
-
-```js
-Promise.longStackTraces();
-```
-
-right after the library is loaded.
-
-In node.js use the environment flag `BLUEBIRD_DEBUG`:
-
-```
-BLUEBIRD_DEBUG=1 node server.js
-```
-
-to enable long stack traces in all instances of bluebird.
-
-Long stack traces cannot be disabled after being enabled, and cannot be enabled after promises have alread been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them.
-
-Long stack traces are enabled by default in the debug build.
-
-####Expected and unexpected errors
-
-A practical problem with Promises/A+ is that it models Javascript `try-catch` too closely for its own good. Therefore by default promises inherit `try-catch` warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about.
-
-Now, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in `try-catch` however:
-
-```js
-try {
- //code
-}
-catch(e) {
- if( e instanceof WhatIWantError) {
- //handle
- }
- else {
- throw e;
- }
-}
-```
-
-Without such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the `.catch` to [accept potential error type eligibility](API.md#catchfunction-errorclass-function-handler---promise).
-
-For instance here it is expected that some evil or incompetent entity will try to crash our server from `SyntaxError` by providing syntactically invalid JSON:
-
-```js
-getJSONFromSomewhere().then(function(jsonString) {
- return JSON.parse(jsonString);
-}).then(function(object) {
- console.log("it was valid json: ", object);
-}).catch(SyntaxError, function(e){
- console.log("don't be evil");
-});
-```
-
-Here any kind of unexpected error will automatically reported on `stderr` along with a stack trace because we only register a handler for the expected `SyntaxError`.
-
-Ok, so, that's pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like `.name`, `.type`, `.code`, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors?
-
-Bluebird defines a special error type `OperationalError` (you can get a reference from `Promise.OperationalError`). This type of error is given as rejection reason by promisified methods when
-their underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like `new Error("database didn't respond")` are considered untyped.
-
-Example of such library is the node core library `fs`. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them:
-
-```js
-//Read more about promisification in the API Reference:
-//API.md
-var fs = Promise.promisifyAll(require("fs"));
-
-fs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) {
- console.log("Successful json")
-}).catch(SyntaxError, function (e) {
- console.error("file contains invalid json");
-}).catch(Promise.OperationalError, function (e) {
- console.error("unable to read file, because: ", e.message);
-});
-```
-
-The last `catch` handler is only invoked when the `fs` module explicitly used the `err` argument convention of async callbacks to inform of an expected error. The `OperationalError` instance will contain the original error in its `.cause` property but it does have a direct copy of the `.message` and `.stack` too. In this code any unexpected error - be it in our code or the `fs` module - would not be caught by these handlers and therefore not swallowed.
-
-Since a `catch` handler typed to `Promise.OperationalError` is expected to be used very often, it has a neat shorthand:
-
-```js
-.error(function (e) {
- console.error("unable to read file, because: ", e.message);
-});
-```
-
-See [API documentation for `.error()`](API.md#error-rejectedhandler----promise)
-
-Finally, Bluebird also supports predicate-based filters. If you pass a
-predicate function instead of an error type, the predicate will receive
-the error as an argument. The return result will be used determine whether
-the error handler should be called.
-
-Predicates should allow for very fine grained control over caught errors:
-pattern matching, error typesets with set operations and many other techniques
-can be implemented on top of them.
-
-Example of using a predicate-based filter:
-
-```js
-var Promise = require("bluebird");
-var request = Promise.promisify(require("request"));
-
-function clientError(e) {
- return e.code >= 400 && e.code < 500;
-}
-
-request("http://www.google.com").then(function(contents){
- console.log(contents);
-}).catch(clientError, function(e){
- //A client error like 400 Bad Request happened
-});
-```
-
-**Danger:** The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives [are not exceptions](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/). You should consider always throwing Error objects when handling exceptions.
-
-
-
-####How do long stack traces differ from e.g. Q?
-
-Bluebird attempts to have more elaborate traces. Consider:
-
-```js
-Error.stackTraceLimit = 25;
-Q.longStackSupport = true;
-Q().then(function outer() {
- return Q().then(function inner() {
- return Q().then(function evenMoreInner() {
- a.b.c.d();
- }).catch(function catcher(e){
- console.error(e.stack);
- });
- })
-});
-```
-
-You will see
-
- ReferenceError: a is not defined
- at evenMoreInner (:7:13)
- From previous event:
- at inner (:6:20)
-
-Compare to:
-
-```js
-Error.stackTraceLimit = 25;
-Promise.longStackTraces();
-Promise.resolve().then(function outer() {
- return Promise.resolve().then(function inner() {
- return Promise.resolve().then(function evenMoreInner() {
- a.b.c.d()
- }).catch(function catcher(e){
- console.error(e.stack);
- });
- });
-});
-```
-
- ReferenceError: a is not defined
- at evenMoreInner (:7:13)
- From previous event:
- at inner (:6:36)
- From previous event:
- at outer (:5:32)
- From previous event:
- at :4:21
- at Object.InjectedScript._evaluateOn (:572:39)
- at Object.InjectedScript._evaluateAndWrap (:531:52)
- at Object.InjectedScript.evaluate (:450:21)
-
-
-A better and more practical example of the differences can be seen in gorgikosev's [debuggability competition](https://github.com/spion/async-compare#debuggability).
-
-
-
-#Development
-
-For development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies.
-
-Install [node](http://nodejs.org/), [npm](https://npmjs.org/), and [grunt](http://gruntjs.com/).
-
- git clone git@github.com:petkaantonov/bluebird.git
- cd bluebird
- npm install
-
-##Testing
-
-To run all tests, run `grunt test`. Note that 10 processes are created to run the tests in parallel. The `stdout` of tests is ignored by default and everything will stop at the first failure. If you want to run tests sequentially with all output, do:
-
- grunt test --jobs=1
-
-You may also give a higher `--jobs` value to run more tests concurrently (and finish faster).
-
-Individual files can be run with `grunt test --run=filename` where `filename` is a test file name in `/test` folder or `/test/mocha` folder. The `.js` prefix is not needed. The dots for AP compliance tests are not needed, so to run `/test/mocha/2.3.3.js` for instance:
-
- grunt test --run=233
-
-When trying to get a test to pass, run only that individual test file with `--verbose` to see the output from that test:
-
- grunt test --run=233 --verbose
-
-The reason for the unusual way of testing is because the majority of tests are from different libraries using different testing frameworks and because it takes forever to test sequentially.
-
-
-###Testing in browsers
-
-To test in browsers:
-
- cd browser
- setup
-
-Then open the `index.html` in your browser. Requires bash (on windows the mingw32 that comes with git works fine too).
-
-You may also [visit the github hosted page](http://petkaantonov.github.io/bluebird/browser/).
-
-Keep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active.
-
-##Benchmarks
-
-To run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too).
-
-Node 0.11.2+ is required to run the generator examples.
-
-###1\. DoxBee sequential
-
-Currently the most relevant benchmark is @gorkikosev's benchmark in the article [Analysis of generators and other async patterns in node](http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html). The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections.
-
-Command: `bench doxbee`
-
-###2\. Made-up parallel
-
-This made-up scenario runs 15 shimmed queries in parallel.
-
-Command: `bench parallel`
-
-##Custom builds
-
-Custom builds for browsers are supported through a command-line utility.
-
-
-
-
-
-
-
-Make sure you have cloned the repo somewhere and did `npm install` successfully.
-
-After that you can run:
-
- grunt build --features="core"
-
-
-The above builds the most minimal build you can get. You can add more features separated by spaces from the above list:
-
- grunt build --features="core filter map reduce"
-
-The custom build file will be found from `/js/browser/bluebird.js`. It will have a comment that lists the disabled and enabled features.
-
-Note that the build leaves the `/js/main` etc folders with same features so if you use the folder for node.js at the same time, don't forget to build
-a full version afterwards (after having taken a copy of the bluebird.js somewhere):
-
- grunt build
-
-
-
-##For library authors
-
-Building a library that depends on bluebird? You should know about a few features.
-
-If your library needs to do something obtrusive like adding or modifying methods on the `Promise` prototype, uses long stack traces or uses a custom unhandled rejection handler then... that's totally ok as long as you don't use `require("bluebird")`. Instead you should create a file
-that creates an isolated copy. For example, creating a file called `bluebird-extended.js` that contains:
-
-```js
- //NOTE the function call right after
-module.exports = require("bluebird/js/main/promise")();
-```
-
-Your library can then use `var Promise = require("bluebird-extended");` and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic.
-
-You should also know about [`.nodeify()`](API.md#nodeifyfunction-callback---promise) which makes it easy to provide a dual callback/promise API.
-
-
-
-##What is the sync build?
-
-You may now use sync build by:
-
- var Promise = require("bluebird/zalgo");
-
-The sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards.
-
-The normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility
-of stack overflow errors and non-deterministic behavior.
-
-The sync build skips the async call trampoline completely, e.g code like:
-
- async.invoke( this.fn, this, val );
-
-Appears as this in the sync build:
-
- this.fn(val);
-
-This should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism.
-
-Note that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads.
-
-
-```js
-var cache = new Map(); //ES6 Map or DataStructures/Map or whatever...
-function getResult(url) {
- var resolver = Promise.pending();
- if (cache.has(url)) {
- resolver.resolve(cache.get(url));
- }
- else {
- http.get(url, function(err, content) {
- if (err) resolver.reject(err);
- else {
- cache.set(url, content);
- resolver.resolve(content);
- }
- });
- }
- return resolver.promise;
-}
-
-
-
-//The result of console.log is truly random without async guarantees
-function guessWhatItPrints( url ) {
- var i = 3;
- getResult(url).then(function(){
- i = 4;
- });
- console.log(i);
-}
-```
-
-#Optimization guide
-
-Articles about optimization will be periodically posted in [the wiki section](https://github.com/petkaantonov/bluebird/wiki), polishing edits are welcome.
-
-A single cohesive guide compiled from the articles will probably be done eventually.
-
-#License
-
-Copyright (c) 2014 Petka Antonov
-
-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/node_modules/z-schema/node_modules/bluebird/js/main/any.js b/node_modules/z-schema/node_modules/bluebird/js/main/any.js
deleted file mode 100644
index 75d1de12..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/any.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var SomePromiseArray = Promise._SomePromiseArray;
-function Promise$_Any(promises) {
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- if (promise.isRejected()) {
- return promise;
- }
- ret.setHowMany(1);
- ret.setUnwrap();
- ret.init();
- return promise;
-}
-
-Promise.any = function Promise$Any(promises) {
- return Promise$_Any(promises);
-};
-
-Promise.prototype.any = function Promise$any() {
- return Promise$_Any(this);
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/assert.js b/node_modules/z-schema/node_modules/bluebird/js/main/assert.js
deleted file mode 100644
index 86ac49e1..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/assert.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = (function(){
-var AssertionError = (function() {
- function AssertionError(a) {
- this.constructor$(a);
- this.message = a;
- this.name = "AssertionError";
- }
- AssertionError.prototype = new Error();
- AssertionError.prototype.constructor = AssertionError;
- AssertionError.prototype.constructor$ = Error;
- return AssertionError;
-})();
-
-function getParams(args) {
- var params = [];
- for (var i = 0; i < args.length; ++i) params.push("arg" + i);
- return params;
-}
-
-function nativeAssert(callName, args, expect) {
- try {
- var params = getParams(args);
- var constructorArgs = params;
- constructorArgs.push("return " +
- callName + "("+ params.join(",") + ");");
- var fn = Function.apply(null, constructorArgs);
- return fn.apply(null, args);
- } catch (e) {
- if (!(e instanceof SyntaxError)) {
- throw e;
- } else {
- return expect;
- }
- }
-}
-
-return function assert(boolExpr, message) {
- if (boolExpr === true) return;
-
- if (typeof boolExpr === "string" &&
- boolExpr.charAt(0) === "%") {
- var nativeCallName = boolExpr;
- var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}
- if (nativeAssert(nativeCallName, args, message) === message) return;
- message = (nativeCallName + " !== " + message);
- }
-
- var ret = new AssertionError(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(ret, assert);
- }
- if (console && console.error) {
- console.error(ret.stack + "");
- }
- throw ret;
-
-};
-})();
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/async.js b/node_modules/z-schema/node_modules/bluebird/js/main/async.js
deleted file mode 100644
index 50004c9c..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/async.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var schedule = require("./schedule.js");
-var Queue = require("./queue.js");
-var errorObj = require("./util.js").errorObj;
-var tryCatch1 = require("./util.js").tryCatch1;
-var _process = typeof process !== "undefined" ? process : void 0;
-
-function Async() {
- this._isTickUsed = false;
- this._schedule = schedule;
- this._length = 0;
- this._lateBuffer = new Queue(16);
- this._functionBuffer = new Queue(65536);
- var self = this;
- this.consumeFunctionBuffer = function Async$consumeFunctionBuffer() {
- self._consumeFunctionBuffer();
- };
-}
-
-Async.prototype.haveItemsQueued = function Async$haveItemsQueued() {
- return this._length > 0;
-};
-
-Async.prototype.invokeLater = function Async$invokeLater(fn, receiver, arg) {
- if (_process !== void 0 &&
- _process.domain != null &&
- !fn.domain) {
- fn = _process.domain.bind(fn);
- }
- this._lateBuffer.push(fn, receiver, arg);
- this._queueTick();
-};
-
-Async.prototype.invoke = function Async$invoke(fn, receiver, arg) {
- if (_process !== void 0 &&
- _process.domain != null &&
- !fn.domain) {
- fn = _process.domain.bind(fn);
- }
- var functionBuffer = this._functionBuffer;
- functionBuffer.push(fn, receiver, arg);
- this._length = functionBuffer.length();
- this._queueTick();
-};
-
-Async.prototype._consumeFunctionBuffer =
-function Async$_consumeFunctionBuffer() {
- var functionBuffer = this._functionBuffer;
- while (functionBuffer.length() > 0) {
- var fn = functionBuffer.shift();
- var receiver = functionBuffer.shift();
- var arg = functionBuffer.shift();
- fn.call(receiver, arg);
- }
- this._reset();
- this._consumeLateBuffer();
-};
-
-Async.prototype._consumeLateBuffer = function Async$_consumeLateBuffer() {
- var buffer = this._lateBuffer;
- while(buffer.length() > 0) {
- var fn = buffer.shift();
- var receiver = buffer.shift();
- var arg = buffer.shift();
- var res = tryCatch1(fn, receiver, arg);
- if (res === errorObj) {
- this._queueTick();
- if (fn.domain != null) {
- fn.domain.emit("error", res.e);
- } else {
- throw res.e;
- }
- }
- }
-};
-
-Async.prototype._queueTick = function Async$_queue() {
- if (!this._isTickUsed) {
- this._schedule(this.consumeFunctionBuffer);
- this._isTickUsed = true;
- }
-};
-
-Async.prototype._reset = function Async$_reset() {
- this._isTickUsed = false;
- this._length = 0;
-};
-
-module.exports = new Async();
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/bluebird.js b/node_modules/z-schema/node_modules/bluebird/js/main/bluebird.js
deleted file mode 100644
index 6fd85f1b..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/bluebird.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var Promise = require("./promise.js")();
-module.exports = Promise;
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/call_get.js b/node_modules/z-schema/node_modules/bluebird/js/main/call_get.js
deleted file mode 100644
index 9df2b233..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/call_get.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var cr = Object.create;
-var callerCache = cr && cr(null);
-var getterCache = cr && cr(null);
-callerCache[" size"] = getterCache[" size"] = 0;
-module.exports = function(Promise) {
-var util = require("./util.js");
-var canEvaluate = util.canEvaluate;
-var isIdentifier = util.isIdentifier;
-
-function makeMethodCaller (methodName) {
- return new Function("obj", " \n\
- 'use strict' \n\
- var len = this.length; \n\
- switch(len) { \n\
- case 1: return obj.methodName(this[0]); \n\
- case 2: return obj.methodName(this[0], this[1]); \n\
- case 3: return obj.methodName(this[0], this[1], this[2]); \n\
- case 0: return obj.methodName(); \n\
- default: return obj.methodName.apply(obj, this); \n\
- } \n\
- ".replace(/methodName/g, methodName));
-}
-
-function makeGetter (propertyName) {
- return new Function("obj", " \n\
- 'use strict'; \n\
- return obj.propertyName; \n\
- ".replace("propertyName", propertyName));
-}
-
-function getCompiled(name, compiler, cache) {
- var ret = cache[name];
- if (typeof ret !== "function") {
- if (!isIdentifier(name)) {
- return null;
- }
- ret = compiler(name);
- cache[name] = ret;
- cache[" size"]++;
- if (cache[" size"] > 512) {
- var keys = Object.keys(cache);
- for (var i = 0; i < 256; ++i) delete cache[keys[i]];
- cache[" size"] = keys.length - 256;
- }
- }
- return ret;
-}
-
-function getMethodCaller(name) {
- return getCompiled(name, makeMethodCaller, callerCache);
-}
-
-function getGetter(name) {
- return getCompiled(name, makeGetter, getterCache);
-}
-
-function caller(obj) {
- return obj[this.pop()].apply(obj, this);
-}
-Promise.prototype.call = function Promise$call(methodName) {
- var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
- if (canEvaluate) {
- var maybeCaller = getMethodCaller(methodName);
- if (maybeCaller !== null) {
- return this._then(maybeCaller, void 0, void 0, args, void 0);
- }
- }
- args.push(methodName);
- return this._then(caller, void 0, void 0, args, void 0);
-};
-
-function namedGetter(obj) {
- return obj[this];
-}
-function indexedGetter(obj) {
- return obj[this];
-}
-Promise.prototype.get = function Promise$get(propertyName) {
- var isIndex = (typeof propertyName === "number");
- var getter;
- if (!isIndex) {
- if (canEvaluate) {
- var maybeGetter = getGetter(propertyName);
- getter = maybeGetter !== null ? maybeGetter : namedGetter;
- } else {
- getter = namedGetter;
- }
- } else {
- getter = indexedGetter;
- }
- return this._then(getter, void 0, void 0, propertyName, void 0);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/cancel.js b/node_modules/z-schema/node_modules/bluebird/js/main/cancel.js
deleted file mode 100644
index d3022b64..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/cancel.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var errors = require("./errors.js");
-var canAttach = errors.canAttach;
-var async = require("./async.js");
-var CancellationError = errors.CancellationError;
-
-Promise.prototype._cancel = function Promise$_cancel(reason) {
- if (!this.isCancellable()) return this;
- var parent;
- var promiseToReject = this;
- while ((parent = promiseToReject._cancellationParent) !== void 0 &&
- parent.isCancellable()) {
- promiseToReject = parent;
- }
- promiseToReject._attachExtraTrace(reason);
- promiseToReject._rejectUnchecked(reason);
-};
-
-Promise.prototype.cancel = function Promise$cancel(reason) {
- if (!this.isCancellable()) return this;
- reason = reason !== void 0
- ? (canAttach(reason) ? reason : new Error(reason + ""))
- : new CancellationError();
- async.invokeLater(this._cancel, this, reason);
- return this;
-};
-
-Promise.prototype.cancellable = function Promise$cancellable() {
- if (this._cancellable()) return this;
- this._setCancellable();
- this._cancellationParent = void 0;
- return this;
-};
-
-Promise.prototype.uncancellable = function Promise$uncancellable() {
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 2 | 4);
- ret._follow(this);
- ret._unsetCancellable();
- return ret;
-};
-
-Promise.prototype.fork =
-function Promise$fork(didFulfill, didReject, didProgress) {
- var ret = this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
-
- ret._setCancellable();
- ret._cancellationParent = void 0;
- return ret;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/captured_trace.js b/node_modules/z-schema/node_modules/bluebird/js/main/captured_trace.js
deleted file mode 100644
index b346612a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/captured_trace.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function() {
-var inherits = require("./util.js").inherits;
-var defineProperty = require("./es5.js").defineProperty;
-
-var rignore = new RegExp(
- "\\b(?:[a-zA-Z0-9.]+\\$_\\w+|" +
- "tryCatch(?:1|2|3|4|Apply)|new \\w*PromiseArray|" +
- "\\w*PromiseArray\\.\\w*PromiseArray|" +
- "setTimeout|CatchFilter\\$_\\w+|makeNodePromisified|processImmediate|" +
- "process._tickCallback|nextTick|Async\\$\\w+)\\b"
-);
-
-var rtraceline = null;
-var formatStack = null;
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj.toString();
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function CapturedTrace(ignoreUntil, isTopLevel) {
- this.captureStackTrace(CapturedTrace, isTopLevel);
-
-}
-inherits(CapturedTrace, Error);
-
-CapturedTrace.prototype.captureStackTrace =
-function CapturedTrace$captureStackTrace(ignoreUntil, isTopLevel) {
- captureStackTrace(this, ignoreUntil, isTopLevel);
-};
-
-CapturedTrace.possiblyUnhandledRejection =
-function CapturedTrace$PossiblyUnhandledRejection(reason) {
- if (typeof console === "object") {
- var message;
- if (typeof reason === "object" || typeof reason === "function") {
- var stack = reason.stack;
- message = "Possibly unhandled " + formatStack(stack, reason);
- } else {
- message = "Possibly unhandled " + String(reason);
- }
- if (typeof console.error === "function" ||
- typeof console.error === "object") {
- console.error(message);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-};
-
-CapturedTrace.combine = function CapturedTrace$Combine(current, prev) {
- var curLast = current.length - 1;
- for (var i = prev.length - 1; i >= 0; --i) {
- var line = prev[i];
- if (current[curLast] === line) {
- current.pop();
- curLast--;
- } else {
- break;
- }
- }
-
- current.push("From previous event:");
- var lines = current.concat(prev);
-
- var ret = [];
-
- for (var i = 0, len = lines.length; i < len; ++i) {
-
- if ((rignore.test(lines[i]) ||
- (i > 0 && !rtraceline.test(lines[i])) &&
- lines[i] !== "From previous event:")
- ) {
- continue;
- }
- ret.push(lines[i]);
- }
- return ret;
-};
-
-CapturedTrace.isSupported = function CapturedTrace$IsSupported() {
- return typeof captureStackTrace === "function";
-};
-
-var captureStackTrace = (function stackDetection() {
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- rtraceline = /^\s*at\s*/;
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
-
-
- };
- var captureStackTrace = Error.captureStackTrace;
- return function CapturedTrace$_captureStackTrace(
- receiver, ignoreUntil) {
- captureStackTrace(receiver, ignoreUntil);
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- typeof "".startsWith === "function" &&
- (err.stack.startsWith("stackDetection@")) &&
- stackDetection.name === "stackDetection") {
-
- defineProperty(Error, "stackTraceLimit", {
- writable: true,
- enumerable: false,
- configurable: false,
- value: 25
- });
- rtraceline = /@/;
- var rline = /[@\n]/;
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") {
- return (error.name + ". " + error.message + "\n" + stack);
- }
-
- if (error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
- };
-
- return function captureStackTrace(o) {
- var stack = new Error().stack;
- var split = stack.split(rline);
- var len = split.length;
- var ret = "";
- for (var i = 0; i < len; i += 2) {
- ret += split[i];
- ret += "@";
- ret += split[i + 1];
- ret += "\n";
- }
- o.stack = ret;
- };
- } else {
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
- };
-
- return null;
- }
-})();
-
-return CapturedTrace;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/catch_filter.js b/node_modules/z-schema/node_modules/bluebird/js/main/catch_filter.js
deleted file mode 100644
index 25d9f73a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/catch_filter.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = require("./util.js");
-var errors = require("./errors.js");
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-var keys = require("./es5.js").keys;
-var TypeError = errors.TypeError;
-
-function CatchFilter(instances, callback, promise) {
- this._instances = instances;
- this._callback = callback;
- this._promise = promise;
-}
-
-function CatchFilter$_safePredicate(predicate, e) {
- var safeObject = {};
- var retfilter = tryCatch1(predicate, safeObject, e);
-
- if (retfilter === errorObj) return retfilter;
-
- var safeKeys = keys(safeObject);
- if (safeKeys.length) {
- errorObj.e = new TypeError(
- "Catch filter must inherit from Error "
- + "or be a simple predicate function");
- return errorObj;
- }
- return retfilter;
-}
-
-CatchFilter.prototype.doFilter = function CatchFilter$_doFilter(e) {
- var cb = this._callback;
- var promise = this._promise;
- var boundTo = promise._boundTo;
- for (var i = 0, len = this._instances.length; i < len; ++i) {
- var item = this._instances[i];
- var itemIsErrorType = item === Error ||
- (item != null && item.prototype instanceof Error);
-
- if (itemIsErrorType && e instanceof item) {
- var ret = tryCatch1(cb, boundTo, e);
- if (ret === errorObj) {
- NEXT_FILTER.e = ret.e;
- return NEXT_FILTER;
- }
- return ret;
- } else if (typeof item === "function" && !itemIsErrorType) {
- var shouldHandle = CatchFilter$_safePredicate(item, e);
- if (shouldHandle === errorObj) {
- var trace = errors.canAttach(errorObj.e)
- ? errorObj.e
- : new Error(errorObj.e + "");
- this._promise._attachExtraTrace(trace);
- e = errorObj.e;
- break;
- } else if (shouldHandle) {
- var ret = tryCatch1(cb, boundTo, e);
- if (ret === errorObj) {
- NEXT_FILTER.e = ret.e;
- return NEXT_FILTER;
- }
- return ret;
- }
- }
- }
- NEXT_FILTER.e = e;
- return NEXT_FILTER;
-};
-
-return CatchFilter;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/direct_resolve.js b/node_modules/z-schema/node_modules/bluebird/js/main/direct_resolve.js
deleted file mode 100644
index 3386a19e..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/direct_resolve.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var util = require("./util.js");
-var isPrimitive = util.isPrimitive;
-var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
-
-module.exports = function(Promise) {
-var returner = function Promise$_returner() {
- return this;
-};
-var thrower = function Promise$_thrower() {
- throw this;
-};
-
-var wrapper = function Promise$_wrapper(value, action) {
- if (action === 1) {
- return function Promise$_thrower() {
- throw value;
- };
- } else if (action === 2) {
- return function Promise$_returner() {
- return value;
- };
- }
-};
-
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn =
-function Promise$thenReturn(value) {
- if (wrapsPrimitiveReceiver && isPrimitive(value)) {
- return this._then(
- wrapper(value, 2),
- void 0,
- void 0,
- void 0,
- void 0
- );
- }
- return this._then(returner, void 0, void 0, value, void 0);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow =
-function Promise$thenThrow(reason) {
- if (wrapsPrimitiveReceiver && isPrimitive(reason)) {
- return this._then(
- wrapper(reason, 1),
- void 0,
- void 0,
- void 0,
- void 0
- );
- }
- return this._then(thrower, void 0, void 0, reason, void 0);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/each.js b/node_modules/z-schema/node_modules/bluebird/js/main/each.js
deleted file mode 100644
index c89a1449..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/each.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseReduce = Promise.reduce;
-
-Promise.prototype.each = function Promise$each(fn) {
- return PromiseReduce(this, fn, null, INTERNAL);
-};
-
-Promise.each = function Promise$Each(promises, fn) {
- return PromiseReduce(promises, fn, null, INTERNAL);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/errors.js b/node_modules/z-schema/node_modules/bluebird/js/main/errors.js
deleted file mode 100644
index 4ea7b6d1..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/errors.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var Objectfreeze = require("./es5.js").freeze;
-var util = require("./util.js");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof OperationalError) ||
- e["isOperational"] === true);
-}
-
-function isError(obj) {
- return obj instanceof Error;
-}
-
-function canAttach(obj) {
- return isError(obj);
-}
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- this.message = typeof message === "string" ? message : defaultMessage;
- this.name = nameProperty;
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-AggregateError.prototype.length = 0;
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- this.name = "OperationalError";
- this.message = message;
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- this.message = message.message;
- this.stack = message.stack;
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var key = "__BluebirdErrorTypes__";
-var errorTypes = Error[key];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- notEnumerableProp(Error, key, errorTypes);
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- canAttach: canAttach
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/errors_api_rejection.js b/node_modules/z-schema/node_modules/bluebird/js/main/errors_api_rejection.js
deleted file mode 100644
index e953e3ba..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/errors_api_rejection.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var TypeError = require('./errors.js').TypeError;
-
-function apiRejection(msg) {
- var error = new TypeError(msg);
- var ret = Promise.rejected(error);
- var parent = ret._peekContext();
- if (parent != null) {
- parent._attachExtraTrace(error);
- }
- return ret;
-}
-
-return apiRejection;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/es5.js b/node_modules/z-schema/node_modules/bluebird/js/main/es5.js
deleted file mode 100644
index d8f05b39..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/es5.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-var isES5 = (function(){
- "use strict";
- return this === void 0;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- keys: Object.keys,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function ObjectKeys(o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- }
-
- var ObjectDefineProperty = function ObjectDefineProperty(o, key, desc) {
- o[key] = desc.value;
- return o;
- }
-
- var ObjectFreeze = function ObjectFreeze(obj) {
- return obj;
- }
-
- var ObjectGetPrototypeOf = function ObjectGetPrototypeOf(obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- }
-
- var ArrayIsArray = function ArrayIsArray(obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- }
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5
- };
-}
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/filter.js b/node_modules/z-schema/node_modules/bluebird/js/main/filter.js
deleted file mode 100644
index 08f67ebb..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/filter.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseMap = Promise.map;
-
-Promise.prototype.filter = function Promise$filter(fn, options) {
- return PromiseMap(this, fn, options, INTERNAL);
-};
-
-Promise.filter = function Promise$Filter(promises, fn, options) {
- return PromiseMap(promises, fn, options, INTERNAL);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/finally.js b/node_modules/z-schema/node_modules/bluebird/js/main/finally.js
deleted file mode 100644
index 0f68296c..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/finally.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, NEXT_FILTER, cast) {
-var util = require("./util.js");
-var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
-var isPrimitive = util.isPrimitive;
-var thrower = util.thrower;
-
-function returnThis() {
- return this;
-}
-function throwThis() {
- throw this;
-}
-function return$(r) {
- return function Promise$_returner() {
- return r;
- };
-}
-function throw$(r) {
- return function Promise$_thrower() {
- throw r;
- };
-}
-function promisedFinally(ret, reasonOrValue, isFulfilled) {
- var then;
- if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) {
- then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
- } else {
- then = isFulfilled ? returnThis : throwThis;
- }
- return ret._then(then, thrower, void 0, reasonOrValue, void 0);
-}
-
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- var ret = promise._isBound()
- ? handler.call(promise._boundTo)
- : handler();
-
- if (ret !== void 0) {
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- return promisedFinally(maybePromise, reasonOrValue,
- promise.isFulfilled());
- }
- }
-
- if (promise.isRejected()) {
- NEXT_FILTER.e = reasonOrValue;
- return NEXT_FILTER;
- } else {
- return reasonOrValue;
- }
-}
-
-function tapHandler(value) {
- var promise = this.promise;
- var handler = this.handler;
-
- var ret = promise._isBound()
- ? handler.call(promise._boundTo, value)
- : handler(value);
-
- if (ret !== void 0) {
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- return promisedFinally(maybePromise, value, true);
- }
- }
- return value;
-}
-
-Promise.prototype._passThroughHandler =
-function Promise$_passThroughHandler(handler, isFinally) {
- if (typeof handler !== "function") return this.then();
-
- var promiseAndHandler = {
- promise: this,
- handler: handler
- };
-
- return this._then(
- isFinally ? finallyHandler : tapHandler,
- isFinally ? finallyHandler : void 0, void 0,
- promiseAndHandler, void 0);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function Promise$finally(handler) {
- return this._passThroughHandler(handler, true);
-};
-
-Promise.prototype.tap = function Promise$tap(handler) {
- return this._passThroughHandler(handler, false);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/generators.js b/node_modules/z-schema/node_modules/bluebird/js/main/generators.js
deleted file mode 100644
index 58d418f8..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/generators.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, apiRejection, INTERNAL, cast) {
-var errors = require("./errors.js");
-var TypeError = errors.TypeError;
-var deprecated = require("./util.js").deprecated;
-var util = require("./util.js");
-var errorObj = util.errorObj;
-var tryCatch1 = util.tryCatch1;
-var yieldHandlers = [];
-
-function promiseFromYieldHandler(value, yieldHandlers) {
- var _errorObj = errorObj;
- var _Promise = Promise;
- var len = yieldHandlers.length;
- for (var i = 0; i < len; ++i) {
- var result = tryCatch1(yieldHandlers[i], void 0, value);
- if (result === _errorObj) {
- return _Promise.reject(_errorObj.e);
- }
- var maybePromise = cast(result, promiseFromYieldHandler);
- if (maybePromise instanceof _Promise) return maybePromise;
- }
- return null;
-}
-
-function PromiseSpawn(generatorFunction, receiver, yieldHandler) {
- var promise = this._promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- this._generatorFunction = generatorFunction;
- this._receiver = receiver;
- this._generator = void 0;
- this._yieldHandlers = typeof yieldHandler === "function"
- ? [yieldHandler].concat(yieldHandlers)
- : yieldHandlers;
-}
-
-PromiseSpawn.prototype.promise = function PromiseSpawn$promise() {
- return this._promise;
-};
-
-PromiseSpawn.prototype._run = function PromiseSpawn$_run() {
- this._generator = this._generatorFunction.call(this._receiver);
- this._receiver =
- this._generatorFunction = void 0;
- this._next(void 0);
-};
-
-PromiseSpawn.prototype._continue = function PromiseSpawn$_continue(result) {
- if (result === errorObj) {
- this._generator = void 0;
- var trace = errors.canAttach(result.e)
- ? result.e : new Error(result.e + "");
- this._promise._attachExtraTrace(trace);
- this._promise._reject(result.e, trace);
- return;
- }
-
- var value = result.value;
- if (result.done === true) {
- this._generator = void 0;
- if (!this._promise._tryFollow(value)) {
- this._promise._fulfill(value);
- }
- } else {
- var maybePromise = cast(value, void 0);
- if (!(maybePromise instanceof Promise)) {
- maybePromise =
- promiseFromYieldHandler(maybePromise, this._yieldHandlers);
- if (maybePromise === null) {
- this._throw(new TypeError("A value was yielded that could not be treated as a promise"));
- return;
- }
- }
- maybePromise._then(
- this._next,
- this._throw,
- void 0,
- this,
- null
- );
- }
-};
-
-PromiseSpawn.prototype._throw = function PromiseSpawn$_throw(reason) {
- if (errors.canAttach(reason))
- this._promise._attachExtraTrace(reason);
- this._continue(
- tryCatch1(this._generator["throw"], this._generator, reason)
- );
-};
-
-PromiseSpawn.prototype._next = function PromiseSpawn$_next(value) {
- this._continue(
- tryCatch1(this._generator.next, this._generator, value)
- );
-};
-
-Promise.coroutine =
-function Promise$Coroutine(generatorFunction, options) {
- if (typeof generatorFunction !== "function") {
- throw new TypeError("generatorFunction must be a function");
- }
- var yieldHandler = Object(options).yieldHandler;
- var PromiseSpawn$ = PromiseSpawn;
- return function () {
- var generator = generatorFunction.apply(this, arguments);
- var spawn = new PromiseSpawn$(void 0, void 0, yieldHandler);
- spawn._generator = generator;
- spawn._next(void 0);
- return spawn.promise();
- };
-};
-
-Promise.coroutine.addYieldHandler = function(fn) {
- if (typeof fn !== "function") throw new TypeError("fn must be a function");
- yieldHandlers.push(fn);
-};
-
-Promise.spawn = function Promise$Spawn(generatorFunction) {
- deprecated("Promise.spawn is deprecated. Use Promise.coroutine instead.");
- if (typeof generatorFunction !== "function") {
- return apiRejection("generatorFunction must be a function");
- }
- var spawn = new PromiseSpawn(generatorFunction, this);
- var ret = spawn.promise();
- spawn._run(Promise.spawn);
- return ret;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/join.js b/node_modules/z-schema/node_modules/bluebird/js/main/join.js
deleted file mode 100644
index 123e66b3..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/join.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
-function(Promise, PromiseArray, cast, INTERNAL) {
-var util = require("./util.js");
-var canEvaluate = util.canEvaluate;
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var caller = function(count) {
- var values = [];
- for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
- return new Function("holder", " \n\
- 'use strict'; \n\
- var callback = holder.fn; \n\
- return callback(values); \n\
- ".replace(/values/g, values.join(", ")));
- };
- var thenCallbacks = [];
- var callers = [void 0];
- for (var i = 1; i <= 5; ++i) {
- thenCallbacks.push(thenCallback(i));
- callers.push(caller(i));
- }
-
- var Holder = function(total, fn) {
- this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
- this.fn = fn;
- this.total = total;
- this.now = 0;
- };
-
- Holder.prototype.callers = callers;
- Holder.prototype.checkFulfillment = function(promise) {
- var now = this.now;
- now++;
- var total = this.total;
- if (now >= total) {
- var handler = this.callers[total];
- var ret = tryCatch1(handler, void 0, this);
- if (ret === errorObj) {
- promise._rejectUnchecked(ret.e);
- } else if (!promise._tryFollow(ret)) {
- promise._fulfillUnchecked(ret);
- }
- } else {
- this.now = now;
- }
- };
-}
-
-
-
-
-Promise.join = function Promise$Join() {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (last < 6 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- var holder = new Holder(last, fn);
- var reject = ret._reject;
- var callbacks = thenCallbacks;
- for (var i = 0; i < last; ++i) {
- var maybePromise = cast(arguments[i], void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- maybePromise._then(callbacks[i], reject,
- void 0, ret, holder);
- } else if (maybePromise.isFulfilled()) {
- callbacks[i].call(ret,
- maybePromise._settledValue, holder);
- } else {
- ret._reject(maybePromise._settledValue);
- maybePromise._unsetRejectionIsUnhandled();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
- return ret;
- }
- }
- var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
- var ret = new PromiseArray(args).promise();
- return fn !== void 0 ? ret.spread(fn) : ret;
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/map.js b/node_modules/z-schema/node_modules/bluebird/js/main/map.js
deleted file mode 100644
index ecc92479..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/map.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, cast, INTERNAL) {
-var util = require("./util.js");
-var tryCatch3 = util.tryCatch3;
-var errorObj = util.errorObj;
-var PENDING = {};
-var EMPTY_ARRAY = [];
-
-function MappingPromiseArray(promises, fn, limit, _filter) {
- this.constructor$(promises);
- this._callback = fn;
- this._preservedValues = _filter === INTERNAL
- ? new Array(this.length())
- : null;
- this._limit = limit;
- this._inFlight = 0;
- this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
- this._init$(void 0, -2);
-}
-util.inherits(MappingPromiseArray, PromiseArray);
-
-MappingPromiseArray.prototype._init = function MappingPromiseArray$_init() {};
-
-MappingPromiseArray.prototype._promiseFulfilled =
-function MappingPromiseArray$_promiseFulfilled(value, index) {
- var values = this._values;
- if (values === null) return;
-
- var length = this.length();
- var preservedValues = this._preservedValues;
- var limit = this._limit;
- if (values[index] === PENDING) {
- values[index] = value;
- if (limit >= 1) {
- this._inFlight--;
- this._drainQueue();
- if (this._isResolved()) return;
- }
- } else {
- if (limit >= 1 && this._inFlight >= limit) {
- values[index] = value;
- this._queue.push(index);
- return;
- }
- if (preservedValues !== null) preservedValues[index] = value;
-
- var callback = this._callback;
- var receiver = this._promise._boundTo;
- var ret = tryCatch3(callback, receiver, value, index, length);
- if (ret === errorObj) return this._reject(ret.e);
-
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- if (limit >= 1) this._inFlight++;
- values[index] = PENDING;
- return maybePromise._proxyPromiseArray(this, index);
- } else if (maybePromise.isFulfilled()) {
- ret = maybePromise.value();
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- return this._reject(maybePromise.reason());
- }
- }
- values[index] = ret;
- }
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= length) {
- if (preservedValues !== null) {
- this._filter(values, preservedValues);
- } else {
- this._resolve(values);
- }
-
- }
-};
-
-MappingPromiseArray.prototype._drainQueue =
-function MappingPromiseArray$_drainQueue() {
- var queue = this._queue;
- var limit = this._limit;
- var values = this._values;
- while (queue.length > 0 && this._inFlight < limit) {
- var index = queue.pop();
- this._promiseFulfilled(values[index], index);
- }
-};
-
-MappingPromiseArray.prototype._filter =
-function MappingPromiseArray$_filter(booleans, values) {
- var len = values.length;
- var ret = new Array(len);
- var j = 0;
- for (var i = 0; i < len; ++i) {
- if (booleans[i]) ret[j++] = values[i];
- }
- ret.length = j;
- this._resolve(ret);
-};
-
-MappingPromiseArray.prototype.preservedValues =
-function MappingPromiseArray$preserveValues() {
- return this._preservedValues;
-};
-
-function map(promises, fn, options, _filter) {
- var limit = typeof options === "object" && options !== null
- ? options.concurrency
- : 0;
- limit = typeof limit === "number" &&
- isFinite(limit) && limit >= 1 ? limit : 0;
- return new MappingPromiseArray(promises, fn, limit, _filter);
-}
-
-Promise.prototype.map = function Promise$map(fn, options) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
-
- return map(this, fn, options, null).promise();
-};
-
-Promise.map = function Promise$Map(promises, fn, options, _filter) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- return map(promises, fn, options, _filter).promise();
-};
-
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/nodeify.js b/node_modules/z-schema/node_modules/bluebird/js/main/nodeify.js
deleted file mode 100644
index e5658d69..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/nodeify.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var util = require("./util.js");
-var async = require("./async.js");
-var tryCatch2 = util.tryCatch2;
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-function thrower(r) {
- throw r;
-}
-
-function Promise$_spreadAdapter(val, receiver) {
- if (!util.isArray(val)) return Promise$_successAdapter(val, receiver);
- var ret = util.tryCatchApply(this, [null].concat(val), receiver);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-
-function Promise$_successAdapter(val, receiver) {
- var nodeback = this;
- var ret = val === void 0
- ? tryCatch1(nodeback, receiver, null)
- : tryCatch2(nodeback, receiver, null, val);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-function Promise$_errorAdapter(reason, receiver) {
- var nodeback = this;
- var ret = tryCatch1(nodeback, receiver, reason);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-
-Promise.prototype.nodeify = function Promise$nodeify(nodeback, options) {
- if (typeof nodeback == "function") {
- var adapter = Promise$_successAdapter;
- if (options !== void 0 && Object(options).spread) {
- adapter = Promise$_spreadAdapter;
- }
- this._then(
- adapter,
- Promise$_errorAdapter,
- void 0,
- nodeback,
- this._boundTo
- );
- }
- return this;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/progress.js b/node_modules/z-schema/node_modules/bluebird/js/main/progress.js
deleted file mode 100644
index fbd53569..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/progress.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray) {
-var util = require("./util.js");
-var async = require("./async.js");
-var errors = require("./errors.js");
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-Promise.prototype.progressed = function Promise$progressed(handler) {
- return this._then(void 0, void 0, handler, void 0, void 0);
-};
-
-Promise.prototype._progress = function Promise$_progress(progressValue) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._progressUnchecked(progressValue);
-
-};
-
-Promise.prototype._progressHandlerAt =
-function Promise$_progressHandlerAt(index) {
- return index === 0
- ? this._progressHandler0
- : this[(index << 2) + index - 5 + 2];
-};
-
-Promise.prototype._doProgressWith =
-function Promise$_doProgressWith(progression) {
- var progressValue = progression.value;
- var handler = progression.handler;
- var promise = progression.promise;
- var receiver = progression.receiver;
-
- var ret = tryCatch1(handler, receiver, progressValue);
- if (ret === errorObj) {
- if (ret.e != null &&
- ret.e.name !== "StopProgressPropagation") {
- var trace = errors.canAttach(ret.e)
- ? ret.e : new Error(ret.e + "");
- promise._attachExtraTrace(trace);
- promise._progress(ret.e);
- }
- } else if (ret instanceof Promise) {
- ret._then(promise._progress, null, null, promise, void 0);
- } else {
- promise._progress(ret);
- }
-};
-
-
-Promise.prototype._progressUnchecked =
-function Promise$_progressUnchecked(progressValue) {
- if (!this.isPending()) return;
- var len = this._length();
- var progress = this._progress;
- for (var i = 0; i < len; i++) {
- var handler = this._progressHandlerAt(i);
- var promise = this._promiseAt(i);
- if (!(promise instanceof Promise)) {
- var receiver = this._receiverAt(i);
- if (typeof handler === "function") {
- handler.call(receiver, progressValue, promise);
- } else if (receiver instanceof Promise && receiver._isProxied()) {
- receiver._progressUnchecked(progressValue);
- } else if (receiver instanceof PromiseArray) {
- receiver._promiseProgressed(progressValue, promise);
- }
- continue;
- }
-
- if (typeof handler === "function") {
- async.invoke(this._doProgressWith, this, {
- handler: handler,
- promise: promise,
- receiver: this._receiverAt(i),
- value: progressValue
- });
- } else {
- async.invoke(progress, promise, progressValue);
- }
- }
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/promise.js b/node_modules/z-schema/node_modules/bluebird/js/main/promise.js
deleted file mode 100644
index fdbdad30..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/promise.js
+++ /dev/null
@@ -1,1042 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict(bluebird) {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-module.exports = function() {
-var util = require("./util.js");
-var async = require("./async.js");
-var errors = require("./errors.js");
-
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {e: null};
-
-var cast = require("./thenables.js")(Promise, INTERNAL);
-var PromiseArray = require("./promise_array.js")(Promise, INTERNAL, cast);
-var CapturedTrace = require("./captured_trace.js")();
-var CatchFilter = require("./catch_filter.js")(NEXT_FILTER);
-var PromiseResolver = require("./promise_resolver.js");
-
-var isArray = util.isArray;
-
-var errorObj = util.errorObj;
-var tryCatch1 = util.tryCatch1;
-var tryCatch2 = util.tryCatch2;
-var tryCatchApply = util.tryCatchApply;
-var RangeError = errors.RangeError;
-var TypeError = errors.TypeError;
-var CancellationError = errors.CancellationError;
-var TimeoutError = errors.TimeoutError;
-var OperationalError = errors.OperationalError;
-var originatesFromRejection = errors.originatesFromRejection;
-var markAsOriginatingFromRejection = errors.markAsOriginatingFromRejection;
-var canAttach = errors.canAttach;
-var thrower = util.thrower;
-var apiRejection = require("./errors_api_rejection")(Promise);
-
-
-var makeSelfResolutionError = function Promise$_makeSelfResolutionError() {
- return new TypeError("circular promise resolution chain");
-};
-
-function Promise(resolver) {
- if (typeof resolver !== "function") {
- throw new TypeError("the promise constructor requires a resolver function");
- }
- if (this.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly");
- }
- this._bitField = 0;
- this._fulfillmentHandler0 = void 0;
- this._rejectionHandler0 = void 0;
- this._promise0 = void 0;
- this._receiver0 = void 0;
- this._settledValue = void 0;
- this._boundTo = void 0;
- if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
-}
-
-Promise.prototype.bind = function Promise$bind(thisArg) {
- var ret = new Promise(INTERNAL);
- ret._follow(this);
- ret._propagateFrom(this, 2 | 1);
- ret._setBoundTo(thisArg);
- return ret;
-};
-
-Promise.prototype.toString = function Promise$toString() {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] =
-function Promise$catch(fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (typeof item === "function") {
- catchInstances[j++] = item;
- } else {
- var catchFilterTypeError =
- new TypeError(
- "A catch filter must be an error constructor "
- + "or a filter function");
-
- this._attachExtraTrace(catchFilterTypeError);
- async.invoke(this._reject, this, catchFilterTypeError);
- return;
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
-
- this._resetTrace();
- var catchFilter = new CatchFilter(catchInstances, fn, this);
- return this._then(void 0, catchFilter.doFilter, void 0,
- catchFilter, void 0);
- }
- return this._then(void 0, fn, void 0, void 0, void 0);
-};
-
-Promise.prototype.then =
-function Promise$then(didFulfill, didReject, didProgress) {
- return this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
-};
-
-
-Promise.prototype.done =
-function Promise$done(didFulfill, didReject, didProgress) {
- var promise = this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function Promise$spread(didFulfill, didReject) {
- return this._then(didFulfill, didReject, void 0,
- APPLY, void 0);
-};
-
-Promise.prototype.isCancellable = function Promise$isCancellable() {
- return !this.isResolved() &&
- this._cancellable();
-};
-
-Promise.prototype.toJSON = function Promise$toJSON() {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: void 0,
- rejectionReason: void 0
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this._settledValue;
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this._settledValue;
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function Promise$all() {
- return new PromiseArray(this).promise();
-};
-
-
-Promise.is = function Promise$Is(val) {
- return val instanceof Promise;
-};
-
-Promise.all = function Promise$All(promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.prototype.error = function Promise$_error(fn) {
- return this.caught(originatesFromRejection, fn);
-};
-
-Promise.prototype._resolveFromSyncValue =
-function Promise$_resolveFromSyncValue(value) {
- if (value === errorObj) {
- this._cleanValues();
- this._setRejected();
- this._settledValue = value.e;
- this._ensurePossibleRejectionHandled();
- } else {
- var maybePromise = cast(value, void 0);
- if (maybePromise instanceof Promise) {
- this._follow(maybePromise);
- } else {
- this._cleanValues();
- this._setFulfilled();
- this._settledValue = value;
- }
- }
-};
-
-Promise.method = function Promise$_Method(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("fn must be a function");
- }
- return function Promise$_method() {
- var value;
- switch(arguments.length) {
- case 0: value = tryCatch1(fn, this, void 0); break;
- case 1: value = tryCatch1(fn, this, arguments[0]); break;
- case 2: value = tryCatch2(fn, this, arguments[0], arguments[1]); break;
- default:
- var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
- value = tryCatchApply(fn, args, this); break;
- }
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {
- if (typeof fn !== "function") {
- return apiRejection("fn must be a function");
- }
- var value = isArray(args)
- ? tryCatchApply(fn, args, ctx)
- : tryCatch1(fn, ctx, args);
-
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.defer = Promise.pending = function Promise$Defer() {
- var promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- return new PromiseResolver(promise);
-};
-
-Promise.bind = function Promise$Bind(thisArg) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._setFulfilled();
- ret._setBoundTo(thisArg);
- return ret;
-};
-
-Promise.cast = function Promise$_Cast(obj) {
- var ret = cast(obj, void 0);
- if (!(ret instanceof Promise)) {
- var val = ret;
- ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._setFulfilled();
- ret._cleanValues();
- ret._settledValue = val;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function Promise$Reject(reason) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- markAsOriginatingFromRejection(reason);
- ret._cleanValues();
- ret._setRejected();
- ret._settledValue = reason;
- if (!canAttach(reason)) {
- var trace = new Error(reason + "");
- ret._setCarriedStackTrace(trace);
- }
- ret._ensurePossibleRejectionHandled();
- return ret;
-};
-
-Promise.onPossiblyUnhandledRejection =
-function Promise$OnPossiblyUnhandledRejection(fn) {
- CapturedTrace.possiblyUnhandledRejection = typeof fn === "function"
- ? fn : void 0;
-};
-
-var unhandledRejectionHandled;
-Promise.onUnhandledRejectionHandled =
-function Promise$onUnhandledRejectionHandled(fn) {
- unhandledRejectionHandled = typeof fn === "function" ? fn : void 0;
-};
-
-var debugging = false || !!(
- typeof process !== "undefined" &&
- typeof process.execPath === "string" &&
- typeof process.env === "object" &&
- (process.env["BLUEBIRD_DEBUG"] ||
- process.env["NODE_ENV"] === "development")
-);
-
-
-Promise.longStackTraces = function Promise$LongStackTraces() {
- if (async.haveItemsQueued() &&
- debugging === false
- ) {
- throw new Error("cannot enable long stack traces after promises have been created");
- }
- debugging = CapturedTrace.isSupported();
-};
-
-Promise.hasLongStackTraces = function Promise$HasLongStackTraces() {
- return debugging && CapturedTrace.isSupported();
-};
-
-Promise.prototype._then =
-function Promise$_then(
- didFulfill,
- didReject,
- didProgress,
- receiver,
- internalData
-) {
- var haveInternalData = internalData !== void 0;
- var ret = haveInternalData ? internalData : new Promise(INTERNAL);
-
- if (!haveInternalData) {
- if (debugging) {
- var haveSameContext = this._peekContext() === this._traceParent;
- ret._traceParent = haveSameContext ? this._traceParent : this;
- }
- ret._propagateFrom(this, 7);
- }
-
- var callbackIndex =
- this._addCallbacks(didFulfill, didReject, didProgress, ret, receiver);
-
- if (this.isResolved()) {
- async.invoke(this._queueSettleAt, this, callbackIndex);
- }
-
- return ret;
-};
-
-Promise.prototype._length = function Promise$_length() {
- return this._bitField & 262143;
-};
-
-Promise.prototype._isFollowingOrFulfilledOrRejected =
-function Promise$_isFollowingOrFulfilledOrRejected() {
- return (this._bitField & 939524096) > 0;
-};
-
-Promise.prototype._isFollowing = function Promise$_isFollowing() {
- return (this._bitField & 536870912) === 536870912;
-};
-
-Promise.prototype._setLength = function Promise$_setLength(len) {
- this._bitField = (this._bitField & -262144) |
- (len & 262143);
-};
-
-Promise.prototype._setFulfilled = function Promise$_setFulfilled() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._setRejected = function Promise$_setRejected() {
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._setFollowing = function Promise$_setFollowing() {
- this._bitField = this._bitField | 536870912;
-};
-
-Promise.prototype._setIsFinal = function Promise$_setIsFinal() {
- this._bitField = this._bitField | 33554432;
-};
-
-Promise.prototype._isFinal = function Promise$_isFinal() {
- return (this._bitField & 33554432) > 0;
-};
-
-Promise.prototype._cancellable = function Promise$_cancellable() {
- return (this._bitField & 67108864) > 0;
-};
-
-Promise.prototype._setCancellable = function Promise$_setCancellable() {
- this._bitField = this._bitField | 67108864;
-};
-
-Promise.prototype._unsetCancellable = function Promise$_unsetCancellable() {
- this._bitField = this._bitField & (~67108864);
-};
-
-Promise.prototype._setRejectionIsUnhandled =
-function Promise$_setRejectionIsUnhandled() {
- this._bitField = this._bitField | 2097152;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled =
-function Promise$_unsetRejectionIsUnhandled() {
- this._bitField = this._bitField & (~2097152);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled =
-function Promise$_isRejectionUnhandled() {
- return (this._bitField & 2097152) > 0;
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified =
-function Promise$_setUnhandledRejectionIsNotified() {
- this._bitField = this._bitField | 524288;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified =
-function Promise$_unsetUnhandledRejectionIsNotified() {
- this._bitField = this._bitField & (~524288);
-};
-
-Promise.prototype._isUnhandledRejectionNotified =
-function Promise$_isUnhandledRejectionNotified() {
- return (this._bitField & 524288) > 0;
-};
-
-Promise.prototype._setCarriedStackTrace =
-function Promise$_setCarriedStackTrace(capturedTrace) {
- this._bitField = this._bitField | 1048576;
- this._fulfillmentHandler0 = capturedTrace;
-};
-
-Promise.prototype._unsetCarriedStackTrace =
-function Promise$_unsetCarriedStackTrace() {
- this._bitField = this._bitField & (~1048576);
- this._fulfillmentHandler0 = void 0;
-};
-
-Promise.prototype._isCarryingStackTrace =
-function Promise$_isCarryingStackTrace() {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._getCarriedStackTrace =
-function Promise$_getCarriedStackTrace() {
- return this._isCarryingStackTrace()
- ? this._fulfillmentHandler0
- : void 0;
-};
-
-Promise.prototype._receiverAt = function Promise$_receiverAt(index) {
- var ret = index === 0
- ? this._receiver0
- : this[(index << 2) + index - 5 + 4];
- if (this._isBound() && ret === void 0) {
- return this._boundTo;
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function Promise$_promiseAt(index) {
- return index === 0
- ? this._promise0
- : this[(index << 2) + index - 5 + 3];
-};
-
-Promise.prototype._fulfillmentHandlerAt =
-function Promise$_fulfillmentHandlerAt(index) {
- return index === 0
- ? this._fulfillmentHandler0
- : this[(index << 2) + index - 5 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt =
-function Promise$_rejectionHandlerAt(index) {
- return index === 0
- ? this._rejectionHandler0
- : this[(index << 2) + index - 5 + 1];
-};
-
-Promise.prototype._addCallbacks = function Promise$_addCallbacks(
- fulfill,
- reject,
- progress,
- promise,
- receiver
-) {
- var index = this._length();
-
- if (index >= 262143 - 5) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- if (receiver !== void 0) this._receiver0 = receiver;
- if (typeof fulfill === "function" && !this._isCarryingStackTrace())
- this._fulfillmentHandler0 = fulfill;
- if (typeof reject === "function") this._rejectionHandler0 = reject;
- if (typeof progress === "function") this._progressHandler0 = progress;
- } else {
- var base = (index << 2) + index - 5;
- this[base + 3] = promise;
- this[base + 4] = receiver;
- this[base + 0] = typeof fulfill === "function"
- ? fulfill : void 0;
- this[base + 1] = typeof reject === "function"
- ? reject : void 0;
- this[base + 2] = typeof progress === "function"
- ? progress : void 0;
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._setProxyHandlers =
-function Promise$_setProxyHandlers(receiver, promiseSlotValue) {
- var index = this._length();
-
- if (index >= 262143 - 5) {
- index = 0;
- this._setLength(0);
- }
- if (index === 0) {
- this._promise0 = promiseSlotValue;
- this._receiver0 = receiver;
- } else {
- var base = (index << 2) + index - 5;
- this[base + 3] = promiseSlotValue;
- this[base + 4] = receiver;
- this[base + 0] =
- this[base + 1] =
- this[base + 2] = void 0;
- }
- this._setLength(index + 1);
-};
-
-Promise.prototype._proxyPromiseArray =
-function Promise$_proxyPromiseArray(promiseArray, index) {
- this._setProxyHandlers(promiseArray, index);
-};
-
-Promise.prototype._proxyPromise = function Promise$_proxyPromise(promise) {
- promise._setProxied();
- this._setProxyHandlers(promise, -1);
-};
-
-Promise.prototype._setBoundTo = function Promise$_setBoundTo(obj) {
- if (obj !== void 0) {
- this._bitField = this._bitField | 8388608;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~8388608);
- }
-};
-
-Promise.prototype._isBound = function Promise$_isBound() {
- return (this._bitField & 8388608) === 8388608;
-};
-
-Promise.prototype._resolveFromResolver =
-function Promise$_resolveFromResolver(resolver) {
- var promise = this;
- this._setTrace(void 0);
- this._pushContext();
-
- function Promise$_resolver(val) {
- if (promise._tryFollow(val)) {
- return;
- }
- promise._fulfill(val);
- }
- function Promise$_rejecter(val) {
- var trace = canAttach(val) ? val : new Error(val + "");
- promise._attachExtraTrace(trace);
- markAsOriginatingFromRejection(val);
- promise._reject(val, trace === val ? void 0 : trace);
- }
- var r = tryCatch2(resolver, void 0, Promise$_resolver, Promise$_rejecter);
- this._popContext();
-
- if (r !== void 0 && r === errorObj) {
- var e = r.e;
- var trace = canAttach(e) ? e : new Error(e + "");
- promise._reject(e, trace);
- }
-};
-
-Promise.prototype._spreadSlowCase =
-function Promise$_spreadSlowCase(targetFn, promise, values, boundTo) {
- var promiseForAll = new PromiseArray(values).promise();
- var promise2 = promiseForAll._then(function() {
- return targetFn.apply(boundTo, arguments);
- }, void 0, void 0, APPLY, void 0);
- promise._follow(promise2);
-};
-
-Promise.prototype._callSpread =
-function Promise$_callSpread(handler, promise, value) {
- var boundTo = this._boundTo;
- if (isArray(value)) {
- for (var i = 0, len = value.length; i < len; ++i) {
- if (cast(value[i], void 0) instanceof Promise) {
- this._spreadSlowCase(handler, promise, value, boundTo);
- return;
- }
- }
- }
- promise._pushContext();
- return tryCatchApply(handler, value, boundTo);
-};
-
-Promise.prototype._callHandler =
-function Promise$_callHandler(
- handler, receiver, promise, value) {
- var x;
- if (receiver === APPLY && !this.isRejected()) {
- x = this._callSpread(handler, promise, value);
- } else {
- promise._pushContext();
- x = tryCatch1(handler, receiver, value);
- }
- promise._popContext();
- return x;
-};
-
-Promise.prototype._settlePromiseFromHandler =
-function Promise$_settlePromiseFromHandler(
- handler, receiver, value, promise
-) {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- return;
- }
- var x = this._callHandler(handler, receiver, promise, value);
- if (promise._isFollowing()) return;
-
- if (x === errorObj || x === promise || x === NEXT_FILTER) {
- var err = x === promise
- ? makeSelfResolutionError()
- : x.e;
- var trace = canAttach(err) ? err : new Error(err + "");
- if (x !== NEXT_FILTER) promise._attachExtraTrace(trace);
- promise._rejectUnchecked(err, trace);
- } else {
- var castValue = cast(x, promise);
- if (castValue instanceof Promise) {
- if (castValue.isRejected() &&
- !castValue._isCarryingStackTrace() &&
- !canAttach(castValue._settledValue)) {
- var trace = new Error(castValue._settledValue + "");
- promise._attachExtraTrace(trace);
- castValue._setCarriedStackTrace(trace);
- }
- promise._follow(castValue);
- promise._propagateFrom(castValue, 1);
- } else {
- promise._fulfillUnchecked(x);
- }
- }
-};
-
-Promise.prototype._follow =
-function Promise$_follow(promise) {
- this._setFollowing();
-
- if (promise.isPending()) {
- this._propagateFrom(promise, 1);
- promise._proxyPromise(this);
- } else if (promise.isFulfilled()) {
- this._fulfillUnchecked(promise._settledValue);
- } else {
- this._rejectUnchecked(promise._settledValue,
- promise._getCarriedStackTrace());
- }
-
- if (promise._isRejectionUnhandled()) promise._unsetRejectionIsUnhandled();
-
- if (debugging &&
- promise._traceParent == null) {
- promise._traceParent = this;
- }
-};
-
-Promise.prototype._tryFollow =
-function Promise$_tryFollow(value) {
- if (this._isFollowingOrFulfilledOrRejected() ||
- value === this) {
- return false;
- }
- var maybePromise = cast(value, void 0);
- if (!(maybePromise instanceof Promise)) {
- return false;
- }
- this._follow(maybePromise);
- return true;
-};
-
-Promise.prototype._resetTrace = function Promise$_resetTrace() {
- if (debugging) {
- this._trace = new CapturedTrace(this._peekContext() === void 0);
- }
-};
-
-Promise.prototype._setTrace = function Promise$_setTrace(parent) {
- if (debugging) {
- var context = this._peekContext();
- this._traceParent = context;
- var isTopLevel = context === void 0;
- if (parent !== void 0 &&
- parent._traceParent === context) {
- this._trace = parent._trace;
- } else {
- this._trace = new CapturedTrace(isTopLevel);
- }
- }
- return this;
-};
-
-Promise.prototype._attachExtraTrace =
-function Promise$_attachExtraTrace(error) {
- if (debugging) {
- var promise = this;
- var stack = error.stack;
- stack = typeof stack === "string"
- ? stack.split("\n") : [];
- var headerLineCount = 1;
- var combinedTraces = 1;
- while(promise != null &&
- promise._trace != null) {
- stack = CapturedTrace.combine(
- stack,
- promise._trace.stack.split("\n")
- );
- promise = promise._traceParent;
- combinedTraces++;
- }
-
- var stackTraceLimit = Error.stackTraceLimit || 10;
- var max = (stackTraceLimit + headerLineCount) * combinedTraces;
- var len = stack.length;
- if (len > max) {
- stack.length = max;
- }
- if (stack.length <= headerLineCount) {
- error.stack = "(No stack trace)";
- } else {
- error.stack = stack.join("\n");
- }
- }
-};
-
-Promise.prototype._cleanValues = function Promise$_cleanValues() {
- if (this._cancellable()) {
- this._cancellationParent = void 0;
- }
-};
-
-Promise.prototype._propagateFrom =
-function Promise$_propagateFrom(parent, flags) {
- if ((flags & 1) > 0 && parent._cancellable()) {
- this._setCancellable();
- this._cancellationParent = parent;
- }
- if ((flags & 4) > 0) {
- this._setBoundTo(parent._boundTo);
- }
- if ((flags & 2) > 0) {
- this._setTrace(parent);
- }
-};
-
-Promise.prototype._fulfill = function Promise$_fulfill(value) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._fulfillUnchecked(value);
-};
-
-Promise.prototype._reject =
-function Promise$_reject(reason, carriedStackTrace) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._rejectUnchecked(reason, carriedStackTrace);
-};
-
-Promise.prototype._settlePromiseAt = function Promise$_settlePromiseAt(index) {
- var handler = this.isFulfilled()
- ? this._fulfillmentHandlerAt(index)
- : this._rejectionHandlerAt(index);
-
- var value = this._settledValue;
- var receiver = this._receiverAt(index);
- var promise = this._promiseAt(index);
-
- if (typeof handler === "function") {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- } else {
- var done = false;
- var isFulfilled = this.isFulfilled();
- if (receiver !== void 0) {
- if (receiver instanceof Promise &&
- receiver._isProxied()) {
- receiver._unsetProxied();
-
- if (isFulfilled) receiver._fulfillUnchecked(value);
- else receiver._rejectUnchecked(value,
- this._getCarriedStackTrace());
- done = true;
- } else if (receiver instanceof PromiseArray) {
- if (isFulfilled) receiver._promiseFulfilled(value, promise);
- else receiver._promiseRejected(value, promise);
- done = true;
- }
- }
-
- if (!done) {
- if (isFulfilled) promise._fulfill(value);
- else promise._reject(value, this._getCarriedStackTrace());
- }
- }
-
- if (index >= 256) {
- this._queueGC();
- }
-};
-
-Promise.prototype._isProxied = function Promise$_isProxied() {
- return (this._bitField & 4194304) === 4194304;
-};
-
-Promise.prototype._setProxied = function Promise$_setProxied() {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._unsetProxied = function Promise$_unsetProxied() {
- this._bitField = this._bitField & (~4194304);
-};
-
-Promise.prototype._isGcQueued = function Promise$_isGcQueued() {
- return (this._bitField & -1073741824) === -1073741824;
-};
-
-Promise.prototype._setGcQueued = function Promise$_setGcQueued() {
- this._bitField = this._bitField | -1073741824;
-};
-
-Promise.prototype._unsetGcQueued = function Promise$_unsetGcQueued() {
- this._bitField = this._bitField & (~-1073741824);
-};
-
-Promise.prototype._queueGC = function Promise$_queueGC() {
- if (this._isGcQueued()) return;
- this._setGcQueued();
- async.invokeLater(this._gc, this, void 0);
-};
-
-Promise.prototype._gc = function Promise$gc() {
- var len = this._length() * 5;
- for (var i = 0; i < len; i++) {
- delete this[i];
- }
- this._setLength(0);
- this._unsetGcQueued();
-};
-
-Promise.prototype._queueSettleAt = function Promise$_queueSettleAt(index) {
- if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
- async.invoke(this._settlePromiseAt, this, index);
-};
-
-Promise.prototype._fulfillUnchecked =
-function Promise$_fulfillUnchecked(value) {
- if (!this.isPending()) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._rejectUnchecked(err, void 0);
- }
- this._cleanValues();
- this._setFulfilled();
- this._settledValue = value;
- var len = this._length();
-
- if (len > 0) {
- async.invoke(this._settlePromises, this, len);
- }
-};
-
-Promise.prototype._rejectUncheckedCheckError =
-function Promise$_rejectUncheckedCheckError(reason) {
- var trace = canAttach(reason) ? reason : new Error(reason + "");
- this._rejectUnchecked(reason, trace === reason ? void 0 : trace);
-};
-
-Promise.prototype._rejectUnchecked =
-function Promise$_rejectUnchecked(reason, trace) {
- if (!this.isPending()) return;
- if (reason === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._rejectUnchecked(err);
- }
- this._cleanValues();
- this._setRejected();
- this._settledValue = reason;
-
- if (this._isFinal()) {
- async.invokeLater(thrower, void 0, trace === void 0 ? reason : trace);
- return;
- }
- var len = this._length();
-
- if (trace !== void 0) this._setCarriedStackTrace(trace);
-
- if (len > 0) {
- async.invoke(this._rejectPromises, this, null);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._rejectPromises = function Promise$_rejectPromises() {
- this._settlePromises();
- this._unsetCarriedStackTrace();
-};
-
-Promise.prototype._settlePromises = function Promise$_settlePromises() {
- var len = this._length();
- for (var i = 0; i < len; i++) {
- this._settlePromiseAt(i);
- }
-};
-
-Promise.prototype._ensurePossibleRejectionHandled =
-function Promise$_ensurePossibleRejectionHandled() {
- this._setRejectionIsUnhandled();
- if (CapturedTrace.possiblyUnhandledRejection !== void 0) {
- async.invokeLater(this._notifyUnhandledRejection, this, void 0);
- }
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled =
-function Promise$_notifyUnhandledRejectionIsHandled() {
- if (typeof unhandledRejectionHandled === "function") {
- async.invokeLater(unhandledRejectionHandled, void 0, this);
- }
-};
-
-Promise.prototype._notifyUnhandledRejection =
-function Promise$_notifyUnhandledRejection() {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue;
- var trace = this._getCarriedStackTrace();
-
- this._setUnhandledRejectionIsNotified();
-
- if (trace !== void 0) {
- this._unsetCarriedStackTrace();
- reason = trace;
- }
- if (typeof CapturedTrace.possiblyUnhandledRejection === "function") {
- CapturedTrace.possiblyUnhandledRejection(reason, this);
- }
- }
-};
-
-var contextStack = [];
-Promise.prototype._peekContext = function Promise$_peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return void 0;
-
-};
-
-Promise.prototype._pushContext = function Promise$_pushContext() {
- if (!debugging) return;
- contextStack.push(this);
-};
-
-Promise.prototype._popContext = function Promise$_popContext() {
- if (!debugging) return;
- contextStack.pop();
-};
-
-Promise.noConflict = function Promise$NoConflict() {
- return noConflict(Promise);
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") throw new TypeError("fn must be a function");
- async._schedule = fn;
-};
-
-if (!CapturedTrace.isSupported()) {
- Promise.longStackTraces = function(){};
- debugging = false;
-}
-
-Promise._makeSelfResolutionError = makeSelfResolutionError;
-require("./finally.js")(Promise, NEXT_FILTER, cast);
-require("./direct_resolve.js")(Promise);
-require("./synchronous_inspection.js")(Promise);
-require("./join.js")(Promise, PromiseArray, cast, INTERNAL);
-Promise.RangeError = RangeError;
-Promise.CancellationError = CancellationError;
-Promise.TimeoutError = TimeoutError;
-Promise.TypeError = TypeError;
-Promise.OperationalError = OperationalError;
-Promise.RejectionError = OperationalError;
-Promise.AggregateError = errors.AggregateError;
-
-util.toFastProperties(Promise);
-util.toFastProperties(Promise.prototype);
-Promise.Promise = Promise;
-require('./timers.js')(Promise,INTERNAL,cast);
-require('./race.js')(Promise,INTERNAL,cast);
-require('./call_get.js')(Promise);
-require('./generators.js')(Promise,apiRejection,INTERNAL,cast);
-require('./map.js')(Promise,PromiseArray,apiRejection,cast,INTERNAL);
-require('./nodeify.js')(Promise);
-require('./promisify.js')(Promise,INTERNAL);
-require('./props.js')(Promise,PromiseArray,cast);
-require('./reduce.js')(Promise,PromiseArray,apiRejection,cast,INTERNAL);
-require('./settle.js')(Promise,PromiseArray);
-require('./some.js')(Promise,PromiseArray,apiRejection);
-require('./progress.js')(Promise,PromiseArray);
-require('./cancel.js')(Promise,INTERNAL);
-require('./filter.js')(Promise,INTERNAL);
-require('./any.js')(Promise,PromiseArray);
-require('./each.js')(Promise,INTERNAL);
-require('./using.js')(Promise,apiRejection,cast);
-
-Promise.prototype = Promise.prototype;
-return Promise;
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/promise_array.js b/node_modules/z-schema/node_modules/bluebird/js/main/promise_array.js
deleted file mode 100644
index db85c8aa..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/promise_array.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL, cast) {
-var canAttach = require("./errors.js").canAttach;
-var util = require("./util.js");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -1: return void 0;
- case -2: return [];
- case -3: return {};
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- var parent = void 0;
- if (values instanceof Promise) {
- parent = values;
- promise._propagateFrom(parent, 1 | 4);
- }
- promise._setTrace(parent);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(void 0, -2);
-}
-PromiseArray.prototype.length = function PromiseArray$length() {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function PromiseArray$promise() {
- return this._promise;
-};
-
-PromiseArray.prototype._init =
-function PromiseArray$_init(_, resolveValueIfEmpty) {
- var values = cast(this._values, void 0);
- if (values instanceof Promise) {
- this._values = values;
- values._setBoundTo(this._promise._boundTo);
- if (values.isFulfilled()) {
- values = values._settledValue;
- if (!isArray(values)) {
- var err = new Promise.TypeError("expecting an array, a promise or a thenable");
- this.__hardReject__(err);
- return;
- }
- } else if (values.isPending()) {
- values._then(
- PromiseArray$_init,
- this._reject,
- void 0,
- this,
- resolveValueIfEmpty
- );
- return;
- } else {
- values._unsetRejectionIsUnhandled();
- this._reject(values._settledValue);
- return;
- }
- } else if (!isArray(values)) {
- var err = new Promise.TypeError("expecting an array, a promise or a thenable");
- this.__hardReject__(err);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- var len = this.getActualLength(values.length);
- var newLen = len;
- var newValues = this.shouldCopyValues() ? new Array(len) : this._values;
- var isDirectScanNeeded = false;
- for (var i = 0; i < len; ++i) {
- var maybePromise = cast(values[i], void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- maybePromise._proxyPromiseArray(this, i);
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- isDirectScanNeeded = true;
- }
- } else {
- isDirectScanNeeded = true;
- }
- newValues[i] = maybePromise;
- }
- this._values = newValues;
- this._length = newLen;
- if (isDirectScanNeeded) {
- this._scanDirectValues(len);
- }
-};
-
-PromiseArray.prototype._settlePromiseAt =
-function PromiseArray$_settlePromiseAt(index) {
- var value = this._values[index];
- if (!(value instanceof Promise)) {
- this._promiseFulfilled(value, index);
- } else if (value.isFulfilled()) {
- this._promiseFulfilled(value._settledValue, index);
- } else if (value.isRejected()) {
- this._promiseRejected(value._settledValue, index);
- }
-};
-
-PromiseArray.prototype._scanDirectValues =
-function PromiseArray$_scanDirectValues(len) {
- for (var i = 0; i < len; ++i) {
- if (this._isResolved()) {
- break;
- }
- this._settlePromiseAt(i);
- }
-};
-
-PromiseArray.prototype._isResolved = function PromiseArray$_isResolved() {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function PromiseArray$_resolve(value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype.__hardReject__ =
-PromiseArray.prototype._reject = function PromiseArray$_reject(reason) {
- this._values = null;
- var trace = canAttach(reason) ? reason : new Error(reason + "");
- this._promise._attachExtraTrace(trace);
- this._promise._reject(reason, trace);
-};
-
-PromiseArray.prototype._promiseProgressed =
-function PromiseArray$_promiseProgressed(progressValue, index) {
- if (this._isResolved()) return;
- this._promise._progress({
- index: index,
- value: progressValue
- });
-};
-
-
-PromiseArray.prototype._promiseFulfilled =
-function PromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- }
-};
-
-PromiseArray.prototype._promiseRejected =
-function PromiseArray$_promiseRejected(reason, index) {
- if (this._isResolved()) return;
- this._totalResolved++;
- this._reject(reason);
-};
-
-PromiseArray.prototype.shouldCopyValues =
-function PromiseArray$_shouldCopyValues() {
- return true;
-};
-
-PromiseArray.prototype.getActualLength =
-function PromiseArray$getActualLength(len) {
- return len;
-};
-
-return PromiseArray;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/promise_resolver.js b/node_modules/z-schema/node_modules/bluebird/js/main/promise_resolver.js
deleted file mode 100644
index 103c04e4..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/promise_resolver.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var util = require("./util.js");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = require("./errors.js");
-var TimeoutError = errors.TimeoutError;
-var OperationalError = errors.OperationalError;
-var async = require("./async.js");
-var haveGetters = util.haveGetters;
-var es5 = require("./es5.js");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- } else {
- ret = obj;
- }
- errors.markAsOriginatingFromRejection(ret);
- return ret;
-}
-
-function nodebackForPromise(promise) {
- function PromiseResolver$_callback(err, value) {
- if (promise === null) return;
-
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (arguments.length > 2) {
- var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
- promise._fulfill(args);
- } else {
- promise._fulfill(value);
- }
-
- promise = null;
- }
- return PromiseResolver$_callback;
-}
-
-
-var PromiseResolver;
-if (!haveGetters) {
- PromiseResolver = function PromiseResolver(promise) {
- this.promise = promise;
- this.asCallback = nodebackForPromise(promise);
- this.callback = this.asCallback;
- };
-}
-else {
- PromiseResolver = function PromiseResolver(promise) {
- this.promise = promise;
- };
-}
-if (haveGetters) {
- var prop = {
- get: function() {
- return nodebackForPromise(this.promise);
- }
- };
- es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
- es5.defineProperty(PromiseResolver.prototype, "callback", prop);
-}
-
-PromiseResolver._nodebackForPromise = nodebackForPromise;
-
-PromiseResolver.prototype.toString = function PromiseResolver$toString() {
- return "[object PromiseResolver]";
-};
-
-PromiseResolver.prototype.resolve =
-PromiseResolver.prototype.fulfill = function PromiseResolver$resolve(value) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
-
- var promise = this.promise;
- if (promise._tryFollow(value)) {
- return;
- }
- async.invoke(promise._fulfill, promise, value);
-};
-
-PromiseResolver.prototype.reject = function PromiseResolver$reject(reason) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
-
- var promise = this.promise;
- errors.markAsOriginatingFromRejection(reason);
- var trace = errors.canAttach(reason) ? reason : new Error(reason + "");
- promise._attachExtraTrace(trace);
- async.invoke(promise._reject, promise, reason);
- if (trace !== reason) {
- async.invoke(this._setCarriedStackTrace, this, trace);
- }
-};
-
-PromiseResolver.prototype.progress =
-function PromiseResolver$progress(value) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
- async.invoke(this.promise._progress, this.promise, value);
-};
-
-PromiseResolver.prototype.cancel = function PromiseResolver$cancel() {
- async.invoke(this.promise.cancel, this.promise, void 0);
-};
-
-PromiseResolver.prototype.timeout = function PromiseResolver$timeout() {
- this.reject(new TimeoutError("timeout"));
-};
-
-PromiseResolver.prototype.isResolved = function PromiseResolver$isResolved() {
- return this.promise.isResolved();
-};
-
-PromiseResolver.prototype.toJSON = function PromiseResolver$toJSON() {
- return this.promise.toJSON();
-};
-
-PromiseResolver.prototype._setCarriedStackTrace =
-function PromiseResolver$_setCarriedStackTrace(trace) {
- if (this.promise.isRejected()) {
- this.promise._setCarriedStackTrace(trace);
- }
-};
-
-module.exports = PromiseResolver;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/promisify.js b/node_modules/z-schema/node_modules/bluebird/js/main/promisify.js
deleted file mode 100644
index 933e0cf4..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/promisify.js
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var THIS = {};
-var util = require("./util.js");
-var nodebackForPromise = require("./promise_resolver.js")
- ._nodebackForPromise;
-var withAppended = util.withAppended;
-var maybeWrapAsError = util.maybeWrapAsError;
-var canEvaluate = util.canEvaluate;
-var TypeError = require("./errors").TypeError;
-var defaultSuffix = "Async";
-var defaultFilter = function(name, func) {
- return util.isIdentifier(name) &&
- name.charAt(0) !== "_" &&
- !util.isClass(func);
-};
-var defaultPromisified = {__isPromisified__: true};
-
-
-function escapeIdentRegex(str) {
- return str.replace(/([$])/, "\\$");
-}
-
-function isPromisified(fn) {
- try {
- return fn.__isPromisified__ === true;
- }
- catch (e) {
- return false;
- }
-}
-
-function hasPromisified(obj, key, suffix) {
- var val = util.getDataPropertyOrDefault(obj, key + suffix,
- defaultPromisified);
- return val ? isPromisified(val) : false;
-}
-function checkValid(ret, suffix, suffixRegexp) {
- for (var i = 0; i < ret.length; i += 2) {
- var key = ret[i];
- if (suffixRegexp.test(key)) {
- var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
- for (var j = 0; j < ret.length; j += 2) {
- if (ret[j] === keyWithoutAsyncSuffix) {
- throw new TypeError("Cannot promisify an API " +
- "that has normal methods with '"+suffix+"'-suffix");
- }
- }
- }
- }
-}
-
-function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
- var keys = util.inheritedDataKeys(obj);
- var ret = [];
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var value = obj[key];
- if (typeof value === "function" &&
- !isPromisified(value) &&
- !hasPromisified(obj, key, suffix) &&
- filter(key, value, obj)) {
- ret.push(key, value);
- }
- }
- checkValid(ret, suffix, suffixRegexp);
- return ret;
-}
-
-function switchCaseArgumentOrder(likelyArgumentCount) {
- var ret = [likelyArgumentCount];
- var min = Math.max(0, likelyArgumentCount - 1 - 5);
- for(var i = likelyArgumentCount - 1; i >= min; --i) {
- if (i === likelyArgumentCount) continue;
- ret.push(i);
- }
- for(var i = likelyArgumentCount + 1; i <= 5; ++i) {
- ret.push(i);
- }
- return ret;
-}
-
-function argumentSequence(argumentCount) {
- return util.filledRange(argumentCount, "arguments[", "]");
-}
-
-function parameterDeclaration(parameterCount) {
- return util.filledRange(parameterCount, "_arg", "");
-}
-
-function parameterCount(fn) {
- if (typeof fn.length === "number") {
- return Math.max(Math.min(fn.length, 1023 + 1), 0);
- }
- return 0;
-}
-
-function generatePropertyAccess(key) {
- if (util.isIdentifier(key)) {
- return "." + key;
- }
- else return "['" + key.replace(/(['\\])/g, "\\$1") + "']";
-}
-
-function makeNodePromisifiedEval(callback, receiver, originalName, fn, suffix) {
- var newParameterCount = Math.max(0, parameterCount(fn) - 1);
- var argumentOrder = switchCaseArgumentOrder(newParameterCount);
- var callbackName =
- (typeof originalName === "string" && util.isIdentifier(originalName)
- ? originalName + suffix
- : "promisified");
-
- function generateCallForArgumentCount(count) {
- var args = argumentSequence(count).join(", ");
- var comma = count > 0 ? ", " : "";
- var ret;
- if (typeof callback === "string") {
- ret = " \n\
- this.method(args, fn); \n\
- break; \n\
- ".replace(".method", generatePropertyAccess(callback));
- } else if (receiver === THIS) {
- ret = " \n\
- callback.call(this, args, fn); \n\
- break; \n\
- ";
- } else if (receiver !== void 0) {
- ret = " \n\
- callback.call(receiver, args, fn); \n\
- break; \n\
- ";
- } else {
- ret = " \n\
- callback(args, fn); \n\
- break; \n\
- ";
- }
- return ret.replace("args", args).replace(", ", comma);
- }
-
- function generateArgumentSwitchCase() {
- var ret = "";
- for(var i = 0; i < argumentOrder.length; ++i) {
- ret += "case " + argumentOrder[i] +":" +
- generateCallForArgumentCount(argumentOrder[i]);
- }
- var codeForCall;
- if (typeof callback === "string") {
- codeForCall = " \n\
- this.property.apply(this, args); \n\
- "
- .replace(".property", generatePropertyAccess(callback));
- } else if (receiver === THIS) {
- codeForCall = " \n\
- callback.apply(this, args); \n\
- ";
- } else {
- codeForCall = " \n\
- callback.apply(receiver, args); \n\
- ";
- }
-
- ret += " \n\
- default: \n\
- var args = new Array(len + 1); \n\
- var i = 0; \n\
- for (var i = 0; i < len; ++i) { \n\
- args[i] = arguments[i]; \n\
- } \n\
- args[i] = fn; \n\
- [CodeForCall] \n\
- break; \n\
- ".replace("[CodeForCall]", codeForCall);
- return ret;
- }
-
- return new Function("Promise",
- "callback",
- "receiver",
- "withAppended",
- "maybeWrapAsError",
- "nodebackForPromise",
- "INTERNAL"," \n\
- var ret = function FunctionName(Parameters) { \n\
- 'use strict'; \n\
- var len = arguments.length; \n\
- var promise = new Promise(INTERNAL); \n\
- promise._setTrace(void 0); \n\
- var fn = nodebackForPromise(promise); \n\
- try { \n\
- switch(len) { \n\
- [CodeForSwitchCase] \n\
- } \n\
- } catch (e) { \n\
- var wrapped = maybeWrapAsError(e); \n\
- promise._attachExtraTrace(wrapped); \n\
- promise._reject(wrapped); \n\
- } \n\
- return promise; \n\
- }; \n\
- ret.__isPromisified__ = true; \n\
- return ret; \n\
- "
- .replace("FunctionName", callbackName)
- .replace("Parameters", parameterDeclaration(newParameterCount))
- .replace("[CodeForSwitchCase]", generateArgumentSwitchCase()))(
- Promise,
- callback,
- receiver,
- withAppended,
- maybeWrapAsError,
- nodebackForPromise,
- INTERNAL
- );
-}
-
-function makeNodePromisifiedClosure(callback, receiver) {
- function promisified() {
- var _receiver = receiver;
- if (receiver === THIS) _receiver = this;
- if (typeof callback === "string") {
- callback = _receiver[callback];
- }
- var promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- var fn = nodebackForPromise(promise);
- try {
- callback.apply(_receiver, withAppended(arguments, fn));
- } catch(e) {
- var wrapped = maybeWrapAsError(e);
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- }
- return promise;
- }
- promisified.__isPromisified__ = true;
- return promisified;
-}
-
-var makeNodePromisified = canEvaluate
- ? makeNodePromisifiedEval
- : makeNodePromisifiedClosure;
-
-function promisifyAll(obj, suffix, filter, promisifier) {
- var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
- var methods =
- promisifiableMethods(obj, suffix, suffixRegexp, filter);
-
- for (var i = 0, len = methods.length; i < len; i+= 2) {
- var key = methods[i];
- var fn = methods[i+1];
- var promisifiedKey = key + suffix;
- obj[promisifiedKey] = promisifier === makeNodePromisified
- ? makeNodePromisified(key, THIS, key, fn, suffix)
- : promisifier(fn);
- }
- util.toFastProperties(obj);
- return obj;
-}
-
-function promisify(callback, receiver) {
- return makeNodePromisified(callback, receiver, void 0, callback);
-}
-
-Promise.promisify = function Promise$Promisify(fn, receiver) {
- if (typeof fn !== "function") {
- throw new TypeError("fn must be a function");
- }
- if (isPromisified(fn)) {
- return fn;
- }
- return promisify(fn, arguments.length < 2 ? THIS : receiver);
-};
-
-Promise.promisifyAll = function Promise$PromisifyAll(target, options) {
- if (typeof target !== "function" && typeof target !== "object") {
- throw new TypeError("the target of promisifyAll must be an object or a function");
- }
- options = Object(options);
- var suffix = options.suffix;
- if (typeof suffix !== "string") suffix = defaultSuffix;
- var filter = options.filter;
- if (typeof filter !== "function") filter = defaultFilter;
- var promisifier = options.promisifier;
- if (typeof promisifier !== "function") promisifier = makeNodePromisified;
-
- if (!util.isIdentifier(suffix)) {
- throw new RangeError("suffix must be a valid identifier");
- }
-
- var keys = util.inheritedDataKeys(target, {includeHidden: true});
- for (var i = 0; i < keys.length; ++i) {
- var value = target[keys[i]];
- if (keys[i] !== "constructor" &&
- util.isClass(value)) {
- promisifyAll(value.prototype, suffix, filter, promisifier);
- promisifyAll(value, suffix, filter, promisifier);
- }
- }
-
- return promisifyAll(target, suffix, filter, promisifier);
-};
-};
-
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/props.js b/node_modules/z-schema/node_modules/bluebird/js/main/props.js
deleted file mode 100644
index 9da98592..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/props.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, cast) {
-var util = require("./util.js");
-var apiRejection = require("./errors_api_rejection")(Promise);
-var isObject = util.isObject;
-var es5 = require("./es5.js");
-
-function PropertiesPromiseArray(obj) {
- var keys = es5.keys(obj);
- var len = keys.length;
- var values = new Array(len * 2);
- for (var i = 0; i < len; ++i) {
- var key = keys[i];
- values[i] = obj[key];
- values[i + len] = key;
- }
- this.constructor$(values);
-}
-util.inherits(PropertiesPromiseArray, PromiseArray);
-
-PropertiesPromiseArray.prototype._init =
-function PropertiesPromiseArray$_init() {
- this._init$(void 0, -3) ;
-};
-
-PropertiesPromiseArray.prototype._promiseFulfilled =
-function PropertiesPromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- var val = {};
- var keyOffset = this.length();
- for (var i = 0, len = this.length(); i < len; ++i) {
- val[this._values[i + keyOffset]] = this._values[i];
- }
- this._resolve(val);
- }
-};
-
-PropertiesPromiseArray.prototype._promiseProgressed =
-function PropertiesPromiseArray$_promiseProgressed(value, index) {
- if (this._isResolved()) return;
-
- this._promise._progress({
- key: this._values[index + this.length()],
- value: value
- });
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues =
-function PropertiesPromiseArray$_shouldCopyValues() {
- return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength =
-function PropertiesPromiseArray$getActualLength(len) {
- return len >> 1;
-};
-
-function Promise$_Props(promises) {
- var ret;
- var castValue = cast(promises, void 0);
-
- if (!isObject(castValue)) {
- return apiRejection("cannot await properties of a non-object");
- } else if (castValue instanceof Promise) {
- ret = castValue._then(Promise.props, void 0, void 0, void 0, void 0);
- } else {
- ret = new PropertiesPromiseArray(castValue).promise();
- }
-
- if (castValue instanceof Promise) {
- ret._propagateFrom(castValue, 4);
- }
- return ret;
-}
-
-Promise.prototype.props = function Promise$props() {
- return Promise$_Props(this);
-};
-
-Promise.props = function Promise$Props(promises) {
- return Promise$_Props(promises);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/queue.js b/node_modules/z-schema/node_modules/bluebird/js/main/queue.js
deleted file mode 100644
index d3dccddc..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/queue.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-function arrayCopy(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
- this._makeCapacity();
-}
-
-Queue.prototype._willBeOverCapacity =
-function Queue$_willBeOverCapacity(size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function Queue$_pushOne(arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype.push = function Queue$push(fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function Queue$shift() {
- var front = this._front,
- ret = this[front];
-
- this[front] = void 0;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function Queue$length() {
- return this._length;
-};
-
-Queue.prototype._makeCapacity = function Queue$_makeCapacity() {
- var len = this._capacity;
- for (var i = 0; i < len; ++i) {
- this[i] = void 0;
- }
-};
-
-Queue.prototype._checkCapacity = function Queue$_checkCapacity(size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 3);
- }
-};
-
-Queue.prototype._resizeTo = function Queue$_resizeTo(capacity) {
- var oldFront = this._front;
- var oldCapacity = this._capacity;
- var oldQueue = new Array(oldCapacity);
- var length = this.length();
-
- arrayCopy(this, 0, oldQueue, 0, oldCapacity);
- this._capacity = capacity;
- this._makeCapacity();
- this._front = 0;
- if (oldFront + length <= oldCapacity) {
- arrayCopy(oldQueue, oldFront, this, 0, length);
- } else { var lengthBeforeWrapping =
- length - ((oldFront + length) & (oldCapacity - 1));
-
- arrayCopy(oldQueue, oldFront, this, 0, lengthBeforeWrapping);
- arrayCopy(oldQueue, 0, this, lengthBeforeWrapping,
- length - lengthBeforeWrapping);
- }
-};
-
-module.exports = Queue;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/race.js b/node_modules/z-schema/node_modules/bluebird/js/main/race.js
deleted file mode 100644
index 4e4c30ef..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/race.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL, cast) {
-var apiRejection = require("./errors_api_rejection.js")(Promise);
-var isArray = require("./util.js").isArray;
-
-var raceLater = function Promise$_raceLater(promise) {
- return promise.then(function(array) {
- return Promise$_Race(array, promise);
- });
-};
-
-var hasOwn = {}.hasOwnProperty;
-function Promise$_Race(promises, parent) {
- var maybePromise = cast(promises, void 0);
-
- if (maybePromise instanceof Promise) {
- return raceLater(maybePromise);
- } else if (!isArray(promises)) {
- return apiRejection("expecting an array, a promise or a thenable");
- }
-
- var ret = new Promise(INTERNAL);
- if (parent !== void 0) {
- ret._propagateFrom(parent, 7);
- } else {
- ret._setTrace(void 0);
- }
- var fulfill = ret._fulfill;
- var reject = ret._reject;
- for (var i = 0, len = promises.length; i < len; ++i) {
- var val = promises[i];
-
- if (val === void 0 && !(hasOwn.call(promises, i))) {
- continue;
- }
-
- Promise.cast(val)._then(fulfill, reject, void 0, ret, null);
- }
- return ret;
-}
-
-Promise.race = function Promise$Race(promises) {
- return Promise$_Race(promises, void 0);
-};
-
-Promise.prototype.race = function Promise$race() {
- return Promise$_Race(this, void 0);
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/reduce.js b/node_modules/z-schema/node_modules/bluebird/js/main/reduce.js
deleted file mode 100644
index 7e5c1691..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/reduce.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, cast, INTERNAL) {
-var util = require("./util.js");
-var tryCatch4 = util.tryCatch4;
-var tryCatch3 = util.tryCatch3;
-var errorObj = util.errorObj;
-var PENDING = {};
-function ReductionPromiseArray(promises, fn, accum, _each) {
- this.constructor$(promises);
- var currentIndex = -2;
- this._preservedValues = _each === INTERNAL ? [] : null;
- var maybePromise = cast(accum, void 0);
- var rejected = false;
- var isPromise = maybePromise instanceof Promise;
- if (isPromise) {
- if (maybePromise.isPending()) {
- currentIndex = -1;
- maybePromise._proxyPromiseArray(this, -1);
- } else if (maybePromise.isFulfilled()) {
- accum = maybePromise.value();
- currentIndex = 0;
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- this._reject(maybePromise.reason());
- rejected = true;
- }
- }
- if (!isPromise && accum !== void 0) currentIndex = 0;
- this._callback = fn;
- this._currentIndex = currentIndex;
- this._accum = accum;
- if (!rejected) this._init$(void 0, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._init =
-function ReductionPromiseArray$_init() {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray =
-function ReductionPromiseArray$_resolveEmptyArray() {
- if (this._currentIndex !== -1) {
- this._resolve(this._preservedValues !== null
- ? [] : this._accum);
- }
-};
-
-ReductionPromiseArray.prototype._promiseFulfilled =
-function ReductionPromiseArray$_promiseFulfilled(value, index) {
- var accum;
- var values = this._values;
- if (values === null) return;
- var length = this.length();
- var currentIndex = this._currentIndex;
- if (currentIndex > index) return;
- var preservedValues = this._preservedValues;
- var isEach = preservedValues !== null;
- if (index === 0 && currentIndex === -2) {
- accum = value;
- currentIndex = 1;
- if (length < 2) return this._resolve(void 0);
- value = values[1];
- } else if (index > currentIndex) {
- return;
- } else if (index === -1 || values[index] === PENDING) {
- accum = value;
- currentIndex++;
- if (currentIndex >= length)
- return this._resolve(isEach ? preservedValues : accum);
- value = values[currentIndex];
- } else {
- accum = this._accum;
- }
-
- var callback = this._callback;
- var receiver = this._promise._boundTo;
- var ret;
-
- for (var i = currentIndex; i < length; ++i) {
- if (i > currentIndex) value = values[i];
-
- if (value instanceof Promise) {
- if (value.isFulfilled()) {
- value = value._settledValue;
- } else if (value.isPending()) {
- this._accum = accum;
- this._currentIndex = i;
- return;
- } else {
- value._unsetRejectionIsUnhandled();
- return this._reject(value.reason());
- }
- }
-
- if (isEach) {
- preservedValues.push(value);
- ret = tryCatch3(callback, receiver, value, i, length);
- }
- else {
- ret = tryCatch4(callback, receiver, accum, value, i, length);
- }
-
- if (ret === errorObj) return this._reject(ret.e);
-
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- values[i] = PENDING;
- this._accum = accum;
- this._currentIndex = i;
- return maybePromise._proxyPromiseArray(this, i);
- } else if (maybePromise.isFulfilled()) {
- ret = maybePromise.value();
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- return this._reject(maybePromise.reason());
- }
- }
- accum = ret;
- }
- this._resolve(isEach ? preservedValues : accum);
-};
-
-function reduce(promises, fn, initialValue, _each) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
- return array.promise();
-}
-
-Promise.prototype.reduce = function Promise$reduce(fn, initialValue) {
- return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function Promise$Reduce(promises, fn, initialValue, _each) {
- return reduce(promises, fn, initialValue, _each);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/schedule.js b/node_modules/z-schema/node_modules/bluebird/js/main/schedule.js
deleted file mode 100644
index f8b6ea06..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/schedule.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var schedule;
-var _MutationObserver;
-if (typeof process === "object" && typeof process.version === "string") {
- schedule = function Promise$_Scheduler(fn) {
- process.nextTick(fn);
- };
-}
-else if ((typeof MutationObserver !== "undefined" &&
- (_MutationObserver = MutationObserver)) ||
- (typeof WebKitMutationObserver !== "undefined" &&
- (_MutationObserver = WebKitMutationObserver))) {
- schedule = (function() {
- var div = document.createElement("div");
- var queuedFn = void 0;
- var observer = new _MutationObserver(
- function Promise$_Scheduler() {
- var fn = queuedFn;
- queuedFn = void 0;
- fn();
- }
- );
- observer.observe(div, {
- attributes: true
- });
- return function Promise$_Scheduler(fn) {
- queuedFn = fn;
- div.setAttribute("class", "foo");
- };
-
- })();
-}
-else if (typeof setTimeout !== "undefined") {
- schedule = function Promise$_Scheduler(fn) {
- setTimeout(fn, 0);
- };
-}
-else throw new Error("no async scheduler available");
-module.exports = schedule;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/settle.js b/node_modules/z-schema/node_modules/bluebird/js/main/settle.js
deleted file mode 100644
index 98812979..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/settle.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
- function(Promise, PromiseArray) {
-var PromiseInspection = Promise.PromiseInspection;
-var util = require("./util.js");
-
-function SettledPromiseArray(values) {
- this.constructor$(values);
-}
-util.inherits(SettledPromiseArray, PromiseArray);
-
-SettledPromiseArray.prototype._promiseResolved =
-function SettledPromiseArray$_promiseResolved(index, inspection) {
- this._values[index] = inspection;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- }
-};
-
-SettledPromiseArray.prototype._promiseFulfilled =
-function SettledPromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- var ret = new PromiseInspection();
- ret._bitField = 268435456;
- ret._settledValue = value;
- this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected =
-function SettledPromiseArray$_promiseRejected(reason, index) {
- if (this._isResolved()) return;
- var ret = new PromiseInspection();
- ret._bitField = 134217728;
- ret._settledValue = reason;
- this._promiseResolved(index, ret);
-};
-
-Promise.settle = function Promise$Settle(promises) {
- return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function Promise$settle() {
- return new SettledPromiseArray(this).promise();
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/some.js b/node_modules/z-schema/node_modules/bluebird/js/main/some.js
deleted file mode 100644
index 935b6a69..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/some.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
-function(Promise, PromiseArray, apiRejection) {
-var util = require("./util.js");
-var RangeError = require("./errors.js").RangeError;
-var AggregateError = require("./errors.js").AggregateError;
-var isArray = util.isArray;
-
-
-function SomePromiseArray(values) {
- this.constructor$(values);
- this._howMany = 0;
- this._unwrap = false;
- this._initialized = false;
-}
-util.inherits(SomePromiseArray, PromiseArray);
-
-SomePromiseArray.prototype._init = function SomePromiseArray$_init() {
- if (!this._initialized) {
- return;
- }
- if (this._howMany === 0) {
- this._resolve([]);
- return;
- }
- this._init$(void 0, -2);
- var isArrayResolved = isArray(this._values);
- if (!this._isResolved() &&
- isArrayResolved &&
- this._howMany > this._canPossiblyFulfill()) {
- var message = "(Promise.some) input array contains less than " +
- this._howMany + " promises";
- this._reject(new RangeError(message));
- }
-};
-
-SomePromiseArray.prototype.init = function SomePromiseArray$init() {
- this._initialized = true;
- this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function SomePromiseArray$setUnwrap() {
- this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function SomePromiseArray$howMany() {
- return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany =
-function SomePromiseArray$setHowMany(count) {
- if (this._isResolved()) return;
- this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled =
-function SomePromiseArray$_promiseFulfilled(value) {
- if (this._isResolved()) return;
- this._addFulfilled(value);
- if (this._fulfilled() === this.howMany()) {
- this._values.length = this.howMany();
- if (this.howMany() === 1 && this._unwrap) {
- this._resolve(this._values[0]);
- } else {
- this._resolve(this._values);
- }
- }
-
-};
-SomePromiseArray.prototype._promiseRejected =
-function SomePromiseArray$_promiseRejected(reason) {
- if (this._isResolved()) return;
- this._addRejected(reason);
- if (this.howMany() > this._canPossiblyFulfill()) {
- var e = new AggregateError();
- for (var i = this.length(); i < this._values.length; ++i) {
- e.push(this._values[i]);
- }
- this._reject(e);
- }
-};
-
-SomePromiseArray.prototype._fulfilled = function SomePromiseArray$_fulfilled() {
- return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function SomePromiseArray$_rejected() {
- return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected =
-function SomePromiseArray$_addRejected(reason) {
- this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled =
-function SomePromiseArray$_addFulfilled(value) {
- this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill =
-function SomePromiseArray$_canPossiblyFulfill() {
- return this.length() - this._rejected();
-};
-
-function Promise$_Some(promises, howMany) {
- if ((howMany | 0) !== howMany || howMany < 0) {
- return apiRejection("expecting a positive integer");
- }
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- if (promise.isRejected()) {
- return promise;
- }
- ret.setHowMany(howMany);
- ret.init();
- return promise;
-}
-
-Promise.some = function Promise$Some(promises, howMany) {
- return Promise$_Some(promises, howMany);
-};
-
-Promise.prototype.some = function Promise$some(howMany) {
- return Promise$_Some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/synchronous_inspection.js b/node_modules/z-schema/node_modules/bluebird/js/main/synchronous_inspection.js
deleted file mode 100644
index 3c840202..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/synchronous_inspection.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== void 0) {
- this._bitField = promise._bitField;
- this._settledValue = promise.isResolved()
- ? promise._settledValue
- : void 0;
- }
- else {
- this._bitField = 0;
- this._settledValue = void 0;
- }
-}
-
-PromiseInspection.prototype.isFulfilled =
-Promise.prototype.isFulfilled = function Promise$isFulfilled() {
- return (this._bitField & 268435456) > 0;
-};
-
-PromiseInspection.prototype.isRejected =
-Promise.prototype.isRejected = function Promise$isRejected() {
- return (this._bitField & 134217728) > 0;
-};
-
-PromiseInspection.prototype.isPending =
-Promise.prototype.isPending = function Promise$isPending() {
- return (this._bitField & 402653184) === 0;
-};
-
-PromiseInspection.prototype.value =
-Promise.prototype.value = function Promise$value() {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise");
- }
- return this._settledValue;
-};
-
-PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason =
-Promise.prototype.reason = function Promise$reason() {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise");
- }
- return this._settledValue;
-};
-
-PromiseInspection.prototype.isResolved =
-Promise.prototype.isResolved = function Promise$isResolved() {
- return (this._bitField & 402653184) > 0;
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/thenables.js b/node_modules/z-schema/node_modules/bluebird/js/main/thenables.js
deleted file mode 100644
index 09e0266a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/thenables.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = require("./util.js");
-var canAttach = require("./errors.js").canAttach;
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function getThen(obj) {
- try {
- return obj.then;
- }
- catch(e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function Promise$_Cast(obj, originalPromise) {
- if (isObject(obj)) {
- if (obj instanceof Promise) {
- return obj;
- }
- else if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- obj._then(
- ret._fulfillUnchecked,
- ret._rejectUncheckedCheckError,
- ret._progressUnchecked,
- ret,
- null
- );
- ret._setFollowing();
- return ret;
- }
- var then = getThen(obj);
- if (then === errorObj) {
- if (originalPromise !== void 0 && canAttach(then.e)) {
- originalPromise._attachExtraTrace(then.e);
- }
- return Promise.reject(then.e);
- } else if (typeof then === "function") {
- return Promise$_doThenable(obj, then, originalPromise);
- }
- }
- return obj;
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- return hasProp.call(obj, "_promise0");
-}
-
-function Promise$_doThenable(x, then, originalPromise) {
- var resolver = Promise.defer();
- var called = false;
- try {
- then.call(
- x,
- Promise$_resolveFromThenable,
- Promise$_rejectFromThenable,
- Promise$_progressFromThenable
- );
- } catch(e) {
- if (!called) {
- called = true;
- var trace = canAttach(e) ? e : new Error(e + "");
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(trace);
- }
- resolver.promise._reject(e, trace);
- }
- }
- return resolver.promise;
-
- function Promise$_resolveFromThenable(y) {
- if (called) return;
- called = true;
-
- if (x === y) {
- var e = Promise._makeSelfResolutionError();
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(e);
- }
- resolver.promise._reject(e, void 0);
- return;
- }
- resolver.resolve(y);
- }
-
- function Promise$_rejectFromThenable(r) {
- if (called) return;
- called = true;
- var trace = canAttach(r) ? r : new Error(r + "");
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(trace);
- }
- resolver.promise._reject(r, trace);
- }
-
- function Promise$_progressFromThenable(v) {
- if (called) return;
- var promise = resolver.promise;
- if (typeof promise._progress === "function") {
- promise._progress(v);
- }
- }
-}
-
-return Promise$_Cast;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/timers.js b/node_modules/z-schema/node_modules/bluebird/js/main/timers.js
deleted file mode 100644
index 4db2f401..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/timers.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var _setTimeout = function(fn, ms) {
- var len = arguments.length;
- var arg0 = arguments[2];
- var arg1 = arguments[3];
- var arg2 = len >= 5 ? arguments[4] : void 0;
- setTimeout(function() {
- fn(arg0, arg1, arg2);
- }, ms);
-};
-
-module.exports = function(Promise, INTERNAL, cast) {
-var util = require("./util.js");
-var errors = require("./errors.js");
-var apiRejection = require("./errors_api_rejection")(Promise);
-var TimeoutError = Promise.TimeoutError;
-
-var afterTimeout = function Promise$_afterTimeout(promise, message, ms) {
- if (!promise.isPending()) return;
- if (typeof message !== "string") {
- message = "operation timed out after" + " " + ms + " ms"
- }
- var err = new TimeoutError(message);
- errors.markAsOriginatingFromRejection(err);
- promise._attachExtraTrace(err);
- promise._cancel(err);
-};
-
-var afterDelay = function Promise$_afterDelay(value, promise) {
- promise._fulfill(value);
-};
-
-var delay = Promise.delay = function Promise$Delay(value, ms) {
- if (ms === void 0) {
- ms = value;
- value = void 0;
- }
- ms = +ms;
- var maybePromise = cast(value, void 0);
- var promise = new Promise(INTERNAL);
-
- if (maybePromise instanceof Promise) {
- promise._propagateFrom(maybePromise, 7);
- promise._follow(maybePromise);
- return promise.then(function(value) {
- return Promise.delay(value, ms);
- });
- } else {
- promise._setTrace(void 0);
- _setTimeout(afterDelay, ms, value, promise);
- }
- return promise;
-};
-
-Promise.prototype.delay = function Promise$delay(ms) {
- return delay(this, ms);
-};
-
-Promise.prototype.timeout = function Promise$timeout(ms, message) {
- ms = +ms;
-
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 7);
- ret._follow(this);
- _setTimeout(afterTimeout, ms, ret, message, ms);
- return ret.cancellable();
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/using.js b/node_modules/z-schema/node_modules/bluebird/js/main/using.js
deleted file mode 100644
index 764f2d3a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/using.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function (Promise, apiRejection, cast) {
- var TypeError = require("./errors.js").TypeError;
- var inherits = require("./util.js").inherits;
- var PromiseInspection = Promise.PromiseInspection;
-
- function inspectionMapper(inspections) {
- var len = inspections.length;
- for (var i = 0; i < len; ++i) {
- var inspection = inspections[i];
- if (inspection.isRejected()) {
- return Promise.reject(inspection.error());
- }
- inspections[i] = inspection.value();
- }
- return inspections;
- }
-
- function thrower(e) {
- setTimeout(function(){throw e;}, 0);
- }
-
- function dispose(resources, inspection) {
- var i = 0;
- var len = resources.length;
- var ret = Promise.defer();
- function iterator() {
- if (i >= len) return ret.resolve();
- var maybePromise = cast(resources[i++], void 0);
- if (maybePromise instanceof Promise &&
- maybePromise._isDisposable()) {
- try {
- maybePromise = cast(maybePromise._getDisposer()
- .tryDispose(inspection), void 0);
- } catch (e) {
- return thrower(e);
- }
- if (maybePromise instanceof Promise) {
- return maybePromise._then(iterator, thrower,
- null, null, null);
- }
- }
- iterator();
- }
- iterator();
- return ret.promise;
- }
-
- function disposerSuccess(value) {
- var inspection = new PromiseInspection();
- inspection._settledValue = value;
- inspection._bitField = 268435456;
- return dispose(this, inspection).thenReturn(value);
- }
-
- function disposerFail(reason) {
- var inspection = new PromiseInspection();
- inspection._settledValue = reason;
- inspection._bitField = 134217728;
- return dispose(this, inspection).thenThrow(reason);
- }
-
- function Disposer(data, promise) {
- this._data = data;
- this._promise = promise;
- }
-
- Disposer.prototype.data = function Disposer$data() {
- return this._data;
- };
-
- Disposer.prototype.promise = function Disposer$promise() {
- return this._promise;
- };
-
- Disposer.prototype.resource = function Disposer$resource() {
- if (this.promise().isFulfilled()) {
- return this.promise().value();
- }
- return null;
- };
-
- Disposer.prototype.tryDispose = function(inspection) {
- var resource = this.resource();
- var ret = resource !== null
- ? this.doDispose(resource, inspection) : null;
- this._promise._unsetDisposable();
- this._data = this._promise = null;
- return ret;
- };
-
- function FunctionDisposer(fn, promise) {
- this.constructor$(fn, promise);
- }
- inherits(FunctionDisposer, Disposer);
-
- FunctionDisposer.prototype.doDispose = function (resource, inspection) {
- var fn = this.data();
- return fn.call(resource, resource, inspection);
- };
-
- Promise.using = function Promise$using() {
- var len = arguments.length;
- if (len < 2) return apiRejection(
- "you must pass at least 2 arguments to Promise.using");
- var fn = arguments[len - 1];
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- len--;
- var resources = new Array(len);
- for (var i = 0; i < len; ++i) {
- var resource = arguments[i];
- if (resource instanceof Disposer) {
- var disposer = resource;
- resource = resource.promise();
- resource._setDisposable(disposer);
- }
- resources[i] = resource;
- }
-
- return Promise.settle(resources)
- .then(inspectionMapper)
- .spread(fn)
- ._then(disposerSuccess, disposerFail, void 0, resources, void 0);
- };
-
- Promise.prototype._setDisposable =
- function Promise$_setDisposable(disposer) {
- this._bitField = this._bitField | 262144;
- this._disposer = disposer;
- };
-
- Promise.prototype._isDisposable = function Promise$_isDisposable() {
- return (this._bitField & 262144) > 0;
- };
-
- Promise.prototype._getDisposer = function Promise$_getDisposer() {
- return this._disposer;
- };
-
- Promise.prototype._unsetDisposable = function Promise$_unsetDisposable() {
- this._bitField = this._bitField & (~262144);
- this._disposer = void 0;
- };
-
- Promise.prototype.disposer = function Promise$disposer(fn) {
- if (typeof fn === "function") {
- return new FunctionDisposer(fn, this);
- }
- throw new TypeError();
- };
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/main/util.js b/node_modules/z-schema/node_modules/bluebird/js/main/util.js
deleted file mode 100644
index 0fadbc33..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/main/util.js
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var es5 = require("./es5.js");
-var haveGetters = (function(){
- try {
- var o = {};
- es5.defineProperty(o, "f", {
- get: function () {
- return 3;
- }
- });
- return o.f === 3;
- }
- catch (e) {
- return false;
- }
-
-})();
-var canEvaluate = typeof navigator == "undefined";
-var errorObj = {e: {}};
-function tryCatch1(fn, receiver, arg) {
- try { return fn.call(receiver, arg); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch2(fn, receiver, arg, arg2) {
- try { return fn.call(receiver, arg, arg2); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch3(fn, receiver, arg, arg2, arg3) {
- try { return fn.call(receiver, arg, arg2, arg3); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch4(fn, receiver, arg, arg2, arg3, arg4) {
- try { return fn.call(receiver, arg, arg2, arg3, arg4); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatchApply(fn, args, receiver) {
- try { return fn.apply(receiver, args); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-function asString(val) {
- return typeof val === "string" ? val : ("" + val);
-}
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return !isPrimitive(value);
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(asString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : void 0;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-
-var wrapsPrimitiveReceiver = (function() {
- return this !== "string";
-}).call("string");
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- if (es5.isES5) {
- return function(obj, opts) {
- var ret = [];
- var visitedKeys = Object.create(null);
- var getKeys = Object(opts).includeHidden
- ? Object.getOwnPropertyNames
- : Object.keys;
- while (obj != null) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- return function(obj) {
- var ret = [];
- /*jshint forin:false */
- for (var key in obj) {
- ret.push(key);
- }
- return ret;
- };
- }
-
-})();
-
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.keys(fn.prototype);
- return keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027*/
- function f() {}
- f.prototype = obj;
- return f;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- haveGetters: haveGetters,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch1: tryCatch1,
- tryCatch2: tryCatch2,
- tryCatch3: tryCatch3,
- tryCatch4: tryCatch4,
- tryCatchApply: tryCatchApply,
- inherits: inherits,
- withAppended: withAppended,
- asString: asString,
- maybeWrapAsError: maybeWrapAsError,
- wrapsPrimitiveReceiver: wrapsPrimitiveReceiver,
- toFastProperties: toFastProperties,
- filledRange: filledRange
-};
-
-module.exports = ret;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/any.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/any.js
deleted file mode 100644
index 75d1de12..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/any.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var SomePromiseArray = Promise._SomePromiseArray;
-function Promise$_Any(promises) {
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- if (promise.isRejected()) {
- return promise;
- }
- ret.setHowMany(1);
- ret.setUnwrap();
- ret.init();
- return promise;
-}
-
-Promise.any = function Promise$Any(promises) {
- return Promise$_Any(promises);
-};
-
-Promise.prototype.any = function Promise$any() {
- return Promise$_Any(this);
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/assert.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/assert.js
deleted file mode 100644
index 86ac49e1..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/assert.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = (function(){
-var AssertionError = (function() {
- function AssertionError(a) {
- this.constructor$(a);
- this.message = a;
- this.name = "AssertionError";
- }
- AssertionError.prototype = new Error();
- AssertionError.prototype.constructor = AssertionError;
- AssertionError.prototype.constructor$ = Error;
- return AssertionError;
-})();
-
-function getParams(args) {
- var params = [];
- for (var i = 0; i < args.length; ++i) params.push("arg" + i);
- return params;
-}
-
-function nativeAssert(callName, args, expect) {
- try {
- var params = getParams(args);
- var constructorArgs = params;
- constructorArgs.push("return " +
- callName + "("+ params.join(",") + ");");
- var fn = Function.apply(null, constructorArgs);
- return fn.apply(null, args);
- } catch (e) {
- if (!(e instanceof SyntaxError)) {
- throw e;
- } else {
- return expect;
- }
- }
-}
-
-return function assert(boolExpr, message) {
- if (boolExpr === true) return;
-
- if (typeof boolExpr === "string" &&
- boolExpr.charAt(0) === "%") {
- var nativeCallName = boolExpr;
- var $_len = arguments.length;var args = new Array($_len - 2); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}
- if (nativeAssert(nativeCallName, args, message) === message) return;
- message = (nativeCallName + " !== " + message);
- }
-
- var ret = new AssertionError(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(ret, assert);
- }
- if (console && console.error) {
- console.error(ret.stack + "");
- }
- throw ret;
-
-};
-})();
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/async.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/async.js
deleted file mode 100644
index 50004c9c..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/async.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var schedule = require("./schedule.js");
-var Queue = require("./queue.js");
-var errorObj = require("./util.js").errorObj;
-var tryCatch1 = require("./util.js").tryCatch1;
-var _process = typeof process !== "undefined" ? process : void 0;
-
-function Async() {
- this._isTickUsed = false;
- this._schedule = schedule;
- this._length = 0;
- this._lateBuffer = new Queue(16);
- this._functionBuffer = new Queue(65536);
- var self = this;
- this.consumeFunctionBuffer = function Async$consumeFunctionBuffer() {
- self._consumeFunctionBuffer();
- };
-}
-
-Async.prototype.haveItemsQueued = function Async$haveItemsQueued() {
- return this._length > 0;
-};
-
-Async.prototype.invokeLater = function Async$invokeLater(fn, receiver, arg) {
- if (_process !== void 0 &&
- _process.domain != null &&
- !fn.domain) {
- fn = _process.domain.bind(fn);
- }
- this._lateBuffer.push(fn, receiver, arg);
- this._queueTick();
-};
-
-Async.prototype.invoke = function Async$invoke(fn, receiver, arg) {
- if (_process !== void 0 &&
- _process.domain != null &&
- !fn.domain) {
- fn = _process.domain.bind(fn);
- }
- var functionBuffer = this._functionBuffer;
- functionBuffer.push(fn, receiver, arg);
- this._length = functionBuffer.length();
- this._queueTick();
-};
-
-Async.prototype._consumeFunctionBuffer =
-function Async$_consumeFunctionBuffer() {
- var functionBuffer = this._functionBuffer;
- while (functionBuffer.length() > 0) {
- var fn = functionBuffer.shift();
- var receiver = functionBuffer.shift();
- var arg = functionBuffer.shift();
- fn.call(receiver, arg);
- }
- this._reset();
- this._consumeLateBuffer();
-};
-
-Async.prototype._consumeLateBuffer = function Async$_consumeLateBuffer() {
- var buffer = this._lateBuffer;
- while(buffer.length() > 0) {
- var fn = buffer.shift();
- var receiver = buffer.shift();
- var arg = buffer.shift();
- var res = tryCatch1(fn, receiver, arg);
- if (res === errorObj) {
- this._queueTick();
- if (fn.domain != null) {
- fn.domain.emit("error", res.e);
- } else {
- throw res.e;
- }
- }
- }
-};
-
-Async.prototype._queueTick = function Async$_queue() {
- if (!this._isTickUsed) {
- this._schedule(this.consumeFunctionBuffer);
- this._isTickUsed = true;
- }
-};
-
-Async.prototype._reset = function Async$_reset() {
- this._isTickUsed = false;
- this._length = 0;
-};
-
-module.exports = new Async();
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/bluebird.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/bluebird.js
deleted file mode 100644
index 6fd85f1b..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/bluebird.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var Promise = require("./promise.js")();
-module.exports = Promise;
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/call_get.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/call_get.js
deleted file mode 100644
index 9df2b233..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/call_get.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var cr = Object.create;
-var callerCache = cr && cr(null);
-var getterCache = cr && cr(null);
-callerCache[" size"] = getterCache[" size"] = 0;
-module.exports = function(Promise) {
-var util = require("./util.js");
-var canEvaluate = util.canEvaluate;
-var isIdentifier = util.isIdentifier;
-
-function makeMethodCaller (methodName) {
- return new Function("obj", " \n\
- 'use strict' \n\
- var len = this.length; \n\
- switch(len) { \n\
- case 1: return obj.methodName(this[0]); \n\
- case 2: return obj.methodName(this[0], this[1]); \n\
- case 3: return obj.methodName(this[0], this[1], this[2]); \n\
- case 0: return obj.methodName(); \n\
- default: return obj.methodName.apply(obj, this); \n\
- } \n\
- ".replace(/methodName/g, methodName));
-}
-
-function makeGetter (propertyName) {
- return new Function("obj", " \n\
- 'use strict'; \n\
- return obj.propertyName; \n\
- ".replace("propertyName", propertyName));
-}
-
-function getCompiled(name, compiler, cache) {
- var ret = cache[name];
- if (typeof ret !== "function") {
- if (!isIdentifier(name)) {
- return null;
- }
- ret = compiler(name);
- cache[name] = ret;
- cache[" size"]++;
- if (cache[" size"] > 512) {
- var keys = Object.keys(cache);
- for (var i = 0; i < 256; ++i) delete cache[keys[i]];
- cache[" size"] = keys.length - 256;
- }
- }
- return ret;
-}
-
-function getMethodCaller(name) {
- return getCompiled(name, makeMethodCaller, callerCache);
-}
-
-function getGetter(name) {
- return getCompiled(name, makeGetter, getterCache);
-}
-
-function caller(obj) {
- return obj[this.pop()].apply(obj, this);
-}
-Promise.prototype.call = function Promise$call(methodName) {
- var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
- if (canEvaluate) {
- var maybeCaller = getMethodCaller(methodName);
- if (maybeCaller !== null) {
- return this._then(maybeCaller, void 0, void 0, args, void 0);
- }
- }
- args.push(methodName);
- return this._then(caller, void 0, void 0, args, void 0);
-};
-
-function namedGetter(obj) {
- return obj[this];
-}
-function indexedGetter(obj) {
- return obj[this];
-}
-Promise.prototype.get = function Promise$get(propertyName) {
- var isIndex = (typeof propertyName === "number");
- var getter;
- if (!isIndex) {
- if (canEvaluate) {
- var maybeGetter = getGetter(propertyName);
- getter = maybeGetter !== null ? maybeGetter : namedGetter;
- } else {
- getter = namedGetter;
- }
- } else {
- getter = indexedGetter;
- }
- return this._then(getter, void 0, void 0, propertyName, void 0);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/cancel.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/cancel.js
deleted file mode 100644
index d3022b64..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/cancel.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var errors = require("./errors.js");
-var canAttach = errors.canAttach;
-var async = require("./async.js");
-var CancellationError = errors.CancellationError;
-
-Promise.prototype._cancel = function Promise$_cancel(reason) {
- if (!this.isCancellable()) return this;
- var parent;
- var promiseToReject = this;
- while ((parent = promiseToReject._cancellationParent) !== void 0 &&
- parent.isCancellable()) {
- promiseToReject = parent;
- }
- promiseToReject._attachExtraTrace(reason);
- promiseToReject._rejectUnchecked(reason);
-};
-
-Promise.prototype.cancel = function Promise$cancel(reason) {
- if (!this.isCancellable()) return this;
- reason = reason !== void 0
- ? (canAttach(reason) ? reason : new Error(reason + ""))
- : new CancellationError();
- async.invokeLater(this._cancel, this, reason);
- return this;
-};
-
-Promise.prototype.cancellable = function Promise$cancellable() {
- if (this._cancellable()) return this;
- this._setCancellable();
- this._cancellationParent = void 0;
- return this;
-};
-
-Promise.prototype.uncancellable = function Promise$uncancellable() {
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 2 | 4);
- ret._follow(this);
- ret._unsetCancellable();
- return ret;
-};
-
-Promise.prototype.fork =
-function Promise$fork(didFulfill, didReject, didProgress) {
- var ret = this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
-
- ret._setCancellable();
- ret._cancellationParent = void 0;
- return ret;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/captured_trace.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/captured_trace.js
deleted file mode 100644
index b346612a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/captured_trace.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function() {
-var inherits = require("./util.js").inherits;
-var defineProperty = require("./es5.js").defineProperty;
-
-var rignore = new RegExp(
- "\\b(?:[a-zA-Z0-9.]+\\$_\\w+|" +
- "tryCatch(?:1|2|3|4|Apply)|new \\w*PromiseArray|" +
- "\\w*PromiseArray\\.\\w*PromiseArray|" +
- "setTimeout|CatchFilter\\$_\\w+|makeNodePromisified|processImmediate|" +
- "process._tickCallback|nextTick|Async\\$\\w+)\\b"
-);
-
-var rtraceline = null;
-var formatStack = null;
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj.toString();
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function CapturedTrace(ignoreUntil, isTopLevel) {
- this.captureStackTrace(CapturedTrace, isTopLevel);
-
-}
-inherits(CapturedTrace, Error);
-
-CapturedTrace.prototype.captureStackTrace =
-function CapturedTrace$captureStackTrace(ignoreUntil, isTopLevel) {
- captureStackTrace(this, ignoreUntil, isTopLevel);
-};
-
-CapturedTrace.possiblyUnhandledRejection =
-function CapturedTrace$PossiblyUnhandledRejection(reason) {
- if (typeof console === "object") {
- var message;
- if (typeof reason === "object" || typeof reason === "function") {
- var stack = reason.stack;
- message = "Possibly unhandled " + formatStack(stack, reason);
- } else {
- message = "Possibly unhandled " + String(reason);
- }
- if (typeof console.error === "function" ||
- typeof console.error === "object") {
- console.error(message);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-};
-
-CapturedTrace.combine = function CapturedTrace$Combine(current, prev) {
- var curLast = current.length - 1;
- for (var i = prev.length - 1; i >= 0; --i) {
- var line = prev[i];
- if (current[curLast] === line) {
- current.pop();
- curLast--;
- } else {
- break;
- }
- }
-
- current.push("From previous event:");
- var lines = current.concat(prev);
-
- var ret = [];
-
- for (var i = 0, len = lines.length; i < len; ++i) {
-
- if ((rignore.test(lines[i]) ||
- (i > 0 && !rtraceline.test(lines[i])) &&
- lines[i] !== "From previous event:")
- ) {
- continue;
- }
- ret.push(lines[i]);
- }
- return ret;
-};
-
-CapturedTrace.isSupported = function CapturedTrace$IsSupported() {
- return typeof captureStackTrace === "function";
-};
-
-var captureStackTrace = (function stackDetection() {
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- rtraceline = /^\s*at\s*/;
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
-
-
- };
- var captureStackTrace = Error.captureStackTrace;
- return function CapturedTrace$_captureStackTrace(
- receiver, ignoreUntil) {
- captureStackTrace(receiver, ignoreUntil);
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- typeof "".startsWith === "function" &&
- (err.stack.startsWith("stackDetection@")) &&
- stackDetection.name === "stackDetection") {
-
- defineProperty(Error, "stackTraceLimit", {
- writable: true,
- enumerable: false,
- configurable: false,
- value: 25
- });
- rtraceline = /@/;
- var rline = /[@\n]/;
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") {
- return (error.name + ". " + error.message + "\n" + stack);
- }
-
- if (error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
- };
-
- return function captureStackTrace(o) {
- var stack = new Error().stack;
- var split = stack.split(rline);
- var len = split.length;
- var ret = "";
- for (var i = 0; i < len; i += 2) {
- ret += split[i];
- ret += "@";
- ret += split[i + 1];
- ret += "\n";
- }
- o.stack = ret;
- };
- } else {
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== void 0 &&
- error.message !== void 0) {
- return error.name + ". " + error.message;
- }
- return formatNonError(error);
- };
-
- return null;
- }
-})();
-
-return CapturedTrace;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/catch_filter.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/catch_filter.js
deleted file mode 100644
index 25d9f73a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/catch_filter.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = require("./util.js");
-var errors = require("./errors.js");
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-var keys = require("./es5.js").keys;
-var TypeError = errors.TypeError;
-
-function CatchFilter(instances, callback, promise) {
- this._instances = instances;
- this._callback = callback;
- this._promise = promise;
-}
-
-function CatchFilter$_safePredicate(predicate, e) {
- var safeObject = {};
- var retfilter = tryCatch1(predicate, safeObject, e);
-
- if (retfilter === errorObj) return retfilter;
-
- var safeKeys = keys(safeObject);
- if (safeKeys.length) {
- errorObj.e = new TypeError(
- "Catch filter must inherit from Error "
- + "or be a simple predicate function");
- return errorObj;
- }
- return retfilter;
-}
-
-CatchFilter.prototype.doFilter = function CatchFilter$_doFilter(e) {
- var cb = this._callback;
- var promise = this._promise;
- var boundTo = promise._boundTo;
- for (var i = 0, len = this._instances.length; i < len; ++i) {
- var item = this._instances[i];
- var itemIsErrorType = item === Error ||
- (item != null && item.prototype instanceof Error);
-
- if (itemIsErrorType && e instanceof item) {
- var ret = tryCatch1(cb, boundTo, e);
- if (ret === errorObj) {
- NEXT_FILTER.e = ret.e;
- return NEXT_FILTER;
- }
- return ret;
- } else if (typeof item === "function" && !itemIsErrorType) {
- var shouldHandle = CatchFilter$_safePredicate(item, e);
- if (shouldHandle === errorObj) {
- var trace = errors.canAttach(errorObj.e)
- ? errorObj.e
- : new Error(errorObj.e + "");
- this._promise._attachExtraTrace(trace);
- e = errorObj.e;
- break;
- } else if (shouldHandle) {
- var ret = tryCatch1(cb, boundTo, e);
- if (ret === errorObj) {
- NEXT_FILTER.e = ret.e;
- return NEXT_FILTER;
- }
- return ret;
- }
- }
- }
- NEXT_FILTER.e = e;
- return NEXT_FILTER;
-};
-
-return CatchFilter;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/direct_resolve.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/direct_resolve.js
deleted file mode 100644
index 3386a19e..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/direct_resolve.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var util = require("./util.js");
-var isPrimitive = util.isPrimitive;
-var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
-
-module.exports = function(Promise) {
-var returner = function Promise$_returner() {
- return this;
-};
-var thrower = function Promise$_thrower() {
- throw this;
-};
-
-var wrapper = function Promise$_wrapper(value, action) {
- if (action === 1) {
- return function Promise$_thrower() {
- throw value;
- };
- } else if (action === 2) {
- return function Promise$_returner() {
- return value;
- };
- }
-};
-
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn =
-function Promise$thenReturn(value) {
- if (wrapsPrimitiveReceiver && isPrimitive(value)) {
- return this._then(
- wrapper(value, 2),
- void 0,
- void 0,
- void 0,
- void 0
- );
- }
- return this._then(returner, void 0, void 0, value, void 0);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow =
-function Promise$thenThrow(reason) {
- if (wrapsPrimitiveReceiver && isPrimitive(reason)) {
- return this._then(
- wrapper(reason, 1),
- void 0,
- void 0,
- void 0,
- void 0
- );
- }
- return this._then(thrower, void 0, void 0, reason, void 0);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/each.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/each.js
deleted file mode 100644
index c89a1449..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/each.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseReduce = Promise.reduce;
-
-Promise.prototype.each = function Promise$each(fn) {
- return PromiseReduce(this, fn, null, INTERNAL);
-};
-
-Promise.each = function Promise$Each(promises, fn) {
- return PromiseReduce(promises, fn, null, INTERNAL);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors.js
deleted file mode 100644
index 4ea7b6d1..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var Objectfreeze = require("./es5.js").freeze;
-var util = require("./util.js");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof OperationalError) ||
- e["isOperational"] === true);
-}
-
-function isError(obj) {
- return obj instanceof Error;
-}
-
-function canAttach(obj) {
- return isError(obj);
-}
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- this.message = typeof message === "string" ? message : defaultMessage;
- this.name = nameProperty;
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-AggregateError.prototype.length = 0;
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- this.name = "OperationalError";
- this.message = message;
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- this.message = message.message;
- this.stack = message.stack;
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var key = "__BluebirdErrorTypes__";
-var errorTypes = Error[key];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- notEnumerableProp(Error, key, errorTypes);
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- canAttach: canAttach
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors_api_rejection.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors_api_rejection.js
deleted file mode 100644
index e953e3ba..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/errors_api_rejection.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var TypeError = require('./errors.js').TypeError;
-
-function apiRejection(msg) {
- var error = new TypeError(msg);
- var ret = Promise.rejected(error);
- var parent = ret._peekContext();
- if (parent != null) {
- parent._attachExtraTrace(error);
- }
- return ret;
-}
-
-return apiRejection;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/es5.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/es5.js
deleted file mode 100644
index d8f05b39..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/es5.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-var isES5 = (function(){
- "use strict";
- return this === void 0;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- keys: Object.keys,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function ObjectKeys(o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- }
-
- var ObjectDefineProperty = function ObjectDefineProperty(o, key, desc) {
- o[key] = desc.value;
- return o;
- }
-
- var ObjectFreeze = function ObjectFreeze(obj) {
- return obj;
- }
-
- var ObjectGetPrototypeOf = function ObjectGetPrototypeOf(obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- }
-
- var ArrayIsArray = function ArrayIsArray(obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- }
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5
- };
-}
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/filter.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/filter.js
deleted file mode 100644
index 08f67ebb..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/filter.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseMap = Promise.map;
-
-Promise.prototype.filter = function Promise$filter(fn, options) {
- return PromiseMap(this, fn, options, INTERNAL);
-};
-
-Promise.filter = function Promise$Filter(promises, fn, options) {
- return PromiseMap(promises, fn, options, INTERNAL);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/finally.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/finally.js
deleted file mode 100644
index 0f68296c..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/finally.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, NEXT_FILTER, cast) {
-var util = require("./util.js");
-var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
-var isPrimitive = util.isPrimitive;
-var thrower = util.thrower;
-
-function returnThis() {
- return this;
-}
-function throwThis() {
- throw this;
-}
-function return$(r) {
- return function Promise$_returner() {
- return r;
- };
-}
-function throw$(r) {
- return function Promise$_thrower() {
- throw r;
- };
-}
-function promisedFinally(ret, reasonOrValue, isFulfilled) {
- var then;
- if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) {
- then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
- } else {
- then = isFulfilled ? returnThis : throwThis;
- }
- return ret._then(then, thrower, void 0, reasonOrValue, void 0);
-}
-
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- var ret = promise._isBound()
- ? handler.call(promise._boundTo)
- : handler();
-
- if (ret !== void 0) {
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- return promisedFinally(maybePromise, reasonOrValue,
- promise.isFulfilled());
- }
- }
-
- if (promise.isRejected()) {
- NEXT_FILTER.e = reasonOrValue;
- return NEXT_FILTER;
- } else {
- return reasonOrValue;
- }
-}
-
-function tapHandler(value) {
- var promise = this.promise;
- var handler = this.handler;
-
- var ret = promise._isBound()
- ? handler.call(promise._boundTo, value)
- : handler(value);
-
- if (ret !== void 0) {
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- return promisedFinally(maybePromise, value, true);
- }
- }
- return value;
-}
-
-Promise.prototype._passThroughHandler =
-function Promise$_passThroughHandler(handler, isFinally) {
- if (typeof handler !== "function") return this.then();
-
- var promiseAndHandler = {
- promise: this,
- handler: handler
- };
-
- return this._then(
- isFinally ? finallyHandler : tapHandler,
- isFinally ? finallyHandler : void 0, void 0,
- promiseAndHandler, void 0);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function Promise$finally(handler) {
- return this._passThroughHandler(handler, true);
-};
-
-Promise.prototype.tap = function Promise$tap(handler) {
- return this._passThroughHandler(handler, false);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/generators.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/generators.js
deleted file mode 100644
index 58d418f8..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/generators.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, apiRejection, INTERNAL, cast) {
-var errors = require("./errors.js");
-var TypeError = errors.TypeError;
-var deprecated = require("./util.js").deprecated;
-var util = require("./util.js");
-var errorObj = util.errorObj;
-var tryCatch1 = util.tryCatch1;
-var yieldHandlers = [];
-
-function promiseFromYieldHandler(value, yieldHandlers) {
- var _errorObj = errorObj;
- var _Promise = Promise;
- var len = yieldHandlers.length;
- for (var i = 0; i < len; ++i) {
- var result = tryCatch1(yieldHandlers[i], void 0, value);
- if (result === _errorObj) {
- return _Promise.reject(_errorObj.e);
- }
- var maybePromise = cast(result, promiseFromYieldHandler);
- if (maybePromise instanceof _Promise) return maybePromise;
- }
- return null;
-}
-
-function PromiseSpawn(generatorFunction, receiver, yieldHandler) {
- var promise = this._promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- this._generatorFunction = generatorFunction;
- this._receiver = receiver;
- this._generator = void 0;
- this._yieldHandlers = typeof yieldHandler === "function"
- ? [yieldHandler].concat(yieldHandlers)
- : yieldHandlers;
-}
-
-PromiseSpawn.prototype.promise = function PromiseSpawn$promise() {
- return this._promise;
-};
-
-PromiseSpawn.prototype._run = function PromiseSpawn$_run() {
- this._generator = this._generatorFunction.call(this._receiver);
- this._receiver =
- this._generatorFunction = void 0;
- this._next(void 0);
-};
-
-PromiseSpawn.prototype._continue = function PromiseSpawn$_continue(result) {
- if (result === errorObj) {
- this._generator = void 0;
- var trace = errors.canAttach(result.e)
- ? result.e : new Error(result.e + "");
- this._promise._attachExtraTrace(trace);
- this._promise._reject(result.e, trace);
- return;
- }
-
- var value = result.value;
- if (result.done === true) {
- this._generator = void 0;
- if (!this._promise._tryFollow(value)) {
- this._promise._fulfill(value);
- }
- } else {
- var maybePromise = cast(value, void 0);
- if (!(maybePromise instanceof Promise)) {
- maybePromise =
- promiseFromYieldHandler(maybePromise, this._yieldHandlers);
- if (maybePromise === null) {
- this._throw(new TypeError("A value was yielded that could not be treated as a promise"));
- return;
- }
- }
- maybePromise._then(
- this._next,
- this._throw,
- void 0,
- this,
- null
- );
- }
-};
-
-PromiseSpawn.prototype._throw = function PromiseSpawn$_throw(reason) {
- if (errors.canAttach(reason))
- this._promise._attachExtraTrace(reason);
- this._continue(
- tryCatch1(this._generator["throw"], this._generator, reason)
- );
-};
-
-PromiseSpawn.prototype._next = function PromiseSpawn$_next(value) {
- this._continue(
- tryCatch1(this._generator.next, this._generator, value)
- );
-};
-
-Promise.coroutine =
-function Promise$Coroutine(generatorFunction, options) {
- if (typeof generatorFunction !== "function") {
- throw new TypeError("generatorFunction must be a function");
- }
- var yieldHandler = Object(options).yieldHandler;
- var PromiseSpawn$ = PromiseSpawn;
- return function () {
- var generator = generatorFunction.apply(this, arguments);
- var spawn = new PromiseSpawn$(void 0, void 0, yieldHandler);
- spawn._generator = generator;
- spawn._next(void 0);
- return spawn.promise();
- };
-};
-
-Promise.coroutine.addYieldHandler = function(fn) {
- if (typeof fn !== "function") throw new TypeError("fn must be a function");
- yieldHandlers.push(fn);
-};
-
-Promise.spawn = function Promise$Spawn(generatorFunction) {
- deprecated("Promise.spawn is deprecated. Use Promise.coroutine instead.");
- if (typeof generatorFunction !== "function") {
- return apiRejection("generatorFunction must be a function");
- }
- var spawn = new PromiseSpawn(generatorFunction, this);
- var ret = spawn.promise();
- spawn._run(Promise.spawn);
- return ret;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/join.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/join.js
deleted file mode 100644
index 123e66b3..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/join.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
-function(Promise, PromiseArray, cast, INTERNAL) {
-var util = require("./util.js");
-var canEvaluate = util.canEvaluate;
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var caller = function(count) {
- var values = [];
- for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
- return new Function("holder", " \n\
- 'use strict'; \n\
- var callback = holder.fn; \n\
- return callback(values); \n\
- ".replace(/values/g, values.join(", ")));
- };
- var thenCallbacks = [];
- var callers = [void 0];
- for (var i = 1; i <= 5; ++i) {
- thenCallbacks.push(thenCallback(i));
- callers.push(caller(i));
- }
-
- var Holder = function(total, fn) {
- this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
- this.fn = fn;
- this.total = total;
- this.now = 0;
- };
-
- Holder.prototype.callers = callers;
- Holder.prototype.checkFulfillment = function(promise) {
- var now = this.now;
- now++;
- var total = this.total;
- if (now >= total) {
- var handler = this.callers[total];
- var ret = tryCatch1(handler, void 0, this);
- if (ret === errorObj) {
- promise._rejectUnchecked(ret.e);
- } else if (!promise._tryFollow(ret)) {
- promise._fulfillUnchecked(ret);
- }
- } else {
- this.now = now;
- }
- };
-}
-
-
-
-
-Promise.join = function Promise$Join() {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (last < 6 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- var holder = new Holder(last, fn);
- var reject = ret._reject;
- var callbacks = thenCallbacks;
- for (var i = 0; i < last; ++i) {
- var maybePromise = cast(arguments[i], void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- maybePromise._then(callbacks[i], reject,
- void 0, ret, holder);
- } else if (maybePromise.isFulfilled()) {
- callbacks[i].call(ret,
- maybePromise._settledValue, holder);
- } else {
- ret._reject(maybePromise._settledValue);
- maybePromise._unsetRejectionIsUnhandled();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
- return ret;
- }
- }
- var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
- var ret = new PromiseArray(args).promise();
- return fn !== void 0 ? ret.spread(fn) : ret;
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/map.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/map.js
deleted file mode 100644
index ecc92479..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/map.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, cast, INTERNAL) {
-var util = require("./util.js");
-var tryCatch3 = util.tryCatch3;
-var errorObj = util.errorObj;
-var PENDING = {};
-var EMPTY_ARRAY = [];
-
-function MappingPromiseArray(promises, fn, limit, _filter) {
- this.constructor$(promises);
- this._callback = fn;
- this._preservedValues = _filter === INTERNAL
- ? new Array(this.length())
- : null;
- this._limit = limit;
- this._inFlight = 0;
- this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
- this._init$(void 0, -2);
-}
-util.inherits(MappingPromiseArray, PromiseArray);
-
-MappingPromiseArray.prototype._init = function MappingPromiseArray$_init() {};
-
-MappingPromiseArray.prototype._promiseFulfilled =
-function MappingPromiseArray$_promiseFulfilled(value, index) {
- var values = this._values;
- if (values === null) return;
-
- var length = this.length();
- var preservedValues = this._preservedValues;
- var limit = this._limit;
- if (values[index] === PENDING) {
- values[index] = value;
- if (limit >= 1) {
- this._inFlight--;
- this._drainQueue();
- if (this._isResolved()) return;
- }
- } else {
- if (limit >= 1 && this._inFlight >= limit) {
- values[index] = value;
- this._queue.push(index);
- return;
- }
- if (preservedValues !== null) preservedValues[index] = value;
-
- var callback = this._callback;
- var receiver = this._promise._boundTo;
- var ret = tryCatch3(callback, receiver, value, index, length);
- if (ret === errorObj) return this._reject(ret.e);
-
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- if (limit >= 1) this._inFlight++;
- values[index] = PENDING;
- return maybePromise._proxyPromiseArray(this, index);
- } else if (maybePromise.isFulfilled()) {
- ret = maybePromise.value();
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- return this._reject(maybePromise.reason());
- }
- }
- values[index] = ret;
- }
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= length) {
- if (preservedValues !== null) {
- this._filter(values, preservedValues);
- } else {
- this._resolve(values);
- }
-
- }
-};
-
-MappingPromiseArray.prototype._drainQueue =
-function MappingPromiseArray$_drainQueue() {
- var queue = this._queue;
- var limit = this._limit;
- var values = this._values;
- while (queue.length > 0 && this._inFlight < limit) {
- var index = queue.pop();
- this._promiseFulfilled(values[index], index);
- }
-};
-
-MappingPromiseArray.prototype._filter =
-function MappingPromiseArray$_filter(booleans, values) {
- var len = values.length;
- var ret = new Array(len);
- var j = 0;
- for (var i = 0; i < len; ++i) {
- if (booleans[i]) ret[j++] = values[i];
- }
- ret.length = j;
- this._resolve(ret);
-};
-
-MappingPromiseArray.prototype.preservedValues =
-function MappingPromiseArray$preserveValues() {
- return this._preservedValues;
-};
-
-function map(promises, fn, options, _filter) {
- var limit = typeof options === "object" && options !== null
- ? options.concurrency
- : 0;
- limit = typeof limit === "number" &&
- isFinite(limit) && limit >= 1 ? limit : 0;
- return new MappingPromiseArray(promises, fn, limit, _filter);
-}
-
-Promise.prototype.map = function Promise$map(fn, options) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
-
- return map(this, fn, options, null).promise();
-};
-
-Promise.map = function Promise$Map(promises, fn, options, _filter) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- return map(promises, fn, options, _filter).promise();
-};
-
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/nodeify.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/nodeify.js
deleted file mode 100644
index e5658d69..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/nodeify.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-var util = require("./util.js");
-var async = require("./async.js");
-var tryCatch2 = util.tryCatch2;
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-function thrower(r) {
- throw r;
-}
-
-function Promise$_spreadAdapter(val, receiver) {
- if (!util.isArray(val)) return Promise$_successAdapter(val, receiver);
- var ret = util.tryCatchApply(this, [null].concat(val), receiver);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-
-function Promise$_successAdapter(val, receiver) {
- var nodeback = this;
- var ret = val === void 0
- ? tryCatch1(nodeback, receiver, null)
- : tryCatch2(nodeback, receiver, null, val);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-function Promise$_errorAdapter(reason, receiver) {
- var nodeback = this;
- var ret = tryCatch1(nodeback, receiver, reason);
- if (ret === errorObj) {
- async.invokeLater(thrower, void 0, ret.e);
- }
-}
-
-Promise.prototype.nodeify = function Promise$nodeify(nodeback, options) {
- if (typeof nodeback == "function") {
- var adapter = Promise$_successAdapter;
- if (options !== void 0 && Object(options).spread) {
- adapter = Promise$_spreadAdapter;
- }
- this._then(
- adapter,
- Promise$_errorAdapter,
- void 0,
- nodeback,
- this._boundTo
- );
- }
- return this;
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/progress.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/progress.js
deleted file mode 100644
index a6fc6044..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/progress.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray) {
-var util = require("./util.js");
-var async = require("./async.js");
-var errors = require("./errors.js");
-var tryCatch1 = util.tryCatch1;
-var errorObj = util.errorObj;
-
-Promise.prototype.progressed = function Promise$progressed(handler) {
- return this._then(void 0, void 0, handler, void 0, void 0);
-};
-
-Promise.prototype._progress = function Promise$_progress(progressValue) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._progressUnchecked(progressValue);
-
-};
-
-Promise.prototype._progressHandlerAt =
-function Promise$_progressHandlerAt(index) {
- return index === 0
- ? this._progressHandler0
- : this[(index << 2) + index - 5 + 2];
-};
-
-Promise.prototype._doProgressWith =
-function Promise$_doProgressWith(progression) {
- var progressValue = progression.value;
- var handler = progression.handler;
- var promise = progression.promise;
- var receiver = progression.receiver;
-
- var ret = tryCatch1(handler, receiver, progressValue);
- if (ret === errorObj) {
- if (ret.e != null &&
- ret.e.name !== "StopProgressPropagation") {
- var trace = errors.canAttach(ret.e)
- ? ret.e : new Error(ret.e + "");
- promise._attachExtraTrace(trace);
- promise._progress(ret.e);
- }
- } else if (ret instanceof Promise) {
- ret._then(promise._progress, null, null, promise, void 0);
- } else {
- promise._progress(ret);
- }
-};
-
-
-Promise.prototype._progressUnchecked =
-function Promise$_progressUnchecked(progressValue) {
- if (!this.isPending()) return;
- var len = this._length();
- var progress = this._progress;
- for (var i = 0; i < len; i++) {
- var handler = this._progressHandlerAt(i);
- var promise = this._promiseAt(i);
- if (!(promise instanceof Promise)) {
- var receiver = this._receiverAt(i);
- if (typeof handler === "function") {
- handler.call(receiver, progressValue, promise);
- } else if (receiver instanceof Promise && receiver._isProxied()) {
- receiver._progressUnchecked(progressValue);
- } else if (receiver instanceof PromiseArray) {
- receiver._promiseProgressed(progressValue, promise);
- }
- continue;
- }
-
- if (typeof handler === "function") {
- this._doProgressWith(({handler: handler,
-promise: promise,
-receiver: this._receiverAt(i),
-value: progressValue}));
- } else {
- progress.call(promise, progressValue);
- }
- }
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise.js
deleted file mode 100644
index 7e2264c3..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise.js
+++ /dev/null
@@ -1,1042 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict(bluebird) {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-module.exports = function() {
-var util = require("./util.js");
-var async = require("./async.js");
-var errors = require("./errors.js");
-
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {e: null};
-
-var cast = require("./thenables.js")(Promise, INTERNAL);
-var PromiseArray = require("./promise_array.js")(Promise, INTERNAL, cast);
-var CapturedTrace = require("./captured_trace.js")();
-var CatchFilter = require("./catch_filter.js")(NEXT_FILTER);
-var PromiseResolver = require("./promise_resolver.js");
-
-var isArray = util.isArray;
-
-var errorObj = util.errorObj;
-var tryCatch1 = util.tryCatch1;
-var tryCatch2 = util.tryCatch2;
-var tryCatchApply = util.tryCatchApply;
-var RangeError = errors.RangeError;
-var TypeError = errors.TypeError;
-var CancellationError = errors.CancellationError;
-var TimeoutError = errors.TimeoutError;
-var OperationalError = errors.OperationalError;
-var originatesFromRejection = errors.originatesFromRejection;
-var markAsOriginatingFromRejection = errors.markAsOriginatingFromRejection;
-var canAttach = errors.canAttach;
-var thrower = util.thrower;
-var apiRejection = require("./errors_api_rejection")(Promise);
-
-
-var makeSelfResolutionError = function Promise$_makeSelfResolutionError() {
- return new TypeError("circular promise resolution chain");
-};
-
-function Promise(resolver) {
- if (typeof resolver !== "function") {
- throw new TypeError("the promise constructor requires a resolver function");
- }
- if (this.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly");
- }
- this._bitField = 0;
- this._fulfillmentHandler0 = void 0;
- this._rejectionHandler0 = void 0;
- this._promise0 = void 0;
- this._receiver0 = void 0;
- this._settledValue = void 0;
- this._boundTo = void 0;
- if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
-}
-
-Promise.prototype.bind = function Promise$bind(thisArg) {
- var ret = new Promise(INTERNAL);
- ret._follow(this);
- ret._propagateFrom(this, 2 | 1);
- ret._setBoundTo(thisArg);
- return ret;
-};
-
-Promise.prototype.toString = function Promise$toString() {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] =
-function Promise$catch(fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (typeof item === "function") {
- catchInstances[j++] = item;
- } else {
- var catchFilterTypeError =
- new TypeError(
- "A catch filter must be an error constructor "
- + "or a filter function");
-
- this._attachExtraTrace(catchFilterTypeError);
- this._reject(catchFilterTypeError);
- return;
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
-
- this._resetTrace();
- var catchFilter = new CatchFilter(catchInstances, fn, this);
- return this._then(void 0, catchFilter.doFilter, void 0,
- catchFilter, void 0);
- }
- return this._then(void 0, fn, void 0, void 0, void 0);
-};
-
-Promise.prototype.then =
-function Promise$then(didFulfill, didReject, didProgress) {
- return this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
-};
-
-
-Promise.prototype.done =
-function Promise$done(didFulfill, didReject, didProgress) {
- var promise = this._then(didFulfill, didReject, didProgress,
- void 0, void 0);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function Promise$spread(didFulfill, didReject) {
- return this._then(didFulfill, didReject, void 0,
- APPLY, void 0);
-};
-
-Promise.prototype.isCancellable = function Promise$isCancellable() {
- return !this.isResolved() &&
- this._cancellable();
-};
-
-Promise.prototype.toJSON = function Promise$toJSON() {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: void 0,
- rejectionReason: void 0
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this._settledValue;
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this._settledValue;
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function Promise$all() {
- return new PromiseArray(this).promise();
-};
-
-
-Promise.is = function Promise$Is(val) {
- return val instanceof Promise;
-};
-
-Promise.all = function Promise$All(promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.prototype.error = function Promise$_error(fn) {
- return this.caught(originatesFromRejection, fn);
-};
-
-Promise.prototype._resolveFromSyncValue =
-function Promise$_resolveFromSyncValue(value) {
- if (value === errorObj) {
- this._cleanValues();
- this._setRejected();
- this._settledValue = value.e;
- this._ensurePossibleRejectionHandled();
- } else {
- var maybePromise = cast(value, void 0);
- if (maybePromise instanceof Promise) {
- this._follow(maybePromise);
- } else {
- this._cleanValues();
- this._setFulfilled();
- this._settledValue = value;
- }
- }
-};
-
-Promise.method = function Promise$_Method(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("fn must be a function");
- }
- return function Promise$_method() {
- var value;
- switch(arguments.length) {
- case 0: value = tryCatch1(fn, this, void 0); break;
- case 1: value = tryCatch1(fn, this, arguments[0]); break;
- case 2: value = tryCatch2(fn, this, arguments[0], arguments[1]); break;
- default:
- var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
- value = tryCatchApply(fn, args, this); break;
- }
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function Promise$_Try(fn, args, ctx) {
- if (typeof fn !== "function") {
- return apiRejection("fn must be a function");
- }
- var value = isArray(args)
- ? tryCatchApply(fn, args, ctx)
- : tryCatch1(fn, ctx, args);
-
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.defer = Promise.pending = function Promise$Defer() {
- var promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- return new PromiseResolver(promise);
-};
-
-Promise.bind = function Promise$Bind(thisArg) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._setFulfilled();
- ret._setBoundTo(thisArg);
- return ret;
-};
-
-Promise.cast = function Promise$_Cast(obj) {
- var ret = cast(obj, void 0);
- if (!(ret instanceof Promise)) {
- var val = ret;
- ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- ret._setFulfilled();
- ret._cleanValues();
- ret._settledValue = val;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function Promise$Reject(reason) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- markAsOriginatingFromRejection(reason);
- ret._cleanValues();
- ret._setRejected();
- ret._settledValue = reason;
- if (!canAttach(reason)) {
- var trace = new Error(reason + "");
- ret._setCarriedStackTrace(trace);
- }
- ret._ensurePossibleRejectionHandled();
- return ret;
-};
-
-Promise.onPossiblyUnhandledRejection =
-function Promise$OnPossiblyUnhandledRejection(fn) {
- CapturedTrace.possiblyUnhandledRejection = typeof fn === "function"
- ? fn : void 0;
-};
-
-var unhandledRejectionHandled;
-Promise.onUnhandledRejectionHandled =
-function Promise$onUnhandledRejectionHandled(fn) {
- unhandledRejectionHandled = typeof fn === "function" ? fn : void 0;
-};
-
-var debugging = false || !!(
- typeof process !== "undefined" &&
- typeof process.execPath === "string" &&
- typeof process.env === "object" &&
- (process.env["BLUEBIRD_DEBUG"] ||
- process.env["NODE_ENV"] === "development")
-);
-
-
-Promise.longStackTraces = function Promise$LongStackTraces() {
- if (async.haveItemsQueued() &&
- debugging === false
- ) {
- throw new Error("cannot enable long stack traces after promises have been created");
- }
- debugging = CapturedTrace.isSupported();
-};
-
-Promise.hasLongStackTraces = function Promise$HasLongStackTraces() {
- return debugging && CapturedTrace.isSupported();
-};
-
-Promise.prototype._then =
-function Promise$_then(
- didFulfill,
- didReject,
- didProgress,
- receiver,
- internalData
-) {
- var haveInternalData = internalData !== void 0;
- var ret = haveInternalData ? internalData : new Promise(INTERNAL);
-
- if (!haveInternalData) {
- if (debugging) {
- var haveSameContext = this._peekContext() === this._traceParent;
- ret._traceParent = haveSameContext ? this._traceParent : this;
- }
- ret._propagateFrom(this, 7);
- }
-
- var callbackIndex =
- this._addCallbacks(didFulfill, didReject, didProgress, ret, receiver);
-
- if (this.isResolved()) {
- this._queueSettleAt(callbackIndex);
- }
-
- return ret;
-};
-
-Promise.prototype._length = function Promise$_length() {
- return this._bitField & 262143;
-};
-
-Promise.prototype._isFollowingOrFulfilledOrRejected =
-function Promise$_isFollowingOrFulfilledOrRejected() {
- return (this._bitField & 939524096) > 0;
-};
-
-Promise.prototype._isFollowing = function Promise$_isFollowing() {
- return (this._bitField & 536870912) === 536870912;
-};
-
-Promise.prototype._setLength = function Promise$_setLength(len) {
- this._bitField = (this._bitField & -262144) |
- (len & 262143);
-};
-
-Promise.prototype._setFulfilled = function Promise$_setFulfilled() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._setRejected = function Promise$_setRejected() {
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._setFollowing = function Promise$_setFollowing() {
- this._bitField = this._bitField | 536870912;
-};
-
-Promise.prototype._setIsFinal = function Promise$_setIsFinal() {
- this._bitField = this._bitField | 33554432;
-};
-
-Promise.prototype._isFinal = function Promise$_isFinal() {
- return (this._bitField & 33554432) > 0;
-};
-
-Promise.prototype._cancellable = function Promise$_cancellable() {
- return (this._bitField & 67108864) > 0;
-};
-
-Promise.prototype._setCancellable = function Promise$_setCancellable() {
- this._bitField = this._bitField | 67108864;
-};
-
-Promise.prototype._unsetCancellable = function Promise$_unsetCancellable() {
- this._bitField = this._bitField & (~67108864);
-};
-
-Promise.prototype._setRejectionIsUnhandled =
-function Promise$_setRejectionIsUnhandled() {
- this._bitField = this._bitField | 2097152;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled =
-function Promise$_unsetRejectionIsUnhandled() {
- this._bitField = this._bitField & (~2097152);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled =
-function Promise$_isRejectionUnhandled() {
- return (this._bitField & 2097152) > 0;
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified =
-function Promise$_setUnhandledRejectionIsNotified() {
- this._bitField = this._bitField | 524288;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified =
-function Promise$_unsetUnhandledRejectionIsNotified() {
- this._bitField = this._bitField & (~524288);
-};
-
-Promise.prototype._isUnhandledRejectionNotified =
-function Promise$_isUnhandledRejectionNotified() {
- return (this._bitField & 524288) > 0;
-};
-
-Promise.prototype._setCarriedStackTrace =
-function Promise$_setCarriedStackTrace(capturedTrace) {
- this._bitField = this._bitField | 1048576;
- this._fulfillmentHandler0 = capturedTrace;
-};
-
-Promise.prototype._unsetCarriedStackTrace =
-function Promise$_unsetCarriedStackTrace() {
- this._bitField = this._bitField & (~1048576);
- this._fulfillmentHandler0 = void 0;
-};
-
-Promise.prototype._isCarryingStackTrace =
-function Promise$_isCarryingStackTrace() {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._getCarriedStackTrace =
-function Promise$_getCarriedStackTrace() {
- return this._isCarryingStackTrace()
- ? this._fulfillmentHandler0
- : void 0;
-};
-
-Promise.prototype._receiverAt = function Promise$_receiverAt(index) {
- var ret = index === 0
- ? this._receiver0
- : this[(index << 2) + index - 5 + 4];
- if (this._isBound() && ret === void 0) {
- return this._boundTo;
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function Promise$_promiseAt(index) {
- return index === 0
- ? this._promise0
- : this[(index << 2) + index - 5 + 3];
-};
-
-Promise.prototype._fulfillmentHandlerAt =
-function Promise$_fulfillmentHandlerAt(index) {
- return index === 0
- ? this._fulfillmentHandler0
- : this[(index << 2) + index - 5 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt =
-function Promise$_rejectionHandlerAt(index) {
- return index === 0
- ? this._rejectionHandler0
- : this[(index << 2) + index - 5 + 1];
-};
-
-Promise.prototype._addCallbacks = function Promise$_addCallbacks(
- fulfill,
- reject,
- progress,
- promise,
- receiver
-) {
- var index = this._length();
-
- if (index >= 262143 - 5) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- if (receiver !== void 0) this._receiver0 = receiver;
- if (typeof fulfill === "function" && !this._isCarryingStackTrace())
- this._fulfillmentHandler0 = fulfill;
- if (typeof reject === "function") this._rejectionHandler0 = reject;
- if (typeof progress === "function") this._progressHandler0 = progress;
- } else {
- var base = (index << 2) + index - 5;
- this[base + 3] = promise;
- this[base + 4] = receiver;
- this[base + 0] = typeof fulfill === "function"
- ? fulfill : void 0;
- this[base + 1] = typeof reject === "function"
- ? reject : void 0;
- this[base + 2] = typeof progress === "function"
- ? progress : void 0;
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._setProxyHandlers =
-function Promise$_setProxyHandlers(receiver, promiseSlotValue) {
- var index = this._length();
-
- if (index >= 262143 - 5) {
- index = 0;
- this._setLength(0);
- }
- if (index === 0) {
- this._promise0 = promiseSlotValue;
- this._receiver0 = receiver;
- } else {
- var base = (index << 2) + index - 5;
- this[base + 3] = promiseSlotValue;
- this[base + 4] = receiver;
- this[base + 0] =
- this[base + 1] =
- this[base + 2] = void 0;
- }
- this._setLength(index + 1);
-};
-
-Promise.prototype._proxyPromiseArray =
-function Promise$_proxyPromiseArray(promiseArray, index) {
- this._setProxyHandlers(promiseArray, index);
-};
-
-Promise.prototype._proxyPromise = function Promise$_proxyPromise(promise) {
- promise._setProxied();
- this._setProxyHandlers(promise, -1);
-};
-
-Promise.prototype._setBoundTo = function Promise$_setBoundTo(obj) {
- if (obj !== void 0) {
- this._bitField = this._bitField | 8388608;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~8388608);
- }
-};
-
-Promise.prototype._isBound = function Promise$_isBound() {
- return (this._bitField & 8388608) === 8388608;
-};
-
-Promise.prototype._resolveFromResolver =
-function Promise$_resolveFromResolver(resolver) {
- var promise = this;
- this._setTrace(void 0);
- this._pushContext();
-
- function Promise$_resolver(val) {
- if (promise._tryFollow(val)) {
- return;
- }
- promise._fulfill(val);
- }
- function Promise$_rejecter(val) {
- var trace = canAttach(val) ? val : new Error(val + "");
- promise._attachExtraTrace(trace);
- markAsOriginatingFromRejection(val);
- promise._reject(val, trace === val ? void 0 : trace);
- }
- var r = tryCatch2(resolver, void 0, Promise$_resolver, Promise$_rejecter);
- this._popContext();
-
- if (r !== void 0 && r === errorObj) {
- var e = r.e;
- var trace = canAttach(e) ? e : new Error(e + "");
- promise._reject(e, trace);
- }
-};
-
-Promise.prototype._spreadSlowCase =
-function Promise$_spreadSlowCase(targetFn, promise, values, boundTo) {
- var promiseForAll = new PromiseArray(values).promise();
- var promise2 = promiseForAll._then(function() {
- return targetFn.apply(boundTo, arguments);
- }, void 0, void 0, APPLY, void 0);
- promise._follow(promise2);
-};
-
-Promise.prototype._callSpread =
-function Promise$_callSpread(handler, promise, value) {
- var boundTo = this._boundTo;
- if (isArray(value)) {
- for (var i = 0, len = value.length; i < len; ++i) {
- if (cast(value[i], void 0) instanceof Promise) {
- this._spreadSlowCase(handler, promise, value, boundTo);
- return;
- }
- }
- }
- promise._pushContext();
- return tryCatchApply(handler, value, boundTo);
-};
-
-Promise.prototype._callHandler =
-function Promise$_callHandler(
- handler, receiver, promise, value) {
- var x;
- if (receiver === APPLY && !this.isRejected()) {
- x = this._callSpread(handler, promise, value);
- } else {
- promise._pushContext();
- x = tryCatch1(handler, receiver, value);
- }
- promise._popContext();
- return x;
-};
-
-Promise.prototype._settlePromiseFromHandler =
-function Promise$_settlePromiseFromHandler(
- handler, receiver, value, promise
-) {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- return;
- }
- var x = this._callHandler(handler, receiver, promise, value);
- if (promise._isFollowing()) return;
-
- if (x === errorObj || x === promise || x === NEXT_FILTER) {
- var err = x === promise
- ? makeSelfResolutionError()
- : x.e;
- var trace = canAttach(err) ? err : new Error(err + "");
- if (x !== NEXT_FILTER) promise._attachExtraTrace(trace);
- promise._rejectUnchecked(err, trace);
- } else {
- var castValue = cast(x, promise);
- if (castValue instanceof Promise) {
- if (castValue.isRejected() &&
- !castValue._isCarryingStackTrace() &&
- !canAttach(castValue._settledValue)) {
- var trace = new Error(castValue._settledValue + "");
- promise._attachExtraTrace(trace);
- castValue._setCarriedStackTrace(trace);
- }
- promise._follow(castValue);
- promise._propagateFrom(castValue, 1);
- } else {
- promise._fulfillUnchecked(x);
- }
- }
-};
-
-Promise.prototype._follow =
-function Promise$_follow(promise) {
- this._setFollowing();
-
- if (promise.isPending()) {
- this._propagateFrom(promise, 1);
- promise._proxyPromise(this);
- } else if (promise.isFulfilled()) {
- this._fulfillUnchecked(promise._settledValue);
- } else {
- this._rejectUnchecked(promise._settledValue,
- promise._getCarriedStackTrace());
- }
-
- if (promise._isRejectionUnhandled()) promise._unsetRejectionIsUnhandled();
-
- if (debugging &&
- promise._traceParent == null) {
- promise._traceParent = this;
- }
-};
-
-Promise.prototype._tryFollow =
-function Promise$_tryFollow(value) {
- if (this._isFollowingOrFulfilledOrRejected() ||
- value === this) {
- return false;
- }
- var maybePromise = cast(value, void 0);
- if (!(maybePromise instanceof Promise)) {
- return false;
- }
- this._follow(maybePromise);
- return true;
-};
-
-Promise.prototype._resetTrace = function Promise$_resetTrace() {
- if (debugging) {
- this._trace = new CapturedTrace(this._peekContext() === void 0);
- }
-};
-
-Promise.prototype._setTrace = function Promise$_setTrace(parent) {
- if (debugging) {
- var context = this._peekContext();
- this._traceParent = context;
- var isTopLevel = context === void 0;
- if (parent !== void 0 &&
- parent._traceParent === context) {
- this._trace = parent._trace;
- } else {
- this._trace = new CapturedTrace(isTopLevel);
- }
- }
- return this;
-};
-
-Promise.prototype._attachExtraTrace =
-function Promise$_attachExtraTrace(error) {
- if (debugging) {
- var promise = this;
- var stack = error.stack;
- stack = typeof stack === "string"
- ? stack.split("\n") : [];
- var headerLineCount = 1;
- var combinedTraces = 1;
- while(promise != null &&
- promise._trace != null) {
- stack = CapturedTrace.combine(
- stack,
- promise._trace.stack.split("\n")
- );
- promise = promise._traceParent;
- combinedTraces++;
- }
-
- var stackTraceLimit = Error.stackTraceLimit || 10;
- var max = (stackTraceLimit + headerLineCount) * combinedTraces;
- var len = stack.length;
- if (len > max) {
- stack.length = max;
- }
- if (stack.length <= headerLineCount) {
- error.stack = "(No stack trace)";
- } else {
- error.stack = stack.join("\n");
- }
- }
-};
-
-Promise.prototype._cleanValues = function Promise$_cleanValues() {
- if (this._cancellable()) {
- this._cancellationParent = void 0;
- }
-};
-
-Promise.prototype._propagateFrom =
-function Promise$_propagateFrom(parent, flags) {
- if ((flags & 1) > 0 && parent._cancellable()) {
- this._setCancellable();
- this._cancellationParent = parent;
- }
- if ((flags & 4) > 0) {
- this._setBoundTo(parent._boundTo);
- }
- if ((flags & 2) > 0) {
- this._setTrace(parent);
- }
-};
-
-Promise.prototype._fulfill = function Promise$_fulfill(value) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._fulfillUnchecked(value);
-};
-
-Promise.prototype._reject =
-function Promise$_reject(reason, carriedStackTrace) {
- if (this._isFollowingOrFulfilledOrRejected()) return;
- this._rejectUnchecked(reason, carriedStackTrace);
-};
-
-Promise.prototype._settlePromiseAt = function Promise$_settlePromiseAt(index) {
- var handler = this.isFulfilled()
- ? this._fulfillmentHandlerAt(index)
- : this._rejectionHandlerAt(index);
-
- var value = this._settledValue;
- var receiver = this._receiverAt(index);
- var promise = this._promiseAt(index);
-
- if (typeof handler === "function") {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- } else {
- var done = false;
- var isFulfilled = this.isFulfilled();
- if (receiver !== void 0) {
- if (receiver instanceof Promise &&
- receiver._isProxied()) {
- receiver._unsetProxied();
-
- if (isFulfilled) receiver._fulfillUnchecked(value);
- else receiver._rejectUnchecked(value,
- this._getCarriedStackTrace());
- done = true;
- } else if (receiver instanceof PromiseArray) {
- if (isFulfilled) receiver._promiseFulfilled(value, promise);
- else receiver._promiseRejected(value, promise);
- done = true;
- }
- }
-
- if (!done) {
- if (isFulfilled) promise._fulfill(value);
- else promise._reject(value, this._getCarriedStackTrace());
- }
- }
-
- if (index >= 256) {
- this._queueGC();
- }
-};
-
-Promise.prototype._isProxied = function Promise$_isProxied() {
- return (this._bitField & 4194304) === 4194304;
-};
-
-Promise.prototype._setProxied = function Promise$_setProxied() {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._unsetProxied = function Promise$_unsetProxied() {
- this._bitField = this._bitField & (~4194304);
-};
-
-Promise.prototype._isGcQueued = function Promise$_isGcQueued() {
- return (this._bitField & -1073741824) === -1073741824;
-};
-
-Promise.prototype._setGcQueued = function Promise$_setGcQueued() {
- this._bitField = this._bitField | -1073741824;
-};
-
-Promise.prototype._unsetGcQueued = function Promise$_unsetGcQueued() {
- this._bitField = this._bitField & (~-1073741824);
-};
-
-Promise.prototype._queueGC = function Promise$_queueGC() {
- if (this._isGcQueued()) return;
- this._setGcQueued();
- async.invokeLater(this._gc, this, void 0);
-};
-
-Promise.prototype._gc = function Promise$gc() {
- var len = this._length() * 5;
- for (var i = 0; i < len; i++) {
- delete this[i];
- }
- this._setLength(0);
- this._unsetGcQueued();
-};
-
-Promise.prototype._queueSettleAt = function Promise$_queueSettleAt(index) {
- if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
- this._settlePromiseAt(index);
-};
-
-Promise.prototype._fulfillUnchecked =
-function Promise$_fulfillUnchecked(value) {
- if (!this.isPending()) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._rejectUnchecked(err, void 0);
- }
- this._cleanValues();
- this._setFulfilled();
- this._settledValue = value;
- var len = this._length();
-
- if (len > 0) {
- this._settlePromises(len);
- }
-};
-
-Promise.prototype._rejectUncheckedCheckError =
-function Promise$_rejectUncheckedCheckError(reason) {
- var trace = canAttach(reason) ? reason : new Error(reason + "");
- this._rejectUnchecked(reason, trace === reason ? void 0 : trace);
-};
-
-Promise.prototype._rejectUnchecked =
-function Promise$_rejectUnchecked(reason, trace) {
- if (!this.isPending()) return;
- if (reason === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._rejectUnchecked(err);
- }
- this._cleanValues();
- this._setRejected();
- this._settledValue = reason;
-
- if (this._isFinal()) {
- async.invokeLater(thrower, void 0, trace === void 0 ? reason : trace);
- return;
- }
- var len = this._length();
-
- if (trace !== void 0) this._setCarriedStackTrace(trace);
-
- if (len > 0) {
- this._rejectPromises(null);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._rejectPromises = function Promise$_rejectPromises() {
- this._settlePromises();
- this._unsetCarriedStackTrace();
-};
-
-Promise.prototype._settlePromises = function Promise$_settlePromises() {
- var len = this._length();
- for (var i = 0; i < len; i++) {
- this._settlePromiseAt(i);
- }
-};
-
-Promise.prototype._ensurePossibleRejectionHandled =
-function Promise$_ensurePossibleRejectionHandled() {
- this._setRejectionIsUnhandled();
- if (CapturedTrace.possiblyUnhandledRejection !== void 0) {
- async.invokeLater(this._notifyUnhandledRejection, this, void 0);
- }
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled =
-function Promise$_notifyUnhandledRejectionIsHandled() {
- if (typeof unhandledRejectionHandled === "function") {
- async.invokeLater(unhandledRejectionHandled, void 0, this);
- }
-};
-
-Promise.prototype._notifyUnhandledRejection =
-function Promise$_notifyUnhandledRejection() {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue;
- var trace = this._getCarriedStackTrace();
-
- this._setUnhandledRejectionIsNotified();
-
- if (trace !== void 0) {
- this._unsetCarriedStackTrace();
- reason = trace;
- }
- if (typeof CapturedTrace.possiblyUnhandledRejection === "function") {
- CapturedTrace.possiblyUnhandledRejection(reason, this);
- }
- }
-};
-
-var contextStack = [];
-Promise.prototype._peekContext = function Promise$_peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return void 0;
-
-};
-
-Promise.prototype._pushContext = function Promise$_pushContext() {
- if (!debugging) return;
- contextStack.push(this);
-};
-
-Promise.prototype._popContext = function Promise$_popContext() {
- if (!debugging) return;
- contextStack.pop();
-};
-
-Promise.noConflict = function Promise$NoConflict() {
- return noConflict(Promise);
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") throw new TypeError("fn must be a function");
- async._schedule = fn;
-};
-
-if (!CapturedTrace.isSupported()) {
- Promise.longStackTraces = function(){};
- debugging = false;
-}
-
-Promise._makeSelfResolutionError = makeSelfResolutionError;
-require("./finally.js")(Promise, NEXT_FILTER, cast);
-require("./direct_resolve.js")(Promise);
-require("./synchronous_inspection.js")(Promise);
-require("./join.js")(Promise, PromiseArray, cast, INTERNAL);
-Promise.RangeError = RangeError;
-Promise.CancellationError = CancellationError;
-Promise.TimeoutError = TimeoutError;
-Promise.TypeError = TypeError;
-Promise.OperationalError = OperationalError;
-Promise.RejectionError = OperationalError;
-Promise.AggregateError = errors.AggregateError;
-
-util.toFastProperties(Promise);
-util.toFastProperties(Promise.prototype);
-Promise.Promise = Promise;
-require('./timers.js')(Promise,INTERNAL,cast);
-require('./race.js')(Promise,INTERNAL,cast);
-require('./call_get.js')(Promise);
-require('./generators.js')(Promise,apiRejection,INTERNAL,cast);
-require('./map.js')(Promise,PromiseArray,apiRejection,cast,INTERNAL);
-require('./nodeify.js')(Promise);
-require('./promisify.js')(Promise,INTERNAL);
-require('./props.js')(Promise,PromiseArray,cast);
-require('./reduce.js')(Promise,PromiseArray,apiRejection,cast,INTERNAL);
-require('./settle.js')(Promise,PromiseArray);
-require('./some.js')(Promise,PromiseArray,apiRejection);
-require('./progress.js')(Promise,PromiseArray);
-require('./cancel.js')(Promise,INTERNAL);
-require('./filter.js')(Promise,INTERNAL);
-require('./any.js')(Promise,PromiseArray);
-require('./each.js')(Promise,INTERNAL);
-require('./using.js')(Promise,apiRejection,cast);
-
-Promise.prototype = Promise.prototype;
-return Promise;
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_array.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_array.js
deleted file mode 100644
index db85c8aa..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_array.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL, cast) {
-var canAttach = require("./errors.js").canAttach;
-var util = require("./util.js");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -1: return void 0;
- case -2: return [];
- case -3: return {};
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- var parent = void 0;
- if (values instanceof Promise) {
- parent = values;
- promise._propagateFrom(parent, 1 | 4);
- }
- promise._setTrace(parent);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(void 0, -2);
-}
-PromiseArray.prototype.length = function PromiseArray$length() {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function PromiseArray$promise() {
- return this._promise;
-};
-
-PromiseArray.prototype._init =
-function PromiseArray$_init(_, resolveValueIfEmpty) {
- var values = cast(this._values, void 0);
- if (values instanceof Promise) {
- this._values = values;
- values._setBoundTo(this._promise._boundTo);
- if (values.isFulfilled()) {
- values = values._settledValue;
- if (!isArray(values)) {
- var err = new Promise.TypeError("expecting an array, a promise or a thenable");
- this.__hardReject__(err);
- return;
- }
- } else if (values.isPending()) {
- values._then(
- PromiseArray$_init,
- this._reject,
- void 0,
- this,
- resolveValueIfEmpty
- );
- return;
- } else {
- values._unsetRejectionIsUnhandled();
- this._reject(values._settledValue);
- return;
- }
- } else if (!isArray(values)) {
- var err = new Promise.TypeError("expecting an array, a promise or a thenable");
- this.__hardReject__(err);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- var len = this.getActualLength(values.length);
- var newLen = len;
- var newValues = this.shouldCopyValues() ? new Array(len) : this._values;
- var isDirectScanNeeded = false;
- for (var i = 0; i < len; ++i) {
- var maybePromise = cast(values[i], void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- maybePromise._proxyPromiseArray(this, i);
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- isDirectScanNeeded = true;
- }
- } else {
- isDirectScanNeeded = true;
- }
- newValues[i] = maybePromise;
- }
- this._values = newValues;
- this._length = newLen;
- if (isDirectScanNeeded) {
- this._scanDirectValues(len);
- }
-};
-
-PromiseArray.prototype._settlePromiseAt =
-function PromiseArray$_settlePromiseAt(index) {
- var value = this._values[index];
- if (!(value instanceof Promise)) {
- this._promiseFulfilled(value, index);
- } else if (value.isFulfilled()) {
- this._promiseFulfilled(value._settledValue, index);
- } else if (value.isRejected()) {
- this._promiseRejected(value._settledValue, index);
- }
-};
-
-PromiseArray.prototype._scanDirectValues =
-function PromiseArray$_scanDirectValues(len) {
- for (var i = 0; i < len; ++i) {
- if (this._isResolved()) {
- break;
- }
- this._settlePromiseAt(i);
- }
-};
-
-PromiseArray.prototype._isResolved = function PromiseArray$_isResolved() {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function PromiseArray$_resolve(value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype.__hardReject__ =
-PromiseArray.prototype._reject = function PromiseArray$_reject(reason) {
- this._values = null;
- var trace = canAttach(reason) ? reason : new Error(reason + "");
- this._promise._attachExtraTrace(trace);
- this._promise._reject(reason, trace);
-};
-
-PromiseArray.prototype._promiseProgressed =
-function PromiseArray$_promiseProgressed(progressValue, index) {
- if (this._isResolved()) return;
- this._promise._progress({
- index: index,
- value: progressValue
- });
-};
-
-
-PromiseArray.prototype._promiseFulfilled =
-function PromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- }
-};
-
-PromiseArray.prototype._promiseRejected =
-function PromiseArray$_promiseRejected(reason, index) {
- if (this._isResolved()) return;
- this._totalResolved++;
- this._reject(reason);
-};
-
-PromiseArray.prototype.shouldCopyValues =
-function PromiseArray$_shouldCopyValues() {
- return true;
-};
-
-PromiseArray.prototype.getActualLength =
-function PromiseArray$getActualLength(len) {
- return len;
-};
-
-return PromiseArray;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_resolver.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_resolver.js
deleted file mode 100644
index afd14bf1..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promise_resolver.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var util = require("./util.js");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = require("./errors.js");
-var TimeoutError = errors.TimeoutError;
-var OperationalError = errors.OperationalError;
-var async = require("./async.js");
-var haveGetters = util.haveGetters;
-var es5 = require("./es5.js");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- } else {
- ret = obj;
- }
- errors.markAsOriginatingFromRejection(ret);
- return ret;
-}
-
-function nodebackForPromise(promise) {
- function PromiseResolver$_callback(err, value) {
- if (promise === null) return;
-
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (arguments.length > 2) {
- var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
- promise._fulfill(args);
- } else {
- promise._fulfill(value);
- }
-
- promise = null;
- }
- return PromiseResolver$_callback;
-}
-
-
-var PromiseResolver;
-if (!haveGetters) {
- PromiseResolver = function PromiseResolver(promise) {
- this.promise = promise;
- this.asCallback = nodebackForPromise(promise);
- this.callback = this.asCallback;
- };
-}
-else {
- PromiseResolver = function PromiseResolver(promise) {
- this.promise = promise;
- };
-}
-if (haveGetters) {
- var prop = {
- get: function() {
- return nodebackForPromise(this.promise);
- }
- };
- es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
- es5.defineProperty(PromiseResolver.prototype, "callback", prop);
-}
-
-PromiseResolver._nodebackForPromise = nodebackForPromise;
-
-PromiseResolver.prototype.toString = function PromiseResolver$toString() {
- return "[object PromiseResolver]";
-};
-
-PromiseResolver.prototype.resolve =
-PromiseResolver.prototype.fulfill = function PromiseResolver$resolve(value) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
-
- var promise = this.promise;
- if (promise._tryFollow(value)) {
- return;
- }
- promise._fulfill(value);
-};
-
-PromiseResolver.prototype.reject = function PromiseResolver$reject(reason) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
-
- var promise = this.promise;
- errors.markAsOriginatingFromRejection(reason);
- var trace = errors.canAttach(reason) ? reason : new Error(reason + "");
- promise._attachExtraTrace(trace);
- promise._reject(reason);
- if (trace !== reason) {
- this._setCarriedStackTrace(trace);
- }
-};
-
-PromiseResolver.prototype.progress =
-function PromiseResolver$progress(value) {
- if (!(this instanceof PromiseResolver)) {
- throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.");
- }
- this.promise._progress(value);
-};
-
-PromiseResolver.prototype.cancel = function PromiseResolver$cancel() {
- this.promise.cancel((void 0));
-};
-
-PromiseResolver.prototype.timeout = function PromiseResolver$timeout() {
- this.reject(new TimeoutError("timeout"));
-};
-
-PromiseResolver.prototype.isResolved = function PromiseResolver$isResolved() {
- return this.promise.isResolved();
-};
-
-PromiseResolver.prototype.toJSON = function PromiseResolver$toJSON() {
- return this.promise.toJSON();
-};
-
-PromiseResolver.prototype._setCarriedStackTrace =
-function PromiseResolver$_setCarriedStackTrace(trace) {
- if (this.promise.isRejected()) {
- this.promise._setCarriedStackTrace(trace);
- }
-};
-
-module.exports = PromiseResolver;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promisify.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/promisify.js
deleted file mode 100644
index 933e0cf4..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/promisify.js
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var THIS = {};
-var util = require("./util.js");
-var nodebackForPromise = require("./promise_resolver.js")
- ._nodebackForPromise;
-var withAppended = util.withAppended;
-var maybeWrapAsError = util.maybeWrapAsError;
-var canEvaluate = util.canEvaluate;
-var TypeError = require("./errors").TypeError;
-var defaultSuffix = "Async";
-var defaultFilter = function(name, func) {
- return util.isIdentifier(name) &&
- name.charAt(0) !== "_" &&
- !util.isClass(func);
-};
-var defaultPromisified = {__isPromisified__: true};
-
-
-function escapeIdentRegex(str) {
- return str.replace(/([$])/, "\\$");
-}
-
-function isPromisified(fn) {
- try {
- return fn.__isPromisified__ === true;
- }
- catch (e) {
- return false;
- }
-}
-
-function hasPromisified(obj, key, suffix) {
- var val = util.getDataPropertyOrDefault(obj, key + suffix,
- defaultPromisified);
- return val ? isPromisified(val) : false;
-}
-function checkValid(ret, suffix, suffixRegexp) {
- for (var i = 0; i < ret.length; i += 2) {
- var key = ret[i];
- if (suffixRegexp.test(key)) {
- var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
- for (var j = 0; j < ret.length; j += 2) {
- if (ret[j] === keyWithoutAsyncSuffix) {
- throw new TypeError("Cannot promisify an API " +
- "that has normal methods with '"+suffix+"'-suffix");
- }
- }
- }
- }
-}
-
-function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
- var keys = util.inheritedDataKeys(obj);
- var ret = [];
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var value = obj[key];
- if (typeof value === "function" &&
- !isPromisified(value) &&
- !hasPromisified(obj, key, suffix) &&
- filter(key, value, obj)) {
- ret.push(key, value);
- }
- }
- checkValid(ret, suffix, suffixRegexp);
- return ret;
-}
-
-function switchCaseArgumentOrder(likelyArgumentCount) {
- var ret = [likelyArgumentCount];
- var min = Math.max(0, likelyArgumentCount - 1 - 5);
- for(var i = likelyArgumentCount - 1; i >= min; --i) {
- if (i === likelyArgumentCount) continue;
- ret.push(i);
- }
- for(var i = likelyArgumentCount + 1; i <= 5; ++i) {
- ret.push(i);
- }
- return ret;
-}
-
-function argumentSequence(argumentCount) {
- return util.filledRange(argumentCount, "arguments[", "]");
-}
-
-function parameterDeclaration(parameterCount) {
- return util.filledRange(parameterCount, "_arg", "");
-}
-
-function parameterCount(fn) {
- if (typeof fn.length === "number") {
- return Math.max(Math.min(fn.length, 1023 + 1), 0);
- }
- return 0;
-}
-
-function generatePropertyAccess(key) {
- if (util.isIdentifier(key)) {
- return "." + key;
- }
- else return "['" + key.replace(/(['\\])/g, "\\$1") + "']";
-}
-
-function makeNodePromisifiedEval(callback, receiver, originalName, fn, suffix) {
- var newParameterCount = Math.max(0, parameterCount(fn) - 1);
- var argumentOrder = switchCaseArgumentOrder(newParameterCount);
- var callbackName =
- (typeof originalName === "string" && util.isIdentifier(originalName)
- ? originalName + suffix
- : "promisified");
-
- function generateCallForArgumentCount(count) {
- var args = argumentSequence(count).join(", ");
- var comma = count > 0 ? ", " : "";
- var ret;
- if (typeof callback === "string") {
- ret = " \n\
- this.method(args, fn); \n\
- break; \n\
- ".replace(".method", generatePropertyAccess(callback));
- } else if (receiver === THIS) {
- ret = " \n\
- callback.call(this, args, fn); \n\
- break; \n\
- ";
- } else if (receiver !== void 0) {
- ret = " \n\
- callback.call(receiver, args, fn); \n\
- break; \n\
- ";
- } else {
- ret = " \n\
- callback(args, fn); \n\
- break; \n\
- ";
- }
- return ret.replace("args", args).replace(", ", comma);
- }
-
- function generateArgumentSwitchCase() {
- var ret = "";
- for(var i = 0; i < argumentOrder.length; ++i) {
- ret += "case " + argumentOrder[i] +":" +
- generateCallForArgumentCount(argumentOrder[i]);
- }
- var codeForCall;
- if (typeof callback === "string") {
- codeForCall = " \n\
- this.property.apply(this, args); \n\
- "
- .replace(".property", generatePropertyAccess(callback));
- } else if (receiver === THIS) {
- codeForCall = " \n\
- callback.apply(this, args); \n\
- ";
- } else {
- codeForCall = " \n\
- callback.apply(receiver, args); \n\
- ";
- }
-
- ret += " \n\
- default: \n\
- var args = new Array(len + 1); \n\
- var i = 0; \n\
- for (var i = 0; i < len; ++i) { \n\
- args[i] = arguments[i]; \n\
- } \n\
- args[i] = fn; \n\
- [CodeForCall] \n\
- break; \n\
- ".replace("[CodeForCall]", codeForCall);
- return ret;
- }
-
- return new Function("Promise",
- "callback",
- "receiver",
- "withAppended",
- "maybeWrapAsError",
- "nodebackForPromise",
- "INTERNAL"," \n\
- var ret = function FunctionName(Parameters) { \n\
- 'use strict'; \n\
- var len = arguments.length; \n\
- var promise = new Promise(INTERNAL); \n\
- promise._setTrace(void 0); \n\
- var fn = nodebackForPromise(promise); \n\
- try { \n\
- switch(len) { \n\
- [CodeForSwitchCase] \n\
- } \n\
- } catch (e) { \n\
- var wrapped = maybeWrapAsError(e); \n\
- promise._attachExtraTrace(wrapped); \n\
- promise._reject(wrapped); \n\
- } \n\
- return promise; \n\
- }; \n\
- ret.__isPromisified__ = true; \n\
- return ret; \n\
- "
- .replace("FunctionName", callbackName)
- .replace("Parameters", parameterDeclaration(newParameterCount))
- .replace("[CodeForSwitchCase]", generateArgumentSwitchCase()))(
- Promise,
- callback,
- receiver,
- withAppended,
- maybeWrapAsError,
- nodebackForPromise,
- INTERNAL
- );
-}
-
-function makeNodePromisifiedClosure(callback, receiver) {
- function promisified() {
- var _receiver = receiver;
- if (receiver === THIS) _receiver = this;
- if (typeof callback === "string") {
- callback = _receiver[callback];
- }
- var promise = new Promise(INTERNAL);
- promise._setTrace(void 0);
- var fn = nodebackForPromise(promise);
- try {
- callback.apply(_receiver, withAppended(arguments, fn));
- } catch(e) {
- var wrapped = maybeWrapAsError(e);
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- }
- return promise;
- }
- promisified.__isPromisified__ = true;
- return promisified;
-}
-
-var makeNodePromisified = canEvaluate
- ? makeNodePromisifiedEval
- : makeNodePromisifiedClosure;
-
-function promisifyAll(obj, suffix, filter, promisifier) {
- var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
- var methods =
- promisifiableMethods(obj, suffix, suffixRegexp, filter);
-
- for (var i = 0, len = methods.length; i < len; i+= 2) {
- var key = methods[i];
- var fn = methods[i+1];
- var promisifiedKey = key + suffix;
- obj[promisifiedKey] = promisifier === makeNodePromisified
- ? makeNodePromisified(key, THIS, key, fn, suffix)
- : promisifier(fn);
- }
- util.toFastProperties(obj);
- return obj;
-}
-
-function promisify(callback, receiver) {
- return makeNodePromisified(callback, receiver, void 0, callback);
-}
-
-Promise.promisify = function Promise$Promisify(fn, receiver) {
- if (typeof fn !== "function") {
- throw new TypeError("fn must be a function");
- }
- if (isPromisified(fn)) {
- return fn;
- }
- return promisify(fn, arguments.length < 2 ? THIS : receiver);
-};
-
-Promise.promisifyAll = function Promise$PromisifyAll(target, options) {
- if (typeof target !== "function" && typeof target !== "object") {
- throw new TypeError("the target of promisifyAll must be an object or a function");
- }
- options = Object(options);
- var suffix = options.suffix;
- if (typeof suffix !== "string") suffix = defaultSuffix;
- var filter = options.filter;
- if (typeof filter !== "function") filter = defaultFilter;
- var promisifier = options.promisifier;
- if (typeof promisifier !== "function") promisifier = makeNodePromisified;
-
- if (!util.isIdentifier(suffix)) {
- throw new RangeError("suffix must be a valid identifier");
- }
-
- var keys = util.inheritedDataKeys(target, {includeHidden: true});
- for (var i = 0; i < keys.length; ++i) {
- var value = target[keys[i]];
- if (keys[i] !== "constructor" &&
- util.isClass(value)) {
- promisifyAll(value.prototype, suffix, filter, promisifier);
- promisifyAll(value, suffix, filter, promisifier);
- }
- }
-
- return promisifyAll(target, suffix, filter, promisifier);
-};
-};
-
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/props.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/props.js
deleted file mode 100644
index 9da98592..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/props.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, cast) {
-var util = require("./util.js");
-var apiRejection = require("./errors_api_rejection")(Promise);
-var isObject = util.isObject;
-var es5 = require("./es5.js");
-
-function PropertiesPromiseArray(obj) {
- var keys = es5.keys(obj);
- var len = keys.length;
- var values = new Array(len * 2);
- for (var i = 0; i < len; ++i) {
- var key = keys[i];
- values[i] = obj[key];
- values[i + len] = key;
- }
- this.constructor$(values);
-}
-util.inherits(PropertiesPromiseArray, PromiseArray);
-
-PropertiesPromiseArray.prototype._init =
-function PropertiesPromiseArray$_init() {
- this._init$(void 0, -3) ;
-};
-
-PropertiesPromiseArray.prototype._promiseFulfilled =
-function PropertiesPromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- var val = {};
- var keyOffset = this.length();
- for (var i = 0, len = this.length(); i < len; ++i) {
- val[this._values[i + keyOffset]] = this._values[i];
- }
- this._resolve(val);
- }
-};
-
-PropertiesPromiseArray.prototype._promiseProgressed =
-function PropertiesPromiseArray$_promiseProgressed(value, index) {
- if (this._isResolved()) return;
-
- this._promise._progress({
- key: this._values[index + this.length()],
- value: value
- });
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues =
-function PropertiesPromiseArray$_shouldCopyValues() {
- return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength =
-function PropertiesPromiseArray$getActualLength(len) {
- return len >> 1;
-};
-
-function Promise$_Props(promises) {
- var ret;
- var castValue = cast(promises, void 0);
-
- if (!isObject(castValue)) {
- return apiRejection("cannot await properties of a non-object");
- } else if (castValue instanceof Promise) {
- ret = castValue._then(Promise.props, void 0, void 0, void 0, void 0);
- } else {
- ret = new PropertiesPromiseArray(castValue).promise();
- }
-
- if (castValue instanceof Promise) {
- ret._propagateFrom(castValue, 4);
- }
- return ret;
-}
-
-Promise.prototype.props = function Promise$props() {
- return Promise$_Props(this);
-};
-
-Promise.props = function Promise$Props(promises) {
- return Promise$_Props(promises);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/queue.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/queue.js
deleted file mode 100644
index d3dccddc..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/queue.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-function arrayCopy(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
- this._makeCapacity();
-}
-
-Queue.prototype._willBeOverCapacity =
-function Queue$_willBeOverCapacity(size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function Queue$_pushOne(arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype.push = function Queue$push(fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function Queue$shift() {
- var front = this._front,
- ret = this[front];
-
- this[front] = void 0;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function Queue$length() {
- return this._length;
-};
-
-Queue.prototype._makeCapacity = function Queue$_makeCapacity() {
- var len = this._capacity;
- for (var i = 0; i < len; ++i) {
- this[i] = void 0;
- }
-};
-
-Queue.prototype._checkCapacity = function Queue$_checkCapacity(size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 3);
- }
-};
-
-Queue.prototype._resizeTo = function Queue$_resizeTo(capacity) {
- var oldFront = this._front;
- var oldCapacity = this._capacity;
- var oldQueue = new Array(oldCapacity);
- var length = this.length();
-
- arrayCopy(this, 0, oldQueue, 0, oldCapacity);
- this._capacity = capacity;
- this._makeCapacity();
- this._front = 0;
- if (oldFront + length <= oldCapacity) {
- arrayCopy(oldQueue, oldFront, this, 0, length);
- } else { var lengthBeforeWrapping =
- length - ((oldFront + length) & (oldCapacity - 1));
-
- arrayCopy(oldQueue, oldFront, this, 0, lengthBeforeWrapping);
- arrayCopy(oldQueue, 0, this, lengthBeforeWrapping,
- length - lengthBeforeWrapping);
- }
-};
-
-module.exports = Queue;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/race.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/race.js
deleted file mode 100644
index 4e4c30ef..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/race.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL, cast) {
-var apiRejection = require("./errors_api_rejection.js")(Promise);
-var isArray = require("./util.js").isArray;
-
-var raceLater = function Promise$_raceLater(promise) {
- return promise.then(function(array) {
- return Promise$_Race(array, promise);
- });
-};
-
-var hasOwn = {}.hasOwnProperty;
-function Promise$_Race(promises, parent) {
- var maybePromise = cast(promises, void 0);
-
- if (maybePromise instanceof Promise) {
- return raceLater(maybePromise);
- } else if (!isArray(promises)) {
- return apiRejection("expecting an array, a promise or a thenable");
- }
-
- var ret = new Promise(INTERNAL);
- if (parent !== void 0) {
- ret._propagateFrom(parent, 7);
- } else {
- ret._setTrace(void 0);
- }
- var fulfill = ret._fulfill;
- var reject = ret._reject;
- for (var i = 0, len = promises.length; i < len; ++i) {
- var val = promises[i];
-
- if (val === void 0 && !(hasOwn.call(promises, i))) {
- continue;
- }
-
- Promise.cast(val)._then(fulfill, reject, void 0, ret, null);
- }
- return ret;
-}
-
-Promise.race = function Promise$Race(promises) {
- return Promise$_Race(promises, void 0);
-};
-
-Promise.prototype.race = function Promise$race() {
- return Promise$_Race(this, void 0);
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/reduce.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/reduce.js
deleted file mode 100644
index 7e5c1691..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/reduce.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, cast, INTERNAL) {
-var util = require("./util.js");
-var tryCatch4 = util.tryCatch4;
-var tryCatch3 = util.tryCatch3;
-var errorObj = util.errorObj;
-var PENDING = {};
-function ReductionPromiseArray(promises, fn, accum, _each) {
- this.constructor$(promises);
- var currentIndex = -2;
- this._preservedValues = _each === INTERNAL ? [] : null;
- var maybePromise = cast(accum, void 0);
- var rejected = false;
- var isPromise = maybePromise instanceof Promise;
- if (isPromise) {
- if (maybePromise.isPending()) {
- currentIndex = -1;
- maybePromise._proxyPromiseArray(this, -1);
- } else if (maybePromise.isFulfilled()) {
- accum = maybePromise.value();
- currentIndex = 0;
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- this._reject(maybePromise.reason());
- rejected = true;
- }
- }
- if (!isPromise && accum !== void 0) currentIndex = 0;
- this._callback = fn;
- this._currentIndex = currentIndex;
- this._accum = accum;
- if (!rejected) this._init$(void 0, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._init =
-function ReductionPromiseArray$_init() {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray =
-function ReductionPromiseArray$_resolveEmptyArray() {
- if (this._currentIndex !== -1) {
- this._resolve(this._preservedValues !== null
- ? [] : this._accum);
- }
-};
-
-ReductionPromiseArray.prototype._promiseFulfilled =
-function ReductionPromiseArray$_promiseFulfilled(value, index) {
- var accum;
- var values = this._values;
- if (values === null) return;
- var length = this.length();
- var currentIndex = this._currentIndex;
- if (currentIndex > index) return;
- var preservedValues = this._preservedValues;
- var isEach = preservedValues !== null;
- if (index === 0 && currentIndex === -2) {
- accum = value;
- currentIndex = 1;
- if (length < 2) return this._resolve(void 0);
- value = values[1];
- } else if (index > currentIndex) {
- return;
- } else if (index === -1 || values[index] === PENDING) {
- accum = value;
- currentIndex++;
- if (currentIndex >= length)
- return this._resolve(isEach ? preservedValues : accum);
- value = values[currentIndex];
- } else {
- accum = this._accum;
- }
-
- var callback = this._callback;
- var receiver = this._promise._boundTo;
- var ret;
-
- for (var i = currentIndex; i < length; ++i) {
- if (i > currentIndex) value = values[i];
-
- if (value instanceof Promise) {
- if (value.isFulfilled()) {
- value = value._settledValue;
- } else if (value.isPending()) {
- this._accum = accum;
- this._currentIndex = i;
- return;
- } else {
- value._unsetRejectionIsUnhandled();
- return this._reject(value.reason());
- }
- }
-
- if (isEach) {
- preservedValues.push(value);
- ret = tryCatch3(callback, receiver, value, i, length);
- }
- else {
- ret = tryCatch4(callback, receiver, accum, value, i, length);
- }
-
- if (ret === errorObj) return this._reject(ret.e);
-
- var maybePromise = cast(ret, void 0);
- if (maybePromise instanceof Promise) {
- if (maybePromise.isPending()) {
- values[i] = PENDING;
- this._accum = accum;
- this._currentIndex = i;
- return maybePromise._proxyPromiseArray(this, i);
- } else if (maybePromise.isFulfilled()) {
- ret = maybePromise.value();
- } else {
- maybePromise._unsetRejectionIsUnhandled();
- return this._reject(maybePromise.reason());
- }
- }
- accum = ret;
- }
- this._resolve(isEach ? preservedValues : accum);
-};
-
-function reduce(promises, fn, initialValue, _each) {
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
- return array.promise();
-}
-
-Promise.prototype.reduce = function Promise$reduce(fn, initialValue) {
- return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function Promise$Reduce(promises, fn, initialValue, _each) {
- return reduce(promises, fn, initialValue, _each);
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/schedule.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/schedule.js
deleted file mode 100644
index f8b6ea06..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/schedule.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var schedule;
-var _MutationObserver;
-if (typeof process === "object" && typeof process.version === "string") {
- schedule = function Promise$_Scheduler(fn) {
- process.nextTick(fn);
- };
-}
-else if ((typeof MutationObserver !== "undefined" &&
- (_MutationObserver = MutationObserver)) ||
- (typeof WebKitMutationObserver !== "undefined" &&
- (_MutationObserver = WebKitMutationObserver))) {
- schedule = (function() {
- var div = document.createElement("div");
- var queuedFn = void 0;
- var observer = new _MutationObserver(
- function Promise$_Scheduler() {
- var fn = queuedFn;
- queuedFn = void 0;
- fn();
- }
- );
- observer.observe(div, {
- attributes: true
- });
- return function Promise$_Scheduler(fn) {
- queuedFn = fn;
- div.setAttribute("class", "foo");
- };
-
- })();
-}
-else if (typeof setTimeout !== "undefined") {
- schedule = function Promise$_Scheduler(fn) {
- setTimeout(fn, 0);
- };
-}
-else throw new Error("no async scheduler available");
-module.exports = schedule;
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/settle.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/settle.js
deleted file mode 100644
index 98812979..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/settle.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
- function(Promise, PromiseArray) {
-var PromiseInspection = Promise.PromiseInspection;
-var util = require("./util.js");
-
-function SettledPromiseArray(values) {
- this.constructor$(values);
-}
-util.inherits(SettledPromiseArray, PromiseArray);
-
-SettledPromiseArray.prototype._promiseResolved =
-function SettledPromiseArray$_promiseResolved(index, inspection) {
- this._values[index] = inspection;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- }
-};
-
-SettledPromiseArray.prototype._promiseFulfilled =
-function SettledPromiseArray$_promiseFulfilled(value, index) {
- if (this._isResolved()) return;
- var ret = new PromiseInspection();
- ret._bitField = 268435456;
- ret._settledValue = value;
- this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected =
-function SettledPromiseArray$_promiseRejected(reason, index) {
- if (this._isResolved()) return;
- var ret = new PromiseInspection();
- ret._bitField = 134217728;
- ret._settledValue = reason;
- this._promiseResolved(index, ret);
-};
-
-Promise.settle = function Promise$Settle(promises) {
- return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function Promise$settle() {
- return new SettledPromiseArray(this).promise();
-};
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/some.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/some.js
deleted file mode 100644
index 935b6a69..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/some.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports =
-function(Promise, PromiseArray, apiRejection) {
-var util = require("./util.js");
-var RangeError = require("./errors.js").RangeError;
-var AggregateError = require("./errors.js").AggregateError;
-var isArray = util.isArray;
-
-
-function SomePromiseArray(values) {
- this.constructor$(values);
- this._howMany = 0;
- this._unwrap = false;
- this._initialized = false;
-}
-util.inherits(SomePromiseArray, PromiseArray);
-
-SomePromiseArray.prototype._init = function SomePromiseArray$_init() {
- if (!this._initialized) {
- return;
- }
- if (this._howMany === 0) {
- this._resolve([]);
- return;
- }
- this._init$(void 0, -2);
- var isArrayResolved = isArray(this._values);
- if (!this._isResolved() &&
- isArrayResolved &&
- this._howMany > this._canPossiblyFulfill()) {
- var message = "(Promise.some) input array contains less than " +
- this._howMany + " promises";
- this._reject(new RangeError(message));
- }
-};
-
-SomePromiseArray.prototype.init = function SomePromiseArray$init() {
- this._initialized = true;
- this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function SomePromiseArray$setUnwrap() {
- this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function SomePromiseArray$howMany() {
- return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany =
-function SomePromiseArray$setHowMany(count) {
- if (this._isResolved()) return;
- this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled =
-function SomePromiseArray$_promiseFulfilled(value) {
- if (this._isResolved()) return;
- this._addFulfilled(value);
- if (this._fulfilled() === this.howMany()) {
- this._values.length = this.howMany();
- if (this.howMany() === 1 && this._unwrap) {
- this._resolve(this._values[0]);
- } else {
- this._resolve(this._values);
- }
- }
-
-};
-SomePromiseArray.prototype._promiseRejected =
-function SomePromiseArray$_promiseRejected(reason) {
- if (this._isResolved()) return;
- this._addRejected(reason);
- if (this.howMany() > this._canPossiblyFulfill()) {
- var e = new AggregateError();
- for (var i = this.length(); i < this._values.length; ++i) {
- e.push(this._values[i]);
- }
- this._reject(e);
- }
-};
-
-SomePromiseArray.prototype._fulfilled = function SomePromiseArray$_fulfilled() {
- return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function SomePromiseArray$_rejected() {
- return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected =
-function SomePromiseArray$_addRejected(reason) {
- this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled =
-function SomePromiseArray$_addFulfilled(value) {
- this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill =
-function SomePromiseArray$_canPossiblyFulfill() {
- return this.length() - this._rejected();
-};
-
-function Promise$_Some(promises, howMany) {
- if ((howMany | 0) !== howMany || howMany < 0) {
- return apiRejection("expecting a positive integer");
- }
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- if (promise.isRejected()) {
- return promise;
- }
- ret.setHowMany(howMany);
- ret.init();
- return promise;
-}
-
-Promise.some = function Promise$Some(promises, howMany) {
- return Promise$_Some(promises, howMany);
-};
-
-Promise.prototype.some = function Promise$some(howMany) {
- return Promise$_Some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/synchronous_inspection.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/synchronous_inspection.js
deleted file mode 100644
index 3c840202..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/synchronous_inspection.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== void 0) {
- this._bitField = promise._bitField;
- this._settledValue = promise.isResolved()
- ? promise._settledValue
- : void 0;
- }
- else {
- this._bitField = 0;
- this._settledValue = void 0;
- }
-}
-
-PromiseInspection.prototype.isFulfilled =
-Promise.prototype.isFulfilled = function Promise$isFulfilled() {
- return (this._bitField & 268435456) > 0;
-};
-
-PromiseInspection.prototype.isRejected =
-Promise.prototype.isRejected = function Promise$isRejected() {
- return (this._bitField & 134217728) > 0;
-};
-
-PromiseInspection.prototype.isPending =
-Promise.prototype.isPending = function Promise$isPending() {
- return (this._bitField & 402653184) === 0;
-};
-
-PromiseInspection.prototype.value =
-Promise.prototype.value = function Promise$value() {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise");
- }
- return this._settledValue;
-};
-
-PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason =
-Promise.prototype.reason = function Promise$reason() {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise");
- }
- return this._settledValue;
-};
-
-PromiseInspection.prototype.isResolved =
-Promise.prototype.isResolved = function Promise$isResolved() {
- return (this._bitField & 402653184) > 0;
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/thenables.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/thenables.js
deleted file mode 100644
index 09e0266a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/thenables.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = require("./util.js");
-var canAttach = require("./errors.js").canAttach;
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function getThen(obj) {
- try {
- return obj.then;
- }
- catch(e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function Promise$_Cast(obj, originalPromise) {
- if (isObject(obj)) {
- if (obj instanceof Promise) {
- return obj;
- }
- else if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- ret._setTrace(void 0);
- obj._then(
- ret._fulfillUnchecked,
- ret._rejectUncheckedCheckError,
- ret._progressUnchecked,
- ret,
- null
- );
- ret._setFollowing();
- return ret;
- }
- var then = getThen(obj);
- if (then === errorObj) {
- if (originalPromise !== void 0 && canAttach(then.e)) {
- originalPromise._attachExtraTrace(then.e);
- }
- return Promise.reject(then.e);
- } else if (typeof then === "function") {
- return Promise$_doThenable(obj, then, originalPromise);
- }
- }
- return obj;
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- return hasProp.call(obj, "_promise0");
-}
-
-function Promise$_doThenable(x, then, originalPromise) {
- var resolver = Promise.defer();
- var called = false;
- try {
- then.call(
- x,
- Promise$_resolveFromThenable,
- Promise$_rejectFromThenable,
- Promise$_progressFromThenable
- );
- } catch(e) {
- if (!called) {
- called = true;
- var trace = canAttach(e) ? e : new Error(e + "");
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(trace);
- }
- resolver.promise._reject(e, trace);
- }
- }
- return resolver.promise;
-
- function Promise$_resolveFromThenable(y) {
- if (called) return;
- called = true;
-
- if (x === y) {
- var e = Promise._makeSelfResolutionError();
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(e);
- }
- resolver.promise._reject(e, void 0);
- return;
- }
- resolver.resolve(y);
- }
-
- function Promise$_rejectFromThenable(r) {
- if (called) return;
- called = true;
- var trace = canAttach(r) ? r : new Error(r + "");
- if (originalPromise !== void 0) {
- originalPromise._attachExtraTrace(trace);
- }
- resolver.promise._reject(r, trace);
- }
-
- function Promise$_progressFromThenable(v) {
- if (called) return;
- var promise = resolver.promise;
- if (typeof promise._progress === "function") {
- promise._progress(v);
- }
- }
-}
-
-return Promise$_Cast;
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/timers.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/timers.js
deleted file mode 100644
index 4db2f401..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/timers.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var _setTimeout = function(fn, ms) {
- var len = arguments.length;
- var arg0 = arguments[2];
- var arg1 = arguments[3];
- var arg2 = len >= 5 ? arguments[4] : void 0;
- setTimeout(function() {
- fn(arg0, arg1, arg2);
- }, ms);
-};
-
-module.exports = function(Promise, INTERNAL, cast) {
-var util = require("./util.js");
-var errors = require("./errors.js");
-var apiRejection = require("./errors_api_rejection")(Promise);
-var TimeoutError = Promise.TimeoutError;
-
-var afterTimeout = function Promise$_afterTimeout(promise, message, ms) {
- if (!promise.isPending()) return;
- if (typeof message !== "string") {
- message = "operation timed out after" + " " + ms + " ms"
- }
- var err = new TimeoutError(message);
- errors.markAsOriginatingFromRejection(err);
- promise._attachExtraTrace(err);
- promise._cancel(err);
-};
-
-var afterDelay = function Promise$_afterDelay(value, promise) {
- promise._fulfill(value);
-};
-
-var delay = Promise.delay = function Promise$Delay(value, ms) {
- if (ms === void 0) {
- ms = value;
- value = void 0;
- }
- ms = +ms;
- var maybePromise = cast(value, void 0);
- var promise = new Promise(INTERNAL);
-
- if (maybePromise instanceof Promise) {
- promise._propagateFrom(maybePromise, 7);
- promise._follow(maybePromise);
- return promise.then(function(value) {
- return Promise.delay(value, ms);
- });
- } else {
- promise._setTrace(void 0);
- _setTimeout(afterDelay, ms, value, promise);
- }
- return promise;
-};
-
-Promise.prototype.delay = function Promise$delay(ms) {
- return delay(this, ms);
-};
-
-Promise.prototype.timeout = function Promise$timeout(ms, message) {
- ms = +ms;
-
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 7);
- ret._follow(this);
- _setTimeout(afterTimeout, ms, ret, message, ms);
- return ret.cancellable();
-};
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/using.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/using.js
deleted file mode 100644
index 764f2d3a..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/using.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-module.exports = function (Promise, apiRejection, cast) {
- var TypeError = require("./errors.js").TypeError;
- var inherits = require("./util.js").inherits;
- var PromiseInspection = Promise.PromiseInspection;
-
- function inspectionMapper(inspections) {
- var len = inspections.length;
- for (var i = 0; i < len; ++i) {
- var inspection = inspections[i];
- if (inspection.isRejected()) {
- return Promise.reject(inspection.error());
- }
- inspections[i] = inspection.value();
- }
- return inspections;
- }
-
- function thrower(e) {
- setTimeout(function(){throw e;}, 0);
- }
-
- function dispose(resources, inspection) {
- var i = 0;
- var len = resources.length;
- var ret = Promise.defer();
- function iterator() {
- if (i >= len) return ret.resolve();
- var maybePromise = cast(resources[i++], void 0);
- if (maybePromise instanceof Promise &&
- maybePromise._isDisposable()) {
- try {
- maybePromise = cast(maybePromise._getDisposer()
- .tryDispose(inspection), void 0);
- } catch (e) {
- return thrower(e);
- }
- if (maybePromise instanceof Promise) {
- return maybePromise._then(iterator, thrower,
- null, null, null);
- }
- }
- iterator();
- }
- iterator();
- return ret.promise;
- }
-
- function disposerSuccess(value) {
- var inspection = new PromiseInspection();
- inspection._settledValue = value;
- inspection._bitField = 268435456;
- return dispose(this, inspection).thenReturn(value);
- }
-
- function disposerFail(reason) {
- var inspection = new PromiseInspection();
- inspection._settledValue = reason;
- inspection._bitField = 134217728;
- return dispose(this, inspection).thenThrow(reason);
- }
-
- function Disposer(data, promise) {
- this._data = data;
- this._promise = promise;
- }
-
- Disposer.prototype.data = function Disposer$data() {
- return this._data;
- };
-
- Disposer.prototype.promise = function Disposer$promise() {
- return this._promise;
- };
-
- Disposer.prototype.resource = function Disposer$resource() {
- if (this.promise().isFulfilled()) {
- return this.promise().value();
- }
- return null;
- };
-
- Disposer.prototype.tryDispose = function(inspection) {
- var resource = this.resource();
- var ret = resource !== null
- ? this.doDispose(resource, inspection) : null;
- this._promise._unsetDisposable();
- this._data = this._promise = null;
- return ret;
- };
-
- function FunctionDisposer(fn, promise) {
- this.constructor$(fn, promise);
- }
- inherits(FunctionDisposer, Disposer);
-
- FunctionDisposer.prototype.doDispose = function (resource, inspection) {
- var fn = this.data();
- return fn.call(resource, resource, inspection);
- };
-
- Promise.using = function Promise$using() {
- var len = arguments.length;
- if (len < 2) return apiRejection(
- "you must pass at least 2 arguments to Promise.using");
- var fn = arguments[len - 1];
- if (typeof fn !== "function") return apiRejection("fn must be a function");
- len--;
- var resources = new Array(len);
- for (var i = 0; i < len; ++i) {
- var resource = arguments[i];
- if (resource instanceof Disposer) {
- var disposer = resource;
- resource = resource.promise();
- resource._setDisposable(disposer);
- }
- resources[i] = resource;
- }
-
- return Promise.settle(resources)
- .then(inspectionMapper)
- .spread(fn)
- ._then(disposerSuccess, disposerFail, void 0, resources, void 0);
- };
-
- Promise.prototype._setDisposable =
- function Promise$_setDisposable(disposer) {
- this._bitField = this._bitField | 262144;
- this._disposer = disposer;
- };
-
- Promise.prototype._isDisposable = function Promise$_isDisposable() {
- return (this._bitField & 262144) > 0;
- };
-
- Promise.prototype._getDisposer = function Promise$_getDisposer() {
- return this._disposer;
- };
-
- Promise.prototype._unsetDisposable = function Promise$_unsetDisposable() {
- this._bitField = this._bitField & (~262144);
- this._disposer = void 0;
- };
-
- Promise.prototype.disposer = function Promise$disposer(fn) {
- if (typeof fn === "function") {
- return new FunctionDisposer(fn, this);
- }
- throw new TypeError();
- };
-
-};
diff --git a/node_modules/z-schema/node_modules/bluebird/js/zalgo/util.js b/node_modules/z-schema/node_modules/bluebird/js/zalgo/util.js
deleted file mode 100644
index 0fadbc33..00000000
--- a/node_modules/z-schema/node_modules/bluebird/js/zalgo/util.js
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * Copyright (c) 2014 Petka Antonov
- *
- * 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.
- *
- */
-"use strict";
-var es5 = require("./es5.js");
-var haveGetters = (function(){
- try {
- var o = {};
- es5.defineProperty(o, "f", {
- get: function () {
- return 3;
- }
- });
- return o.f === 3;
- }
- catch (e) {
- return false;
- }
-
-})();
-var canEvaluate = typeof navigator == "undefined";
-var errorObj = {e: {}};
-function tryCatch1(fn, receiver, arg) {
- try { return fn.call(receiver, arg); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch2(fn, receiver, arg, arg2) {
- try { return fn.call(receiver, arg, arg2); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch3(fn, receiver, arg, arg2, arg3) {
- try { return fn.call(receiver, arg, arg2, arg3); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatch4(fn, receiver, arg, arg2, arg3, arg4) {
- try { return fn.call(receiver, arg, arg2, arg3, arg4); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-function tryCatchApply(fn, args, receiver) {
- try { return fn.apply(receiver, args); }
- catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-function asString(val) {
- return typeof val === "string" ? val : ("" + val);
-}
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return !isPrimitive(value);
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(asString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : void 0;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-
-var wrapsPrimitiveReceiver = (function() {
- return this !== "string";
-}).call("string");
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- if (es5.isES5) {
- return function(obj, opts) {
- var ret = [];
- var visitedKeys = Object.create(null);
- var getKeys = Object(opts).includeHidden
- ? Object.getOwnPropertyNames
- : Object.keys;
- while (obj != null) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- return function(obj) {
- var ret = [];
- /*jshint forin:false */
- for (var key in obj) {
- ret.push(key);
- }
- return ret;
- };
- }
-
-})();
-
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.keys(fn.prototype);
- return keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027*/
- function f() {}
- f.prototype = obj;
- return f;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- haveGetters: haveGetters,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch1: tryCatch1,
- tryCatch2: tryCatch2,
- tryCatch3: tryCatch3,
- tryCatch4: tryCatch4,
- tryCatchApply: tryCatchApply,
- inherits: inherits,
- withAppended: withAppended,
- asString: asString,
- maybeWrapAsError: maybeWrapAsError,
- wrapsPrimitiveReceiver: wrapsPrimitiveReceiver,
- toFastProperties: toFastProperties,
- filledRange: filledRange
-};
-
-module.exports = ret;
diff --git a/node_modules/z-schema/node_modules/bluebird/package.json b/node_modules/z-schema/node_modules/bluebird/package.json
deleted file mode 100644
index b648b802..00000000
--- a/node_modules/z-schema/node_modules/bluebird/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "name": "bluebird",
- "description": "Full featured Promises/A+ implementation with exceptionally good performance",
- "version": "2.1.3",
- "keywords": [
- "promise",
- "performance",
- "promises",
- "promises-a",
- "promises-aplus",
- "async",
- "await",
- "deferred",
- "deferreds",
- "future",
- "flow control",
- "dsl",
- "fluent interface"
- ],
- "scripts": {
- "test": "grunt test"
- },
- "homepage": "https://github.com/petkaantonov/bluebird",
- "repository": {
- "type": "git",
- "url": "git://github.com/petkaantonov/bluebird.git"
- },
- "bugs": {
- "url": "http://github.com/petkaantonov/bluebird/issues"
- },
- "license": "MIT",
- "author": {
- "name": "Petka Antonov",
- "email": "petka_antonov@hotmail.com",
- "url": "http://github.com/petkaantonov/"
- },
- "devDependencies": {
- "grunt": "~0.4.1",
- "grunt-contrib-jshint": "~0.6.4",
- "grunt-contrib-watch": "latest",
- "grunt-contrib-connect": "latest",
- "grunt-contrib-concat": "latest",
- "grunt-saucelabs": "latest",
- "acorn": "~0.3.1",
- "mocha": "~1.12.1",
- "q": "~0.9.7",
- "when": "~2.4.0",
- "deferred": "~0.6.5",
- "rsvp": "~2.0.4",
- "avow": "~2.0.1",
- "jsdom": "~0.8.4",
- "jquery-browserify": "~1.8.1",
- "sinon": "~1.7.3",
- "kew": "~0.2.2",
- "browserify": "~2.35.0",
- "concurrent": "~0.3.2",
- "text-table": "~0.2.0",
- "grunt-cli": "~0.1.9",
- "jshint-stylish": "~0.1.3",
- "semver-utils": "~1.1.0",
- "rimraf": "~2.2.6",
- "mkdirp": "~0.3.5"
- },
- "readmeFilename": "README.md",
- "main": "./js/main/bluebird.js",
- "files": [
- "js/main",
- "js/zalgo",
- "LICENSE",
- "zalgo.js"
- ],
- "readme": "[![Build Status](https://travis-ci.org/petkaantonov/bluebird.png?branch=master)](https://travis-ci.org/petkaantonov/bluebird)\n\n\n \n\n\n\n\n#Introduction\n\nBluebird is a fully featured [promise](#what-are-promises-and-why-should-i-use-them) library with focus on innovative features and performance\n\n\n\n#Topics\n\n- [Features](#features)\n- [Quick start](#quick-start)\n- [API Reference and examples](API.md)\n- [Support](#support)\n- [What are promises and why should I use them?](#what-are-promises-and-why-should-i-use-them)\n- [Questions and issues](#questions-and-issues)\n- [Error handling](#error-handling)\n- [Development](#development)\n - [Testing](#testing)\n - [Benchmarking](#benchmarks)\n - [Custom builds](#custom-builds)\n - [For library authors](#for-library-authors)\n- [What is the sync build?](#what-is-the-sync-build)\n- [License](#license)\n- [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)\n- [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)\n- [Changelog](changelog.md)\n- [Optimization guide](#optimization-guide)\n\n\n\n#Features:\n\n- [Promises A+](http://promisesaplus.com)\n- [Synchronous inspection](API.md#synchronous-inspection)\n- [Concurrency coordination](API.md#collections)\n- [Promisification on steroids](API.md#promisification)\n- [Resource management through a parallel of python `with`/C# `using`](API.md#resource-management)\n- [Cancellation and timeouts](API.md#cancellation)\n- [Parallel for C# `async` and `await`](API.md#generators)\n- Mind blowing utilities such as\n - [`.bind()`](API.md#binddynamic-thisarg---promise)\n - [`.call()`](API.md#callstring-propertyname--dynamic-arg---promise)\n - [`Promise.join()`](API.md#promisejoinpromisethenablevalue-promises-function-handler---promise)\n - [And](API.md#core) [much](API.md#timers) [more](API.md#utility)!\n- [Practical debugging solutions and sane defaults](#error-handling)\n- [Sick performance](benchmark/stats/latest.md)\n\n\n\n#Quick start\n\n##Node.js\n\n npm install bluebird\n\nThen:\n\n```js\nvar Promise = require(\"bluebird\");\n```\n\n##Browsers\n\nDownload the [bluebird.js](https://github.com/petkaantonov/bluebird/tree/master/js/browser) file. And then use a script tag:\n\n```html\n\n```\n\nThe global variable `Promise` becomes available after the above script tag.\n\nA [minimal bluebird browser build](#custom-builds) is ̃38.92KB minified*, 11.65KB gzipped and has no external dependencies.\n\n*Google Closure Compiler using Simple.\n\n####Browser support\n\nBrowsers that [implement ECMA-262, edition 3](http://en.wikipedia.org/wiki/Ecmascript#Implementations) and later are supported.\n\n[![Selenium Test Status](https://saucelabs.com/browser-matrix/petka_antonov.svg)](https://saucelabs.com/u/petka_antonov)\n\n*IE7 and IE8 had to be removed from tests due to SauceLabs bug but are supported and pass all tests*\n\n**Note** that in ECMA-262, edition 3 (IE7, IE8 etc) it is not possible to use methods that have keyword names like `.catch` and `.finally`. The [API documentation](API.md) always lists a compatible alternative name that you can use if you need to support these browsers. For example `.catch` is replaced with `.caught` and `.finally` with `.lastly`.\n\nAlso, [long stack trace](API.md#promiselongstacktraces---void) support is only available in Chrome and Firefox.\n\nPreviously bluebird required es5-shim.js and es5-sham.js to support Edition 3 - these are **no longer required** as of **0.10.4**.\n\nAfter quick start, see [API Reference and examples](API.md)\n\n\n\n#Support\n\n- IRC: #promises @freenode\n- StackOverflow: [bluebird tag](http://stackoverflow.com/questions/tagged/bluebird)\n- Bugs and feature requests: [github issue tracker](https://github.com/petkaantonov/bluebird/issues?state=open)\n\n\n\n#What are promises and why should I use them?\n\nYou should use promises to turn this:\n\n```js\nfs.readFile(\"file.json\", function(err, val) {\n if( err ) {\n console.error(\"unable to read file\");\n }\n else {\n try {\n val = JSON.parse(val);\n console.log(val.success);\n }\n catch( e ) {\n console.error(\"invalid json in file\");\n }\n }\n});\n```\n\nInto this:\n\n```js\nfs.readFileAsync(\"file.json\").then(JSON.parse).then(function(val) {\n console.log(val.success);\n})\n.catch(SyntaxError, function(e) {\n console.error(\"invalid json in file\");\n})\n.catch(function(e){\n console.error(\"unable to read file\")\n});\n```\n\n*If you are wondering \"there is no `readFileAsync` method on `fs` that returns a promise\", see [promisification](API.md#promisification)*\n\nActually you might notice the latter has a lot in common with code that would do the same using synchronous I/O:\n\n```js\ntry {\n var val = JSON.parse(fs.readFileSync(\"file.json\"));\n console.log(val.success);\n}\n//Syntax actually not supported in JS but drives the point\ncatch(SyntaxError e) {\n console.error(\"invalid json in file\");\n}\ncatch(Error e) {\n console.error(\"unable to read file\")\n}\n```\n\nAnd that is the point - being able to have something that is a lot like `return` and `throw` in synchronous code.\n\nYou can also use promises to improve code that was written with callback helpers:\n\n\n```js\n//Copyright Plato http://stackoverflow.com/a/19385911/995876\n//CC BY-SA 2.5\nmapSeries(URLs, function (URL, done) {\n var options = {};\n needle.get(URL, options, function (error, response, body) {\n if (error) {\n return done(error)\n }\n try {\n var ret = JSON.parse(body);\n return done(null, ret);\n }\n catch (e) {\n done(e);\n }\n });\n}, function (err, results) {\n if (err) {\n console.log(err)\n } else {\n console.log('All Needle requests successful');\n // results is a 1 to 1 mapping in order of URLs > needle.body\n processAndSaveAllInDB(results, function (err) {\n if (err) {\n return done(err)\n }\n console.log('All Needle requests saved');\n done(null);\n });\n }\n});\n```\n\nIs more pleasing to the eye when done with promises:\n\n```js\nPromise.promisifyAll(needle);\nvar options = {};\n\nvar current = Promise.resolve();\nPromise.map(URLs, function(URL) {\n current = current.then(function () {\n return needle.getAsync(URL, options);\n });\n return current;\n}).map(function(responseAndBody){\n return JSON.parse(responseAndBody[1]);\n}).then(function (results) {\n return processAndSaveAllInDB(results);\n}).then(function(){\n console.log('All Needle requests saved');\n}).catch(function (e) {\n console.log(e);\n});\n```\n\nAlso promises don't just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators.\n\nMore reading:\n\n - [Promise nuggets](http://spion.github.io/promise-nuggets/)\n - [Why I am switching to promises](http://spion.github.io/posts/why-i-am-switching-to-promises.html)\n - [What is the the point of promises](http://domenic.me/2012/10/14/youre-missing-the-point-of-promises/#toc_1)\n - [Snippets for common problems](https://github.com/petkaantonov/bluebird/wiki/Snippets)\n - [Promise anti-patterns](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns)\n\n#Questions and issues\n\nIf you find a bug in bluebird or have a feature request, file an issue in the [github issue tracker](https://github.com/petkaantonov/bluebird/issues). Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.\n\n#Error handling\n\nThis is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled.\n\nThere are two common pragmatic attempts at solving the problem that promise libraries do.\n\nThe more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so:\n\n```js\ndownload().then(...).then(...).done();\n```\n\nFor handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call `.done` and that cannot be justified when the problem is forgetting to create an error handler in the first place.\n\nThe second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to `stderr` or `console.error` in browsers. This is close to what happens with synchronous code - your code doesn't work as expected and you open console and see a stack trace. Nice.\n\nOf course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the `.done()` method to signal that any hanging exceptions should be thrown.\n\nIf you want to override the default handler for these possibly unhandled rejections, you can pass yours like so:\n\n```js\nPromise.onPossiblyUnhandledRejection(function(error){\n throw error;\n});\n```\n\nIf you want to also enable long stack traces, call:\n\n```js\nPromise.longStackTraces();\n```\n\nright after the library is loaded.\n\nIn node.js use the environment flag `BLUEBIRD_DEBUG`:\n\n```\nBLUEBIRD_DEBUG=1 node server.js\n```\n\nto enable long stack traces in all instances of bluebird.\n\nLong stack traces cannot be disabled after being enabled, and cannot be enabled after promises have alread been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them.\n\nLong stack traces are enabled by default in the debug build.\n\n####Expected and unexpected errors\n\nA practical problem with Promises/A+ is that it models Javascript `try-catch` too closely for its own good. Therefore by default promises inherit `try-catch` warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about.\n\nNow, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in `try-catch` however:\n\n```js\ntry {\n //code\n}\ncatch(e) {\n if( e instanceof WhatIWantError) {\n //handle\n }\n else {\n throw e;\n }\n}\n```\n\nWithout such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the `.catch` to [accept potential error type eligibility](API.md#catchfunction-errorclass-function-handler---promise).\n\nFor instance here it is expected that some evil or incompetent entity will try to crash our server from `SyntaxError` by providing syntactically invalid JSON:\n\n```js\ngetJSONFromSomewhere().then(function(jsonString) {\n return JSON.parse(jsonString);\n}).then(function(object) {\n console.log(\"it was valid json: \", object);\n}).catch(SyntaxError, function(e){\n console.log(\"don't be evil\");\n});\n```\n\nHere any kind of unexpected error will automatically reported on `stderr` along with a stack trace because we only register a handler for the expected `SyntaxError`.\n\nOk, so, that's pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like `.name`, `.type`, `.code`, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors?\n\nBluebird defines a special error type `OperationalError` (you can get a reference from `Promise.OperationalError`). This type of error is given as rejection reason by promisified methods when\ntheir underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like `new Error(\"database didn't respond\")` are considered untyped.\n\nExample of such library is the node core library `fs`. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them:\n\n```js\n//Read more about promisification in the API Reference:\n//API.md\nvar fs = Promise.promisifyAll(require(\"fs\"));\n\nfs.readFileAsync(\"myfile.json\").then(JSON.parse).then(function (json) {\n console.log(\"Successful json\")\n}).catch(SyntaxError, function (e) {\n console.error(\"file contains invalid json\");\n}).catch(Promise.OperationalError, function (e) {\n console.error(\"unable to read file, because: \", e.message);\n});\n```\n\nThe last `catch` handler is only invoked when the `fs` module explicitly used the `err` argument convention of async callbacks to inform of an expected error. The `OperationalError` instance will contain the original error in its `.cause` property but it does have a direct copy of the `.message` and `.stack` too. In this code any unexpected error - be it in our code or the `fs` module - would not be caught by these handlers and therefore not swallowed.\n\nSince a `catch` handler typed to `Promise.OperationalError` is expected to be used very often, it has a neat shorthand:\n\n```js\n.error(function (e) {\n console.error(\"unable to read file, because: \", e.message);\n});\n```\n\nSee [API documentation for `.error()`](API.md#error-rejectedhandler----promise)\n\nFinally, Bluebird also supports predicate-based filters. If you pass a\npredicate function instead of an error type, the predicate will receive\nthe error as an argument. The return result will be used determine whether\nthe error handler should be called.\n\nPredicates should allow for very fine grained control over caught errors:\npattern matching, error typesets with set operations and many other techniques\ncan be implemented on top of them.\n\nExample of using a predicate-based filter:\n\n```js\nvar Promise = require(\"bluebird\");\nvar request = Promise.promisify(require(\"request\"));\n\nfunction clientError(e) {\n return e.code >= 400 && e.code < 500;\n}\n\nrequest(\"http://www.google.com\").then(function(contents){\n console.log(contents);\n}).catch(clientError, function(e){\n //A client error like 400 Bad Request happened\n});\n```\n\n**Danger:** The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives [are not exceptions](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/). You should consider always throwing Error objects when handling exceptions.\n\n\n\n####How do long stack traces differ from e.g. Q?\n\nBluebird attempts to have more elaborate traces. Consider:\n\n```js\nError.stackTraceLimit = 25;\nQ.longStackSupport = true;\nQ().then(function outer() {\n return Q().then(function inner() {\n return Q().then(function evenMoreInner() {\n a.b.c.d();\n }).catch(function catcher(e){\n console.error(e.stack);\n });\n })\n});\n```\n\nYou will see\n\n ReferenceError: a is not defined\n at evenMoreInner (:7:13)\n From previous event:\n at inner (:6:20)\n\nCompare to:\n\n```js\nError.stackTraceLimit = 25;\nPromise.longStackTraces();\nPromise.resolve().then(function outer() {\n return Promise.resolve().then(function inner() {\n return Promise.resolve().then(function evenMoreInner() {\n a.b.c.d()\n }).catch(function catcher(e){\n console.error(e.stack);\n });\n });\n});\n```\n\n ReferenceError: a is not defined\n at evenMoreInner (:7:13)\n From previous event:\n at inner (:6:36)\n From previous event:\n at outer (:5:32)\n From previous event:\n at :4:21\n at Object.InjectedScript._evaluateOn (:572:39)\n at Object.InjectedScript._evaluateAndWrap (:531:52)\n at Object.InjectedScript.evaluate (:450:21)\n\n\nA better and more practical example of the differences can be seen in gorgikosev's [debuggability competition](https://github.com/spion/async-compare#debuggability).\n\n\n\n#Development\n\nFor development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies.\n\nInstall [node](http://nodejs.org/), [npm](https://npmjs.org/), and [grunt](http://gruntjs.com/).\n\n git clone git@github.com:petkaantonov/bluebird.git\n cd bluebird\n npm install\n\n##Testing\n\nTo run all tests, run `grunt test`. Note that 10 processes are created to run the tests in parallel. The `stdout` of tests is ignored by default and everything will stop at the first failure. If you want to run tests sequentially with all output, do:\n\n grunt test --jobs=1\n\nYou may also give a higher `--jobs` value to run more tests concurrently (and finish faster).\n\nIndividual files can be run with `grunt test --run=filename` where `filename` is a test file name in `/test` folder or `/test/mocha` folder. The `.js` prefix is not needed. The dots for AP compliance tests are not needed, so to run `/test/mocha/2.3.3.js` for instance:\n\n grunt test --run=233\n\nWhen trying to get a test to pass, run only that individual test file with `--verbose` to see the output from that test:\n\n grunt test --run=233 --verbose\n\nThe reason for the unusual way of testing is because the majority of tests are from different libraries using different testing frameworks and because it takes forever to test sequentially.\n\n\n###Testing in browsers\n\nTo test in browsers:\n\n cd browser\n setup\n\nThen open the `index.html` in your browser. Requires bash (on windows the mingw32 that comes with git works fine too).\n\nYou may also [visit the github hosted page](http://petkaantonov.github.io/bluebird/browser/).\n\nKeep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active.\n\n##Benchmarks\n\nTo run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too).\n\nNode 0.11.2+ is required to run the generator examples.\n\n###1\\. DoxBee sequential\n\nCurrently the most relevant benchmark is @gorkikosev's benchmark in the article [Analysis of generators and other async patterns in node](http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html). The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections.\n\nCommand: `bench doxbee`\n\n###2\\. Made-up parallel\n\nThis made-up scenario runs 15 shimmed queries in parallel.\n\nCommand: `bench parallel`\n\n##Custom builds\n\nCustom builds for browsers are supported through a command-line utility.\n\n\n\n\n
\n\n\nMake sure you have cloned the repo somewhere and did `npm install` successfully.\n\nAfter that you can run:\n\n grunt build --features=\"core\"\n\n\nThe above builds the most minimal build you can get. You can add more features separated by spaces from the above list:\n\n grunt build --features=\"core filter map reduce\"\n\nThe custom build file will be found from `/js/browser/bluebird.js`. It will have a comment that lists the disabled and enabled features.\n\nNote that the build leaves the `/js/main` etc folders with same features so if you use the folder for node.js at the same time, don't forget to build\na full version afterwards (after having taken a copy of the bluebird.js somewhere):\n\n grunt build\n\n\n\n##For library authors\n\nBuilding a library that depends on bluebird? You should know about a few features.\n\nIf your library needs to do something obtrusive like adding or modifying methods on the `Promise` prototype, uses long stack traces or uses a custom unhandled rejection handler then... that's totally ok as long as you don't use `require(\"bluebird\")`. Instead you should create a file\nthat creates an isolated copy. For example, creating a file called `bluebird-extended.js` that contains:\n\n```js\n //NOTE the function call right after\nmodule.exports = require(\"bluebird/js/main/promise\")();\n```\n\nYour library can then use `var Promise = require(\"bluebird-extended\");` and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic.\n\nYou should also know about [`.nodeify()`](API.md#nodeifyfunction-callback---promise) which makes it easy to provide a dual callback/promise API.\n\n\n\n##What is the sync build?\n\nYou may now use sync build by:\n\n var Promise = require(\"bluebird/zalgo\");\n\nThe sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards.\n\nThe normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility\nof stack overflow errors and non-deterministic behavior.\n\nThe sync build skips the async call trampoline completely, e.g code like:\n\n async.invoke( this.fn, this, val );\n\nAppears as this in the sync build:\n\n this.fn(val);\n\nThis should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism.\n\nNote that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads.\n\n\n```js\nvar cache = new Map(); //ES6 Map or DataStructures/Map or whatever...\nfunction getResult(url) {\n var resolver = Promise.pending();\n if (cache.has(url)) {\n resolver.resolve(cache.get(url));\n }\n else {\n http.get(url, function(err, content) {\n if (err) resolver.reject(err);\n else {\n cache.set(url, content);\n resolver.resolve(content);\n }\n });\n }\n return resolver.promise;\n}\n\n\n\n//The result of console.log is truly random without async guarantees\nfunction guessWhatItPrints( url ) {\n var i = 3;\n getResult(url).then(function(){\n i = 4;\n });\n console.log(i);\n}\n```\n\n#Optimization guide\n\nArticles about optimization will be periodically posted in [the wiki section](https://github.com/petkaantonov/bluebird/wiki), polishing edits are welcome.\n\nA single cohesive guide compiled from the articles will probably be done eventually.\n\n#License\n\nCopyright (c) 2014 Petka Antonov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
- "_id": "bluebird@2.1.3",
- "dist": {
- "shasum": "f1e12c5ce76fc66f80d3fde5441f555d4bac34d5"
- },
- "_from": "bluebird@>=1.2.0",
- "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.1.3.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/bluebird/zalgo.js b/node_modules/z-schema/node_modules/bluebird/zalgo.js
deleted file mode 100644
index 13573528..00000000
--- a/node_modules/z-schema/node_modules/bluebird/zalgo.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./js/zalgo/bluebird.js');
diff --git a/node_modules/z-schema/node_modules/request/.npmignore b/node_modules/z-schema/node_modules/request/.npmignore
deleted file mode 100644
index 80e59ef5..00000000
--- a/node_modules/z-schema/node_modules/request/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-tests
-node_modules
diff --git a/node_modules/z-schema/node_modules/request/.travis.yml b/node_modules/z-schema/node_modules/request/.travis.yml
deleted file mode 100644
index 0bce8152..00000000
--- a/node_modules/z-schema/node_modules/request/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: node_js
-node_js:
- - 0.8
- - 0.10
-
-env:
- - OPTIONALS=Y
- - OPTIONALS=N
-
-install:
- - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi
- - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi
diff --git a/node_modules/z-schema/node_modules/request/CHANGELOG.md b/node_modules/z-schema/node_modules/request/CHANGELOG.md
deleted file mode 100644
index 7324f337..00000000
--- a/node_modules/z-schema/node_modules/request/CHANGELOG.md
+++ /dev/null
@@ -1,388 +0,0 @@
-## Change Log
-
-### v2.34.0 (2014/02/18 19:35 +00:00)
-- [#781](https://github.com/mikeal/request/pull/781) simpler isReadStream function (@joaojeronimo)
-
-- [#785](https://github.com/mikeal/request/pull/785) Provide ability to override content-type when `json` option used (@vvo)
-
-- [#793](https://github.com/mikeal/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul)
-
-- [#802](https://github.com/mikeal/request/pull/802) Added the Apache license to the package.json. (@keskival)
-
-- [#516](https://github.com/mikeal/request/pull/516) UNIX Socket URL Support (@lyuzashi)
-
-- [#801](https://github.com/mikeal/request/pull/801) Ignore cookie parsing and domain errors (@lalitkapoor)
-
-
-### v2.32.0 (2014/01/16 19:33 +00:00)
-- [#757](https://github.com/mikeal/request/pull/757) require aws-sign2 (@mafintosh)
-
-- [#744](https://github.com/mikeal/request/pull/744) Use Cookie.parse (@lalitkapoor)
-
-- [#763](https://github.com/mikeal/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash)
-
-- [#764](https://github.com/mikeal/request/pull/764) Case-insensitive authentication scheme (@bobyrizov)
-
-- [#767](https://github.com/mikeal/request/pull/767) Use tough-cookie CookieJar sync API (@stash)
-
-
-### v2.31.0 (2014/01/08 02:57 +00:00)
-- [#736](https://github.com/mikeal/request/pull/736) Fix callback arguments documentation (@mmalecki)
-
-- [#741](https://github.com/mikeal/request/pull/741) README example is using old cookie jar api (@emkay)
-
-- [#742](https://github.com/mikeal/request/pull/742) Add note about JSON output body type (@iansltx)
-
-- [#745](https://github.com/mikeal/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay)
-
-- [#746](https://github.com/mikeal/request/pull/746) README: Markdown code highlight (@weakish)
-
-- [#645](https://github.com/mikeal/request/pull/645) update twitter api url to v1.1 (@mick)
-
-
-### v2.30.0 (2013/12/13 19:17 +00:00)
-- [#732](https://github.com/mikeal/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium)
-
-- [#730](https://github.com/mikeal/request/pull/730) better HTTP DIGEST support (@dai-shi)
-
-- [#728](https://github.com/mikeal/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow)
-
-
-### v2.29.0 (2013/12/06 20:05 +00:00)
-- [#727](https://github.com/mikeal/request/pull/727) fix requester bug (@jchris)
-
-
-### v2.28.0 (2013/12/04 19:42 +00:00)
-- [#662](https://github.com/mikeal/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar)
-
-- [#656](https://github.com/mikeal/request/pull/656) Test case for #304. (@diversario)
-
-- [#666](https://github.com/mikeal/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong)
-
-- [#683](https://github.com/mikeal/request/pull/683) Travis CI support (@Turbo87)
-
-- [#690](https://github.com/mikeal/request/pull/690) Handle blank password in basic auth. (@diversario)
-
-- [#694](https://github.com/mikeal/request/pull/694) Typo in README (@VRMink)
-
-- [#696](https://github.com/mikeal/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin)
-
-- [#630](https://github.com/mikeal/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl)
-
-- [#710](https://github.com/mikeal/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak)
-
-- [#715](https://github.com/mikeal/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub)
-
-- [#682](https://github.com/mikeal/request/pull/682) Optional dependencies (@Turbo87)
-
-- [#719](https://github.com/mikeal/request/pull/719) Made a comment gender neutral. (@oztu)
-
-- [#724](https://github.com/mikeal/request/pull/724) README.md: add custom HTTP Headers example. (@tcort)
-
-- [#674](https://github.com/mikeal/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren)
-
-- [#659](https://github.com/mikeal/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm)
-
-
-### v2.27.0 (2013/08/15 21:30 +00:00)
-- [#619](https://github.com/mikeal/request/pull/619) decouple things a bit (@joaojeronimo)
-
-
-### v2.26.0 (2013/08/07 16:31 +00:00)
-- [#605](https://github.com/mikeal/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker)
-
-- [#613](https://github.com/mikeal/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander)
-
-
-### v2.24.0 (2013/07/23 20:51 +00:00)
-- [#601](https://github.com/mikeal/request/pull/601) Fixed a small typo (@michalstanko)
-
-- [#594](https://github.com/mikeal/request/pull/594) Emit complete event when there is no callback (@RomainLK)
-
-- [#596](https://github.com/mikeal/request/pull/596) Global agent is being used when pool is specified (@Cauldrath)
-
-
-### v2.23.0 (2013/07/23 02:44 +00:00)
-- [#589](https://github.com/mikeal/request/pull/589) Prevent setting headers after they are sent (@wpreul)
-
-- [#587](https://github.com/mikeal/request/pull/587) Global cookie jar disabled by default (@threepointone)
-
-
-### v2.22.0 (2013/07/05 17:12 +00:00)
-- [#542](https://github.com/mikeal/request/pull/542) Expose Request class (@regality)
-
-- [#541](https://github.com/mikeal/request/pull/541) The exported request function doesn't have an auth method (@tschaub)
-
-- [#564](https://github.com/mikeal/request/pull/564) Fix redirections (@criloz)
-
-- [#568](https://github.com/mikeal/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette)
-
-- [#581](https://github.com/mikeal/request/pull/581) Fix spelling of "ignoring." (@bigeasy)
-
-- [#544](https://github.com/mikeal/request/pull/544) Update http-signature version. (@davidlehn)
-
-
-### v2.21.0 (2013/04/30 21:28 +00:00)
-- [#529](https://github.com/mikeal/request/pull/529) dependencies versions bump (@jodaka)
-
-- [#521](https://github.com/mikeal/request/pull/521) Improving test-localAddress.js (@noway421)
-
-- [#503](https://github.com/mikeal/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi)
-
-- [#497](https://github.com/mikeal/request/pull/497) Added redirect event (@Cauldrath)
-
-- [#532](https://github.com/mikeal/request/pull/532) fix typo (@fredericosilva)
-
-- [#536](https://github.com/mikeal/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando)
-
-
-### v2.17.0 (2013/04/22 15:52 +00:00)
-- [#19](https://github.com/mikeal/request/pull/19) Request is unusable without native ssl support in node (@davglass)
-
-- [#31](https://github.com/mikeal/request/pull/31) Error on piping a request to a destination (@tobowers)
-
-- [#35](https://github.com/mikeal/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli)
-
-- [#45](https://github.com/mikeal/request/pull/45) Added timeout option (@mbrevoort)
-
-- [#66](https://github.com/mikeal/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod)
-
-- [#67](https://github.com/mikeal/request/pull/67) fixed global variable leaks (@aheckmann)
-
-- [#69](https://github.com/mikeal/request/pull/69) Flatten chunked requests properly (@isaacs)
-
-- [#73](https://github.com/mikeal/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs)
-
-- [#70](https://github.com/mikeal/request/pull/70) add test script to package.json (@isaacs)
-
-- [#76](https://github.com/mikeal/request/pull/76) Bug when a request fails and a timeout is set (@Marsup)
-
-- [#78](https://github.com/mikeal/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs)
-
-- [#79](https://github.com/mikeal/request/pull/79) Proxy auth bug (@isaacs)
-
-- [#81](https://github.com/mikeal/request/pull/81) Enhance redirect handling (@danmactough)
-
-- [#96](https://github.com/mikeal/request/pull/96) Authless parsed url host support (@isaacs)
-
-- [#84](https://github.com/mikeal/request/pull/84) Document strictSSL option (@isaacs)
-
-- [#97](https://github.com/mikeal/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs)
-
-- [#53](https://github.com/mikeal/request/pull/53) Parse json: Issue #51 (@benatkin)
-
-- [#102](https://github.com/mikeal/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex)
-
-- [#105](https://github.com/mikeal/request/pull/105) added test for proxy option. (@dominictarr)
-
-- [#86](https://github.com/mikeal/request/pull/86) Can't post binary to multipart requests (@kkaefer)
-
-- [#110](https://github.com/mikeal/request/pull/110) Update to Iris Couch URL (@jhs)
-
-- [#117](https://github.com/mikeal/request/pull/117) Remove the global `i` (@3rd-Eden)
-
-- [#121](https://github.com/mikeal/request/pull/121) Another patch for cookie handling regression (@jhurliman)
-
-- [#104](https://github.com/mikeal/request/pull/104) Cookie handling contains bugs (@janjongboom)
-
-- [#112](https://github.com/mikeal/request/pull/112) Support using a custom http-like module (@jhs)
-
-- [#132](https://github.com/mikeal/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson)
-
-- [#135](https://github.com/mikeal/request/pull/135) host vs hostname (@iangreenleaf)
-
-- [#133](https://github.com/mikeal/request/pull/133) Fixed cookies parsing (@afanasy)
-
-- [#144](https://github.com/mikeal/request/pull/144) added "form" option to readme (@petejkim)
-
-- [#146](https://github.com/mikeal/request/pull/146) Multipart should respect content-type if previously set (@apeace)
-
-- [#148](https://github.com/mikeal/request/pull/148) Retry Agent (@thejh)
-
-- [#90](https://github.com/mikeal/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes)
-
-- [#162](https://github.com/mikeal/request/pull/162) Fix issue #159 (@dpetukhov)
-
-- [#161](https://github.com/mikeal/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou)
-
-- [#168](https://github.com/mikeal/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby)
-
-- [#170](https://github.com/mikeal/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes)
-
-- [#179](https://github.com/mikeal/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack)
-
-- [#180](https://github.com/mikeal/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63)
-
-- [#177](https://github.com/mikeal/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63)
-
-- [#182](https://github.com/mikeal/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63)
-
-- [#176](https://github.com/mikeal/request/pull/176) Querystring option (@csainty)
-
-- [#188](https://github.com/mikeal/request/pull/188) Add abort support to the returned request (@itay)
-
-- [#193](https://github.com/mikeal/request/pull/193) Fixes GH-119 (@goatslacker)
-
-- [#197](https://github.com/mikeal/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs)
-
-- [#198](https://github.com/mikeal/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs)
-
-- [#199](https://github.com/mikeal/request/pull/199) Tunnel (@isaacs)
-
-- [#203](https://github.com/mikeal/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise)
-
-- [#217](https://github.com/mikeal/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup)
-
-- [#224](https://github.com/mikeal/request/pull/224) Multipart content-type change (@janjongboom)
-
-- [#211](https://github.com/mikeal/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso)
-
-- [#240](https://github.com/mikeal/request/pull/240) don't error when null is passed for options (@polotek)
-
-- [#243](https://github.com/mikeal/request/pull/243) Dynamic boundary (@zephrax)
-
-- [#246](https://github.com/mikeal/request/pull/246) Fixing the set-cookie header (@jeromegn)
-
-- [#260](https://github.com/mikeal/request/pull/260) fixed just another leak of 'i' (@sreuter)
-
-- [#255](https://github.com/mikeal/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1)
-
-- [#261](https://github.com/mikeal/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel)
-
-- [#262](https://github.com/mikeal/request/pull/262) JSON test should check for equality (@timshadel)
-
-- [#265](https://github.com/mikeal/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr)
-
-- [#263](https://github.com/mikeal/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet)
-
-- [#268](https://github.com/mikeal/request/pull/268) I'm not OCD seriously (@TehShrike)
-
-- [#273](https://github.com/mikeal/request/pull/273) Pipe back pressure issue (@mafintosh)
-
-- [#279](https://github.com/mikeal/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin)
-
-- [#241](https://github.com/mikeal/request/pull/241) Composability updates suggested by issue #239 (@polotek)
-
-- [#284](https://github.com/mikeal/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry)
-
-- [#272](https://github.com/mikeal/request/pull/272) Boundary begins with CRLF? (@proksoup)
-
-- [#207](https://github.com/mikeal/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs)
-
-- [#280](https://github.com/mikeal/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1)
-
-- [#290](https://github.com/mikeal/request/pull/290) A test for #289 (@isaacs)
-
-- [#293](https://github.com/mikeal/request/pull/293) Allow parser errors to bubble up to request (@mscdex)
-
-- [#317](https://github.com/mikeal/request/pull/317) Workaround for #313 (@isaacs)
-
-- [#318](https://github.com/mikeal/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs)
-
-- [#326](https://github.com/mikeal/request/pull/326) Do not try to remove listener from an undefined connection (@strk)
-
-- [#320](https://github.com/mikeal/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris)
-
-- [#343](https://github.com/mikeal/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf)
-
-- [#332](https://github.com/mikeal/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup)
-
-- [#355](https://github.com/mikeal/request/pull/355) stop sending erroneous headers on redirected requests (@azylman)
-
-- [#360](https://github.com/mikeal/request/pull/360) Delete self._form along with everything else on redirect (@jgautier)
-
-- [#361](https://github.com/mikeal/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins)
-
-- [#362](https://github.com/mikeal/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall)
-
-- [#363](https://github.com/mikeal/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall)
-
-- [#344](https://github.com/mikeal/request/pull/344) Make AWS auth signing find headers correctly (@nlf)
-
-- [#369](https://github.com/mikeal/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge)
-
-- [#370](https://github.com/mikeal/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge)
-
-- [#374](https://github.com/mikeal/request/pull/374) Correct Host header for proxy tunnel CONNECT (@ypocat)
-
-- [#375](https://github.com/mikeal/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock)
-
-- [#376](https://github.com/mikeal/request/pull/376) Headers lost on redirect (@kapetan)
-
-- [#380](https://github.com/mikeal/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-)
-
-- [#381](https://github.com/mikeal/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro)
-
-- [#398](https://github.com/mikeal/request/pull/398) Add more reporting to tests (@mmalecki)
-
-- [#403](https://github.com/mikeal/request/pull/403) Optimize environment lookup to happen once only (@mmalecki)
-
-- [#415](https://github.com/mikeal/request/pull/415) Fixed a typo. (@jerem)
-
-- [#430](https://github.com/mikeal/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf)
-
-- [#338](https://github.com/mikeal/request/pull/338) Add more auth options, including digest support (@nylen)
-
-- [#448](https://github.com/mikeal/request/pull/448) Convenience method for PATCH (@mloar)
-
-- [#413](https://github.com/mikeal/request/pull/413) rename googledoodle.png to .jpg (@nfriedly)
-
-- [#454](https://github.com/mikeal/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh)
-
-- [#429](https://github.com/mikeal/request/pull/429) Copy options before adding callback. (@nrn)
-
-- [#462](https://github.com/mikeal/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya)
-
-- [#471](https://github.com/mikeal/request/pull/471) Using querystring library from visionmedia (@kbackowski)
-
-- [#473](https://github.com/mikeal/request/pull/473) V0.10 compat (@isaacs)
-
-- [#475](https://github.com/mikeal/request/pull/475) Use `unescape` from `querystring` (@shimaore)
-
-- [#479](https://github.com/mikeal/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH)
-
-- [#490](https://github.com/mikeal/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas)
-
-- [#498](https://github.com/mikeal/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins)
-
-- [#512](https://github.com/mikeal/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1)
-
-- [#508](https://github.com/mikeal/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs)
-
-- [#519](https://github.com/mikeal/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun)
-
-- [#520](https://github.com/mikeal/request/pull/520) Fixing test-tunnel.js (@noway421)
-
-- [#523](https://github.com/mikeal/request/pull/523) Updating dependencies (@noway421)
-
-- [#510](https://github.com/mikeal/request/pull/510) Add HTTP Signature support. (@davidlehn)
-
-- [#456](https://github.com/mikeal/request/pull/456) hawk 0.9.0 (@hueniverse)
-
-- [#460](https://github.com/mikeal/request/pull/460) hawk 0.10.0 (@hueniverse)
-
-- [#444](https://github.com/mikeal/request/pull/444) protect against double callbacks on error path (@spollack)
-
-- [#322](https://github.com/mikeal/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo)
-
-- [#513](https://github.com/mikeal/request/pull/513) add 'localAddress' support (@yyfrankyy)
-
-- [#249](https://github.com/mikeal/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges)
-
-- [#502](https://github.com/mikeal/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen)
-
-- [#282](https://github.com/mikeal/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock)
-
-- [#388](https://github.com/mikeal/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23)
-
-- [#214](https://github.com/mikeal/request/pull/214) documenting additional behavior of json option (@jphaas)
-
-- [#310](https://github.com/mikeal/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann)
-
-- [#433](https://github.com/mikeal/request/pull/433) Added support for HTTPS cert & key (@indexzero)
-
-- [#461](https://github.com/mikeal/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin)
-
-
-### v1.2.0 (2011/01/30 22:04 +00:00)
-- [#3](https://github.com/mikeal/request/pull/3) JSON body (@Stanley)
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/LICENSE b/node_modules/z-schema/node_modules/request/LICENSE
deleted file mode 100644
index a4a9aee0..00000000
--- a/node_modules/z-schema/node_modules/request/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/README.md b/node_modules/z-schema/node_modules/request/README.md
deleted file mode 100644
index 3651e499..00000000
--- a/node_modules/z-schema/node_modules/request/README.md
+++ /dev/null
@@ -1,395 +0,0 @@
-# Request -- Simplified HTTP client
-
-[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)
-
-## Super simple to use
-
-Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.
-
-```javascript
-var request = require('request');
-request('http://www.google.com', function (error, response, body) {
- if (!error && response.statusCode == 200) {
- console.log(body) // Print the google web page.
- }
-})
-```
-
-## Streaming
-
-You can stream any response to a file stream.
-
-```javascript
-request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
-```
-
-You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).
-
-```javascript
-fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))
-```
-
-Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.
-
-```javascript
-request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))
-```
-
-Now let’s get fancy.
-
-```javascript
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- if (req.method === 'PUT') {
- req.pipe(request.put('http://mysite.com/doodle.png'))
- } else if (req.method === 'GET' || req.method === 'HEAD') {
- request.get('http://mysite.com/doodle.png').pipe(resp)
- }
- }
-})
-```
-
-You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:
-
-```javascript
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- var x = request('http://mysite.com/doodle.png')
- req.pipe(x)
- x.pipe(resp)
- }
-})
-```
-
-And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)
-
-```javascript
-req.pipe(request('http://mysite.com/doodle.png')).pipe(resp)
-```
-
-Also, none of this new functionality conflicts with requests previous features, it just expands them.
-
-```javascript
-var r = request.defaults({'proxy':'http://localproxy.com'})
-
-http.createServer(function (req, resp) {
- if (req.url === '/doodle.png') {
- r.get('http://google.com/doodle.png').pipe(resp)
- }
-})
-```
-
-You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
-
-## UNIX Socket
-
-`request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system.
-
-HTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response.
-
-Thus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket`
-
-```javascript
-request.get('unix://tmp/unix.socket/httppath')
-```
-
-## Forms
-
-`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.
-
-URL-encoded forms are simple.
-
-```javascript
-request.post('http://service.com/upload', {form:{key:'value'}})
-// or
-request.post('http://service.com/upload').form({key:'value'})
-```
-
-For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.
-
-```javascript
-var r = request.post('http://service.com/upload', function optionalCallback (err, httpResponse, body) {
- if (err) {
- return console.error('upload failed:', err);
- }
- console.log('Upload successful! Server responded with:', body);
-})
-var form = r.form()
-form.append('my_field', 'my_value')
-form.append('my_buffer', new Buffer([1, 2, 3]))
-form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')))
-form.append('remote_file', request('http://google.com/doodle.png'))
-
-// Just like always, `r` is a writable stream, and can be used as such (you have until nextTick to pipe it, etc.)
-// Alternatively, you can provide a callback (that's what this example does-- see `optionalCallback` above).
-```
-
-## HTTP Authentication
-
-```javascript
-request.get('http://some.server.com/').auth('username', 'password', false);
-// or
-request.get('http://some.server.com/', {
- 'auth': {
- 'user': 'username',
- 'pass': 'password',
- 'sendImmediately': false
- }
-});
-// or
-request.get('http://some.server.com/').auth(null, null, true, 'bearerToken');
-// or
-request.get('http://some.server.com/', {
- 'auth': {
- 'bearer': 'bearerToken'
- }
-});
-```
-
-If passed as an option, `auth` should be a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.
-
-`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).
-
-Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.
-
-Bearer authentication is supported, and is activated when the `bearer` value is available. The value may be either a `String` or a `Function` returning a `String`. Using a function to supply the bearer token is particularly useful if used in conjuction with `defaults` to allow a single function to supply the last known token at the time or sending a request or to compute one on the fly.
-
-## OAuth Signing
-
-```javascript
-// Twitter OAuth
-var qs = require('querystring')
- , oauth =
- { callback: 'http://mysite.com/callback/'
- , consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- }
- , url = 'https://api.twitter.com/oauth/request_token'
- ;
-request.post({url:url, oauth:oauth}, function (e, r, body) {
- // Ideally, you would take the body in the response
- // and construct a URL that a user clicks on (like a sign in button).
- // The verifier is only available in the response after a user has
- // verified with twitter that they are authorizing your app.
- var access_token = qs.parse(body)
- , oauth =
- { consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- , token: access_token.oauth_token
- , verifier: access_token.oauth_verifier
- }
- , url = 'https://api.twitter.com/oauth/access_token'
- ;
- request.post({url:url, oauth:oauth}, function (e, r, body) {
- var perm_token = qs.parse(body)
- , oauth =
- { consumer_key: CONSUMER_KEY
- , consumer_secret: CONSUMER_SECRET
- , token: perm_token.oauth_token
- , token_secret: perm_token.oauth_token_secret
- }
- , url = 'https://api.twitter.com/1.1/users/show.json?'
- , params =
- { screen_name: perm_token.screen_name
- , user_id: perm_token.user_id
- }
- ;
- url += qs.stringify(params)
- request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {
- console.log(user)
- })
- })
-})
-```
-
-### Custom HTTP Headers
-
-HTTP Headers, such as `User-Agent`, can be set in the `options` object.
-In the example below, we call the github API to find out the number
-of stars and forks for the request repository. This requires a
-custom `User-Agent` header as well as https.
-
-```javascript
-var request = require('request');
-
-var options = {
- url: 'https://api.github.com/repos/mikeal/request',
- headers: {
- 'User-Agent': 'request'
- }
-};
-
-function callback(error, response, body) {
- if (!error && response.statusCode == 200) {
- var info = JSON.parse(body);
- console.log(info.stargazers_count + " Stars");
- console.log(info.forks_count + " Forks");
- }
-}
-
-request(options, callback);
-```
-
-### request(options, callback)
-
-The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.
-
-* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`
-* `qs` - object containing querystring values to be appended to the `uri`
-* `method` - http method (default: `"GET"`)
-* `headers` - http headers (default: `{}`)
-* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.
-* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).
-* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.
-* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
-* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.
-* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)
-* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)
-* `maxRedirects` - the maximum number of redirects to follow (default: `10`)
-* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.
-* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)
-* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
-* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
-* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)
-* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.
-* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).
-* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.
-* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)
-* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)
-* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.
-* `localAddress` - Local interface to bind for network connections.
-
-
-The callback argument gets 3 arguments:
-
-1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)
-2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object
-3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)
-
-## Convenience methods
-
-There are also shorthand methods for different HTTP METHODs and some other conveniences.
-
-### request.defaults(options)
-
-This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.
-
-### request.put
-
-Same as `request()`, but defaults to `method: "PUT"`.
-
-```javascript
-request.put(url)
-```
-
-### request.patch
-
-Same as `request()`, but defaults to `method: "PATCH"`.
-
-```javascript
-request.patch(url)
-```
-
-### request.post
-
-Same as `request()`, but defaults to `method: "POST"`.
-
-```javascript
-request.post(url)
-```
-
-### request.head
-
-Same as request() but defaults to `method: "HEAD"`.
-
-```javascript
-request.head(url)
-```
-
-### request.del
-
-Same as `request()`, but defaults to `method: "DELETE"`.
-
-```javascript
-request.del(url)
-```
-
-### request.get
-
-Same as `request()` (for uniformity).
-
-```javascript
-request.get(url)
-```
-### request.cookie
-
-Function that creates a new cookie.
-
-```javascript
-request.cookie('cookie_string_here')
-```
-### request.jar
-
-Function that creates a new cookie jar.
-
-```javascript
-request.jar()
-```
-
-
-## Examples:
-
-```javascript
- var request = require('request')
- , rand = Math.floor(Math.random()*100000000).toString()
- ;
- request(
- { method: 'PUT'
- , uri: 'http://mikeal.iriscouch.com/testjs/' + rand
- , multipart:
- [ { 'content-type': 'application/json'
- , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})
- }
- , { body: 'I am an attachment' }
- ]
- }
- , function (error, response, body) {
- if(response.statusCode == 201){
- console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)
- } else {
- console.log('error: '+ response.statusCode)
- console.log(body)
- }
- }
- )
-```
-
-Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).
-
-```javascript
-var request = request.defaults({jar: true})
-request('http://www.google.com', function () {
- request('http://images.google.com')
-})
-```
-
-To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)
-
-```javascript
-var j = request.jar()
-var request = request.defaults({jar:j})
-request('http://www.google.com', function () {
- request('http://images.google.com')
-})
-```
-
-OR
-
-```javascript
-var j = request.jar()
-var cookie = request.cookie('your_cookie_here')
-j.setCookie(cookie, uri);
-request({url: 'http://www.google.com', jar: j}, function () {
- request('http://images.google.com')
-})
-```
diff --git a/node_modules/z-schema/node_modules/request/index.js b/node_modules/z-schema/node_modules/request/index.js
deleted file mode 100755
index 506282d5..00000000
--- a/node_modules/z-schema/node_modules/request/index.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2010-2012 Mikeal Rogers
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-var cookies = require('./lib/cookies')
- , copy = require('./lib/copy')
- , Request = require('./request')
- , util = require('util')
- ;
-
-
-
-// organize params for patch, post, put, head, del
-function initParams(uri, options, callback) {
- var opts;
- if ((typeof options === 'function') && !callback) callback = options
- if (options && typeof options === 'object') {
- opts = util._extend({}, options);
- opts.uri = uri
- } else if (typeof uri === 'string') {
- opts = {uri:uri}
- } else {
- opts = util._extend({}, uri);
- uri = opts.uri
- }
-
- return { uri: uri, options: opts, callback: callback }
-}
-
-function request (uri, options, callback) {
- var opts;
- if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
- if ((typeof options === 'function') && !callback) callback = options
- if (options && typeof options === 'object') {
- opts = util._extend({}, options);
- opts.uri = uri
- } else if (typeof uri === 'string') {
- opts = {uri:uri}
- } else {
- opts = util._extend({}, uri);
- }
-
- if (callback) opts.callback = callback
- var r = new Request(opts)
- return r
-}
-
-module.exports = request
-
-request.Request = Request;
-
-request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG)
-
-request.initParams = initParams
-
-request.defaults = function (options, requester) {
- var def = function (method) {
- var d = function (uri, opts, callback) {
- var params = initParams(uri, opts, callback)
- for (var i in options) {
- if (params.options[i] === undefined) params.options[i] = options[i]
- }
- if(typeof requester === 'function') {
- if(method === request) {
- method = requester
- } else {
- params.options._requester = requester
- }
- }
- return method(params.options, params.callback)
- }
- return d
- }
- var de = def(request)
- de.get = def(request.get)
- de.patch = def(request.patch)
- de.post = def(request.post)
- de.put = def(request.put)
- de.head = def(request.head)
- de.del = def(request.del)
- de.cookie = def(request.cookie)
- de.jar = request.jar
- return de
-}
-
-function requester(params) {
- if(typeof params.options._requester === 'function') {
- return params.options._requester
- } else {
- return request
- }
-}
-
-request.forever = function (agentOptions, optionsArg) {
- var options = {}
- if (optionsArg) {
- for (var option in optionsArg) {
- options[option] = optionsArg[option]
- }
- }
- if (agentOptions) options.agentOptions = agentOptions
- options.forever = true
- return request.defaults(options)
-}
-
-request.get = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'GET'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.post = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'POST'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.put = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'PUT'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.patch = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'PATCH'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.head = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'HEAD'
- if (params.options.body ||
- params.options.requestBodyStream ||
- (params.options.json && typeof params.options.json !== 'boolean') ||
- params.options.multipart) {
- throw new Error("HTTP HEAD requests MUST NOT include a request body.")
- }
-
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.del = function (uri, options, callback) {
- var params = initParams(uri, options, callback)
- params.options.method = 'DELETE'
- return requester(params)(params.uri || null, params.options, params.callback)
-}
-request.jar = function () {
- return cookies.jar();
-}
-request.cookie = function (str) {
- return cookies.parse(str);
-}
diff --git a/node_modules/z-schema/node_modules/request/lib/cookies.js b/node_modules/z-schema/node_modules/request/lib/cookies.js
deleted file mode 100644
index 4eb641c5..00000000
--- a/node_modules/z-schema/node_modules/request/lib/cookies.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var optional = require('./optional')
- , tough = optional('tough-cookie')
- , Cookie = tough && tough.Cookie
- , CookieJar = tough && tough.CookieJar
- ;
-
-exports.parse = function(str) {
- if (str && str.uri) str = str.uri
- if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
- if (!Cookie) {
- return null;
- }
- return Cookie.parse(str)
-};
-
-// Adapt the sometimes-Async api of tough.CookieJar to our requirements
-function RequestJar() {
- this._jar = new CookieJar();
-}
-RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) {
- return this._jar.setCookieSync(cookieOrStr, uri, options || {});
-};
-RequestJar.prototype.getCookieString = function(uri) {
- return this._jar.getCookieStringSync(uri);
-};
-
-exports.jar = function() {
- if (!CookieJar) {
- // tough-cookie not loaded, return a stub object:
- return {
- setCookie: function(){},
- getCookieString: function(){}
- };
- }
- return new RequestJar();
-};
diff --git a/node_modules/z-schema/node_modules/request/lib/copy.js b/node_modules/z-schema/node_modules/request/lib/copy.js
deleted file mode 100644
index 56831ff8..00000000
--- a/node_modules/z-schema/node_modules/request/lib/copy.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports =
-function copy (obj) {
- var o = {}
- Object.keys(obj).forEach(function (i) {
- o[i] = obj[i]
- })
- return o
-}
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/lib/debug.js b/node_modules/z-schema/node_modules/request/lib/debug.js
deleted file mode 100644
index fa27b24b..00000000
--- a/node_modules/z-schema/node_modules/request/lib/debug.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var util = require('util')
-
-module.exports =
-function debug () {
- if (/\brequest\b/.test(process.env.NODE_DEBUG))
- console.error('REQUEST %s', util.format.apply(util, arguments))
-}
diff --git a/node_modules/z-schema/node_modules/request/lib/getSafe.js b/node_modules/z-schema/node_modules/request/lib/getSafe.js
deleted file mode 100644
index 28e07ea5..00000000
--- a/node_modules/z-schema/node_modules/request/lib/getSafe.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Safe toJSON
-module.exports =
-function getSafe (self, uuid) {
- if (typeof self === 'object' || typeof self === 'function') var safe = {}
- if (Array.isArray(self)) var safe = []
-
- var recurse = []
-
- Object.defineProperty(self, uuid, {})
-
- var attrs = Object.keys(self).filter(function (i) {
- if (i === uuid) return false
- if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true
- return !(Object.getOwnPropertyDescriptor(self[i], uuid))
- })
-
-
- for (var i=0;i
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var crypto = require('crypto')
- , parse = require('url').parse
- ;
-
-/**
- * Valid keys.
- */
-
-var keys =
- [ 'acl'
- , 'location'
- , 'logging'
- , 'notification'
- , 'partNumber'
- , 'policy'
- , 'requestPayment'
- , 'torrent'
- , 'uploadId'
- , 'uploads'
- , 'versionId'
- , 'versioning'
- , 'versions'
- , 'website'
- ]
-
-/**
- * Return an "Authorization" header value with the given `options`
- * in the form of "AWS :"
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function authorization (options) {
- return 'AWS ' + options.key + ':' + sign(options)
-}
-
-module.exports = authorization
-module.exports.authorization = authorization
-
-/**
- * Simple HMAC-SHA1 Wrapper
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function hmacSha1 (options) {
- return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
-}
-
-module.exports.hmacSha1 = hmacSha1
-
-/**
- * Create a base64 sha1 HMAC for `options`.
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function sign (options) {
- options.message = stringToSign(options)
- return hmacSha1(options)
-}
-module.exports.sign = sign
-
-/**
- * Create a base64 sha1 HMAC for `options`.
- *
- * Specifically to be used with S3 presigned URLs
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function signQuery (options) {
- options.message = queryStringToSign(options)
- return hmacSha1(options)
-}
-module.exports.signQuery= signQuery
-
-/**
- * Return a string for sign() with the given `options`.
- *
- * Spec:
- *
- * \n
- * \n
- * \n
- * \n
- * [headers\n]
- *
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function stringToSign (options) {
- var headers = options.amazonHeaders || ''
- if (headers) headers += '\n'
- var r =
- [ options.verb
- , options.md5
- , options.contentType
- , options.date ? options.date.toUTCString() : ''
- , headers + options.resource
- ]
- return r.join('\n')
-}
-module.exports.queryStringToSign = stringToSign
-
-/**
- * Return a string for sign() with the given `options`, but is meant exclusively
- * for S3 presigned URLs
- *
- * Spec:
- *
- * \n
- *
- *
- * @param {Object} options
- * @return {String}
- * @api private
- */
-
-function queryStringToSign (options){
- return 'GET\n\n\n' + options.date + '\n' + options.resource
-}
-module.exports.queryStringToSign = queryStringToSign
-
-/**
- * Perform the following:
- *
- * - ignore non-amazon headers
- * - lowercase fields
- * - sort lexicographically
- * - trim whitespace between ":"
- * - join with newline
- *
- * @param {Object} headers
- * @return {String}
- * @api private
- */
-
-function canonicalizeHeaders (headers) {
- var buf = []
- , fields = Object.keys(headers)
- ;
- for (var i = 0, len = fields.length; i < len; ++i) {
- var field = fields[i]
- , val = headers[field]
- , field = field.toLowerCase()
- ;
- if (0 !== field.indexOf('x-amz')) continue
- buf.push(field + ':' + val)
- }
- return buf.sort().join('\n')
-}
-module.exports.canonicalizeHeaders = canonicalizeHeaders
-
-/**
- * Perform the following:
- *
- * - ignore non sub-resources
- * - sort lexicographically
- *
- * @param {String} resource
- * @return {String}
- * @api private
- */
-
-function canonicalizeResource (resource) {
- var url = parse(resource, true)
- , path = url.pathname
- , buf = []
- ;
-
- Object.keys(url.query).forEach(function(key){
- if (!~keys.indexOf(key)) return
- var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])
- buf.push(key + val)
- })
-
- return path + (buf.length ? '?' + buf.sort().join('&') : '')
-}
-module.exports.canonicalizeResource = canonicalizeResource
diff --git a/node_modules/z-schema/node_modules/request/node_modules/aws-sign2/package.json b/node_modules/z-schema/node_modules/request/node_modules/aws-sign2/package.json
deleted file mode 100644
index d60b4430..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/aws-sign2/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "name": "aws-sign2",
- "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.",
- "version": "0.5.0",
- "repository": {
- "url": "https://github.com/mikeal/aws-sign"
- },
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "readme": "aws-sign\n========\n\nAWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/mikeal/aws-sign/issues"
- },
- "_id": "aws-sign2@0.5.0",
- "_from": "aws-sign2@~0.5.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/forever-agent/LICENSE
deleted file mode 100644
index a4a9aee0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/README.md b/node_modules/z-schema/node_modules/request/node_modules/forever-agent/README.md
deleted file mode 100644
index 9d5b6634..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-forever-agent
-=============
-
-HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/index.js b/node_modules/z-schema/node_modules/request/node_modules/forever-agent/index.js
deleted file mode 100644
index 1e8efcdf..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/index.js
+++ /dev/null
@@ -1,119 +0,0 @@
-module.exports = ForeverAgent
-ForeverAgent.SSL = ForeverAgentSSL
-
-var util = require('util')
- , Agent = require('http').Agent
- , net = require('net')
- , tls = require('tls')
- , AgentSSL = require('https').Agent
-
-function ForeverAgent(options) {
- var self = this
- self.options = options || {}
- self.requests = {}
- self.sockets = {}
- self.freeSockets = {}
- self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
- self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
- self.on('free', function(socket, host, port) {
- var name = host + ':' + port
- if (self.requests[name] && self.requests[name].length) {
- self.requests[name].shift().onSocket(socket)
- } else if (self.sockets[name].length < self.minSockets) {
- if (!self.freeSockets[name]) self.freeSockets[name] = []
- self.freeSockets[name].push(socket)
-
- // if an error happens while we don't use the socket anyway, meh, throw the socket away
- var onIdleError = function() {
- socket.destroy()
- }
- socket._onIdleError = onIdleError
- socket.on('error', onIdleError)
- } else {
- // If there are no pending requests just destroy the
- // socket and it will get removed from the pool. This
- // gets us out of timeout issues and allows us to
- // default to Connection:keep-alive.
- socket.destroy()
- }
- })
-
-}
-util.inherits(ForeverAgent, Agent)
-
-ForeverAgent.defaultMinSockets = 5
-
-
-ForeverAgent.prototype.createConnection = net.createConnection
-ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
-ForeverAgent.prototype.addRequest = function(req, host, port) {
- var name = host + ':' + port
- if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
- var idleSocket = this.freeSockets[name].pop()
- idleSocket.removeListener('error', idleSocket._onIdleError)
- delete idleSocket._onIdleError
- req._reusedSocket = true
- req.onSocket(idleSocket)
- } else {
- this.addRequestNoreuse(req, host, port)
- }
-}
-
-ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
- if (this.sockets[name]) {
- var index = this.sockets[name].indexOf(s)
- if (index !== -1) {
- this.sockets[name].splice(index, 1)
- }
- } else if (this.sockets[name] && this.sockets[name].length === 0) {
- // don't leak
- delete this.sockets[name]
- delete this.requests[name]
- }
-
- if (this.freeSockets[name]) {
- var index = this.freeSockets[name].indexOf(s)
- if (index !== -1) {
- this.freeSockets[name].splice(index, 1)
- if (this.freeSockets[name].length === 0) {
- delete this.freeSockets[name]
- }
- }
- }
-
- if (this.requests[name] && this.requests[name].length) {
- // If we have pending requests and a socket gets closed a new one
- // needs to be created to take over in the pool for the one that closed.
- this.createSocket(name, host, port).emit('free')
- }
-}
-
-function ForeverAgentSSL (options) {
- ForeverAgent.call(this, options)
-}
-util.inherits(ForeverAgentSSL, ForeverAgent)
-
-ForeverAgentSSL.prototype.createConnection = createConnectionSSL
-ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
-
-function createConnectionSSL (port, host, options) {
- if (typeof port === 'object') {
- options = port;
- } else if (typeof host === 'object') {
- options = host;
- } else if (typeof options === 'object') {
- options = options;
- } else {
- options = {};
- }
-
- if (typeof port === 'number') {
- options.port = port;
- }
-
- if (typeof host === 'string') {
- options.host = host;
- }
-
- return tls.connect(options);
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/package.json b/node_modules/z-schema/node_modules/request/node_modules/forever-agent/package.json
deleted file mode 100644
index fa2f05c4..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/forever-agent/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "name": "forever-agent",
- "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
- "version": "0.5.2",
- "repository": {
- "url": "https://github.com/mikeal/forever-agent"
- },
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/mikeal/forever-agent/issues"
- },
- "_id": "forever-agent@0.5.2",
- "_from": "forever-agent@~0.5.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/License b/node_modules/z-schema/node_modules/request/node_modules/form-data/License
deleted file mode 100644
index c7ff12a2..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) 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/node_modules/z-schema/node_modules/request/node_modules/form-data/Readme.md b/node_modules/z-schema/node_modules/request/node_modules/form-data/Readme.md
deleted file mode 100644
index c8a1a55d..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/Readme.md
+++ /dev/null
@@ -1,175 +0,0 @@
-# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)
-
-A module to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications.
-
-The API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].
-
-[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
-[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions
-
-## Install
-
-```
-npm install form-data
-```
-
-## Usage
-
-In this example we are constructing a form with 3 fields that contain a string,
-a buffer and a file stream.
-
-``` javascript
-var FormData = require('form-data');
-var fs = require('fs');
-
-var form = new FormData();
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
-```
-
-Also you can use http-response stream:
-
-``` javascript
-var FormData = require('form-data');
-var http = require('http');
-
-var form = new FormData();
-
-http.request('http://nodejs.org/images/logo.png', function(response) {
- form.append('my_field', 'my value');
- form.append('my_buffer', new Buffer(10));
- form.append('my_logo', response);
-});
-```
-
-Or @mikeal's request stream:
-
-``` javascript
-var FormData = require('form-data');
-var request = require('request');
-
-var form = new FormData();
-
-form.append('my_field', 'my value');
-form.append('my_buffer', new Buffer(10));
-form.append('my_logo', request('http://nodejs.org/images/logo.png'));
-```
-
-In order to submit this form to a web application, call ```submit(url, [callback])``` method:
-
-``` javascript
-form.submit('http://example.org/', function(err, res) {
- // res – response object (http.IncomingMessage) //
- res.resume(); // for node-0.10.x
-});
-
-```
-
-For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.
-
-### Alternative submission methods
-
-You can use node's http client interface:
-
-``` javascript
-var http = require('http');
-
-var request = http.request({
- method: 'post',
- host: 'example.org',
- path: '/upload',
- headers: form.getHeaders()
-});
-
-form.pipe(request);
-
-request.on('response', function(res) {
- console.log(res.statusCode);
-});
-```
-
-Or if you would prefer the `'Content-Length'` header to be set for you:
-
-``` javascript
-form.submit('example.org/upload', function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-To use custom headers and pre-known length in parts:
-
-``` javascript
-var CRLF = '\r\n';
-var form = new FormData();
-
-var options = {
- header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,
- knownLength: 1
-};
-
-form.append('my_buffer', buffer, options);
-
-form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
-});
-```
-
-Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually:
-
-``` javascript
-someModule.stream(function(err, stdout, stderr) {
- if (err) throw err;
-
- var form = new FormData();
-
- form.append('file', stdout, {
- filename: 'unicycle.jpg',
- contentType: 'image/jpg',
- knownLength: 19806
- });
-
- form.submit('http://example.com/', function(err, res) {
- if (err) throw err;
- console.log('Done');
- });
-});
-```
-
-For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/probably.php?extra=params',
- auth: 'username:password'
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:
-
-``` javascript
-form.submit({
- host: 'example.com',
- path: '/surelynot.php',
- headers: {'x-test-header': 'test-header-value'}
-}, function(err, res) {
- console.log(res.statusCode);
-});
-```
-
-## Notes
-
-- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.
-- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]
-
-## TODO
-
-- Add new streams (0.10) support and try really hard not to break it for 0.8.x.
-
-## License
-
-Form-Data is licensed under the MIT license.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/lib/form_data.js
deleted file mode 100644
index 6e6c7425..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/lib/form_data.js
+++ /dev/null
@@ -1,327 +0,0 @@
-var CombinedStream = require('combined-stream');
-var util = require('util');
-var path = require('path');
-var http = require('http');
-var https = require('https');
-var parseUrl = require('url').parse;
-var fs = require('fs');
-var mime = require('mime');
-var async = require('async');
-
-module.exports = FormData;
-function FormData() {
- this._overheadLength = 0;
- this._valueLength = 0;
- this._lengthRetrievers = [];
-
- CombinedStream.call(this);
-}
-util.inherits(FormData, CombinedStream);
-
-FormData.LINE_BREAK = '\r\n';
-
-FormData.prototype.append = function(field, value, options) {
- options = options || {};
-
- var append = CombinedStream.prototype.append.bind(this);
-
- // all that streamy business can't handle numbers
- if (typeof value == 'number') value = ''+value;
-
- // https://github.com/felixge/node-form-data/issues/38
- if (util.isArray(value)) {
- // Please convert your array into string
- // the way web server expects it
- this._error(new Error('Arrays are not supported.'));
- return;
- }
-
- var header = this._multiPartHeader(field, value, options);
- var footer = this._multiPartFooter(field, value, options);
-
- append(header);
- append(value);
- append(footer);
-
- // pass along options.knownLength
- this._trackLength(header, value, options);
-};
-
-FormData.prototype._trackLength = function(header, value, options) {
- var valueLength = 0;
-
- // used w/ getLengthSync(), when length is known.
- // e.g. for streaming directly from a remote server,
- // w/ a known file a size, and not wanting to wait for
- // incoming file to finish to get its size.
- if (options.knownLength != null) {
- valueLength += +options.knownLength;
- } else if (Buffer.isBuffer(value)) {
- valueLength = value.length;
- } else if (typeof value === 'string') {
- valueLength = Buffer.byteLength(value);
- }
-
- this._valueLength += valueLength;
-
- // @check why add CRLF? does this account for custom/multiple CRLFs?
- this._overheadLength +=
- Buffer.byteLength(header) +
- + FormData.LINE_BREAK.length;
-
- // empty or either doesn't have path or not an http response
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
- return;
- }
-
- // no need to bother with the length
- if (!options.knownLength)
- this._lengthRetrievers.push(function(next) {
-
- if (value.hasOwnProperty('fd')) {
- fs.stat(value.path, function(err, stat) {
- if (err) {
- next(err);
- return;
- }
-
- next(null, stat.size);
- });
-
- // or http response
- } else if (value.hasOwnProperty('httpVersion')) {
- next(null, +value.headers['content-length']);
-
- // or request stream http://github.com/mikeal/request
- } else if (value.hasOwnProperty('httpModule')) {
- // wait till response come back
- value.on('response', function(response) {
- value.pause();
- next(null, +response.headers['content-length']);
- });
- value.resume();
-
- // something else
- } else {
- next('Unknown stream');
- }
- });
-};
-
-FormData.prototype._multiPartHeader = function(field, value, options) {
- var boundary = this.getBoundary();
- var header = '';
-
- // custom header specified (as string)?
- // it becomes responsible for boundary
- // (e.g. to handle extra CRLFs on .NET servers)
- if (options.header != null) {
- header = options.header;
- } else {
- header += '--' + boundary + FormData.LINE_BREAK +
- 'Content-Disposition: form-data; name="' + field + '"';
-
- // fs- and request- streams have path property
- // or use custom filename and/or contentType
- // TODO: Use request's response mime-type
- if (options.filename || value.path) {
- header +=
- '; filename="' + path.basename(options.filename || value.path) + '"' + FormData.LINE_BREAK +
- 'Content-Type: ' + (options.contentType || mime.lookup(options.filename || value.path));
-
- // http response has not
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
- header +=
- '; filename="' + path.basename(value.client._httpMessage.path) + '"' + FormData.LINE_BREAK +
- 'Content-Type: ' + value.headers['content-type'];
- }
-
- header += FormData.LINE_BREAK + FormData.LINE_BREAK;
- }
-
- return header;
-};
-
-FormData.prototype._multiPartFooter = function(field, value, options) {
- return function(next) {
- var footer = FormData.LINE_BREAK;
-
- var lastPart = (this._streams.length === 0);
- if (lastPart) {
- footer += this._lastBoundary();
- }
-
- next(footer);
- }.bind(this);
-};
-
-FormData.prototype._lastBoundary = function() {
- return '--' + this.getBoundary() + '--';
-};
-
-FormData.prototype.getHeaders = function(userHeaders) {
- var formHeaders = {
- 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
- };
-
- for (var header in userHeaders) {
- formHeaders[header.toLowerCase()] = userHeaders[header];
- }
-
- return formHeaders;
-}
-
-FormData.prototype.getCustomHeaders = function(contentType) {
- contentType = contentType ? contentType : 'multipart/form-data';
-
- var formHeaders = {
- 'content-type': contentType + '; boundary=' + this.getBoundary(),
- 'content-length': this.getLengthSync()
- };
-
- return formHeaders;
-}
-
-FormData.prototype.getBoundary = function() {
- if (!this._boundary) {
- this._generateBoundary();
- }
-
- return this._boundary;
-};
-
-FormData.prototype._generateBoundary = function() {
- // This generates a 50 character boundary similar to those used by Firefox.
- // They are optimized for boyer-moore parsing.
- var boundary = '--------------------------';
- for (var i = 0; i < 24; i++) {
- boundary += Math.floor(Math.random() * 10).toString(16);
- }
-
- this._boundary = boundary;
-};
-
-// Note: getLengthSync DOESN'T calculate streams length
-// As workaround one can calculate file size manually
-// and add it as knownLength option
-FormData.prototype.getLengthSync = function(debug) {
- var knownLength = this._overheadLength + this._valueLength;
-
- // Don't get confused, there are 3 "internal" streams for each keyval pair
- // so it basically checks if there is any value added to the form
- if (this._streams.length) {
- knownLength += this._lastBoundary().length;
- }
-
- // https://github.com/felixge/node-form-data/issues/40
- if (this._lengthRetrievers.length) {
- // Some async length retrivers are present
- // therefore synchronous length calculation is false.
- // Please use getLength(callback) to get proper length
- this._error(new Error('Cannot calculate proper length in synchronous way.'));
- }
-
- return knownLength;
-};
-
-FormData.prototype.getLength = function(cb) {
- var knownLength = this._overheadLength + this._valueLength;
-
- if (this._streams.length) {
- knownLength += this._lastBoundary().length;
- }
-
- if (!this._lengthRetrievers.length) {
- process.nextTick(cb.bind(this, null, knownLength));
- return;
- }
-
- async.parallel(this._lengthRetrievers, function(err, values) {
- if (err) {
- cb(err);
- return;
- }
-
- values.forEach(function(length) {
- knownLength += length;
- });
-
- cb(null, knownLength);
- });
-};
-
-FormData.prototype.submit = function(params, cb) {
-
- var request
- , options
- , defaults = {
- method : 'post'
- };
-
- // parse provided url if it's string
- // or treat it as options object
- if (typeof params == 'string') {
- params = parseUrl(params);
-
- options = populate({
- port: params.port,
- path: params.pathname,
- host: params.hostname
- }, defaults);
- }
- else // use custom params
- {
- options = populate(params, defaults);
- // if no port provided use default one
- if (!options.port) {
- options.port = options.protocol == 'https:' ? 443 : 80;
- }
- }
-
- // put that good code in getHeaders to some use
- options.headers = this.getHeaders(params.headers);
-
- // https if specified, fallback to http in any other case
- if (params.protocol == 'https:') {
- request = https.request(options);
- } else {
- request = http.request(options);
- }
-
- // get content length and fire away
- this.getLength(function(err, length) {
-
- // TODO: Add chunked encoding when no length (if err)
-
- // add content length
- request.setHeader('Content-Length', length);
-
- this.pipe(request);
- if (cb) {
- request.on('error', cb);
- request.on('response', cb.bind(this, null));
- }
- }.bind(this));
-
- return request;
-};
-
-FormData.prototype._error = function(err) {
- if (this.error) return;
-
- this.error = err;
- this.pause();
- this.emit('error', err);
-};
-
-/*
- * Santa's little helpers
- */
-
-// populates missing values
-function populate(dst, src) {
- for (var prop in src) {
- if (!dst[prop]) dst[prop] = src[prop];
- }
- return dst;
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml
deleted file mode 100644
index 6e5919de..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/LICENSE
deleted file mode 100644
index 8f296985..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010-2014 Caolan McMahon
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-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/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/README.md
deleted file mode 100644
index 0bea5311..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/README.md
+++ /dev/null
@@ -1,1646 +0,0 @@
-# Async.js
-
-[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
-
-
-Async is a utility module which provides straight-forward, powerful functions
-for working with asynchronous JavaScript. Although originally designed for
-use with [Node.js](http://nodejs.org), it can also be used directly in the
-browser. Also supports [component](https://github.com/component/component).
-
-Async provides around 20 functions that include the usual 'functional'
-suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns
-for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these
-functions assume you follow the Node.js convention of providing a single
-callback as the last argument of your `async` function.
-
-
-## Quick Examples
-
-```javascript
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-
-async.parallel([
- function(){ ... },
- function(){ ... }
-], callback);
-
-async.series([
- function(){ ... },
- function(){ ... }
-]);
-```
-
-There are many more functions available so take a look at the docs below for a
-full list. This module aims to be comprehensive, so if you feel anything is
-missing please create a GitHub issue for it.
-
-## Common Pitfalls
-
-### Binding a context to an iterator
-
-This section is really about `bind`, not about `async`. If you are wondering how to
-make `async` execute your iterators in a given context, or are confused as to why
-a method of another library isn't working as an iterator, study this example:
-
-```js
-// Here is a simple object with an (unnecessarily roundabout) squaring method
-var AsyncSquaringLibrary = {
- squareExponent: 2,
- square: function(number, callback){
- var result = Math.pow(number, this.squareExponent);
- setTimeout(function(){
- callback(null, result);
- }, 200);
- }
-};
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
- // result is [NaN, NaN, NaN]
- // This fails because the `this.squareExponent` expression in the square
- // function is not evaluated in the context of AsyncSquaringLibrary, and is
- // therefore undefined.
-});
-
-async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
- // result is [1, 4, 9]
- // With the help of bind we can attach a context to the iterator before
- // passing it to async. Now the square function will be executed in its
- // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
- // will be as expected.
-});
-```
-
-## Download
-
-The source is available for download from
-[GitHub](http://github.com/caolan/async).
-Alternatively, you can install using Node Package Manager (`npm`):
-
- npm install async
-
-__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
-
-## In the Browser
-
-So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5.
-
-Usage:
-
-```html
-
-
-```
-
-## Documentation
-
-### Collections
-
-* [`each`](#each)
-* [`eachSeries`](#eachSeries)
-* [`eachLimit`](#eachLimit)
-* [`map`](#map)
-* [`mapSeries`](#mapSeries)
-* [`mapLimit`](#mapLimit)
-* [`filter`](#filter)
-* [`filterSeries`](#filterSeries)
-* [`reject`](#reject)
-* [`rejectSeries`](#rejectSeries)
-* [`reduce`](#reduce)
-* [`reduceRight`](#reduceRight)
-* [`detect`](#detect)
-* [`detectSeries`](#detectSeries)
-* [`sortBy`](#sortBy)
-* [`some`](#some)
-* [`every`](#every)
-* [`concat`](#concat)
-* [`concatSeries`](#concatSeries)
-
-### Control Flow
-
-* [`series`](#seriestasks-callback)
-* [`parallel`](#parallel)
-* [`parallelLimit`](#parallellimittasks-limit-callback)
-* [`whilst`](#whilst)
-* [`doWhilst`](#doWhilst)
-* [`until`](#until)
-* [`doUntil`](#doUntil)
-* [`forever`](#forever)
-* [`waterfall`](#waterfall)
-* [`compose`](#compose)
-* [`seq`](#seq)
-* [`applyEach`](#applyEach)
-* [`applyEachSeries`](#applyEachSeries)
-* [`queue`](#queue)
-* [`priorityQueue`](#priorityQueue)
-* [`cargo`](#cargo)
-* [`auto`](#auto)
-* [`retry`](#retry)
-* [`iterator`](#iterator)
-* [`apply`](#apply)
-* [`nextTick`](#nextTick)
-* [`times`](#times)
-* [`timesSeries`](#timesSeries)
-
-### Utils
-
-* [`memoize`](#memoize)
-* [`unmemoize`](#unmemoize)
-* [`log`](#log)
-* [`dir`](#dir)
-* [`noConflict`](#noConflict)
-
-
-## Collections
-
-
-
-### each(arr, iterator, callback)
-
-Applies the function `iterator` to each item in `arr`, in parallel.
-The `iterator` is called with an item from the list, and a callback for when it
-has finished. If the `iterator` passes an error to its `callback`, the main
-`callback` (for the `each` function) is immediately called with the error.
-
-Note, that since this function applies `iterator` to each item in parallel,
-there is no guarantee that the iterator functions will complete in order.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the `callback` should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Examples__
-
-
-```js
-// assuming openFiles is an array of file names and saveFile is a function
-// to save the modified contents of that file:
-
-async.each(openFiles, saveFile, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
-```js
-// assuming openFiles is an array of file names
-
-async.each(openFiles, function( file, callback) {
-
- // Perform operation on file here.
- console.log('Processing file ' + file);
-
- if( file.length > 32 ) {
- console.log('This file name is too long');
- callback('File name too long');
- } else {
- // Do work to process file here
- console.log('File processed');
- callback();
- }
-}, function(err){
- // if any of the file processing produced an error, err would equal that error
- if( err ) {
- // One of the iterations produced an error.
- // All processing will now stop.
- console.log('A file failed to process');
- } else {
- console.log('All files have been processed successfully');
- }
-});
-```
-
----------------------------------------
-
-
-
-### eachSeries(arr, iterator, callback)
-
-The same as [`each`](#each), only `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-This means the `iterator` functions will complete in order.
-
-
----------------------------------------
-
-
-
-### eachLimit(arr, limit, iterator, callback)
-
-The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items in `arr` are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err)` which must be called once it has
- completed. If no error has occured, the callback should be run without
- arguments or with an explicit `null` argument.
-* `callback(err)` - A callback which is called when all `iterator` functions
- have finished, or an error occurs.
-
-__Example__
-
-```js
-// Assume documents is an array of JSON objects and requestApi is a
-// function that interacts with a rate-limited REST api.
-
-async.eachLimit(documents, 20, requestApi, function(err){
- // if any of the saves produced an error, err would equal that error
-});
-```
-
----------------------------------------
-
-
-### map(arr, iterator, callback)
-
-Produces a new array of values by mapping each value in `arr` through
-the `iterator` function. The `iterator` is called with an item from `arr` and a
-callback for when it has finished processing. Each of these callback takes 2 arguments:
-an `error`, and the transformed item from `arr`. If `iterator` passes an error to this
-callback, the main `callback` (for the `map` function) is immediately called with the error.
-
-Note, that since this function applies the `iterator` to each item in parallel,
-there is no guarantee that the `iterator` functions will complete in order.
-However, the results array will be in the same order as the original `arr`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- functions have finished, or an error occurs. Results is an array of the
- transformed items from the `arr`.
-
-__Example__
-
-```js
-async.map(['file1','file2','file3'], fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-### mapSeries(arr, iterator, callback)
-
-The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
----------------------------------------
-
-
-### mapLimit(arr, limit, iterator, callback)
-
-The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously
-running at any time.
-
-Note that the items are not processed in batches, so there is no guarantee that
-the first `limit` `iterator` functions will complete before any others are started.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `limit` - The maximum number of `iterator`s to run at any time.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, transformed)` which must be called once
- it has completed with an error (which can be `null`) and a transformed item.
-* `callback(err, results)` - A callback which is called when all `iterator`
- calls have finished, or an error occurs. The result is an array of the
- transformed items from the original `arr`.
-
-__Example__
-
-```js
-async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){
- // results is now an array of stats for each file
-});
-```
-
----------------------------------------
-
-
-
-### filter(arr, iterator, callback)
-
-__Alias:__ `select`
-
-Returns a new array of all the values in `arr` which pass an async truth test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. This operation is
-performed in parallel, but the results array will be in the same order as the
-original.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The `iterator` is passed a `callback(truthValue)`, which must be called with a
- boolean argument once it has completed.
-* `callback(results)` - A callback which is called after all the `iterator`
- functions have finished.
-
-__Example__
-
-```js
-async.filter(['file1','file2','file3'], fs.exists, function(results){
- // results now equals an array of the existing files
-});
-```
-
----------------------------------------
-
-
-
-### filterSeries(arr, iterator, callback)
-
-__Alias:__ `selectSeries`
-
-The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
----------------------------------------
-
-
-### reject(arr, iterator, callback)
-
-The opposite of [`filter`](#filter). Removes values that pass an `async` truth test.
-
----------------------------------------
-
-
-### rejectSeries(arr, iterator, callback)
-
-The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr`
-in series.
-
-
----------------------------------------
-
-
-### reduce(arr, memo, iterator, callback)
-
-__Aliases:__ `inject`, `foldl`
-
-Reduces `arr` into a single value using an async `iterator` to return
-each successive step. `memo` is the initial state of the reduction.
-This function only operates in series.
-
-For performance reasons, it may make sense to split a call to this function into
-a parallel map, and then use the normal `Array.prototype.reduce` on the results.
-This function is for situations where each step in the reduction needs to be async;
-if you can get the data before reducing it, then it's probably a good idea to do so.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `memo` - The initial state of the reduction.
-* `iterator(memo, item, callback)` - A function applied to each item in the
- array to produce the next step in the reduction. The `iterator` is passed a
- `callback(err, reduction)` which accepts an optional error as its first
- argument, and the state of the reduction as the second. If an error is
- passed to the callback, the reduction is stopped and the main `callback` is
- immediately called with the error.
-* `callback(err, result)` - A callback which is called after all the `iterator`
- functions have finished. Result is the reduced value.
-
-__Example__
-
-```js
-async.reduce([1,2,3], 0, function(memo, item, callback){
- // pointless async:
- process.nextTick(function(){
- callback(null, memo + item)
- });
-}, function(err, result){
- // result is now equal to the last value of memo, which is 6
-});
-```
-
----------------------------------------
-
-
-### reduceRight(arr, memo, iterator, callback)
-
-__Alias:__ `foldr`
-
-Same as [`reduce`](#reduce), only operates on `arr` in reverse order.
-
-
----------------------------------------
-
-
-### detect(arr, iterator, callback)
-
-Returns the first value in `arr` that passes an async truth test. The
-`iterator` is applied in parallel, meaning the first iterator to return `true` will
-fire the detect `callback` with that result. That means the result might not be
-the first item in the original `arr` (in terms of order) that passes the test.
-
-If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in `arr`.
- The iterator is passed a `callback(truthValue)` which must be called with a
- boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the `iterator` functions have finished. Result will be
- the first item in the array that passes the truth test (iterator) or the
- value `undefined` if none passed.
-
-__Example__
-
-```js
-async.detect(['file1','file2','file3'], fs.exists, function(result){
- // result now equals the first file in the list that exists
-});
-```
-
----------------------------------------
-
-
-### detectSeries(arr, iterator, callback)
-
-The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr`
-in series. This means the result is always the first in the original `arr` (in
-terms of array order) that passes the truth test.
-
-
----------------------------------------
-
-
-### sortBy(arr, iterator, callback)
-
-Sorts a list by the results of running each `arr` value through an async `iterator`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, sortValue)` which must be called once it
- has completed with an error (which can be `null`) and a value to use as the sort
- criteria.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is the items from
- the original `arr` sorted by the values returned by the `iterator` calls.
-
-__Example__
-
-```js
-async.sortBy(['file1','file2','file3'], function(file, callback){
- fs.stat(file, function(err, stats){
- callback(err, stats.mtime);
- });
-}, function(err, results){
- // results is now the original array of files sorted by
- // modified date
-});
-```
-
-__Sort Order__
-
-By modifying the callback parameter the sorting order can be influenced:
-
-```js
-//ascending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x);
-}, function(err,result){
- //result callback
-} );
-
-//descending order
-async.sortBy([1,9,3,5], function(x, callback){
- callback(err, x*-1); //<- x*-1 instead of x, turns the order around
-}, function(err,result){
- //result callback
-} );
-```
-
----------------------------------------
-
-
-### some(arr, iterator, callback)
-
-__Alias:__ `any`
-
-Returns `true` if at least one element in the `arr` satisfies an async test.
-_The callback for each iterator call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`. Once any iterator
-call returns `true`, the main `callback` is immediately called.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called as soon as any iterator returns
- `true`, or after all the iterator functions have finished. Result will be
- either `true` or `false` depending on the values of the async tests.
-
-__Example__
-
-```js
-async.some(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then at least one of the files exists
-});
-```
-
----------------------------------------
-
-
-### every(arr, iterator, callback)
-
-__Alias:__ `all`
-
-Returns `true` if every element in `arr` satisfies an async test.
-_The callback for each `iterator` call only accepts a single argument of `true` or
-`false`; it does not accept an error argument first!_ This is in-line with the
-way node libraries work with truth tests like `fs.exists`.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A truth test to apply to each item in the array
- in parallel. The iterator is passed a callback(truthValue) which must be
- called with a boolean argument once it has completed.
-* `callback(result)` - A callback which is called after all the `iterator`
- functions have finished. Result will be either `true` or `false` depending on
- the values of the async tests.
-
-__Example__
-
-```js
-async.every(['file1','file2','file3'], fs.exists, function(result){
- // if result is true then every file exists
-});
-```
-
----------------------------------------
-
-
-### concat(arr, iterator, callback)
-
-Applies `iterator` to each item in `arr`, concatenating the results. Returns the
-concatenated list. The `iterator`s are called in parallel, and the results are
-concatenated as they return. There is no guarantee that the results array will
-be returned in the original order of `arr` passed to the `iterator` function.
-
-__Arguments__
-
-* `arr` - An array to iterate over.
-* `iterator(item, callback)` - A function to apply to each item in `arr`.
- The iterator is passed a `callback(err, results)` which must be called once it
- has completed with an error (which can be `null`) and an array of results.
-* `callback(err, results)` - A callback which is called after all the `iterator`
- functions have finished, or an error occurs. Results is an array containing
- the concatenated results of the `iterator` function.
-
-__Example__
-
-```js
-async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
- // files is now a list of filenames that exist in the 3 directories
-});
-```
-
----------------------------------------
-
-
-### concatSeries(arr, iterator, callback)
-
-Same as [`concat`](#concat), but executes in series instead of parallel.
-
-
-## Control Flow
-
-
-### series(tasks, [callback])
-
-Run the functions in the `tasks` array in series, each one running once the previous
-function has completed. If any functions in the series pass an error to its
-callback, no more functions are run, and `callback` is immediately called with the value of the error.
-Otherwise, `callback` receives an array of results when `tasks` have completed.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function, and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`series`](#series).
-
-**Note** that while many implementations preserve the order of object properties, the
-[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
-explicitly states that
-
-> The mechanics and order of enumerating the properties is not specified.
-
-So if you rely on the order in which your series of functions are executed, and want
-this to work on all platforms, consider using an array.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
-__Example__
-
-```js
-async.series([
- function(callback){
- // do some stuff ...
- callback(null, 'one');
- },
- function(callback){
- // do some more stuff ...
- callback(null, 'two');
- }
-],
-// optional callback
-function(err, results){
- // results is now equal to ['one', 'two']
-});
-
-
-// an example using an object instead of an array
-async.series({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equal to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallel(tasks, [callback])
-
-Run the `tasks` array of functions in parallel, without waiting until the previous
-function has completed. If any of the functions pass an error to its
-callback, the main `callback` is immediately called with the value of the error.
-Once the `tasks` have completed, the results are passed to the final `callback` as an
-array.
-
-It is also possible to use an object instead of an array. Each property will be
-run as a function and the results will be passed to the final `callback` as an object
-instead of an array. This can be a more readable way of handling results from
-[`parallel`](#parallel).
-
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run. Each function is passed
- a `callback(err, result)` which it must call on completion with an error `err`
- (which can be `null`) and an optional `result` value.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the task callbacks.
-
-__Example__
-
-```js
-async.parallel([
- function(callback){
- setTimeout(function(){
- callback(null, 'one');
- }, 200);
- },
- function(callback){
- setTimeout(function(){
- callback(null, 'two');
- }, 100);
- }
-],
-// optional callback
-function(err, results){
- // the results array will equal ['one','two'] even though
- // the second function had a shorter timeout.
-});
-
-
-// an example using an object instead of an array
-async.parallel({
- one: function(callback){
- setTimeout(function(){
- callback(null, 1);
- }, 200);
- },
- two: function(callback){
- setTimeout(function(){
- callback(null, 2);
- }, 100);
- }
-},
-function(err, results) {
- // results is now equals to: {one: 1, two: 2}
-});
-```
-
----------------------------------------
-
-
-### parallelLimit(tasks, limit, [callback])
-
-The same as [`parallel`](#parallel), only `tasks` are executed in parallel
-with a maximum of `limit` tasks executing at any time.
-
-Note that the `tasks` are not executed in batches, so there is no guarantee that
-the first `limit` tasks will complete before any others are started.
-
-__Arguments__
-
-* `tasks` - An array or object containing functions to run, each function is passed
- a `callback(err, result)` it must call on completion with an error `err` (which can
- be `null`) and an optional `result` value.
-* `limit` - The maximum number of `tasks` to run at any time.
-* `callback(err, results)` - An optional callback to run once all the functions
- have completed. This function gets a results array (or object) containing all
- the result arguments passed to the `task` callbacks.
-
----------------------------------------
-
-
-### whilst(test, fn, callback)
-
-Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-__Arguments__
-
-* `test()` - synchronous truth test to perform before each execution of `fn`.
-* `fn(callback)` - A function which is called each time `test` passes. The function is
- passed a `callback(err)`, which must be called once it has completed with an
- optional `err` argument.
-* `callback(err)` - A callback which is called after the test fails and repeated
- execution of `fn` has stopped.
-
-__Example__
-
-```js
-var count = 0;
-
-async.whilst(
- function () { return count < 5; },
- function (callback) {
- count++;
- setTimeout(callback, 1000);
- },
- function (err) {
- // 5 seconds have passed
- }
-);
-```
-
----------------------------------------
-
-
-### doWhilst(fn, test, callback)
-
-The post-check version of [`whilst`](#whilst). To reflect the difference in
-the order of operations, the arguments `test` and `fn` are switched.
-
-`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
-
----------------------------------------
-
-
-### until(test, fn, callback)
-
-Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,
-or an error occurs.
-
-The inverse of [`whilst`](#whilst).
-
----------------------------------------
-
-
-### doUntil(fn, test, callback)
-
-Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.
-
----------------------------------------
-
-
-### forever(fn, errback)
-
-Calls the asynchronous function `fn` with a callback parameter that allows it to
-call itself again, in series, indefinitely.
-
-If an error is passed to the callback then `errback` is called with the
-error, and execution stops, otherwise it will never be called.
-
-```js
-async.forever(
- function(next) {
- // next is suitable for passing to things that need a callback(err [, whatever]);
- // it will result in this function being called again.
- },
- function(err) {
- // if next is called with a value in its first parameter, it will appear
- // in here as 'err', and execution will stop.
- }
-);
-```
-
----------------------------------------
-
-
-### waterfall(tasks, [callback])
-
-Runs the `tasks` array of functions in series, each passing their results to the next in
-the array. However, if any of the `tasks` pass an error to their own callback, the
-next function is not executed, and the main `callback` is immediately called with
-the error.
-
-__Arguments__
-
-* `tasks` - An array of functions to run, each function is passed a
- `callback(err, result1, result2, ...)` it must call on completion. The first
- argument is an error (which can be `null`) and any further arguments will be
- passed as arguments in order to the next task.
-* `callback(err, [results])` - An optional callback to run once all the functions
- have completed. This will be passed the results of the last task's callback.
-
-
-
-__Example__
-
-```js
-async.waterfall([
- function(callback){
- callback(null, 'one', 'two');
- },
- function(arg1, arg2, callback){
- // arg1 now equals 'one' and arg2 now equals 'two'
- callback(null, 'three');
- },
- function(arg1, callback){
- // arg1 now equals 'three'
- callback(null, 'done');
- }
-], function (err, result) {
- // result now equals 'done'
-});
-```
-
----------------------------------------
-
-### compose(fn1, fn2...)
-
-Creates a function which is a composition of the passed asynchronous
-functions. Each function consumes the return value of the function that
-follows. Composing functions `f()`, `g()`, and `h()` would produce the result of
-`f(g(h()))`, only this version uses callbacks to obtain the return values.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* `functions...` - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-function add1(n, callback) {
- setTimeout(function () {
- callback(null, n + 1);
- }, 10);
-}
-
-function mul3(n, callback) {
- setTimeout(function () {
- callback(null, n * 3);
- }, 10);
-}
-
-var add1mul3 = async.compose(mul3, add1);
-
-add1mul3(4, function (err, result) {
- // result now equals 15
-});
-```
-
----------------------------------------
-
-### seq(fn1, fn2...)
-
-Version of the compose function that is more natural to read.
-Each following function consumes the return value of the latter function.
-
-Each function is executed with the `this` binding of the composed function.
-
-__Arguments__
-
-* functions... - the asynchronous functions to compose
-
-
-__Example__
-
-```js
-// Requires lodash (or underscore), express3 and dresende's orm2.
-// Part of an app, that fetches cats of the logged user.
-// This example uses `seq` function to avoid overnesting and error
-// handling clutter.
-app.get('/cats', function(request, response) {
- function handleError(err, data, callback) {
- if (err) {
- console.error(err);
- response.json({ status: 'error', message: err.message });
- }
- else {
- callback(data);
- }
- }
- var User = request.models.User;
- async.seq(
- _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
- handleError,
- function(user, fn) {
- user.getCats(fn); // 'getCats' has signature (callback(err, data))
- },
- handleError,
- function(cats) {
- response.json({ status: 'ok', message: 'Cats found', data: cats });
- }
- )(req.session.user_id);
- }
-});
-```
-
----------------------------------------
-
-### applyEach(fns, args..., callback)
-
-Applies the provided arguments to each function in the array, calling
-`callback` after all functions have completed. If you only provide the first
-argument, then it will return a function which lets you pass in the
-arguments as if it were a single function call.
-
-__Arguments__
-
-* `fns` - the asynchronous functions to all call with the same arguments
-* `args...` - any number of separate arguments to pass to the function
-* `callback` - the final argument should be the callback, called when all
- functions have completed processing
-
-
-__Example__
-
-```js
-async.applyEach([enableSearch, updateSchema], 'bucket', callback);
-
-// partial application example:
-async.each(
- buckets,
- async.applyEach([enableSearch, updateSchema]),
- callback
-);
-```
-
----------------------------------------
-
-
-### applyEachSeries(arr, iterator, callback)
-
-The same as [`applyEach`](#applyEach) only the functions are applied in series.
-
----------------------------------------
-
-
-### queue(worker, concurrency)
-
-Creates a `queue` object with the specified `concurrency`. Tasks added to the
-`queue` are processed in parallel (up to the `concurrency` limit). If all
-`worker`s are in progress, the task is queued until one becomes available.
-Once a `worker` completes a `task`, that `task`'s callback is called.
-
-__Arguments__
-
-* `worker(task, callback)` - An asynchronous function for processing a queued
- task, which must call its `callback(err)` argument when finished, with an
- optional `error` as an argument.
-* `concurrency` - An `integer` for determining how many `worker` functions should be
- run in parallel.
-
-__Queue objects__
-
-The `queue` object returned by this function has the following properties and
-methods:
-
-* `length()` - a function returning the number of items waiting to be processed.
-* `started` - a function returning whether or not any items have been pushed and processed by the queue
-* `running()` - a function returning the number of items currently being processed.
-* `idle()` - a function returning false if there are items waiting or being processed, or true if not.
-* `concurrency` - an integer for determining how many `worker` functions should be
- run in parallel. This property can be changed after a `queue` is created to
- alter the concurrency on-the-fly.
-* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once
- the `worker` has finished processing the task. Instead of a single task, a `tasks` array
- can be submitted. The respective callback is used for every task in the list.
-* `unshift(task, [callback])` - add a new task to the front of the `queue`.
-* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit,
- and further tasks will be queued.
-* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.
-* `paused` - a boolean for determining whether the queue is in a paused state
-* `pause()` - a function that pauses the processing of tasks until `resume()` is called.
-* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.
-* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle.
-
-__Example__
-
-```js
-// create a queue object with concurrency 2
-
-var q = async.queue(function (task, callback) {
- console.log('hello ' + task.name);
- callback();
-}, 2);
-
-
-// assign a callback
-q.drain = function() {
- console.log('all items have been processed');
-}
-
-// add some items to the queue
-
-q.push({name: 'foo'}, function (err) {
- console.log('finished processing foo');
-});
-q.push({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the queue (batch-wise)
-
-q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
- console.log('finished processing bar');
-});
-
-// add some items to the front of the queue
-
-q.unshift({name: 'bar'}, function (err) {
- console.log('finished processing bar');
-});
-```
-
-
----------------------------------------
-
-
-### priorityQueue(worker, concurrency)
-
-The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:
-
-* `push(task, priority, [callback])` - `priority` should be a number. If an array of
- `tasks` is given, all tasks will be assigned the same priority.
-* The `unshift` method was removed.
-
----------------------------------------
-
-
-### cargo(worker, [payload])
-
-Creates a `cargo` object with the specified payload. Tasks added to the
-cargo will be processed altogether (up to the `payload` limit). If the
-`worker` is in progress, the task is queued until it becomes available. Once
-the `worker` has completed some tasks, each callback of those tasks is called.
-Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work.
-
-While [queue](#queue) passes only one task to one of a group of workers
-at a time, cargo passes an array of tasks to a single worker, repeating
-when the worker is finished.
-
-__Arguments__
-
-* `worker(tasks, callback)` - An asynchronous function for processing an array of
- queued tasks, which must call its `callback(err)` argument when finished, with
- an optional `err` argument.
-* `payload` - An optional `integer` for determining how many tasks should be
- processed per round; if omitted, the default is unlimited.
-
-__Cargo objects__
-
-The `cargo` object returned by this function has the following properties and
-methods:
-
-* `length()` - A function returning the number of items waiting to be processed.
-* `payload` - An `integer` for determining how many tasks should be
- process per round. This property can be changed after a `cargo` is created to
- alter the payload on-the-fly.
-* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called
- once the `worker` has finished processing the task. Instead of a single task, an array of `tasks`
- can be submitted. The respective callback is used for every task in the list.
-* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.
-* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.
-* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.
-
-__Example__
-
-```js
-// create a cargo object with payload 2
-
-var cargo = async.cargo(function (tasks, callback) {
- for(var i=0; i
-### auto(tasks, [callback])
-
-Determines the best order for running the functions in `tasks`, based on their
-requirements. Each function can optionally depend on other functions being completed
-first, and each function is run as soon as its requirements are satisfied.
-
-If any of the functions pass an error to their callback, it will not
-complete (so any other functions depending on it will not run), and the main
-`callback` is immediately called with the error. Functions also receive an
-object containing the results of functions which have completed so far.
-
-Note, all functions are called with a `results` object as a second argument,
-so it is unsafe to pass functions in the `tasks` object which cannot handle the
-extra argument.
-
-For example, this snippet of code:
-
-```js
-async.auto({
- readData: async.apply(fs.readFile, 'data.txt', 'utf-8')
-}, callback);
-```
-
-will have the effect of calling `readFile` with the results object as the last
-argument, which will fail:
-
-```js
-fs.readFile('data.txt', 'utf-8', cb, {});
-```
-
-Instead, wrap the call to `readFile` in a function which does not forward the
-`results` object:
-
-```js
-async.auto({
- readData: function(cb, results){
- fs.readFile('data.txt', 'utf-8', cb);
- }
-}, callback);
-```
-
-__Arguments__
-
-* `tasks` - An object. Each of its properties is either a function or an array of
- requirements, with the function itself the last item in the array. The object's key
- of a property serves as the name of the task defined by that property,
- i.e. can be used when specifying requirements for other tasks.
- The function receives two arguments: (1) a `callback(err, result)` which must be
- called when finished, passing an `error` (which can be `null`) and the result of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions.
-* `callback(err, results)` - An optional callback which is called when all the
- tasks have been completed. It receives the `err` argument if any `tasks`
- pass an error to their callback. Results are always returned; however, if
- an error occurs, no further `tasks` will be performed, and the results
- object will only contain partial results.
-
-
-__Example__
-
-```js
-async.auto({
- get_data: function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- make_folder: function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- },
- write_file: ['get_data', 'make_folder', function(callback, results){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- callback(null, 'filename');
- }],
- email_link: ['write_file', function(callback, results){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- // results.write_file contains the filename returned by write_file.
- callback(null, {'file':results.write_file, 'email':'user@example.com'});
- }]
-}, function(err, results) {
- console.log('err = ', err);
- console.log('results = ', results);
-});
-```
-
-This is a fairly trivial example, but to do this using the basic parallel and
-series functions would look like this:
-
-```js
-async.parallel([
- function(callback){
- console.log('in get_data');
- // async code to get some data
- callback(null, 'data', 'converted to array');
- },
- function(callback){
- console.log('in make_folder');
- // async code to create a directory to store a file in
- // this is run at the same time as getting the data
- callback(null, 'folder');
- }
-],
-function(err, results){
- async.series([
- function(callback){
- console.log('in write_file', JSON.stringify(results));
- // once there is some data and the directory exists,
- // write the data to a file in the directory
- results.push('filename');
- callback(null);
- },
- function(callback){
- console.log('in email_link', JSON.stringify(results));
- // once the file is written let's email a link to it...
- callback(null, {'file':results.pop(), 'email':'user@example.com'});
- }
- ]);
-});
-```
-
-For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding
-new tasks much easier (and the code more readable).
-
-
----------------------------------------
-
-
-### retry([times = 5], task, [callback])
-
-Attempts to get a successful response from `task` no more than `times` times before
-returning an error. If the task is successful, the `callback` will be passed the result
-of the successfull task. If all attemps fail, the callback will be passed the error and
-result (if any) of the final attempt.
-
-__Arguments__
-
-* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5.
-* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`
- which must be called when finished, passing `err` (which can be `null`) and the `result` of
- the function's execution, and (2) a `results` object, containing the results of
- the previously executed functions (if nested inside another control flow).
-* `callback(err, results)` - An optional callback which is called when the
- task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.
-
-The [`retry`](#retry) function can be used as a stand-alone control flow by passing a
-callback, as shown below:
-
-```js
-async.retry(3, apiMethod, function(err, result) {
- // do something with the result
-});
-```
-
-It can also be embeded within other control flow functions to retry individual methods
-that are not as reliable, like this:
-
-```js
-async.auto({
- users: api.getUsers.bind(api),
- payments: async.retry(3, api.getPayments.bind(api))
-}, function(err, results) {
- // do something with the results
-});
-```
-
-
----------------------------------------
-
-
-### iterator(tasks)
-
-Creates an iterator function which calls the next function in the `tasks` array,
-returning a continuation to call the next one after that. It's also possible to
-“peek” at the next iterator with `iterator.next()`.
-
-This function is used internally by the `async` module, but can be useful when
-you want to manually control the flow of functions in series.
-
-__Arguments__
-
-* `tasks` - An array of functions to run.
-
-__Example__
-
-```js
-var iterator = async.iterator([
- function(){ sys.p('one'); },
- function(){ sys.p('two'); },
- function(){ sys.p('three'); }
-]);
-
-node> var iterator2 = iterator();
-'one'
-node> var iterator3 = iterator2();
-'two'
-node> iterator3();
-'three'
-node> var nextfn = iterator2.next();
-node> nextfn();
-'three'
-```
-
----------------------------------------
-
-
-### apply(function, arguments..)
-
-Creates a continuation function with some arguments already applied.
-
-Useful as a shorthand when combined with other control flow functions. Any arguments
-passed to the returned function are added to the arguments originally passed
-to apply.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to automatically apply when the
- continuation is called.
-
-__Example__
-
-```js
-// using apply
-
-async.parallel([
- async.apply(fs.writeFile, 'testfile1', 'test1'),
- async.apply(fs.writeFile, 'testfile2', 'test2'),
-]);
-
-
-// the same process without using apply
-
-async.parallel([
- function(callback){
- fs.writeFile('testfile1', 'test1', callback);
- },
- function(callback){
- fs.writeFile('testfile2', 'test2', callback);
- }
-]);
-```
-
-It's possible to pass any number of additional arguments when calling the
-continuation:
-
-```js
-node> var fn = async.apply(sys.puts, 'one');
-node> fn('two', 'three');
-one
-two
-three
-```
-
----------------------------------------
-
-
-### nextTick(callback)
-
-Calls `callback` on a later loop around the event loop. In Node.js this just
-calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`
-if available, otherwise `setTimeout(callback, 0)`, which means other higher priority
-events may precede the execution of `callback`.
-
-This is used internally for browser-compatibility purposes.
-
-__Arguments__
-
-* `callback` - The function to call on a later loop around the event loop.
-
-__Example__
-
-```js
-var call_order = [];
-async.nextTick(function(){
- call_order.push('two');
- // call_order now equals ['one','two']
-});
-call_order.push('one')
-```
-
-
-### times(n, callback)
-
-Calls the `callback` function `n` times, and accumulates results in the same manner
-you would use with [`map`](#map).
-
-__Arguments__
-
-* `n` - The number of times to run the function.
-* `callback` - The function to call `n` times.
-
-__Example__
-
-```js
-// Pretend this is some complicated async factory
-var createUser = function(id, callback) {
- callback(null, {
- id: 'user' + id
- })
-}
-// generate 5 users
-async.times(5, function(n, next){
- createUser(n, function(err, user) {
- next(err, user)
- })
-}, function(err, users) {
- // we should now have 5 users
-});
-```
-
-
-### timesSeries(n, callback)
-
-The same as [`times`](#times), only the iterator is applied to each item in `arr` in
-series. The next `iterator` is only called once the current one has completed.
-The results array will be in the same order as the original.
-
-
-## Utils
-
-
-### memoize(fn, [hasher])
-
-Caches the results of an `async` function. When creating a hash to store function
-results against, the callback is omitted from the hash and an optional hash
-function can be used.
-
-The cache of results is exposed as the `memo` property of the function returned
-by `memoize`.
-
-__Arguments__
-
-* `fn` - The function to proxy and cache results from.
-* `hasher` - Tn optional function for generating a custom hash for storing
- results. It has all the arguments applied to it apart from the callback, and
- must be synchronous.
-
-__Example__
-
-```js
-var slow_fn = function (name, callback) {
- // do something
- callback(null, result);
-};
-var fn = async.memoize(slow_fn);
-
-// fn can now be used as if it were slow_fn
-fn('some name', function () {
- // callback
-});
-```
-
-
-### unmemoize(fn)
-
-Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized
-form. Handy for testing.
-
-__Arguments__
-
-* `fn` - the memoized function
-
-
-### log(function, arguments)
-
-Logs the result of an `async` function to the `console`. Only works in Node.js or
-in browsers that support `console.log` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.log` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, 'hello ' + name);
- }, 1000);
-};
-```
-```js
-node> async.log(hello, 'world');
-'hello world'
-```
-
----------------------------------------
-
-
-### dir(function, arguments)
-
-Logs the result of an `async` function to the `console` using `console.dir` to
-display the properties of the resulting object. Only works in Node.js or
-in browsers that support `console.dir` and `console.error` (such as FF and Chrome).
-If multiple arguments are returned from the async function, `console.dir` is
-called on each argument in order.
-
-__Arguments__
-
-* `function` - The function you want to eventually apply all arguments to.
-* `arguments...` - Any number of arguments to apply to the function.
-
-__Example__
-
-```js
-var hello = function(name, callback){
- setTimeout(function(){
- callback(null, {hello: name});
- }, 1000);
-};
-```
-```js
-node> async.dir(hello, 'world');
-{hello: 'world'}
-```
-
----------------------------------------
-
-
-### noConflict()
-
-Changes the value of `async` back to its original value, returning a reference to the
-`async` object.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/component.json b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/component.json
deleted file mode 100644
index bbb01154..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/component.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "async",
- "repo": "caolan/async",
- "description": "Higher-order functions and common patterns for asynchronous code",
- "version": "0.1.23",
- "keywords": [],
- "dependencies": {},
- "development": {},
- "main": "lib/async.js",
- "scripts": [ "lib/async.js" ]
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
deleted file mode 100755
index 01e8afcc..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*!
- * async
- * https://github.com/caolan/async
- *
- * Copyright 2010-2014 Caolan McMahon
- * Released under the MIT license
- */
-/*jshint onevar: false, indent:4 */
-/*global setImmediate: false, setTimeout: false, console: false */
-(function () {
-
- var async = {};
-
- // global on the server, window in the browser
- var root, previous_async;
-
- root = this;
- if (root != null) {
- previous_async = root.async;
- }
-
- async.noConflict = function () {
- root.async = previous_async;
- return async;
- };
-
- function only_once(fn) {
- var called = false;
- return function() {
- if (called) throw new Error("Callback was already called.");
- called = true;
- fn.apply(root, arguments);
- }
- }
-
- //// cross-browser compatiblity functions ////
-
- var _toString = Object.prototype.toString;
-
- var _isArray = Array.isArray || function (obj) {
- return _toString.call(obj) === '[object Array]';
- };
-
- var _each = function (arr, iterator) {
- if (arr.forEach) {
- return arr.forEach(iterator);
- }
- for (var i = 0; i < arr.length; i += 1) {
- iterator(arr[i], i, arr);
- }
- };
-
- var _map = function (arr, iterator) {
- if (arr.map) {
- return arr.map(iterator);
- }
- var results = [];
- _each(arr, function (x, i, a) {
- results.push(iterator(x, i, a));
- });
- return results;
- };
-
- var _reduce = function (arr, iterator, memo) {
- if (arr.reduce) {
- return arr.reduce(iterator, memo);
- }
- _each(arr, function (x, i, a) {
- memo = iterator(memo, x, i, a);
- });
- return memo;
- };
-
- var _keys = function (obj) {
- if (Object.keys) {
- return Object.keys(obj);
- }
- var keys = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- keys.push(k);
- }
- }
- return keys;
- };
-
- //// exported async module functions ////
-
- //// nextTick implementation with browser-compatible fallback ////
- if (typeof process === 'undefined' || !(process.nextTick)) {
- if (typeof setImmediate === 'function') {
- async.nextTick = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- async.setImmediate = async.nextTick;
- }
- else {
- async.nextTick = function (fn) {
- setTimeout(fn, 0);
- };
- async.setImmediate = async.nextTick;
- }
- }
- else {
- async.nextTick = process.nextTick;
- if (typeof setImmediate !== 'undefined') {
- async.setImmediate = function (fn) {
- // not a direct alias for IE10 compatibility
- setImmediate(fn);
- };
- }
- else {
- async.setImmediate = async.nextTick;
- }
- }
-
- async.each = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- _each(arr, function (x) {
- iterator(x, only_once(done) );
- });
- function done(err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- }
- }
- };
- async.forEach = async.each;
-
- async.eachSeries = function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length) {
- return callback();
- }
- var completed = 0;
- var iterate = function () {
- iterator(arr[completed], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- iterate();
- }
- }
- });
- };
- iterate();
- };
- async.forEachSeries = async.eachSeries;
-
- async.eachLimit = function (arr, limit, iterator, callback) {
- var fn = _eachLimit(limit);
- fn.apply(null, [arr, iterator, callback]);
- };
- async.forEachLimit = async.eachLimit;
-
- var _eachLimit = function (limit) {
-
- return function (arr, iterator, callback) {
- callback = callback || function () {};
- if (!arr.length || limit <= 0) {
- return callback();
- }
- var completed = 0;
- var started = 0;
- var running = 0;
-
- (function replenish () {
- if (completed >= arr.length) {
- return callback();
- }
-
- while (running < limit && started < arr.length) {
- started += 1;
- running += 1;
- iterator(arr[started - 1], function (err) {
- if (err) {
- callback(err);
- callback = function () {};
- }
- else {
- completed += 1;
- running -= 1;
- if (completed >= arr.length) {
- callback();
- }
- else {
- replenish();
- }
- }
- });
- }
- })();
- };
- };
-
-
- var doParallel = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.each].concat(args));
- };
- };
- var doParallelLimit = function(limit, fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [_eachLimit(limit)].concat(args));
- };
- };
- var doSeries = function (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments);
- return fn.apply(null, [async.eachSeries].concat(args));
- };
- };
-
-
- var _asyncMap = function (eachfn, arr, iterator, callback) {
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- if (!callback) {
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err) {
- callback(err);
- });
- });
- } else {
- var results = [];
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (err, v) {
- results[x.index] = v;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
- async.map = doParallel(_asyncMap);
- async.mapSeries = doSeries(_asyncMap);
- async.mapLimit = function (arr, limit, iterator, callback) {
- return _mapLimit(limit)(arr, iterator, callback);
- };
-
- var _mapLimit = function(limit) {
- return doParallelLimit(limit, _asyncMap);
- };
-
- // reduce only has a series version, as doing reduce in parallel won't
- // work in many situations.
- async.reduce = function (arr, memo, iterator, callback) {
- async.eachSeries(arr, function (x, callback) {
- iterator(memo, x, function (err, v) {
- memo = v;
- callback(err);
- });
- }, function (err) {
- callback(err, memo);
- });
- };
- // inject alias
- async.inject = async.reduce;
- // foldl alias
- async.foldl = async.reduce;
-
- async.reduceRight = function (arr, memo, iterator, callback) {
- var reversed = _map(arr, function (x) {
- return x;
- }).reverse();
- async.reduce(reversed, memo, iterator, callback);
- };
- // foldr alias
- async.foldr = async.reduceRight;
-
- var _filter = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.filter = doParallel(_filter);
- async.filterSeries = doSeries(_filter);
- // select alias
- async.select = async.filter;
- async.selectSeries = async.filterSeries;
-
- var _reject = function (eachfn, arr, iterator, callback) {
- var results = [];
- arr = _map(arr, function (x, i) {
- return {index: i, value: x};
- });
- eachfn(arr, function (x, callback) {
- iterator(x.value, function (v) {
- if (!v) {
- results.push(x);
- }
- callback();
- });
- }, function (err) {
- callback(_map(results.sort(function (a, b) {
- return a.index - b.index;
- }), function (x) {
- return x.value;
- }));
- });
- };
- async.reject = doParallel(_reject);
- async.rejectSeries = doSeries(_reject);
-
- var _detect = function (eachfn, arr, iterator, main_callback) {
- eachfn(arr, function (x, callback) {
- iterator(x, function (result) {
- if (result) {
- main_callback(x);
- main_callback = function () {};
- }
- else {
- callback();
- }
- });
- }, function (err) {
- main_callback();
- });
- };
- async.detect = doParallel(_detect);
- async.detectSeries = doSeries(_detect);
-
- async.some = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (v) {
- main_callback(true);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(false);
- });
- };
- // any alias
- async.any = async.some;
-
- async.every = function (arr, iterator, main_callback) {
- async.each(arr, function (x, callback) {
- iterator(x, function (v) {
- if (!v) {
- main_callback(false);
- main_callback = function () {};
- }
- callback();
- });
- }, function (err) {
- main_callback(true);
- });
- };
- // all alias
- async.all = async.every;
-
- async.sortBy = function (arr, iterator, callback) {
- async.map(arr, function (x, callback) {
- iterator(x, function (err, criteria) {
- if (err) {
- callback(err);
- }
- else {
- callback(null, {value: x, criteria: criteria});
- }
- });
- }, function (err, results) {
- if (err) {
- return callback(err);
- }
- else {
- var fn = function (left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- };
- callback(null, _map(results.sort(fn), function (x) {
- return x.value;
- }));
- }
- });
- };
-
- async.auto = function (tasks, callback) {
- callback = callback || function () {};
- var keys = _keys(tasks);
- var remainingTasks = keys.length
- if (!remainingTasks) {
- return callback();
- }
-
- var results = {};
-
- var listeners = [];
- var addListener = function (fn) {
- listeners.unshift(fn);
- };
- var removeListener = function (fn) {
- for (var i = 0; i < listeners.length; i += 1) {
- if (listeners[i] === fn) {
- listeners.splice(i, 1);
- return;
- }
- }
- };
- var taskComplete = function () {
- remainingTasks--
- _each(listeners.slice(0), function (fn) {
- fn();
- });
- };
-
- addListener(function () {
- if (!remainingTasks) {
- var theCallback = callback;
- // prevent final callback from calling itself if it errors
- callback = function () {};
-
- theCallback(null, results);
- }
- });
-
- _each(keys, function (k) {
- var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
- var taskCallback = function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- if (err) {
- var safeResults = {};
- _each(_keys(results), function(rkey) {
- safeResults[rkey] = results[rkey];
- });
- safeResults[k] = args;
- callback(err, safeResults);
- // stop subsequent errors hitting callback multiple times
- callback = function () {};
- }
- else {
- results[k] = args;
- async.setImmediate(taskComplete);
- }
- };
- var requires = task.slice(0, Math.abs(task.length - 1)) || [];
- var ready = function () {
- return _reduce(requires, function (a, x) {
- return (a && results.hasOwnProperty(x));
- }, true) && !results.hasOwnProperty(k);
- };
- if (ready()) {
- task[task.length - 1](taskCallback, results);
- }
- else {
- var listener = function () {
- if (ready()) {
- removeListener(listener);
- task[task.length - 1](taskCallback, results);
- }
- };
- addListener(listener);
- }
- });
- };
-
- async.retry = function(times, task, callback) {
- var DEFAULT_TIMES = 5;
- var attempts = [];
- // Use defaults if times not passed
- if (typeof times === 'function') {
- callback = task;
- task = times;
- times = DEFAULT_TIMES;
- }
- // Make sure times is a number
- times = parseInt(times, 10) || DEFAULT_TIMES;
- var wrappedTask = function(wrappedCallback, wrappedResults) {
- var retryAttempt = function(task, finalAttempt) {
- return function(seriesCallback) {
- task(function(err, result){
- seriesCallback(!err || finalAttempt, {err: err, result: result});
- }, wrappedResults);
- };
- };
- while (times) {
- attempts.push(retryAttempt(task, !(times-=1)));
- }
- async.series(attempts, function(done, data){
- data = data[data.length - 1];
- (wrappedCallback || callback)(data.err, data.result);
- });
- }
- // If a callback is passed, run this as a controll flow
- return callback ? wrappedTask() : wrappedTask
- };
-
- async.waterfall = function (tasks, callback) {
- callback = callback || function () {};
- if (!_isArray(tasks)) {
- var err = new Error('First argument to waterfall must be an array of functions');
- return callback(err);
- }
- if (!tasks.length) {
- return callback();
- }
- var wrapIterator = function (iterator) {
- return function (err) {
- if (err) {
- callback.apply(null, arguments);
- callback = function () {};
- }
- else {
- var args = Array.prototype.slice.call(arguments, 1);
- var next = iterator.next();
- if (next) {
- args.push(wrapIterator(next));
- }
- else {
- args.push(callback);
- }
- async.setImmediate(function () {
- iterator.apply(null, args);
- });
- }
- };
- };
- wrapIterator(async.iterator(tasks))();
- };
-
- var _parallel = function(eachfn, tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- eachfn.map(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- eachfn.each(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.parallel = function (tasks, callback) {
- _parallel({ map: async.map, each: async.each }, tasks, callback);
- };
-
- async.parallelLimit = function(tasks, limit, callback) {
- _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
- };
-
- async.series = function (tasks, callback) {
- callback = callback || function () {};
- if (_isArray(tasks)) {
- async.mapSeries(tasks, function (fn, callback) {
- if (fn) {
- fn(function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- callback.call(null, err, args);
- });
- }
- }, callback);
- }
- else {
- var results = {};
- async.eachSeries(_keys(tasks), function (k, callback) {
- tasks[k](function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (args.length <= 1) {
- args = args[0];
- }
- results[k] = args;
- callback(err);
- });
- }, function (err) {
- callback(err, results);
- });
- }
- };
-
- async.iterator = function (tasks) {
- var makeCallback = function (index) {
- var fn = function () {
- if (tasks.length) {
- tasks[index].apply(null, arguments);
- }
- return fn.next();
- };
- fn.next = function () {
- return (index < tasks.length - 1) ? makeCallback(index + 1): null;
- };
- return fn;
- };
- return makeCallback(0);
- };
-
- async.apply = function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- return function () {
- return fn.apply(
- null, args.concat(Array.prototype.slice.call(arguments))
- );
- };
- };
-
- var _concat = function (eachfn, arr, fn, callback) {
- var r = [];
- eachfn(arr, function (x, cb) {
- fn(x, function (err, y) {
- r = r.concat(y || []);
- cb(err);
- });
- }, function (err) {
- callback(err, r);
- });
- };
- async.concat = doParallel(_concat);
- async.concatSeries = doSeries(_concat);
-
- async.whilst = function (test, iterator, callback) {
- if (test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.whilst(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doWhilst = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (test.apply(null, args)) {
- async.doWhilst(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.until = function (test, iterator, callback) {
- if (!test()) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- async.until(test, iterator, callback);
- });
- }
- else {
- callback();
- }
- };
-
- async.doUntil = function (iterator, test, callback) {
- iterator(function (err) {
- if (err) {
- return callback(err);
- }
- var args = Array.prototype.slice.call(arguments, 1);
- if (!test.apply(null, args)) {
- async.doUntil(iterator, test, callback);
- }
- else {
- callback();
- }
- });
- };
-
- async.queue = function (worker, concurrency) {
- if (concurrency === undefined) {
- concurrency = 1;
- }
- function _insert(q, data, pos, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- callback: typeof callback === 'function' ? callback : null
- };
-
- if (pos) {
- q.tasks.unshift(item);
- } else {
- q.tasks.push(item);
- }
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- var workers = 0;
- var q = {
- tasks: [],
- concurrency: concurrency,
- saturated: null,
- empty: null,
- drain: null,
- started: false,
- paused: false,
- push: function (data, callback) {
- _insert(q, data, false, callback);
- },
- kill: function () {
- q.drain = null;
- q.tasks = [];
- },
- unshift: function (data, callback) {
- _insert(q, data, true, callback);
- },
- process: function () {
- if (!q.paused && workers < q.concurrency && q.tasks.length) {
- var task = q.tasks.shift();
- if (q.empty && q.tasks.length === 0) {
- q.empty();
- }
- workers += 1;
- var next = function () {
- workers -= 1;
- if (task.callback) {
- task.callback.apply(task, arguments);
- }
- if (q.drain && q.tasks.length + workers === 0) {
- q.drain();
- }
- q.process();
- };
- var cb = only_once(next);
- worker(task.data, cb);
- }
- },
- length: function () {
- return q.tasks.length;
- },
- running: function () {
- return workers;
- },
- idle: function() {
- return q.tasks.length + workers === 0;
- },
- pause: function () {
- if (q.paused === true) { return; }
- q.paused = true;
- q.process();
- },
- resume: function () {
- if (q.paused === false) { return; }
- q.paused = false;
- q.process();
- }
- };
- return q;
- };
-
- async.priorityQueue = function (worker, concurrency) {
-
- function _compareTasks(a, b){
- return a.priority - b.priority;
- };
-
- function _binarySearch(sequence, item, compare) {
- var beg = -1,
- end = sequence.length - 1;
- while (beg < end) {
- var mid = beg + ((end - beg + 1) >>> 1);
- if (compare(item, sequence[mid]) >= 0) {
- beg = mid;
- } else {
- end = mid - 1;
- }
- }
- return beg;
- }
-
- function _insert(q, data, priority, callback) {
- if (!q.started){
- q.started = true;
- }
- if (!_isArray(data)) {
- data = [data];
- }
- if(data.length == 0) {
- // call drain immediately if there are no tasks
- return async.setImmediate(function() {
- if (q.drain) {
- q.drain();
- }
- });
- }
- _each(data, function(task) {
- var item = {
- data: task,
- priority: priority,
- callback: typeof callback === 'function' ? callback : null
- };
-
- q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
-
- if (q.saturated && q.tasks.length === q.concurrency) {
- q.saturated();
- }
- async.setImmediate(q.process);
- });
- }
-
- // Start with a normal queue
- var q = async.queue(worker, concurrency);
-
- // Override push to accept second parameter representing priority
- q.push = function (data, priority, callback) {
- _insert(q, data, priority, callback);
- };
-
- // Remove unshift function
- delete q.unshift;
-
- return q;
- };
-
- async.cargo = function (worker, payload) {
- var working = false,
- tasks = [];
-
- var cargo = {
- tasks: tasks,
- payload: payload,
- saturated: null,
- empty: null,
- drain: null,
- drained: true,
- push: function (data, callback) {
- if (!_isArray(data)) {
- data = [data];
- }
- _each(data, function(task) {
- tasks.push({
- data: task,
- callback: typeof callback === 'function' ? callback : null
- });
- cargo.drained = false;
- if (cargo.saturated && tasks.length === payload) {
- cargo.saturated();
- }
- });
- async.setImmediate(cargo.process);
- },
- process: function process() {
- if (working) return;
- if (tasks.length === 0) {
- if(cargo.drain && !cargo.drained) cargo.drain();
- cargo.drained = true;
- return;
- }
-
- var ts = typeof payload === 'number'
- ? tasks.splice(0, payload)
- : tasks.splice(0, tasks.length);
-
- var ds = _map(ts, function (task) {
- return task.data;
- });
-
- if(cargo.empty) cargo.empty();
- working = true;
- worker(ds, function () {
- working = false;
-
- var args = arguments;
- _each(ts, function (data) {
- if (data.callback) {
- data.callback.apply(null, args);
- }
- });
-
- process();
- });
- },
- length: function () {
- return tasks.length;
- },
- running: function () {
- return working;
- }
- };
- return cargo;
- };
-
- var _console_fn = function (name) {
- return function (fn) {
- var args = Array.prototype.slice.call(arguments, 1);
- fn.apply(null, args.concat([function (err) {
- var args = Array.prototype.slice.call(arguments, 1);
- if (typeof console !== 'undefined') {
- if (err) {
- if (console.error) {
- console.error(err);
- }
- }
- else if (console[name]) {
- _each(args, function (x) {
- console[name](x);
- });
- }
- }
- }]));
- };
- };
- async.log = _console_fn('log');
- async.dir = _console_fn('dir');
- /*async.info = _console_fn('info');
- async.warn = _console_fn('warn');
- async.error = _console_fn('error');*/
-
- async.memoize = function (fn, hasher) {
- var memo = {};
- var queues = {};
- hasher = hasher || function (x) {
- return x;
- };
- var memoized = function () {
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- var key = hasher.apply(null, args);
- if (key in memo) {
- async.nextTick(function () {
- callback.apply(null, memo[key]);
- });
- }
- else if (key in queues) {
- queues[key].push(callback);
- }
- else {
- queues[key] = [callback];
- fn.apply(null, args.concat([function () {
- memo[key] = arguments;
- var q = queues[key];
- delete queues[key];
- for (var i = 0, l = q.length; i < l; i++) {
- q[i].apply(null, arguments);
- }
- }]));
- }
- };
- memoized.memo = memo;
- memoized.unmemoized = fn;
- return memoized;
- };
-
- async.unmemoize = function (fn) {
- return function () {
- return (fn.unmemoized || fn).apply(null, arguments);
- };
- };
-
- async.times = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.map(counter, iterator, callback);
- };
-
- async.timesSeries = function (count, iterator, callback) {
- var counter = [];
- for (var i = 0; i < count; i++) {
- counter.push(i);
- }
- return async.mapSeries(counter, iterator, callback);
- };
-
- async.seq = function (/* functions... */) {
- var fns = arguments;
- return function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- async.reduce(fns, args, function (newargs, fn, cb) {
- fn.apply(that, newargs.concat([function () {
- var err = arguments[0];
- var nextargs = Array.prototype.slice.call(arguments, 1);
- cb(err, nextargs);
- }]))
- },
- function (err, results) {
- callback.apply(that, [err].concat(results));
- });
- };
- };
-
- async.compose = function (/* functions... */) {
- return async.seq.apply(null, Array.prototype.reverse.call(arguments));
- };
-
- var _applyEach = function (eachfn, fns /*args...*/) {
- var go = function () {
- var that = this;
- var args = Array.prototype.slice.call(arguments);
- var callback = args.pop();
- return eachfn(fns, function (fn, cb) {
- fn.apply(that, args.concat([cb]));
- },
- callback);
- };
- if (arguments.length > 2) {
- var args = Array.prototype.slice.call(arguments, 2);
- return go.apply(this, args);
- }
- else {
- return go;
- }
- };
- async.applyEach = doParallel(_applyEach);
- async.applyEachSeries = doSeries(_applyEach);
-
- async.forever = function (fn, callback) {
- function next(err) {
- if (err) {
- if (callback) {
- return callback(err);
- }
- throw err;
- }
- fn(next);
- }
- next();
- };
-
- // Node.js
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = async;
- }
- // AMD / RequireJS
- else if (typeof define !== 'undefined' && define.amd) {
- define([], function () {
- return async;
- });
- }
- // included directly via \n\n```\n\n## Documentation\n\n### Collections\n\n* [`each`](#each)\n* [`eachSeries`](#eachSeries)\n* [`eachLimit`](#eachLimit)\n* [`map`](#map)\n* [`mapSeries`](#mapSeries)\n* [`mapLimit`](#mapLimit)\n* [`filter`](#filter)\n* [`filterSeries`](#filterSeries)\n* [`reject`](#reject)\n* [`rejectSeries`](#rejectSeries)\n* [`reduce`](#reduce)\n* [`reduceRight`](#reduceRight)\n* [`detect`](#detect)\n* [`detectSeries`](#detectSeries)\n* [`sortBy`](#sortBy)\n* [`some`](#some)\n* [`every`](#every)\n* [`concat`](#concat)\n* [`concatSeries`](#concatSeries)\n\n### Control Flow\n\n* [`series`](#seriestasks-callback)\n* [`parallel`](#parallel)\n* [`parallelLimit`](#parallellimittasks-limit-callback)\n* [`whilst`](#whilst)\n* [`doWhilst`](#doWhilst)\n* [`until`](#until)\n* [`doUntil`](#doUntil)\n* [`forever`](#forever)\n* [`waterfall`](#waterfall)\n* [`compose`](#compose)\n* [`seq`](#seq)\n* [`applyEach`](#applyEach)\n* [`applyEachSeries`](#applyEachSeries)\n* [`queue`](#queue)\n* [`priorityQueue`](#priorityQueue)\n* [`cargo`](#cargo)\n* [`auto`](#auto)\n* [`retry`](#retry)\n* [`iterator`](#iterator)\n* [`apply`](#apply)\n* [`nextTick`](#nextTick)\n* [`times`](#times)\n* [`timesSeries`](#timesSeries)\n\n### Utils\n\n* [`memoize`](#memoize)\n* [`unmemoize`](#unmemoize)\n* [`log`](#log)\n* [`dir`](#dir)\n* [`noConflict`](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies the function `iterator` to each item in `arr`, in parallel.\nThe `iterator` is called with an item from the list, and a callback for when it\nhas finished. If the `iterator` passes an error to its `callback`, the main\n`callback` (for the `each` function) is immediately called with the error.\n\nNote, that since this function applies `iterator` to each item in parallel,\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has \n completed. If no error has occured, the `callback` should be run without \n arguments or with an explicit `null` argument.\n* `callback(err)` - A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Examples__\n\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n```js\n// assuming openFiles is an array of file names \n\nasync.each(openFiles, function( file, callback) {\n \n // Perform operation on file here.\n console.log('Processing file ' + file);\n \n if( file.length > 32 ) {\n console.log('This file name is too long');\n callback('File name too long');\n } else {\n // Do work to process file here\n console.log('File processed');\n callback();\n }\n}, function(err){\n // if any of the file processing produced an error, err would equal that error\n if( err ) {\n // One of the iterations produced an error.\n // All processing will now stop.\n console.log('A file failed to process');\n } else {\n console.log('All files have been processed successfully');\n }\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as [`each`](#each), only `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThis means the `iterator` functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously \nrunning at any time.\n\nNote that the items in `arr` are not processed in batches, so there is no guarantee that \nthe first `limit` `iterator` functions will complete before any others are started.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `limit` - The maximum number of `iterator`s to run at any time.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err)` which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit `null` argument.\n* `callback(err)` - A callback which is called when all `iterator` functions\n have finished, or an error occurs.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in `arr` through\nthe `iterator` function. The `iterator` is called with an item from `arr` and a\ncallback for when it has finished processing. Each of these callback takes 2 arguments: \nan `error`, and the transformed item from `arr`. If `iterator` passes an error to this \ncallback, the main `callback` (for the `map` function) is immediately called with the error.\n\nNote, that since this function applies the `iterator` to each item in parallel,\nthere is no guarantee that the `iterator` functions will complete in order. \nHowever, the results array will be in the same order as the original `arr`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once \n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - A callback which is called when all `iterator`\n functions have finished, or an error occurs. Results is an array of the\n transformed items from the `arr`.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as [`map`](#map), only the `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that \nthe first `limit` `iterator` functions will complete before any others are started.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `limit` - The maximum number of `iterator`s to run at any time.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, transformed)` which must be called once \n it has completed with an error (which can be `null`) and a transformed item.\n* `callback(err, results)` - A callback which is called when all `iterator`\n calls have finished, or an error occurs. The result is an array of the\n transformed items from the original `arr`.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ `select`\n\nReturns a new array of all the values in `arr` which pass an async truth test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The `iterator` is passed a `callback(truthValue)`, which must be called with a \n boolean argument once it has completed.\n* `callback(results)` - A callback which is called after all the `iterator`\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n\n### filterSeries(arr, iterator, callback)\n\n__Alias:__ `selectSeries`\n\nThe same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of [`filter`](#filter). Removes values that pass an `async` truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as [`reject`](#reject), only the `iterator` is applied to each item in `arr`\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__Aliases:__ `inject`, `foldl`\n\nReduces `arr` into a single value using an async `iterator` to return\neach successive step. `memo` is the initial state of the reduction. \nThis function only operates in series. \n\nFor performance reasons, it may make sense to split a call to this function into \na parallel map, and then use the normal `Array.prototype.reduce` on the results. \nThis function is for situations where each step in the reduction needs to be async; \nif you can get the data before reducing it, then it's probably a good idea to do so.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `memo` - The initial state of the reduction.\n* `iterator(memo, item, callback)` - A function applied to each item in the\n array to produce the next step in the reduction. The `iterator` is passed a\n `callback(err, reduction)` which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main `callback` is \n immediately called with the error.\n* `callback(err, result)` - A callback which is called after all the `iterator`\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ `foldr`\n\nSame as [`reduce`](#reduce), only operates on `arr` in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in `arr` that passes an async truth test. The\n`iterator` is applied in parallel, meaning the first iterator to return `true` will\nfire the detect `callback` with that result. That means the result might not be\nthe first item in the original `arr` (in terms of order) that passes the test.\n\nIf order within the original `arr` is important, then look at [`detectSeries`](#detectSeries).\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in `arr`.\n The iterator is passed a `callback(truthValue)` which must be called with a \n boolean argument once it has completed.\n* `callback(result)` - A callback which is called as soon as any iterator returns\n `true`, or after all the `iterator` functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value `undefined` if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as [`detect`](#detect), only the `iterator` is applied to each item in `arr`\nin series. This means the result is always the first in the original `arr` (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each `arr` value through an async `iterator`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, sortValue)` which must be called once it\n has completed with an error (which can be `null`) and a value to use as the sort\n criteria.\n* `callback(err, results)` - A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is the items from\n the original `arr` sorted by the values returned by the `iterator` calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n__Sort Order__\n\nBy modifying the callback parameter the sorting order can be influenced:\n\n```js\n//ascending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(err, x);\n}, function(err,result){\n //result callback\n} );\n\n//descending order\nasync.sortBy([1,9,3,5], function(x, callback){\n callback(err, x*-1); //<- x*-1 instead of x, turns the order around\n}, function(err,result){\n //result callback\n} );\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ `any`\n\nReturns `true` if at least one element in the `arr` satisfies an async test.\n_The callback for each iterator call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`. Once any iterator\ncall returns `true`, the main `callback` is immediately called.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a callback(truthValue) which must be \n called with a boolean argument once it has completed.\n* `callback(result)` - A callback which is called as soon as any iterator returns\n `true`, or after all the iterator functions have finished. Result will be\n either `true` or `false` depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ `all`\n\nReturns `true` if every element in `arr` satisfies an async test.\n_The callback for each `iterator` call only accepts a single argument of `true` or\n`false`; it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like `fs.exists`.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A truth test to apply to each item in the array\n in parallel. The iterator is passed a callback(truthValue) which must be \n called with a boolean argument once it has completed.\n* `callback(result)` - A callback which is called after all the `iterator`\n functions have finished. Result will be either `true` or `false` depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies `iterator` to each item in `arr`, concatenating the results. Returns the\nconcatenated list. The `iterator`s are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of `arr` passed to the `iterator` function.\n\n__Arguments__\n\n* `arr` - An array to iterate over.\n* `iterator(item, callback)` - A function to apply to each item in `arr`.\n The iterator is passed a `callback(err, results)` which must be called once it \n has completed with an error (which can be `null`) and an array of results.\n* `callback(err, results)` - A callback which is called after all the `iterator`\n functions have finished, or an error occurs. Results is an array containing\n the concatenated results of the `iterator` function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as [`concat`](#concat), but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun the functions in the `tasks` array in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run, and `callback` is immediately called with the value of the error. \nOtherwise, `callback` receives an array of results when `tasks` have completed.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function, and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`series`](#series).\n\n**Note** that while many implementations preserve the order of object properties, the\n[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) \nexplicitly states that\n\n> The mechanics and order of enumerating the properties is not specified.\n\nSo if you rely on the order in which your series of functions are executed, and want\nthis to work on all platforms, consider using an array. \n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed\n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the `task` callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun the `tasks` array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main `callback` is immediately called with the value of the error.\nOnce the `tasks` have completed, the results are passed to the final `callback` as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final `callback` as an object\ninstead of an array. This can be a more readable way of handling results from\n[`parallel`](#parallel).\n\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run. Each function is passed \n a `callback(err, result)` which it must call on completion with an error `err` \n (which can be `null`) and an optional `result` value.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as [`parallel`](#parallel), only `tasks` are executed in parallel \nwith a maximum of `limit` tasks executing at any time.\n\nNote that the `tasks` are not executed in batches, so there is no guarantee that \nthe first `limit` tasks will complete before any others are started.\n\n__Arguments__\n\n* `tasks` - An array or object containing functions to run, each function is passed \n a `callback(err, result)` it must call on completion with an error `err` (which can\n be `null`) and an optional `result` value.\n* `limit` - The maximum number of `tasks` to run at any time.\n* `callback(err, results)` - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the `task` callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\n__Arguments__\n\n* `test()` - synchronous truth test to perform before each execution of `fn`.\n* `fn(callback)` - A function which is called each time `test` passes. The function is\n passed a `callback(err)`, which must be called once it has completed with an \n optional `err` argument.\n* `callback(err)` - A callback which is called after the test fails and repeated\n execution of `fn` has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post-check version of [`whilst`](#whilst). To reflect the difference in \nthe order of operations, the arguments `test` and `fn` are switched. \n\n`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped,\nor an error occurs.\n\nThe inverse of [`whilst`](#whilst).\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, errback)\n\nCalls the asynchronous function `fn` with a callback parameter that allows it to\ncall itself again, in series, indefinitely.\n\nIf an error is passed to the callback then `errback` is called with the\nerror, and execution stops, otherwise it will never be called.\n\n```js\nasync.forever(\n function(next) {\n // next is suitable for passing to things that need a callback(err [, whatever]);\n // it will result in this function being called again.\n },\n function(err) {\n // if next is called with a value in its first parameter, it will appear\n // in here as 'err', and execution will stop.\n }\n);\n```\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns the `tasks` array of functions in series, each passing their results to the next in\nthe array. However, if any of the `tasks` pass an error to their own callback, the\nnext function is not executed, and the main `callback` is immediately called with\nthe error.\n\n__Arguments__\n\n* `tasks` - An array of functions to run, each function is passed a \n `callback(err, result1, result2, ...)` it must call on completion. The first\n argument is an error (which can be `null`) and any further arguments will be \n passed as arguments in order to the next task.\n* `callback(err, [results])` - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n // arg1 now equals 'one' and arg2 now equals 'two'\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions `f()`, `g()`, and `h()` would produce the result of\n`f(g(h()))`, only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* `functions...` - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### seq(fn1, fn2...)\n\nVersion of the compose function that is more natural to read.\nEach following function consumes the return value of the latter function. \n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\n// Requires lodash (or underscore), express3 and dresende's orm2.\n// Part of an app, that fetches cats of the logged user.\n// This example uses `seq` function to avoid overnesting and error \n// handling clutter.\napp.get('/cats', function(request, response) {\n function handleError(err, data, callback) {\n if (err) {\n console.error(err);\n response.json({ status: 'error', message: err.message });\n }\n else {\n callback(data);\n }\n }\n var User = request.models.User;\n async.seq(\n _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))\n handleError,\n function(user, fn) {\n user.getCats(fn); // 'getCats' has signature (callback(err, data))\n },\n handleError,\n function(cats) {\n response.json({ status: 'ok', message: 'Cats found', data: cats });\n }\n )(req.session.user_id);\n }\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling \n`callback` after all functions have completed. If you only provide the first\nargument, then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* `fns` - the asynchronous functions to all call with the same arguments\n* `args...` - any number of separate arguments to pass to the function\n* `callback` - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as [`applyEach`](#applyEach) only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a `queue` object with the specified `concurrency`. Tasks added to the\n`queue` are processed in parallel (up to the `concurrency` limit). If all\n`worker`s are in progress, the task is queued until one becomes available. \nOnce a `worker` completes a `task`, that `task`'s callback is called.\n\n__Arguments__\n\n* `worker(task, callback)` - An asynchronous function for processing a queued\n task, which must call its `callback(err)` argument when finished, with an \n optional `error` as an argument.\n* `concurrency` - An `integer` for determining how many `worker` functions should be\n run in parallel.\n\n__Queue objects__\n\nThe `queue` object returned by this function has the following properties and\nmethods:\n\n* `length()` - a function returning the number of items waiting to be processed.\n* `started` - a function returning whether or not any items have been pushed and processed by the queue\n* `running()` - a function returning the number of items currently being processed.\n* `idle()` - a function returning false if there are items waiting or being processed, or true if not.\n* `concurrency` - an integer for determining how many `worker` functions should be\n run in parallel. This property can be changed after a `queue` is created to\n alter the concurrency on-the-fly.\n* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once \n the `worker` has finished processing the task. Instead of a single task, a `tasks` array\n can be submitted. The respective callback is used for every task in the list.\n* `unshift(task, [callback])` - add a new task to the front of the `queue`.\n* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, \n and further tasks will be queued.\n* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`.\n* `paused` - a boolean for determining whether the queue is in a paused state\n* `pause()` - a function that pauses the processing of tasks until `resume()` is called.\n* `resume()` - a function that resumes the processing of queued tasks when the queue is paused.\n* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle.\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n\n---------------------------------------\n\n\n### priorityQueue(worker, concurrency)\n\nThe same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects:\n\n* `push(task, priority, [callback])` - `priority` should be a number. If an array of\n `tasks` is given, all tasks will be assigned the same priority.\n* The `unshift` method was removed.\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a `cargo` object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the `payload` limit). If the\n`worker` is in progress, the task is queued until it becomes available. Once\nthe `worker` has completed some tasks, each callback of those tasks is called.\nCheck out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work.\n\nWhile [queue](#queue) passes only one task to one of a group of workers\nat a time, cargo passes an array of tasks to a single worker, repeating\nwhen the worker is finished.\n\n__Arguments__\n\n* `worker(tasks, callback)` - An asynchronous function for processing an array of\n queued tasks, which must call its `callback(err)` argument when finished, with \n an optional `err` argument.\n* `payload` - An optional `integer` for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe `cargo` object returned by this function has the following properties and\nmethods:\n\n* `length()` - A function returning the number of items waiting to be processed.\n* `payload` - An `integer` for determining how many tasks should be\n process per round. This property can be changed after a `cargo` is created to\n alter the payload on-the-fly.\n* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called\n once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` \n can be submitted. The respective callback is used for every task in the list.\n* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued.\n* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`.\n* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`.\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running the functions in `tasks`, based on their \nrequirements. Each function can optionally depend on other functions being completed \nfirst, and each function is run as soon as its requirements are satisfied. \n\nIf any of the functions pass an error to their callback, it will not \ncomplete (so any other functions depending on it will not run), and the main \n`callback` is immediately called with the error. Functions also receive an \nobject containing the results of functions which have completed so far.\n\nNote, all functions are called with a `results` object as a second argument, \nso it is unsafe to pass functions in the `tasks` object which cannot handle the\nextra argument. \n\nFor example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling `readFile` with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to `readFile` in a function which does not forward the \n`results` object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* `tasks` - An object. Each of its properties is either a function or an array of\n requirements, with the function itself the last item in the array. The object's key\n of a property serves as the name of the task defined by that property,\n i.e. can be used when specifying requirements for other tasks.\n The function receives two arguments: (1) a `callback(err, result)` which must be \n called when finished, passing an `error` (which can be `null`) and the result of \n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions.\n* `callback(err, results)` - An optional callback which is called when all the\n tasks have been completed. It receives the `err` argument if any `tasks` \n pass an error to their callback. Results are always returned; however, if \n an error occurs, no further `tasks` will be performed, and the results\n object will only contain partial results.\n\n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n make_folder: function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n },\n write_file: ['get_data', 'make_folder', function(callback, results){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, 'filename');\n }],\n email_link: ['write_file', function(callback, results){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n callback(null, {'file':results.write_file, 'email':'user@example.com'});\n }]\n}, function(err, results) {\n console.log('err = ', err);\n console.log('results = ', results);\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n console.log('in get_data');\n // async code to get some data\n callback(null, 'data', 'converted to array');\n },\n function(callback){\n console.log('in make_folder');\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n callback(null, 'folder');\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n console.log('in write_file', JSON.stringify(results));\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n results.push('filename');\n callback(null);\n },\n function(callback){\n console.log('in email_link', JSON.stringify(results));\n // once the file is written let's email a link to it...\n callback(null, {'file':results.pop(), 'email':'user@example.com'});\n }\n ]);\n});\n```\n\nFor a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding\nnew tasks much easier (and the code more readable).\n\n\n---------------------------------------\n\n\n### retry([times = 5], task, [callback])\n\nAttempts to get a successful response from `task` no more than `times` times before\nreturning an error. If the task is successful, the `callback` will be passed the result\nof the successfull task. If all attemps fail, the callback will be passed the error and\nresult (if any) of the final attempt.\n\n__Arguments__\n\n* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5.\n* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)`\n which must be called when finished, passing `err` (which can be `null`) and the `result` of \n the function's execution, and (2) a `results` object, containing the results of\n the previously executed functions (if nested inside another control flow).\n* `callback(err, results)` - An optional callback which is called when the\n task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`.\n\nThe [`retry`](#retry) function can be used as a stand-alone control flow by passing a\ncallback, as shown below:\n\n```js\nasync.retry(3, apiMethod, function(err, result) {\n // do something with the result\n});\n```\n\nIt can also be embeded within other control flow functions to retry individual methods\nthat are not as reliable, like this:\n\n```js\nasync.auto({\n users: api.getUsers.bind(api),\n payments: async.retry(3, api.getPayments.bind(api))\n}, function(err, results) {\n // do something with the results\n});\n```\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the `tasks` array,\nreturning a continuation to call the next one after that. It's also possible to\n“peek” at the next iterator with `iterator.next()`.\n\nThis function is used internally by the `async` module, but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* `tasks` - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied. \n\nUseful as a shorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls `callback` on a later loop around the event loop. In Node.js this just\ncalls `process.nextTick`; in the browser it falls back to `setImmediate(callback)`\nif available, otherwise `setTimeout(callback, 0)`, which means other higher priority\nevents may precede the execution of `callback`.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* `callback` - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the `callback` function `n` times, and accumulates results in the same manner\nyou would use with [`map`](#map).\n\n__Arguments__\n\n* `n` - The number of times to run the function.\n* `callback` - The function to call `n` times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as [`times`](#times), only the iterator is applied to each item in `arr` in\nseries. The next `iterator` is only called once the current one has completed. \nThe results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an `async` function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* `fn` - The function to proxy and cache results from.\n* `hasher` - Tn optional function for generating a custom hash for storing\n results. It has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized\nform. Handy for testing.\n\n__Arguments__\n\n* `fn` - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an `async` function to the `console`. Only works in Node.js or\nin browsers that support `console.log` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.log` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an `async` function to the `console` using `console.dir` to\ndisplay the properties of the resulting object. Only works in Node.js or\nin browsers that support `console.dir` and `console.error` (such as FF and Chrome).\nIf multiple arguments are returned from the async function, `console.dir` is\ncalled on each argument in order.\n\n__Arguments__\n\n* `function` - The function you want to eventually apply all arguments to.\n* `arguments...` - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of `async` back to its original value, returning a reference to the\n`async` object.\n",
- "readmeFilename": "README.md",
- "_id": "async@0.9.0",
- "dist": {
- "shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7"
- },
- "_from": "async@~0.9.0",
- "_resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore
deleted file mode 100644
index aba34f01..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.un~
-/node_modules
-/test/tmp
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/License b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/License
deleted file mode 100644
index 4804b7ab..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2011 Debuggable Limited
-
-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/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile
deleted file mode 100644
index b4ff85a3..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-SHELL := /bin/bash
-
-test:
- @./test/run.js
-
-.PHONY: test
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md
deleted file mode 100644
index 1a9999eb..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# combined-stream
-
-A stream that emits multiple other streams one after another.
-
-## Installation
-
-``` bash
-npm install combined-stream
-```
-
-## Usage
-
-Here is a simple example that shows how you can use combined-stream to combine
-two files into one:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create();
-combinedStream.append(fs.createReadStream('file1.txt'));
-combinedStream.append(fs.createReadStream('file2.txt'));
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-While the example above works great, it will pause all source streams until
-they are needed. If you don't want that to happen, you can set `pauseStreams`
-to `false`:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create({pauseStreams: false});
-combinedStream.append(fs.createReadStream('file1.txt'));
-combinedStream.append(fs.createReadStream('file2.txt'));
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-However, what if you don't have all the source streams yet, or you don't want
-to allocate the resources (file descriptors, memory, etc.) for them right away?
-Well, in that case you can simply provide a callback that supplies the stream
-by calling a `next()` function:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create();
-combinedStream.append(function(next) {
- next(fs.createReadStream('file1.txt'));
-});
-combinedStream.append(function(next) {
- next(fs.createReadStream('file2.txt'));
-});
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-## API
-
-### CombinedStream.create([options])
-
-Returns a new combined stream object. Available options are:
-
-* `maxDataSize`
-* `pauseStreams`
-
-The effect of those options is described below.
-
-### combinedStream.pauseStreams = true
-
-Whether to apply back pressure to the underlaying streams. If set to `false`,
-the underlaying streams will never be paused. If set to `true`, the
-underlaying streams will be paused right after being appended, as well as when
-`delayedStream.pipe()` wants to throttle.
-
-### combinedStream.maxDataSize = 2 * 1024 * 1024
-
-The maximum amount of bytes (or characters) to buffer for all source streams.
-If this value is exceeded, `combinedStream` emits an `'error'` event.
-
-### combinedStream.dataSize = 0
-
-The amount of bytes (or characters) currently buffered by `combinedStream`.
-
-### combinedStream.append(stream)
-
-Appends the given `stream` to the combinedStream object. If `pauseStreams` is
-set to `true, this stream will also be paused right away.
-
-`streams` can also be a function that takes one parameter called `next`. `next`
-is a function that must be invoked in order to provide the `next` stream, see
-example above.
-
-Regardless of how the `stream` is appended, combined-stream always attaches an
-`'error'` listener to it, so you don't have to do that manually.
-
-Special case: `stream` can also be a String or Buffer.
-
-### combinedStream.write(data)
-
-You should not call this, `combinedStream` takes care of piping the appended
-streams into itself for you.
-
-### combinedStream.resume()
-
-Causes `combinedStream` to start drain the streams it manages. The function is
-idempotent, and also emits a `'resume'` event each time which usually goes to
-the stream that is currently being drained.
-
-### combinedStream.pause();
-
-If `combinedStream.pauseStreams` is set to `false`, this does nothing.
-Otherwise a `'pause'` event is emitted, this goes to the stream that is
-currently being drained, so you can use it to apply back pressure.
-
-### combinedStream.end();
-
-Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
-all streams from the queue.
-
-### combinedStream.destroy();
-
-Same as `combinedStream.end()`, except it emits a `'close'` event instead of
-`'end'`.
-
-## License
-
-combined-stream is licensed under the MIT license.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js
deleted file mode 100644
index 32849fd1..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js
+++ /dev/null
@@ -1,185 +0,0 @@
-var util = require('util');
-var Stream = require('stream').Stream;
-var DelayedStream = require('delayed-stream');
-
-module.exports = CombinedStream;
-function CombinedStream() {
- this.writable = false;
- this.readable = true;
- this.dataSize = 0;
- this.maxDataSize = 2 * 1024 * 1024;
- this.pauseStreams = true;
-
- this._released = false;
- this._streams = [];
- this._currentStream = null;
-}
-util.inherits(CombinedStream, Stream);
-
-CombinedStream.create = function(options) {
- var combinedStream = new this();
-
- options = options || {};
- for (var option in options) {
- combinedStream[option] = options[option];
- }
-
- return combinedStream;
-};
-
-CombinedStream.isStreamLike = function(stream) {
- return (typeof stream !== 'function')
- && (typeof stream !== 'string')
- && (typeof stream !== 'boolean')
- && (typeof stream !== 'number')
- && (!Buffer.isBuffer(stream));
-};
-
-CombinedStream.prototype.append = function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
-
- if (isStreamLike) {
- if (!(stream instanceof DelayedStream)) {
- stream.on('data', this._checkDataSize.bind(this));
-
- stream = DelayedStream.create(stream, {
- maxDataSize: Infinity,
- pauseStream: this.pauseStreams,
- });
- }
-
- this._handleErrors(stream);
-
- if (this.pauseStreams) {
- stream.pause();
- }
- }
-
- this._streams.push(stream);
- return this;
-};
-
-CombinedStream.prototype.pipe = function(dest, options) {
- Stream.prototype.pipe.call(this, dest, options);
- this.resume();
-};
-
-CombinedStream.prototype._getNext = function() {
- this._currentStream = null;
- var stream = this._streams.shift();
-
-
- if (typeof stream == 'undefined') {
- this.end();
- return;
- }
-
- if (typeof stream !== 'function') {
- this._pipeNext(stream);
- return;
- }
-
- var getStream = stream;
- getStream(function(stream) {
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
- stream.on('data', this._checkDataSize.bind(this));
- this._handleErrors(stream);
- }
-
- this._pipeNext(stream);
- }.bind(this));
-};
-
-CombinedStream.prototype._pipeNext = function(stream) {
- this._currentStream = stream;
-
- var isStreamLike = CombinedStream.isStreamLike(stream);
- if (isStreamLike) {
- stream.on('end', this._getNext.bind(this))
- stream.pipe(this, {end: false});
- return;
- }
-
- var value = stream;
- this.write(value);
- this._getNext();
-};
-
-CombinedStream.prototype._handleErrors = function(stream) {
- var self = this;
- stream.on('error', function(err) {
- self._emitError(err);
- });
-};
-
-CombinedStream.prototype.write = function(data) {
- this.emit('data', data);
-};
-
-CombinedStream.prototype.pause = function() {
- if (!this.pauseStreams) {
- return;
- }
-
- this.emit('pause');
-};
-
-CombinedStream.prototype.resume = function() {
- if (!this._released) {
- this._released = true;
- this.writable = true;
- this._getNext();
- }
-
- this.emit('resume');
-};
-
-CombinedStream.prototype.end = function() {
- this._reset();
- this.emit('end');
-};
-
-CombinedStream.prototype.destroy = function() {
- this._reset();
- this.emit('close');
-};
-
-CombinedStream.prototype._reset = function() {
- this.writable = false;
- this._streams = [];
- this._currentStream = null;
-};
-
-CombinedStream.prototype._checkDataSize = function() {
- this._updateDataSize();
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
-
- var message =
- 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
- this._emitError(new Error(message));
-};
-
-CombinedStream.prototype._updateDataSize = function() {
- this.dataSize = 0;
-
- var self = this;
- this._streams.forEach(function(stream) {
- if (!stream.dataSize) {
- return;
- }
-
- self.dataSize += stream.dataSize;
- });
-
- if (this._currentStream && this._currentStream.dataSize) {
- this.dataSize += this._currentStream.dataSize;
- }
-};
-
-CombinedStream.prototype._emitError = function(err) {
- this._reset();
- this.emit('error', err);
-};
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore
deleted file mode 100644
index 2fedb26c..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.un~
-/node_modules/*
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License
deleted file mode 100644
index 4804b7ab..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2011 Debuggable Limited
-
-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/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile
deleted file mode 100644
index b4ff85a3..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-SHELL := /bin/bash
-
-test:
- @./test/run.js
-
-.PHONY: test
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md
deleted file mode 100644
index 5cb5b35e..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# delayed-stream
-
-Buffers events from a stream until you are ready to handle them.
-
-## Installation
-
-``` bash
-npm install delayed-stream
-```
-
-## Usage
-
-The following example shows how to write a http echo server that delays its
-response by 1000 ms.
-
-``` javascript
-var DelayedStream = require('delayed-stream');
-var http = require('http');
-
-http.createServer(function(req, res) {
- var delayed = DelayedStream.create(req);
-
- setTimeout(function() {
- res.writeHead(200);
- delayed.pipe(res);
- }, 1000);
-});
-```
-
-If you are not using `Stream#pipe`, you can also manually release the buffered
-events by calling `delayedStream.resume()`:
-
-``` javascript
-var delayed = DelayedStream.create(req);
-
-setTimeout(function() {
- // Emit all buffered events and resume underlaying source
- delayed.resume();
-}, 1000);
-```
-
-## Implementation
-
-In order to use this meta stream properly, here are a few things you should
-know about the implementation.
-
-### Event Buffering / Proxying
-
-All events of the `source` stream are hijacked by overwriting the `source.emit`
-method. Until node implements a catch-all event listener, this is the only way.
-
-However, delayed-stream still continues to emit all events it captures on the
-`source`, regardless of whether you have released the delayed stream yet or
-not.
-
-Upon creation, delayed-stream captures all `source` events and stores them in
-an internal event buffer. Once `delayedStream.release()` is called, all
-buffered events are emitted on the `delayedStream`, and the event buffer is
-cleared. After that, delayed-stream merely acts as a proxy for the underlaying
-source.
-
-### Error handling
-
-Error events on `source` are buffered / proxied just like any other events.
-However, `delayedStream.create` attaches a no-op `'error'` listener to the
-`source`. This way you only have to handle errors on the `delayedStream`
-object, rather than in two places.
-
-### Buffer limits
-
-delayed-stream provides a `maxDataSize` property that can be used to limit
-the amount of data being buffered. In order to protect you from bad `source`
-streams that don't react to `source.pause()`, this feature is enabled by
-default.
-
-## API
-
-### DelayedStream.create(source, [options])
-
-Returns a new `delayedStream`. Available options are:
-
-* `pauseStream`
-* `maxDataSize`
-
-The description for those properties can be found below.
-
-### delayedStream.source
-
-The `source` stream managed by this object. This is useful if you are
-passing your `delayedStream` around, and you still want to access properties
-on the `source` object.
-
-### delayedStream.pauseStream = true
-
-Whether to pause the underlaying `source` when calling
-`DelayedStream.create()`. Modifying this property afterwards has no effect.
-
-### delayedStream.maxDataSize = 1024 * 1024
-
-The amount of data to buffer before emitting an `error`.
-
-If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
-refers to bytes.
-
-If the underlaying source is emitting JavaScript strings, the size refers to
-characters.
-
-If you know what you are doing, you can set this property to `Infinity` to
-disable this feature. You can also modify this property during runtime.
-
-### delayedStream.maxDataSize = 1024 * 1024
-
-The amount of data to buffer before emitting an `error`.
-
-If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
-refers to bytes.
-
-If the underlaying source is emitting JavaScript strings, the size refers to
-characters.
-
-If you know what you are doing, you can set this property to `Infinity` to
-disable this feature.
-
-### delayedStream.dataSize = 0
-
-The amount of data buffered so far.
-
-### delayedStream.readable
-
-An ECMA5 getter that returns the value of `source.readable`.
-
-### delayedStream.resume()
-
-If the `delayedStream` has not been released so far, `delayedStream.release()`
-is called.
-
-In either case, `source.resume()` is called.
-
-### delayedStream.pause()
-
-Calls `source.pause()`.
-
-### delayedStream.pipe(dest)
-
-Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
-
-### delayedStream.release()
-
-Emits and clears all events that have been buffered up so far. This does not
-resume the underlaying source, use `delayedStream.resume()` instead.
-
-## License
-
-delayed-stream is licensed under the MIT license.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js
deleted file mode 100644
index 7c10d482..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var Stream = require('stream').Stream;
-var util = require('util');
-
-module.exports = DelayedStream;
-function DelayedStream() {
- this.source = null;
- this.dataSize = 0;
- this.maxDataSize = 1024 * 1024;
- this.pauseStream = true;
-
- this._maxDataSizeExceeded = false;
- this._released = false;
- this._bufferedEvents = [];
-}
-util.inherits(DelayedStream, Stream);
-
-DelayedStream.create = function(source, options) {
- var delayedStream = new this();
-
- options = options || {};
- for (var option in options) {
- delayedStream[option] = options[option];
- }
-
- delayedStream.source = source;
-
- var realEmit = source.emit;
- source.emit = function() {
- delayedStream._handleEmit(arguments);
- return realEmit.apply(source, arguments);
- };
-
- source.on('error', function() {});
- if (delayedStream.pauseStream) {
- source.pause();
- }
-
- return delayedStream;
-};
-
-DelayedStream.prototype.__defineGetter__('readable', function() {
- return this.source.readable;
-});
-
-DelayedStream.prototype.resume = function() {
- if (!this._released) {
- this.release();
- }
-
- this.source.resume();
-};
-
-DelayedStream.prototype.pause = function() {
- this.source.pause();
-};
-
-DelayedStream.prototype.release = function() {
- this._released = true;
-
- this._bufferedEvents.forEach(function(args) {
- this.emit.apply(this, args);
- }.bind(this));
- this._bufferedEvents = [];
-};
-
-DelayedStream.prototype.pipe = function() {
- var r = Stream.prototype.pipe.apply(this, arguments);
- this.resume();
- return r;
-};
-
-DelayedStream.prototype._handleEmit = function(args) {
- if (this._released) {
- this.emit.apply(this, args);
- return;
- }
-
- if (args[0] === 'data') {
- this.dataSize += args[1].length;
- this._checkIfMaxDataSizeExceeded();
- }
-
- this._bufferedEvents.push(args);
-};
-
-DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
- if (this._maxDataSizeExceeded) {
- return;
- }
-
- if (this.dataSize <= this.maxDataSize) {
- return;
- }
-
- this._maxDataSizeExceeded = true;
- var message =
- 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
- this.emit('error', new Error(message));
-};
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
deleted file mode 100644
index 876a7739..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "author": {
- "name": "Felix Geisendörfer",
- "email": "felix@debuggable.com",
- "url": "http://debuggable.com/"
- },
- "name": "delayed-stream",
- "description": "Buffers events from a stream until you are ready to handle them.",
- "version": "0.0.5",
- "homepage": "https://github.com/felixge/node-delayed-stream",
- "repository": {
- "type": "git",
- "url": "git://github.com/felixge/node-delayed-stream.git"
- },
- "main": "./lib/delayed_stream",
- "engines": {
- "node": ">=0.4.0"
- },
- "dependencies": {},
- "devDependencies": {
- "fake": "0.2.0",
- "far": "0.0.1"
- },
- "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n",
- "readmeFilename": "Readme.md",
- "bugs": {
- "url": "https://github.com/felixge/node-delayed-stream/issues"
- },
- "_id": "delayed-stream@0.0.5",
- "dist": {
- "shasum": "baee50472834ab3c3ac481905d546834a548b8fc"
- },
- "_from": "delayed-stream@0.0.5",
- "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js
deleted file mode 100644
index 4d71b8a6..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var common = module.exports;
-
-common.DelayedStream = require('..');
-common.assert = require('assert');
-common.fake = require('fake');
-common.PORT = 49252;
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
deleted file mode 100644
index 9ecad5b8..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var DelayedStream = common.DelayedStream;
-var http = require('http');
-
-var UPLOAD = new Buffer(10 * 1024 * 1024);
-
-var server = http.createServer(function(req, res) {
- var delayed = DelayedStream.create(req, {maxDataSize: UPLOAD.length});
-
- setTimeout(function() {
- res.writeHead(200);
- delayed.pipe(res);
- }, 10);
-});
-server.listen(common.PORT, function() {
- var request = http.request({
- method: 'POST',
- port: common.PORT,
- });
-
- request.write(UPLOAD);
- request.end();
-
- request.on('response', function(res) {
- var received = 0;
- res
- .on('data', function(chunk) {
- received += chunk.length;
- })
- .on('end', function() {
- assert.equal(received, UPLOAD.length);
- server.close();
- });
- });
-});
-
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js
deleted file mode 100644
index 6f417f3e..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testAutoPause() {
- var source = new Stream();
-
- fake.expect(source, 'pause', 1);
- var delayedStream = DelayedStream.create(source);
- fake.verify();
-})();
-
-(function testDisableAutoPause() {
- var source = new Stream();
- fake.expect(source, 'pause', 0);
-
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
- fake.verify();
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js
deleted file mode 100644
index b50c3978..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testDelayEventsUntilResume() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
-
- fake.expect(source, 'pause');
- delayedStream.pause();
- fake.verify();
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js
deleted file mode 100644
index fc4047e0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testDelayEventsUntilResume() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
-
- // delayedStream must not emit until we resume
- fake.expect(delayedStream, 'emit', 0);
-
- // but our original source must emit
- var params = [];
- source.on('foo', function(param) {
- params.push(param);
- });
-
- source.emit('foo', 1);
- source.emit('foo', 2);
-
- // Make sure delayedStream did not emit, and source did
- assert.deepEqual(params, [1, 2]);
- fake.verify();
-
- // After resume, delayedStream must playback all events
- fake
- .stub(delayedStream, 'emit')
- .times(Infinity)
- .withArg(1, 'newListener');
- fake.expect(delayedStream, 'emit', ['foo', 1]);
- fake.expect(delayedStream, 'emit', ['foo', 2]);
- fake.expect(source, 'resume');
-
- delayedStream.resume();
- fake.verify();
-
- // Calling resume again will delegate to source
- fake.expect(source, 'resume');
- delayedStream.resume();
- fake.verify();
-
- // Emitting more events directly leads to them being emitted
- fake.expect(delayedStream, 'emit', ['foo', 3]);
- source.emit('foo', 3);
- fake.verify();
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js
deleted file mode 100644
index a9d35e72..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testHandleSourceErrors() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
-
- // We deal with this by attaching a no-op listener to 'error' on the source
- // when creating a new DelayedStream. This way error events on the source
- // won't throw.
- source.emit('error', new Error('something went wrong'));
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js
deleted file mode 100644
index 7638a2bf..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testMaxDataSize() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {maxDataSize: 1024, pauseStream: false});
-
- source.emit('data', new Buffer(1024));
-
- fake
- .expect(delayedStream, 'emit')
- .withArg(1, 'error');
- source.emit('data', new Buffer(1));
- fake.verify();
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js
deleted file mode 100644
index 7d312ab1..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testPipeReleases() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
-
- fake.expect(delayedStream, 'resume');
- delayedStream.pipe(new Stream());
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js
deleted file mode 100644
index d436163b..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var fake = common.fake.create();
-var DelayedStream = common.DelayedStream;
-var Stream = require('stream').Stream;
-
-(function testProxyReadableProperty() {
- var source = new Stream();
- var delayedStream = DelayedStream.create(source, {pauseStream: false});
-
- source.readable = fake.value('source.readable');
- assert.strictEqual(delayedStream.readable, source.readable);
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js
deleted file mode 100755
index 0bb8e822..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var far = require('far').create();
-
-far.add(__dirname);
-far.include(/test-.*\.js$/);
-
-far.execute();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
deleted file mode 100644
index 0dd41416..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "author": {
- "name": "Felix Geisendörfer",
- "email": "felix@debuggable.com",
- "url": "http://debuggable.com/"
- },
- "name": "combined-stream",
- "description": "A stream that emits multiple other streams one after another.",
- "version": "0.0.4",
- "homepage": "https://github.com/felixge/node-combined-stream",
- "repository": {
- "type": "git",
- "url": "git://github.com/felixge/node-combined-stream.git"
- },
- "main": "./lib/combined_stream",
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "delayed-stream": "0.0.5"
- },
- "devDependencies": {
- "far": "0.0.1"
- },
- "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = true\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = 2 * 1024 * 1024\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = 0\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n",
- "readmeFilename": "Readme.md",
- "bugs": {
- "url": "https://github.com/felixge/node-combined-stream/issues"
- },
- "_id": "combined-stream@0.0.4",
- "_from": "combined-stream@~0.0.4"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js
deleted file mode 100644
index 81543485..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var common = module.exports;
-
-var path = require('path');
-var fs = require('fs');
-var root = path.join(__dirname, '..');
-
-common.dir = {
- fixture: root + '/test/fixture',
- tmp: root + '/test/tmp',
-};
-
-// Create tmp directory if it does not exist
-// Not using fs.exists so as to be node 0.6.x compatible
-try {
- fs.statSync(common.dir.tmp);
-}
-catch (e) {
- // Dir does not exist
- fs.mkdirSync(common.dir.tmp);
-}
-
-common.CombinedStream = require(root);
-common.assert = require('assert');
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
deleted file mode 100644
index 50e0218d..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
+++ /dev/null
@@ -1,256 +0,0 @@
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
-10101010101010101010101010101010101010101010101010101010101010101010101010101010
-01010101010101010101010101010101010101010101010101010101010101010101010101010101
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt
deleted file mode 100644
index da1d821f..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt
+++ /dev/null
@@ -1,256 +0,0 @@
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
-20202020202020202020202020202020202020202020202020202020202020202020202020202020
-02020202020202020202020202020202020202020202020202020202020202020202020202020202
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js
deleted file mode 100644
index 44ecabab..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var fs = require('fs');
-
-var FILE1 = common.dir.fixture + '/file1.txt';
-var FILE2 = common.dir.fixture + '/file2.txt';
-var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2);
-
-(function testDelayedStreams() {
- var combinedStream = CombinedStream.create();
- combinedStream.append(function(next) {
- next(fs.createReadStream(FILE1));
- });
- combinedStream.append(function(next) {
- next(fs.createReadStream(FILE2));
- });
-
- var tmpFile = common.dir.tmp + '/combined.txt';
- var dest = fs.createWriteStream(tmpFile);
- combinedStream.pipe(dest);
-
- dest.on('end', function() {
- var written = fs.readFileSync(tmpFile, 'utf8');
- assert.strictEqual(written, EXPECTED);
- });
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js
deleted file mode 100644
index e3fbd184..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-
-(function testDataSizeGetter() {
- var combinedStream = CombinedStream.create();
-
- assert.strictEqual(combinedStream.dataSize, 0);
-
- // Test one stream
- combinedStream._streams.push({dataSize: 10});
- combinedStream._updateDataSize();
- assert.strictEqual(combinedStream.dataSize, 10);
-
- // Test two streams
- combinedStream._streams.push({dataSize: 23});
- combinedStream._updateDataSize();
- assert.strictEqual(combinedStream.dataSize, 33);
-
- // Test currentStream
- combinedStream._currentStream = {dataSize: 20};
- combinedStream._updateDataSize();
- assert.strictEqual(combinedStream.dataSize, 53);
-
- // Test currentStream without dataSize
- combinedStream._currentStream = {};
- combinedStream._updateDataSize();
- assert.strictEqual(combinedStream.dataSize, 33);
-
- // Test stream function
- combinedStream._streams.push(function() {});
- combinedStream._updateDataSize();
- assert.strictEqual(combinedStream.dataSize, 33);
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js
deleted file mode 100644
index c678575c..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var fs = require('fs');
-
-var FILE1 = common.dir.fixture + '/file1.txt';
-var BUFFER = new Buffer('Bacon is delicious');
-var FILE2 = common.dir.fixture + '/file2.txt';
-var STRING = 'The € kicks the $\'s ass!';
-
-var EXPECTED =
- fs.readFileSync(FILE1)
- + BUFFER
- + fs.readFileSync(FILE2)
- + STRING;
-var GOT;
-
-(function testDelayedStreams() {
- var combinedStream = CombinedStream.create();
- combinedStream.append(fs.createReadStream(FILE1));
- combinedStream.append(BUFFER);
- combinedStream.append(fs.createReadStream(FILE2));
- combinedStream.append(function(next) {
- next(STRING);
- });
-
- var tmpFile = common.dir.tmp + '/combined-file1-buffer-file2-string.txt';
- var dest = fs.createWriteStream(tmpFile);
- combinedStream.pipe(dest);
-
- dest.on('close', function() {
- GOT = fs.readFileSync(tmpFile, 'utf8');
- });
-})();
-
-process.on('exit', function() {
- assert.strictEqual(GOT, EXPECTED);
-});
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js
deleted file mode 100644
index 263cfdf7..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var fs = require('fs');
-
-var FILE1 = common.dir.fixture + '/file1.txt';
-var FILE2 = common.dir.fixture + '/file2.txt';
-var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2);
-var GOT;
-
-(function testDelayedStreams() {
- var combinedStream = CombinedStream.create();
- combinedStream.append(fs.createReadStream(FILE1));
- combinedStream.append(fs.createReadStream(FILE2));
-
- var stream1 = combinedStream._streams[0];
- var stream2 = combinedStream._streams[1];
-
- stream1.on('end', function() {
- assert.equal(stream2.dataSize, 0);
- });
-
- var tmpFile = common.dir.tmp + '/combined.txt';
- var dest = fs.createWriteStream(tmpFile);
- combinedStream.pipe(dest);
-
- dest.on('close', function() {
- GOT = fs.readFileSync(tmpFile, 'utf8');
- });
-})();
-
-process.on('exit', function() {
- console.error(GOT.length, EXPECTED.length);
- assert.strictEqual(GOT, EXPECTED);
-});
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js
deleted file mode 100644
index c3d288d0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var util = require('util');
-var Stream = require('stream').Stream;
-
-var s = CombinedStream.create();
-
-
-function StringStream(){
- this.writable=true;
- this.str=""
-}
-util.inherits(StringStream,Stream);
-
-StringStream.prototype.write=function(chunk,encoding){
- this.str+=chunk.toString();
- this.emit('data',chunk);
-}
-
-StringStream.prototype.end=function(chunk,encoding){
- this.emit('end');
-}
-
-StringStream.prototype.toString=function(){
- return this.str;
-}
-
-
-s.append("foo.");
-s.append("");
-s.append("bar");
-
-var ss = new StringStream();
-
-s.pipe(ss);
-s.resume();
-
-assert.equal(ss.toString(),"foo.bar");
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js
deleted file mode 100644
index aefa36e6..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var fs = require('fs');
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var FILE1 = common.dir.fixture + '/file1.txt';
-var fileStream = fs.createReadStream(FILE1);
-
-var foo = function(){};
-
-(function testIsStreamLike() {
- assert(! CombinedStream.isStreamLike(true));
- assert(! CombinedStream.isStreamLike("I am a string"));
- assert(! CombinedStream.isStreamLike(7));
- assert(! CombinedStream.isStreamLike(foo));
-
- assert(CombinedStream.isStreamLike(fileStream));
-})();
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js
deleted file mode 100644
index 25f47a47..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var fs = require('fs');
-
-var FILE1 = common.dir.fixture + '/file1.txt';
-var FILE2 = common.dir.fixture + '/file2.txt';
-var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2);
-
-(function testDelayedStreams() {
- var combinedStream = CombinedStream.create({pauseStreams: false, maxDataSize: 20736});
- combinedStream.append(fs.createReadStream(FILE1));
- combinedStream.append(fs.createReadStream(FILE2));
-
- var gotErr = null;
- combinedStream.on('error', function(err) {
- gotErr = err;
- });
-
- process.on('exit', function() {
- assert.ok(gotErr);
- assert.ok(gotErr.message.match(/bytes/));
- });
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js
deleted file mode 100644
index 30a3a6f8..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var common = require('../common');
-var assert = common.assert;
-var CombinedStream = common.CombinedStream;
-var fs = require('fs');
-
-var FILE1 = common.dir.fixture + '/file1.txt';
-var FILE2 = common.dir.fixture + '/file2.txt';
-var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2);
-
-(function testDelayedStreams() {
- var combinedStream = CombinedStream.create({pauseStreams: false});
- combinedStream.append(fs.createReadStream(FILE1));
- combinedStream.append(fs.createReadStream(FILE2));
-
- var stream1 = combinedStream._streams[0];
- var stream2 = combinedStream._streams[1];
-
- stream1.on('end', function() {
- assert.ok(stream2.dataSize > 0);
- });
-
- var tmpFile = common.dir.tmp + '/combined.txt';
- var dest = fs.createWriteStream(tmpFile);
- combinedStream.pipe(dest);
-
- dest.on('end', function() {
- var written = fs.readFileSync(tmpFile, 'utf8');
- assert.strictEqual(written, EXPECTED);
- });
-})();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js b/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js
deleted file mode 100755
index 0bb8e822..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env node
-var far = require('far').create();
-
-far.add(__dirname);
-far.include(/test-.*\.js$/);
-
-far.execute();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/form-data/package.json b/node_modules/z-schema/node_modules/request/node_modules/form-data/package.json
deleted file mode 100644
index 93cd6649..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/form-data/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "author": {
- "name": "Felix Geisendörfer",
- "email": "felix@debuggable.com",
- "url": "http://debuggable.com/"
- },
- "name": "form-data",
- "description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
- "version": "0.1.3",
- "repository": {
- "type": "git",
- "url": "git://github.com/felixge/node-form-data.git"
- },
- "main": "./lib/form_data",
- "scripts": {
- "test": "node test/run.js"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "dependencies": {
- "combined-stream": "~0.0.4",
- "mime": "~1.2.11",
- "async": "~0.9.0"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "https://raw.github.com/felixge/node-form-data/master/License"
- }
- ],
- "devDependencies": {
- "fake": "~0.2.2",
- "far": "~0.0.7",
- "formidable": "~1.0.14",
- "request": "~2.36.0"
- },
- "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume(); // for node-0.10.x\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nIn case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/surelynot.php',\n headers: {'x-test-header': 'test-header-value'}\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n",
- "readmeFilename": "Readme.md",
- "bugs": {
- "url": "https://github.com/felixge/node-form-data/issues"
- },
- "_id": "form-data@0.1.3",
- "dist": {
- "shasum": "9a5f8696f5fa743783ae8588b5317ea573e461cf"
- },
- "_from": "form-data@~0.1.0",
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/hawk/.npmignore b/node_modules/z-schema/node_modules/request/node_modules/hawk/.npmignore
deleted file mode 100644
index 77ba16cb..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/hawk/.npmignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/hawk/.travis.yml b/node_modules/z-schema/node_modules/request/node_modules/hawk/.travis.yml
deleted file mode 100755
index 047f7e3d..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/hawk/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/hawk/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/hawk/LICENSE
deleted file mode 100755
index e699a7bd..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/hawk/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2012-2013, Eran Hammer.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of Eran Hammer nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY
-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/z-schema/node_modules/request/node_modules/hawk/Makefile b/node_modules/z-schema/node_modules/request/node_modules/hawk/Makefile
deleted file mode 100755
index 5f339bf3..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/hawk/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-test:
- @node node_modules/lab/bin/lab
-test-cov:
- @node node_modules/lab/bin/lab -r threshold -t 100
-test-cov-html:
- @node node_modules/lab/bin/lab -r html -o coverage.html
-complexity:
- @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
-
-.PHONY: test test-cov test-cov-html complexity
diff --git a/node_modules/z-schema/node_modules/request/node_modules/hawk/README.md b/node_modules/z-schema/node_modules/request/node_modules/hawk/README.md
deleted file mode 100755
index 010bac6d..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/hawk/README.md
+++ /dev/null
@@ -1,627 +0,0 @@
-![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)
-
- **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial
-HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).
-
-Current version: **1.0**
-
-[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)
-
-# Table of Content
-
-- [**Introduction**](#introduction)
- - [Replay Protection](#replay-protection)
- - [Usage Example](#usage-example)
- - [Protocol Example](#protocol-example)
- - [Payload Validation](#payload-validation)
- - [Response Payload Validation](#response-payload-validation)
- - [Browser Support and Considerations](#browser-support-and-considerations)
-
-- [**Single URI Authorization**](#single-uri-authorization)
- - [Usage Example](#bewit-usage-example)
-
-- [**Security Considerations**](#security-considerations)
- - [MAC Keys Transmission](#mac-keys-transmission)
- - [Confidentiality of Requests](#confidentiality-of-requests)
- - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)
- - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)
- - [Entropy of Keys](#entropy-of-keys)
- - [Coverage Limitations](#coverage-limitations)
- - [Future Time Manipulation](#future-time-manipulation)
- - [Client Clock Poisoning](#client-clock-poisoning)
- - [Bewit Limitations](#bewit-limitations)
- - [Host Header Forgery](#host-header-forgery)
-
-- [**Frequently Asked Questions**](#frequently-asked-questions)
-
-- [**Acknowledgements**](#acknowledgements)
-
-# Introduction
-
-**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with
-partial cryptographic verification of the request and response, covering the HTTP method, request URI, host,
-and optionally the request payload.
-
-Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of
-client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,
-the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is
-included in its place.
-
-However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of
-replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less
-"chattiness" (interaction with the server).
-
-Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because
-the client and server must both have access to the key material in the clear.
-
-The primary design goals of this scheme are to:
-* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,
-* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where
- to send an authenticated request), and
-* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client
- failure to validate the server's identity as part of its TLS handshake.
-
-In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using
-a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).
-
-The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,
-which is beyond the scope of this module. Typically, the shared credentials are established via an initial
-TLS-protected phase or derived from some other shared confidential information available to both the client
-and the server.
-
-
-## Replay Protection
-
-Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more
-than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when
-making requests. This gives the server enough information to prevent replay attacks.
-
-The nonce is generated by the client, and is a string unique across all requests with the same timestamp and
-key identifier combination.
-
-The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards
-are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.
-By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in
-practice translates to a maximum of 2 minutes as the skew can be positive or negative).
-
-Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client
-clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types
-(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response
-to a bad timestamp.
-
-There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a
-potential attack vector). Instead, the client only uses the server's time to calculate an offset used only
-for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing
-the number of round trips required to authenticate the first request.
-
-
-## Usage Example
-
-Server code:
-
-```javascript
-var Http = require('http');
-var Hawk = require('hawk');
-
-
-// Credentials lookup function
-
-var credentialsFunc = function (id, callback) {
-
- var credentials = {
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256',
- user: 'Steve'
- };
-
- return callback(null, credentials);
-};
-
-// Create HTTP server
-
-var handler = function (req, res) {
-
- // Authenticate incoming request
-
- Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
-
- // Prepare response
-
- var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');
- var headers = { 'Content-Type': 'text/plain' };
-
- // Generate Server-Authorization response header
-
- var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });
- headers['Server-Authorization'] = header;
-
- // Send the response back
-
- res.writeHead(!err ? 200 : 401, headers);
- res.end(payload);
- });
-};
-
-// Start server
-
-Http.createServer(handler).listen(8000, 'example.com');
-```
-
-Client code:
-
-```javascript
-var Request = require('request');
-var Hawk = require('hawk');
-
-
-// Client credentials
-
-var credentials = {
- id: 'dh37fgj492je',
- key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
- algorithm: 'sha256'
-}
-
-// Request options
-
-var requestOptions = {
- uri: 'http://example.com:8000/resource/1?b=1&a=2',
- method: 'GET',
- headers: {}
-};
-
-// Generate Authorization request header
-
-var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });
-requestOptions.headers.Authorization = header.field;
-
-// Send authenticated request
-
-Request(requestOptions, function (error, response, body) {
-
- // Authenticate the server's response
-
- var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });
-
- // Output results
-
- console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));
-});
-```
-
-**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local
-machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.
-
-```javascript
-Hawk.sntp.start();
-```
-
-
-## Protocol Example
-
-The client attempts to access a protected resource without authentication, sending the following HTTP request to
-the resource server:
-
-```
-GET /resource/1?b=1&a=2 HTTP/1.1
-Host: example.com:8000
-```
-
-The resource server returns an authentication challenge.
-
-```
-HTTP/1.1 401 Unauthorized
-WWW-Authenticate: Hawk
-```
-
-The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/"
-server. The **Hawk** credentials issued to the client include the following attributes:
-
-* Key identifier: dh37fgj492je
-* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn
-* Algorithm: sha256
-
-The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,
-1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline
-character):
-
-```
-hawk.1.header
-1353832234
-j4h3g2
-GET
-/resource/1?b=1&a=2
-example.com
-8000
-
-some-app-ext-data
-
-```
-
-The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string.
-The result is base64-encoded to produce the request MAC:
-
-```
-6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=
-```
-
-The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using
-the HTTP `Authorization` request header field:
-
-```
-GET /resource/1?b=1&a=2 HTTP/1.1
-Host: example.com:8000
-Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="
-```
-
-The server validates the request by calculating the request MAC again based on the request received and verifies the validity
-and scope of the **Hawk** credentials. If valid, the server responds with the requested resource.
-
-
-### Payload Validation
-
-**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash
-using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):
-* `hawk.1.payload`
-* the content-type in lowercase, without any parameters (e.g. `application/json`)
-* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)
-
-For example:
-
-* Payload: `Thank you for flying Hawk`
-* Content Type: `text/plain`
-* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`
-
-Results in the following input to the payload hash function (newline terminated values):
-
-```
-hawk.1.payload
-text/plain
-Thank you for flying Hawk
-
-```
-
-Which produces the following hash value:
-
-```
-Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
-```
-
-The client constructs the normalized request string (newline terminated values):
-
-```
-hawk.1.header
-1353832234
-j4h3g2
-POST
-/resource/1?a=1&b=2
-example.com
-8000
-Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=
-some-app-ext-data
-
-```
-
-Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,
-and request MAC, with the request using the HTTP `Authorization` request header field:
-
-```
-POST /resource/1?a=1&b=2 HTTP/1.1
-Host: example.com:8000
-Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="
-```
-
-It is up to the server if and when it validates the payload for any given request, based solely on it's security policy
-and the nature of the data included.
-
-If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct
-the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value
-with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.
-
-However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed
-at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value
-provided by the client after validating the MAC.
-
-It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value
-included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided
-by the client, the payload may be modified by an attacker.
-
-
-## Response Payload Validation
-
-**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the
-client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header
-as a response header using the exact same syntax as the `Authorization` request header field.
-
-The header is contructed using the same process as the client's request header. The server uses the same credentials and other
-artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with
-new values based on the server response. The rest as identical to those used by the client.
-
-The result MAC digest is included with the optional `hash` and `ext` values:
-
-```
-Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"
-```
-
-
-## Browser Support and Considerations
-
-A browser script is provided for including using a `'));
- expect(boom.response.payload.message).to.not.contain('');
- expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
- done();
- });
-
- it('encodes \' characters', function (done) {
-
- var encoded = Hoek.escapeJavaScript('something(\'param\')');
- expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
- done();
- });
-
- it('encodes large unicode characters with the correct padding', function (done) {
-
- var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
- expect(encoded).to.equal('\\u0500\\u1000');
- done();
- });
-
- it('doesn\'t throw an exception when passed null', function (done) {
-
- var encoded = Hoek.escapeJavaScript(null);
- expect(encoded).to.equal('');
- done();
- });
- });
-
- describe('#escapeHtml', function () {
-
- it('encodes / characters', function (done) {
-
- var encoded = Hoek.escapeHtml('');
- expect(encoded).to.equal('<script>alert(1)</script>');
- done();
- });
-
- it('encodes < and > as named characters', function (done) {
-
- var encoded = Hoek.escapeHtml('
-```
-
-Or in node.js:
-
-```
-npm install node-uuid
-```
-
-```javascript
-var uuid = require('node-uuid');
-```
-
-Then create some ids ...
-
-```javascript
-// Generate a v1 (time-based) id
-uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
-
-// Generate a v4 (random) id
-uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
-```
-
-## API
-
-### uuid.v1([`options` [, `buffer` [, `offset`]]])
-
-Generate and return a RFC4122 v1 (timestamp-based) UUID.
-
-* `options` - (Object) Optional uuid state to apply. Properties may include:
-
- * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
- * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
- * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
- * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
-
-* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
-* `offset` - (Number) Starting index in `buffer` at which to begin writing.
-
-Returns `buffer`, if specified, otherwise the string form of the UUID
-
-Notes:
-
-1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
-
-Example: Generate string UUID with fully-specified options
-
-```javascript
-uuid.v1({
- node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
- clockseq: 0x1234,
- msecs: new Date('2011-11-01').getTime(),
- nsecs: 5678
-}); // -> "710b962e-041c-11e1-9234-0123456789ab"
-```
-
-Example: In-place generation of two binary IDs
-
-```javascript
-// Generate two ids in an array
-var arr = new Array(32); // -> []
-uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-
-// Optionally use uuid.unparse() to get stringify the ids
-uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
-uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
-```
-
-### uuid.v4([`options` [, `buffer` [, `offset`]]])
-
-Generate and return a RFC4122 v4 UUID.
-
-* `options` - (Object) Optional uuid state to apply. Properties may include:
-
- * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
- * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
-
-* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
-* `offset` - (Number) Starting index in `buffer` at which to begin writing.
-
-Returns `buffer`, if specified, otherwise the string form of the UUID
-
-Example: Generate string UUID with fully-specified options
-
-```javascript
-uuid.v4({
- random: [
- 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
- 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
- ]
-});
-// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
-```
-
-Example: Generate two IDs in a single buffer
-
-```javascript
-var buffer = new Array(32); // (or 'new Buffer' in node.js)
-uuid.v4(null, buffer, 0);
-uuid.v4(null, buffer, 16);
-```
-
-### uuid.parse(id[, buffer[, offset]])
-### uuid.unparse(buffer[, offset])
-
-Parse and unparse UUIDs
-
- * `id` - (String) UUID(-like) string
- * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
- * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
-
-Example parsing and unparsing a UUID string
-
-```javascript
-var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // ->
-var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
-```
-
-### uuid.noConflict()
-
-(Browsers only) Set `uuid` property back to it's previous value.
-
-Returns the node-uuid object.
-
-Example:
-
-```javascript
-var myUuid = uuid.noConflict();
-myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
-```
-
-## Deprecated APIs
-
-Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
-
-### uuid([format [, buffer [, offset]]])
-
-uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
-
-### uuid.BufferClass
-
-The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.
-
-## Testing
-
-In node.js
-
-```
-> cd test
-> node test.js
-```
-
-In Browser
-
-```
-open test/test.html
-```
-
-### Benchmarking
-
-Requires node.js
-
-```
-npm install uuid uuid-js
-node benchmark/benchmark.js
-```
-
-For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
-
-For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
-
-## Release notes
-
-### 1.4.0
-
-* Improved module context detection
-* Removed public RNG functions
-
-### 1.3.2
-
-* Improve tests and handling of v1() options (Issue #24)
-* Expose RNG option to allow for perf testing with different generators
-
-### 1.3.0
-
-* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
-* Support for node.js crypto API
-* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/README.md b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/README.md
deleted file mode 100644
index aaeb2ea0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# node-uuid Benchmarks
-
-### Results
-
-To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark
-
-### Run them yourself
-
-node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`.
-
-To prepare and run the benchmark issue;
-
-```
-npm install uuid uuid-js
-node benchmark/benchmark.js
-```
-
-You'll see an output like this one:
-
-```
-# v4
-nodeuuid.v4(): 854700 uuids/second
-nodeuuid.v4('binary'): 788643 uuids/second
-nodeuuid.v4('binary', buffer): 1336898 uuids/second
-uuid(): 479386 uuids/second
-uuid('binary'): 582072 uuids/second
-uuidjs.create(4): 312304 uuids/second
-
-# v1
-nodeuuid.v1(): 938086 uuids/second
-nodeuuid.v1('binary'): 683060 uuids/second
-nodeuuid.v1('binary', buffer): 1644736 uuids/second
-uuidjs.create(1): 190621 uuids/second
-```
-
-* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library.
-* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK.
-
-If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file:
-
-```
-for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done;
-```
-
-If you're interested in how performance varies between different node versions, you can issue the above command multiple times.
-
-You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot:
-
-```
-(cd benchmark/ && ./bench.sh)
-```
-
-This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu
deleted file mode 100644
index a342fbbe..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/opt/local/bin/gnuplot -persist
-#
-#
-# G N U P L O T
-# Version 4.4 patchlevel 3
-# last modified March 2011
-# System: Darwin 10.8.0
-#
-# Copyright (C) 1986-1993, 1998, 2004, 2007-2010
-# Thomas Williams, Colin Kelley and many others
-#
-# gnuplot home: http://www.gnuplot.info
-# faq, bugs, etc: type "help seeking-assistance"
-# immediate help: type "help"
-# plot window: hit 'h'
-set terminal postscript eps noenhanced defaultplex \
- leveldefault color colortext \
- solid linewidth 1.2 butt noclip \
- palfuncparam 2000,0.003 \
- "Helvetica" 14
-set output 'bench.eps'
-unset clip points
-set clip one
-unset clip two
-set bar 1.000000 front
-set border 31 front linetype -1 linewidth 1.000
-set xdata
-set ydata
-set zdata
-set x2data
-set y2data
-set timefmt x "%d/%m/%y,%H:%M"
-set timefmt y "%d/%m/%y,%H:%M"
-set timefmt z "%d/%m/%y,%H:%M"
-set timefmt x2 "%d/%m/%y,%H:%M"
-set timefmt y2 "%d/%m/%y,%H:%M"
-set timefmt cb "%d/%m/%y,%H:%M"
-set boxwidth
-set style fill empty border
-set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1
-set style circle radius graph 0.02, first 0, 0
-set dummy x,y
-set format x "% g"
-set format y "% g"
-set format x2 "% g"
-set format y2 "% g"
-set format z "% g"
-set format cb "% g"
-set angles radians
-unset grid
-set key title ""
-set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox
-set key noinvert samplen 4 spacing 1 width 0 height 0
-set key maxcolumns 2 maxrows 0
-unset label
-unset arrow
-set style increment default
-unset style line
-set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0
-unset style arrow
-set style histogram clustered gap 2 title offset character 0, 0, 0
-unset logscale
-set offsets graph 0.05, 0.15, 0, 0
-set pointsize 1.5
-set pointintervalbox 1
-set encoding default
-unset polar
-unset parametric
-unset decimalsign
-set view 60, 30, 1, 1
-set samples 100, 100
-set isosamples 10, 10
-set surface
-unset contour
-set clabel '%8.3g'
-set mapping cartesian
-set datafile separator whitespace
-unset hidden3d
-set cntrparam order 4
-set cntrparam linear
-set cntrparam levels auto 5
-set cntrparam points 5
-set size ratio 0 1,1
-set origin 0,0
-set style data points
-set style function lines
-set xzeroaxis linetype -2 linewidth 1.000
-set yzeroaxis linetype -2 linewidth 1.000
-set zzeroaxis linetype -2 linewidth 1.000
-set x2zeroaxis linetype -2 linewidth 1.000
-set y2zeroaxis linetype -2 linewidth 1.000
-set ticslevel 0.5
-set mxtics default
-set mytics default
-set mztics default
-set mx2tics default
-set my2tics default
-set mcbtics default
-set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set xtics norangelimit
-set xtics ()
-set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set ytics autofreq norangelimit
-set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
-set ztics autofreq norangelimit
-set nox2tics
-set noy2tics
-set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
-set cbtics autofreq norangelimit
-set title ""
-set title offset character 0, 0, 0 font "" norotate
-set timestamp bottom
-set timestamp ""
-set timestamp offset character 0, 0, 0 font "" norotate
-set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
-set autoscale rfixmin
-set autoscale rfixmax
-set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
-set autoscale tfixmin
-set autoscale tfixmax
-set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale ufixmin
-set autoscale ufixmax
-set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale vfixmin
-set autoscale vfixmax
-set xlabel ""
-set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set x2label ""
-set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] )
-set autoscale xfixmin
-set autoscale xfixmax
-set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] )
-set autoscale x2fixmin
-set autoscale x2fixmax
-set ylabel ""
-set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set y2label ""
-set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] )
-set autoscale yfixmin
-set autoscale yfixmax
-set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] )
-set autoscale y2fixmin
-set autoscale y2fixmax
-set zlabel ""
-set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
-set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
-set autoscale zfixmin
-set autoscale zfixmax
-set cblabel ""
-set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
-set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
-set autoscale cbfixmin
-set autoscale cbfixmax
-set zero 1e-08
-set lmargin -1
-set bmargin -1
-set rmargin -1
-set tmargin -1
-set pm3d explicit at s
-set pm3d scansautomatic
-set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
-set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
-set palette rgbformulae 7, 5, 15
-set colorbox default
-set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
-set loadpath
-set fontpath
-set fit noerrorvariables
-GNUTERM = "aqua"
-plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2
-# EOF
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.sh b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.sh
deleted file mode 100755
index d870a0cb..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/bench.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# for a given node version run:
-# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
-
-PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte')
-FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es)
-INDICES=(2 3 2 3 2 2 2 2 2)
-VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
-TMPJOIN="tmp_join"
-OUTPUT="bench_results.txt"
-
-for I in ${!FILES[*]}; do
- F=${FILES[$I]}
- P=${PATTERNS[$I]}
- INDEX=${INDICES[$I]}
- echo "version $F" > $F
- for V in $VERSIONS; do
- (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
- done
- if [ $I == 0 ]; then
- cat $F > $TMPJOIN
- else
- join $TMPJOIN $F > $OUTPUT
- cp $OUTPUT $TMPJOIN
- fi
- rm $F
-done
-
-rm $TMPJOIN
-
-gnuplot bench.gnu
-convert -density 200 -resize 800x560 -flatten bench.eps bench.png
-rm bench.eps
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c
deleted file mode 100644
index dbfc75f6..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Test performance of native C UUID generation
-
-To Compile: cc -luuid benchmark-native.c -o benchmark-native
-*/
-
-#include
-#include
-#include
-#include
-
-int main() {
- uuid_t myid;
- char buf[36+1];
- int i;
- struct timeval t;
- double start, finish;
-
- gettimeofday(&t, NULL);
- start = t.tv_sec + t.tv_usec/1e6;
-
- int n = 2e5;
- for (i = 0; i < n; i++) {
- uuid_generate(myid);
- uuid_unparse(myid, buf);
- }
-
- gettimeofday(&t, NULL);
- finish = t.tv_sec + t.tv_usec/1e6;
- double dur = finish - start;
-
- printf("%d uuids/sec", (int)(n/dur));
- return 0;
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js
deleted file mode 100644
index 40e6efbe..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js
+++ /dev/null
@@ -1,84 +0,0 @@
-try {
- var nodeuuid = require('../uuid');
-} catch (e) {
- console.error('node-uuid require failed - skipping tests');
-}
-
-try {
- var uuid = require('uuid');
-} catch (e) {
- console.error('uuid require failed - skipping tests');
-}
-
-try {
- var uuidjs = require('uuid-js');
-} catch (e) {
- console.error('uuid-js require failed - skipping tests');
-}
-
-var N = 5e5;
-
-function rate(msg, t) {
- console.log(msg + ': ' +
- (N / (Date.now() - t) * 1e3 | 0) +
- ' uuids/second');
-}
-
-console.log('# v4');
-
-// node-uuid - string form
-if (nodeuuid) {
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4();
- rate('nodeuuid.v4() - using node.js crypto RNG', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG});
- rate('nodeuuid.v4() - using Math.random() RNG', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary');
- rate('nodeuuid.v4(\'binary\')', t);
-
- var buffer = new nodeuuid.BufferClass(16);
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer);
- rate('nodeuuid.v4(\'binary\', buffer)', t);
-}
-
-// libuuid - string form
-if (uuid) {
- for (var i = 0, t = Date.now(); i < N; i++) uuid();
- rate('uuid()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) uuid('binary');
- rate('uuid(\'binary\')', t);
-}
-
-// uuid-js - string form
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4);
- rate('uuidjs.create(4)', t);
-}
-
-// 140byte.es
-for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)});
-rate('140byte.es_v4', t);
-
-console.log('');
-console.log('# v1');
-
-// node-uuid - v1 string form
-if (nodeuuid) {
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1();
- rate('nodeuuid.v1()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary');
- rate('nodeuuid.v1(\'binary\')', t);
-
- var buffer = new nodeuuid.BufferClass(16);
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer);
- rate('nodeuuid.v1(\'binary\', buffer)', t);
-}
-
-// uuid-js - v1 string form
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1);
- rate('uuidjs.create(1)', t);
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/component.json b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/component.json
deleted file mode 100644
index ace21348..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/component.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "node-uuid",
- "repo": "broofa/node-uuid",
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "version": "1.4.0",
- "author": "Robert Kieffer ",
- "contributors": [
- {"name": "Christoph Tavan ", "github": "https://github.com/ctavan"}
- ],
- "keywords": ["uuid", "guid", "rfc4122"],
- "dependencies": {},
- "development": {},
- "main": "uuid.js",
- "scripts": [
- "uuid.js"
- ],
- "license": "MIT"
-}
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/package.json b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/package.json
deleted file mode 100644
index 3fb5825b..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "node-uuid",
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "url": "http://github.com/broofa/node-uuid",
- "keywords": [
- "uuid",
- "guid",
- "rfc4122"
- ],
- "author": {
- "name": "Robert Kieffer",
- "email": "robert@broofa.com"
- },
- "contributors": [
- {
- "name": "Christoph Tavan",
- "email": "dev@tavan.de"
- }
- ],
- "lib": ".",
- "main": "./uuid.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/broofa/node-uuid.git"
- },
- "version": "1.4.1",
- "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> \nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/broofa/node-uuid/issues"
- },
- "_id": "node-uuid@1.4.1",
- "_from": "node-uuid@~1.4.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/compare_v1.js b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/compare_v1.js
deleted file mode 100644
index 05af8221..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/compare_v1.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var assert = require('assert'),
- nodeuuid = require('../uuid'),
- uuidjs = require('uuid-js'),
- libuuid = require('uuid').generate,
- util = require('util'),
- exec = require('child_process').exec,
- os = require('os');
-
-// On Mac Os X / macports there's only the ossp-uuid package that provides uuid
-// On Linux there's uuid-runtime which provides uuidgen
-var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t';
-
-function compare(ids) {
- console.log(ids);
- for (var i = 0; i < ids.length; i++) {
- var id = ids[i].split('-');
- id = [id[2], id[1], id[0]].join('');
- ids[i] = id;
- }
- var sorted = ([].concat(ids)).sort();
-
- if (sorted.toString() !== ids.toString()) {
- console.log('Warning: sorted !== ids');
- } else {
- console.log('everything in order!');
- }
-}
-
-// Test time order of v1 uuids
-var ids = [];
-while (ids.length < 10e3) ids.push(nodeuuid.v1());
-
-var max = 10;
-console.log('node-uuid:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(nodeuuid.v1());
-compare(ids);
-
-console.log('');
-console.log('uuidjs:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString());
-compare(ids);
-
-console.log('');
-console.log('libuuid:');
-ids = [];
-var count = 0;
-var last = function() {
- compare(ids);
-}
-var cb = function(err, stdout, stderr) {
- ids.push(stdout.substring(0, stdout.length-1));
- count++;
- if (count < max) {
- return next();
- }
- last();
-};
-var next = function() {
- exec(uuidCmd, cb);
-};
-next();
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.html b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.html
deleted file mode 100644
index d80326ec..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.js
deleted file mode 100644
index 24692256..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/test/test.js
+++ /dev/null
@@ -1,228 +0,0 @@
-if (!this.uuid) {
- // node.js
- uuid = require('../uuid');
-}
-
-//
-// x-platform log/assert shims
-//
-
-function _log(msg, type) {
- type = type || 'log';
-
- if (typeof(document) != 'undefined') {
- document.write('
' + msg.replace(/\n/g, ' ') + '
');
- }
- if (typeof(console) != 'undefined') {
- var color = {
- log: '\033[39m',
- warn: '\033[33m',
- error: '\033[31m'
- };
- console[type](color[type] + msg + color.log);
- }
-}
-
-function log(msg) {_log(msg, 'log');}
-function warn(msg) {_log(msg, 'warn');}
-function error(msg) {_log(msg, 'error');}
-
-function assert(res, msg) {
- if (!res) {
- error('FAIL: ' + msg);
- } else {
- log('Pass: ' + msg);
- }
-}
-
-//
-// Unit tests
-//
-
-// Verify ordering of v1 ids created with explicit times
-var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
-
-function compare(name, ids) {
- ids = ids.map(function(id) {
- return id.split('-').reverse().join('-');
- }).sort();
- var sorted = ([].concat(ids)).sort();
-
- assert(sorted.toString() == ids.toString(), name + ' have expected order');
-}
-
-// Verify ordering of v1 ids created using default behavior
-compare('uuids with current time', [
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1()
-]);
-
-// Verify ordering of v1 ids created with explicit times
-compare('uuids with time option', [
- uuid.v1({msecs: TIME - 10*3600*1000}),
- uuid.v1({msecs: TIME - 1}),
- uuid.v1({msecs: TIME}),
- uuid.v1({msecs: TIME + 1}),
- uuid.v1({msecs: TIME + 28*24*3600*1000})
-]);
-
-assert(
- uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
- 'IDs created at same msec are different'
-);
-
-// Verify throw if too many ids created
-var thrown = false;
-try {
- uuid.v1({msecs: TIME, nsecs: 10000});
-} catch (e) {
- thrown = true;
-}
-assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
-
-// Verify clock regression bumps clockseq
-var uidt = uuid.v1({msecs: TIME});
-var uidtb = uuid.v1({msecs: TIME - 1});
-assert(
- parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
- 'Clock regression by msec increments the clockseq'
-);
-
-// Verify clock regression bumps clockseq
-var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
-var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
-assert(
- parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
- 'Clock regression by nsec increments the clockseq'
-);
-
-// Verify explicit options produce expected id
-var id = uuid.v1({
- msecs: 1321651533573,
- nsecs: 5432,
- clockseq: 0x385c,
- node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
-});
-assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
-
-// Verify adjacent ids across a msec boundary are 1 time unit apart
-var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
-var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
-
-var before = u0.split('-')[0], after = u1.split('-')[0];
-var dt = parseInt(after, 16) - parseInt(before, 16);
-assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
-
-//
-// Test parse/unparse
-//
-
-id = '00112233445566778899aabbccddeeff';
-assert(uuid.unparse(uuid.parse(id.substr(0,10))) ==
- '00112233-4400-0000-0000-000000000000', 'Short parse');
-assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) ==
- '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse');
-
-//
-// Perf tests
-//
-
-var generators = {
- v1: uuid.v1,
- v4: uuid.v4
-};
-
-var UUID_FORMAT = {
- v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,
- v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i
-};
-
-var N = 1e4;
-
-// Get %'age an actual value differs from the ideal value
-function divergence(actual, ideal) {
- return Math.round(100*100*(actual - ideal)/ideal)/100;
-}
-
-function rate(msg, t) {
- log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second');
-}
-
-for (var version in generators) {
- var counts = {}, max = 0;
- var generator = generators[version];
- var format = UUID_FORMAT[version];
-
- log('\nSanity check ' + N + ' ' + version + ' uuids');
- for (var i = 0, ok = 0; i < N; i++) {
- id = generator();
- if (!format.test(id)) {
- throw Error(id + ' is not a valid UUID string');
- }
-
- if (id != uuid.unparse(uuid.parse(id))) {
- assert(fail, id + ' is not a valid id');
- }
-
- // Count digits for our randomness check
- if (version == 'v4') {
- var digits = id.replace(/-/g, '').split('');
- for (var j = digits.length-1; j >= 0; j--) {
- var c = digits[j];
- max = Math.max(max, counts[c] = (counts[c] || 0) + 1);
- }
- }
- }
-
- // Check randomness for v4 UUIDs
- if (version == 'v4') {
- // Limit that we get worried about randomness. (Purely empirical choice, this!)
- var limit = 2*100*Math.sqrt(1/N);
-
- log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)');
-
- for (var i = 0; i < 16; i++) {
- var c = i.toString(16);
- var bar = '', n = counts[c], p = Math.round(n/max*100|0);
-
- // 1-3,5-8, and D-F: 1:16 odds over 30 digits
- var ideal = N*30/16;
- if (i == 4) {
- // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits
- ideal = N*(1 + 30/16);
- } else if (i >= 8 && i <= 11) {
- // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits
- ideal = N*(1/4 + 30/16);
- } else {
- // Otherwise: 1:16 odds on 30 digits
- ideal = N*30/16;
- }
- var d = divergence(n, ideal);
-
- // Draw bar using UTF squares (just for grins)
- var s = n/max*50 | 0;
- while (s--) bar += '=';
-
- assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)');
- }
- }
-}
-
-// Perf tests
-for (var version in generators) {
- log('\nPerformance testing ' + version + ' UUIDs');
- var generator = generators[version];
- var buf = new uuid.BufferClass(16);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator();
- rate('uuid.' + version + '()', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary');
- rate('uuid.' + version + '(\'binary\')', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf);
- rate('uuid.' + version + '(\'binary\', buffer)', t);
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/z-schema/node_modules/request/node_modules/node-uuid/uuid.js
deleted file mode 100644
index 2fac6dc4..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/node-uuid/uuid.js
+++ /dev/null
@@ -1,245 +0,0 @@
-// uuid.js
-//
-// Copyright (c) 2010-2012 Robert Kieffer
-// MIT License - http://opensource.org/licenses/mit-license.php
-
-(function() {
- var _global = this;
-
- // Unique ID creation requires a high quality random # generator. We feature
- // detect to determine the best RNG source, normalizing to a function that
- // returns 128-bits of randomness, since that's what's usually required
- var _rng;
-
- // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
- //
- // Moderately fast, high quality
- if (typeof(require) == 'function') {
- try {
- var _rb = require('crypto').randomBytes;
- _rng = _rb && function() {return _rb(16);};
- } catch(e) {}
- }
-
- if (!_rng && _global.crypto && crypto.getRandomValues) {
- // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
- //
- // Moderately fast, high quality
- var _rnds8 = new Uint8Array(16);
- _rng = function whatwgRNG() {
- crypto.getRandomValues(_rnds8);
- return _rnds8;
- };
- }
-
- if (!_rng) {
- // Math.random()-based (RNG)
- //
- // If all else fails, use Math.random(). It's fast, but is of unspecified
- // quality.
- var _rnds = new Array(16);
- _rng = function() {
- for (var i = 0, r; i < 16; i++) {
- if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
- _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
- }
-
- return _rnds;
- };
- }
-
- // Buffer class to use
- var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
-
- // Maps for number <-> hex string conversion
- var _byteToHex = [];
- var _hexToByte = {};
- for (var i = 0; i < 256; i++) {
- _byteToHex[i] = (i + 0x100).toString(16).substr(1);
- _hexToByte[_byteToHex[i]] = i;
- }
-
- // **`parse()` - Parse a UUID into it's component bytes**
- function parse(s, buf, offset) {
- var i = (buf && offset) || 0, ii = 0;
-
- buf = buf || [];
- s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
- if (ii < 16) { // Don't overflow!
- buf[i + ii++] = _hexToByte[oct];
- }
- });
-
- // Zero out remaining bytes if string was short
- while (ii < 16) {
- buf[i + ii++] = 0;
- }
-
- return buf;
- }
-
- // **`unparse()` - Convert UUID byte array (ala parse()) into a string**
- function unparse(buf, offset) {
- var i = offset || 0, bth = _byteToHex;
- return bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] + '-' +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]] +
- bth[buf[i++]] + bth[buf[i++]];
- }
-
- // **`v1()` - Generate time-based UUID**
- //
- // Inspired by https://github.com/LiosK/UUID.js
- // and http://docs.python.org/library/uuid.html
-
- // random #'s we need to init node and clockseq
- var _seedBytes = _rng();
-
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
- var _nodeId = [
- _seedBytes[0] | 0x01,
- _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
- ];
-
- // Per 4.2.2, randomize (14 bit) clockseq
- var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
-
- // Previous uuid creation time
- var _lastMSecs = 0, _lastNSecs = 0;
-
- // See https://github.com/broofa/node-uuid for API details
- function v1(options, buf, offset) {
- var i = buf && offset || 0;
- var b = buf || [];
-
- options = options || {};
-
- var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
-
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
- var msecs = options.msecs != null ? options.msecs : new Date().getTime();
-
- // Per 4.2.1.2, use count of uuid's generated during the current clock
- // cycle to simulate higher resolution clock
- var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
-
- // Time since last uuid creation (in msecs)
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
-
- // Per 4.2.1.2, Bump clockseq on clock regression
- if (dt < 0 && options.clockseq == null) {
- clockseq = clockseq + 1 & 0x3fff;
- }
-
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
- // time interval
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
- nsecs = 0;
- }
-
- // Per 4.2.1.2 Throw error if too many uuids are requested
- if (nsecs >= 10000) {
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
- }
-
- _lastMSecs = msecs;
- _lastNSecs = nsecs;
- _clockseq = clockseq;
-
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
- msecs += 12219292800000;
-
- // `time_low`
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
- b[i++] = tl >>> 24 & 0xff;
- b[i++] = tl >>> 16 & 0xff;
- b[i++] = tl >>> 8 & 0xff;
- b[i++] = tl & 0xff;
-
- // `time_mid`
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
- b[i++] = tmh >>> 8 & 0xff;
- b[i++] = tmh & 0xff;
-
- // `time_high_and_version`
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
- b[i++] = tmh >>> 16 & 0xff;
-
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
- b[i++] = clockseq >>> 8 | 0x80;
-
- // `clock_seq_low`
- b[i++] = clockseq & 0xff;
-
- // `node`
- var node = options.node || _nodeId;
- for (var n = 0; n < 6; n++) {
- b[i + n] = node[n];
- }
-
- return buf ? buf : unparse(b);
- }
-
- // **`v4()` - Generate random UUID**
-
- // See https://github.com/broofa/node-uuid for API details
- function v4(options, buf, offset) {
- // Deprecated - 'format' argument, as supported in v1.2
- var i = buf && offset || 0;
-
- if (typeof(options) == 'string') {
- buf = options == 'binary' ? new BufferClass(16) : null;
- options = null;
- }
- options = options || {};
-
- var rnds = options.random || (options.rng || _rng)();
-
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
-
- // Copy bytes to buffer, if provided
- if (buf) {
- for (var ii = 0; ii < 16; ii++) {
- buf[i + ii] = rnds[ii];
- }
- }
-
- return buf || unparse(rnds);
- }
-
- // Export public API
- var uuid = v4;
- uuid.v1 = v1;
- uuid.v4 = v4;
- uuid.parse = parse;
- uuid.unparse = unparse;
- uuid.BufferClass = BufferClass;
-
- if (typeof define === 'function' && define.amd) {
- // Publish as AMD module
- define(function() {return uuid;});
- } else if (typeof(module) != 'undefined' && module.exports) {
- // Publish as node.js module
- module.exports = uuid;
- } else {
- // Publish as global (in browsers)
- var _previousRoot = _global.uuid;
-
- // **`noConflict()` - (browser only) to reset global 'uuid' var**
- uuid.noConflict = function() {
- _global.uuid = _previousRoot;
- return uuid;
- };
-
- _global.uuid = uuid;
- }
-}).call(this);
diff --git a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/LICENSE
deleted file mode 100644
index a4a9aee0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/README.md
deleted file mode 100644
index 34c4a85d..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-oauth-sign
-==========
-
-OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/index.js
deleted file mode 100644
index e35bfa67..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/index.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var crypto = require('crypto')
- , qs = require('querystring')
- ;
-
-function sha1 (key, body) {
- return crypto.createHmac('sha1', key).update(body).digest('base64')
-}
-
-function rfc3986 (str) {
- return encodeURIComponent(str)
- .replace(/!/g,'%21')
- .replace(/\*/g,'%2A')
- .replace(/\(/g,'%28')
- .replace(/\)/g,'%29')
- .replace(/'/g,'%27')
- ;
-}
-
-function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
- // adapted from https://dev.twitter.com/docs/auth/oauth and
- // https://dev.twitter.com/docs/auth/creating-signature
-
- var querystring = Object.keys(params).sort().map(function(key){
- // big WTF here with the escape + encoding but it's what twitter wants
- return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key]))
- }).join('%26')
-
- var base = [
- httpMethod ? httpMethod.toUpperCase() : 'GET',
- rfc3986(base_uri),
- querystring
- ].join('&')
-
- var key = [
- consumer_secret,
- token_secret || ''
- ].map(rfc3986).join('&')
-
- return sha1(key, base)
-}
-
-exports.hmacsign = hmacsign
-exports.rfc3986 = rfc3986
diff --git a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/package.json
deleted file mode 100644
index f211ed34..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "name": "oauth-sign",
- "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
- "version": "0.3.0",
- "repository": {
- "url": "https://github.com/mikeal/oauth-sign"
- },
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "scripts": {
- "test": "node test.js"
- },
- "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/mikeal/oauth-sign/issues"
- },
- "_id": "oauth-sign@0.3.0",
- "_from": "oauth-sign@~0.3.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/test.js
deleted file mode 100644
index 46955ff6..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/oauth-sign/test.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var hmacsign = require('./index').hmacsign
- , assert = require('assert')
- , qs = require('querystring')
- ;
-
-// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth
-
-var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token',
- { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11'
- , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
- , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk'
- , oauth_signature_method: 'HMAC-SHA1'
- , oauth_timestamp: '1272323042'
- , oauth_version: '1.0'
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98")
-
-console.log(reqsign)
-console.log('8wUi7m5HFQy76nowoCThusfgB+Q=')
-assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=')
-
-var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token',
- { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g'
- , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8'
- , oauth_signature_method: 'HMAC-SHA1'
- , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc'
- , oauth_timestamp: '1272323047'
- , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY'
- , oauth_version: '1.0'
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA")
-
-console.log(accsign)
-console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
-assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=')
-
-var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json',
- { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g"
- , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y"
- , oauth_signature_method: "HMAC-SHA1"
- , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw"
- , oauth_timestamp: "1272325550"
- , oauth_version: "1.0"
- , status: 'setting up my twitter 私のさえずりを設定する'
- }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA")
-
-console.log(upsign)
-console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=')
-assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=')
-
-
diff --git a/node_modules/z-schema/node_modules/request/node_modules/qs/.gitmodules b/node_modules/z-schema/node_modules/request/node_modules/qs/.gitmodules
deleted file mode 100644
index 49e31dac..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/qs/.gitmodules
+++ /dev/null
@@ -1,6 +0,0 @@
-[submodule "support/expresso"]
- path = support/expresso
- url = git://github.com/visionmedia/expresso.git
-[submodule "support/should"]
- path = support/should
- url = git://github.com/visionmedia/should.js.git
diff --git a/node_modules/z-schema/node_modules/request/node_modules/qs/.npmignore b/node_modules/z-schema/node_modules/request/node_modules/qs/.npmignore
deleted file mode 100644
index e85ce2af..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/qs/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-test
-.travis.yml
-benchmark.js
-component.json
-examples.js
-History.md
-Makefile
diff --git a/node_modules/z-schema/node_modules/request/node_modules/qs/Readme.md b/node_modules/z-schema/node_modules/request/node_modules/qs/Readme.md
deleted file mode 100644
index 27e54a4a..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/qs/Readme.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# node-querystring
-
- query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.
-
-## Installation
-
- $ npm install qs
-
-## Examples
-
-```js
-var qs = require('qs');
-
-qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');
-// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }
-
-qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})
-// => user[name]=Tobi&user[email]=tobi%40learnboost.com
-```
-
-## Testing
-
-Install dev dependencies:
-
- $ npm install -d
-
-and execute:
-
- $ make test
-
-browser:
-
- $ open test/browser/index.html
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/qs/index.js b/node_modules/z-schema/node_modules/request/node_modules/qs/index.js
deleted file mode 100644
index b05938ac..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/qs/index.js
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * Object#toString() ref for stringify().
- */
-
-var toString = Object.prototype.toString;
-
-/**
- * Object#hasOwnProperty ref
- */
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * Array#indexOf shim.
- */
-
-var indexOf = typeof Array.prototype.indexOf === 'function'
- ? function(arr, el) { return arr.indexOf(el); }
- : function(arr, el) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i] === el) return i;
- }
- return -1;
- };
-
-/**
- * Array.isArray shim.
- */
-
-var isArray = Array.isArray || function(arr) {
- return toString.call(arr) == '[object Array]';
-};
-
-/**
- * Object.keys shim.
- */
-
-var objectKeys = Object.keys || function(obj) {
- var ret = [];
- for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
- ret.push(key);
- }
- }
- return ret;
-};
-
-/**
- * Array#forEach shim.
- */
-
-var forEach = typeof Array.prototype.forEach === 'function'
- ? function(arr, fn) { return arr.forEach(fn); }
- : function(arr, fn) {
- for (var i = 0; i < arr.length; i++) fn(arr[i]);
- };
-
-/**
- * Array#reduce shim.
- */
-
-var reduce = function(arr, fn, initial) {
- if (typeof arr.reduce === 'function') return arr.reduce(fn, initial);
- var res = initial;
- for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]);
- return res;
-};
-
-/**
- * Cache non-integer test regexp.
- */
-
-var isint = /^[0-9]+$/;
-
-function promote(parent, key) {
- if (parent[key].length == 0) return parent[key] = {}
- var t = {};
- for (var i in parent[key]) {
- if (hasOwnProperty.call(parent[key], i)) {
- t[i] = parent[key][i];
- }
- }
- parent[key] = t;
- return t;
-}
-
-function parse(parts, parent, key, val) {
- var part = parts.shift();
-
- // illegal
- if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return;
-
- // end
- if (!part) {
- if (isArray(parent[key])) {
- parent[key].push(val);
- } else if ('object' == typeof parent[key]) {
- parent[key] = val;
- } else if ('undefined' == typeof parent[key]) {
- parent[key] = val;
- } else {
- parent[key] = [parent[key], val];
- }
- // array
- } else {
- var obj = parent[key] = parent[key] || [];
- if (']' == part) {
- if (isArray(obj)) {
- if ('' != val) obj.push(val);
- } else if ('object' == typeof obj) {
- obj[objectKeys(obj).length] = val;
- } else {
- obj = parent[key] = [parent[key], val];
- }
- // prop
- } else if (~indexOf(part, ']')) {
- part = part.substr(0, part.length - 1);
- if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
- parse(parts, obj, part, val);
- // key
- } else {
- if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
- parse(parts, obj, part, val);
- }
- }
-}
-
-/**
- * Merge parent key/val pair.
- */
-
-function merge(parent, key, val){
- if (~indexOf(key, ']')) {
- var parts = key.split('[')
- , len = parts.length
- , last = len - 1;
- parse(parts, parent, 'base', val);
- // optimize
- } else {
- if (!isint.test(key) && isArray(parent.base)) {
- var t = {};
- for (var k in parent.base) t[k] = parent.base[k];
- parent.base = t;
- }
- set(parent.base, key, val);
- }
-
- return parent;
-}
-
-/**
- * Compact sparse arrays.
- */
-
-function compact(obj) {
- if ('object' != typeof obj) return obj;
-
- if (isArray(obj)) {
- var ret = [];
-
- for (var i in obj) {
- if (hasOwnProperty.call(obj, i)) {
- ret.push(obj[i]);
- }
- }
-
- return ret;
- }
-
- for (var key in obj) {
- obj[key] = compact(obj[key]);
- }
-
- return obj;
-}
-
-/**
- * Parse the given obj.
- */
-
-function parseObject(obj){
- var ret = { base: {} };
-
- forEach(objectKeys(obj), function(name){
- merge(ret, name, obj[name]);
- });
-
- return compact(ret.base);
-}
-
-/**
- * Parse the given str.
- */
-
-function parseString(str){
- var ret = reduce(String(str).split('&'), function(ret, pair){
- var eql = indexOf(pair, '=')
- , brace = lastBraceInKey(pair)
- , key = pair.substr(0, brace || eql)
- , val = pair.substr(brace || eql, pair.length)
- , val = val.substr(indexOf(val, '=') + 1, val.length);
-
- // ?foo
- if ('' == key) key = pair, val = '';
- if ('' == key) return ret;
-
- return merge(ret, decode(key), decode(val));
- }, { base: {} }).base;
-
- return compact(ret);
-}
-
-/**
- * Parse the given query `str` or `obj`, returning an object.
- *
- * @param {String} str | {Object} obj
- * @return {Object}
- * @api public
- */
-
-exports.parse = function(str){
- if (null == str || '' == str) return {};
- return 'object' == typeof str
- ? parseObject(str)
- : parseString(str);
-};
-
-/**
- * Turn the given `obj` into a query string
- *
- * @param {Object} obj
- * @return {String}
- * @api public
- */
-
-var stringify = exports.stringify = function(obj, prefix) {
- if (isArray(obj)) {
- return stringifyArray(obj, prefix);
- } else if ('[object Object]' == toString.call(obj)) {
- return stringifyObject(obj, prefix);
- } else if ('string' == typeof obj) {
- return stringifyString(obj, prefix);
- } else {
- return prefix + '=' + encodeURIComponent(String(obj));
- }
-};
-
-/**
- * Stringify the given `str`.
- *
- * @param {String} str
- * @param {String} prefix
- * @return {String}
- * @api private
- */
-
-function stringifyString(str, prefix) {
- if (!prefix) throw new TypeError('stringify expects an object');
- return prefix + '=' + encodeURIComponent(str);
-}
-
-/**
- * Stringify the given `arr`.
- *
- * @param {Array} arr
- * @param {String} prefix
- * @return {String}
- * @api private
- */
-
-function stringifyArray(arr, prefix) {
- var ret = [];
- if (!prefix) throw new TypeError('stringify expects an object');
- for (var i = 0; i < arr.length; i++) {
- ret.push(stringify(arr[i], prefix + '[' + i + ']'));
- }
- return ret.join('&');
-}
-
-/**
- * Stringify the given `obj`.
- *
- * @param {Object} obj
- * @param {String} prefix
- * @return {String}
- * @api private
- */
-
-function stringifyObject(obj, prefix) {
- var ret = []
- , keys = objectKeys(obj)
- , key;
-
- for (var i = 0, len = keys.length; i < len; ++i) {
- key = keys[i];
- if ('' == key) continue;
- if (null == obj[key]) {
- ret.push(encodeURIComponent(key) + '=');
- } else {
- ret.push(stringify(obj[key], prefix
- ? prefix + '[' + encodeURIComponent(key) + ']'
- : encodeURIComponent(key)));
- }
- }
-
- return ret.join('&');
-}
-
-/**
- * Set `obj`'s `key` to `val` respecting
- * the weird and wonderful syntax of a qs,
- * where "foo=bar&foo=baz" becomes an array.
- *
- * @param {Object} obj
- * @param {String} key
- * @param {String} val
- * @api private
- */
-
-function set(obj, key, val) {
- var v = obj[key];
- if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return;
- if (undefined === v) {
- obj[key] = val;
- } else if (isArray(v)) {
- v.push(val);
- } else {
- obj[key] = [v, val];
- }
-}
-
-/**
- * Locate last brace in `str` within the key.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function lastBraceInKey(str) {
- var len = str.length
- , brace
- , c;
- for (var i = 0; i < len; ++i) {
- c = str[i];
- if (']' == c) brace = false;
- if ('[' == c) brace = true;
- if ('=' == c && !brace) return i;
- }
-}
-
-/**
- * Decode `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-function decode(str) {
- try {
- return decodeURIComponent(str.replace(/\+/g, ' '));
- } catch (err) {
- return str;
- }
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/qs/package.json b/node_modules/z-schema/node_modules/request/node_modules/qs/package.json
deleted file mode 100644
index db945127..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/qs/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "qs",
- "description": "querystring parser",
- "version": "0.6.6",
- "keywords": [
- "query string",
- "parser",
- "component"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/visionmedia/node-querystring.git"
- },
- "devDependencies": {
- "mocha": "*",
- "expect.js": "*"
- },
- "scripts": {
- "test": "make test"
- },
- "author": {
- "name": "TJ Holowaychuk",
- "email": "tj@vision-media.ca",
- "url": "http://tjholowaychuk.com"
- },
- "main": "index",
- "engines": {
- "node": "*"
- },
- "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
- "readmeFilename": "Readme.md",
- "bugs": {
- "url": "https://github.com/visionmedia/node-querystring/issues"
- },
- "_id": "qs@0.6.6",
- "_from": "qs@~0.6.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.jshintrc
deleted file mode 100644
index fb11913a..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.jshintrc
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "passfail" : false,
- "maxerr" : 100,
-
- "browser" : false,
- "node" : true,
- "rhino" : false,
- "couch" : false,
- "wsh" : false,
-
- "jquery" : false,
- "prototypejs" : false,
- "mootools" : false,
- "dojo" : false,
-
- "debug" : false,
- "devel" : false,
-
- "esnext" : true,
- "strict" : true,
- "globalstrict" : true,
-
- "asi" : false,
- "laxbreak" : false,
- "bitwise" : true,
- "boss" : false,
- "curly" : true,
- "eqeqeq" : false,
- "eqnull" : true,
- "evil" : false,
- "expr" : false,
- "forin" : false,
- "immed" : true,
- "lastsemic" : true,
- "latedef" : false,
- "loopfunc" : false,
- "noarg" : true,
- "regexp" : false,
- "regexdash" : false,
- "scripturl" : false,
- "shadow" : false,
- "supernew" : false,
- "undef" : true,
- "unused" : true,
-
- "newcap" : true,
- "noempty" : true,
- "nonew" : true,
- "nomen" : false,
- "onevar" : false,
- "onecase" : true,
- "plusplus" : false,
- "proto" : false,
- "sub" : true,
- "trailing" : true,
- "white" : false,
-
- "predef": [
- "describe",
- "it",
- "before",
- "beforeEach",
- "after",
- "afterEach",
- "expect",
- "setTimeout",
- "clearTimeout"
- ],
- "maxlen": 0
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.npmignore
deleted file mode 100644
index 54efff98..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/
-.*.sw[nmop]
-npm-debug.log
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.travis.yml b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.travis.yml
deleted file mode 100644
index 5d892654..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
-- "0.10"
-- "0.11"
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: 0.11
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/LICENSE
deleted file mode 100644
index 3fac4c85..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/LICENSE
+++ /dev/null
@@ -1,78 +0,0 @@
-Copyright GoInstant, Inc. and other contributors. All rights reserved.
-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.
-
-The following exceptions apply:
-
-===
-
-`pubSufTest()` of generate-pubsuffix.js is in the public domain.
-
- // Any copyright is dedicated to the Public Domain.
- // http://creativecommons.org/publicdomain/zero/1.0/
-
-===
-
-`public-suffix.txt` was obtained from
-
-via .
-
-That file contains the usual Mozilla triple-license, for which this project uses it
-under the terms of the MPL 1.1:
-
- // ***** BEGIN LICENSE BLOCK *****
- // Version: MPL 1.1/GPL 2.0/LGPL 2.1
- //
- // The contents of this file are subject to the Mozilla Public License Version
- // 1.1 (the "License"); you may not use this file except in compliance with
- // the License. You may obtain a copy of the License at
- // http://www.mozilla.org/MPL/
- //
- // Software distributed under the License is distributed on an "AS IS" basis,
- // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- // for the specific language governing rights and limitations under the
- // License.
- //
- // The Original Code is the Public Suffix List.
- //
- // The Initial Developer of the Original Code is
- // Jo Hermans .
- // Portions created by the Initial Developer are Copyright (C) 2007
- // the Initial Developer. All Rights Reserved.
- //
- // Contributor(s):
- // Ruben Arakelyan
- // Gervase Markham
- // Pamela Greene
- // David Triendl
- // Jothan Frakes
- // The kind representatives of many TLD registries
- //
- // Alternatively, the contents of this file may be used under the terms of
- // either the GNU General Public License Version 2 or later (the "GPL"), or
- // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- // in which case the provisions of the GPL or the LGPL are applicable instead
- // of those above. If you wish to allow use of your version of this file only
- // under the terms of either the GPL or the LGPL, and not to allow others to
- // use your version of this file under the terms of the MPL, indicate your
- // decision by deleting the provisions above and replace them with the notice
- // and other provisions required by the GPL or the LGPL. If you do not delete
- // the provisions above, a recipient may use your version of this file under
- // the terms of any one of the MPL, the GPL or the LGPL.
- //
- // ***** END LICENSE BLOCK *****
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/README.md
deleted file mode 100644
index 9e6caee1..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/README.md
+++ /dev/null
@@ -1,412 +0,0 @@
-[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
-
-![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)
-
-[![Build Status](https://travis-ci.org/goinstant/node-cookie.png?branch=master)](https://travis-ci.org/goinstant/node-cookie)
-
-[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)
-![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)
-
-# Synopsis
-
-``` javascript
-var tough = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'
-var Cookie = tough.Cookie;
-var cookie = Cookie.parse(header);
-cookie.value = 'somethingdifferent';
-header = cookie.toString();
-
-var cookiejar = new tough.CookieJar();
-cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
-// ...
-cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {
- res.headers['cookie'] = cookies.join('; ');
-});
-```
-
-# Installation
-
-It's _so_ easy!
-
-`npm install tough-cookie`
-
-Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.
-
-Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
-
-# API
-
-tough
-=====
-
-Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound".
-
-parseDate(string[,strict])
------------------
-
-Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).
-
-formatDate(date)
-----------------
-
-Format a Date into a RFC1123 string (the RFC6265-recommended format).
-
-canonicalDomain(str)
---------------------
-
-Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).
-
-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 RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match".
-
-The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.
-
-defaultPath(path)
------------------
-
-Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC.
-
-The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.
-
-pathMatch(reqPath,cookiePath)
------------------------------
-
-Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean.
-
-This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
-
-parse(header[,strict=false])
-----------------------------
-
-alias for `Cookie.parse(header[,strict])`
-
-fromJSON(string)
-----------------
-
-alias for `Cookie.fromJSON(string)`
-
-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 http://publicsuffix.org/. This module derives its list from that site.
-
-cookieCompare(a,b)
-------------------
-
-For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.
-
-``` javascript
-var cookies = [ /* unsorted array of Cookie objects */ ];
-cookies = cookies.sort(cookieCompare);
-```
-
-permuteDomain(domain)
----------------------
-
-Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.
-
-
-permutePath(path)
------------------
-
-Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.
-
-Cookie
-======
-
-Cookie.parse(header[,strict=false])
------------------------------------
-
-Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.
-
-Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:
-
-``` javascript
-if (res.headers['set-cookie'] instanceof Array)
- cookies = res.headers['set-cookie'].map(function (c) { return (Cookie.parse(c)); });
-else
- cookies = [Cookie.parse(res.headers['set-cookie'])];
-```
-
-Cookie.fromJSON(string)
------------------------
-
-Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.
-
-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. May 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
- * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
-
-After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:
-
- * _hostOnly_ - boolean - is this a host-only cookie (i.e. 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.
- * _created_ - `Date` - when this cookie was added to the jar
- * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.
-
-Construction([{options}])
-------------
-
-Receives an options object that can contain any Cookie properties, uses the default for unspecified properties.
-
-.toString()
------------
-
-encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
-
-.cookieString()
----------------
-
-encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').
-
-.setExpires(String)
--------------------
-
-sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set.
-
-.setMaxAge(number)
--------------------
-
-sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly.
-
-.expiryTime([now=Date.now()])
------------------------------
-
-.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 `.created` attribute -- or, by default, the `now` paramter -- 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()])
----------
-
-compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.
-
-The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
-
-.canonicalizedDoman()
----------------------
-
-.cdomain()
-----------
-
-return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.
-
-.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 -- you can future-proof with this construct:
-
-``` javascript
-if (cookie.validate() === true) {
- // it's tasty
-} else {
- // yuck!
-}
-```
-
-CookieJar
-=========
-
-Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes])
-------------
-
-Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.
-
-
-Attributes
-----------
-
- * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`)
-
-Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.
-
-.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))
--------------------------------------------------------------------
-
-Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.
-
-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/access time of cookies
- * _strict_ - boolean - default `false` - perform extra checks
- * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.
-
-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`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
-
-.storeCookie(cookie, [{options},] cb(err,cookie))
--------------------------------------------------
-
-__REMOVED__ removed in lieu of the CookieStore API below
-
-.getCookies(currentUrl, [{options},] cb(err,cookies))
------------------------------------------------------
-
-Retrieve the list of cookies that can be sent in a Cookie header for the current url.
-
-If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.
-
-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/access time of cookies
- * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).
- * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).
-
-The `.lastAccessed` property of the returned cookies will have been updated.
-
-.getCookiesSync(currentUrl, [{options}])
-----------------------------------------
-
-Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
-
-.getCookieString(...)
----------------------
-
-Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.
-
-.getCookieStringSync(...)
--------------------------
-
-Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
-
-.getSetCookieStrings(...)
--------------------------
-
-Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.
-
-.getSetCookieStringsSync(...)
------------------------------
-
-Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
-
-Store
-=====
-
-Base class for CookieJar stores.
-
-# CookieStore API
-
-The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.
-
-Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. Stores are asynchronous by default, but if `store.synchronous` is set, then the `*Sync` methods on the CookieJar can be used.
-
-All `domain` parameters will have been normalized before calling.
-
-The Cookie store must have all of the following methods.
-
-store.findCookie(domain, path, key, cb(err,cookie))
----------------------------------------------------
-
-Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.
-
-Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).
-
-store.findCookies(domain, path, cb(err,cookies))
-------------------------------------------------
-
-Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.
-
-If no cookies are found, the callback MUST be passed an empty array.
-
-The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.
-
-As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).
-
-store.putCookie(cookie, cb(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; the caller will have already updated the `.creation` and `.lastAccessed` properties.
-
-Pass an error if the cookie cannot be stored.
-
-store.updateCookie(oldCookie, newCookie, cb(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 will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).
-
-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(newCookie,cb)` will be 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, cb(err))
-----------------------------------------------
-
-Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).
-
-The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.
-
-store.removeCookies(domain, path, cb(err))
-------------------------------------------
-
-Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.
-
-Pass an error ONLY if removing any existing cookies failed.
-
-# TODO
-
- * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`
- * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891
- * better tests for `validate()`?
-
-# Copyright and License
-
-(tl;dr: MIT with some MPL/1.1)
-
-Copyright 2012- GoInstant, Inc. and other contributors. All rights reserved.
-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.
-
-Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js
deleted file mode 100644
index 74d76aa1..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright GoInstant, Inc. and other contributors. All rights reserved.
- * 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.
- */
-'use strict';
-var fs = require('fs');
-var assert = require('assert');
-var punycode = require('punycode');
-
-fs.readFile('./public-suffix.txt', 'utf8', function(err,string) {
- if (err) {
- throw err;
- }
- var lines = string.split("\n");
- process.nextTick(function() {
- processList(lines);
- });
-});
-
-var index = {};
-
-var COMMENT = new RegExp('//.+');
-function processList(lines) {
- while (lines.length) {
- var line = lines.shift();
- line = line.replace(COMMENT,'').trim();
- if (!line) {
- continue;
- }
- addToIndex(index,line);
- }
-
- pubSufTest();
-
- var w = fs.createWriteStream('./lib/pubsuffix.js',{
- flags: 'w',
- encoding: 'utf8',
- mode: parseInt('644',8)
- });
- w.on('end', process.exit);
- w.write("/****************************************************\n");
- w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n");
- w.write(" * DO NOT EDIT! *\n");
- w.write(" ****************************************************/\n\n");
-
- w.write("module.exports.getPublicSuffix = ");
- w.write(getPublicSuffix.toString());
- w.write(";\n\n");
-
- w.write("// The following generated structure is used under the MPL version 1.1\n");
- w.write("// See public-suffix.txt for more information\n\n");
- w.write("var index = module.exports.index = Object.freeze(\n");
- w.write(JSON.stringify(index));
- w.write(");\n\n");
- w.write("// END of automatically generated file\n");
-
- w.end();
-}
-
-function addToIndex(index,line) {
- var prefix = '';
- if (line.replace(/^(!|\*\.)/)) {
- prefix = RegExp.$1;
- line = line.slice(prefix.length);
- }
- line = prefix + punycode.toASCII(line);
-
- if (line.substr(0,1) == '!') {
- index[line.substr(1)] = false;
- } else {
- index[line] = true;
- }
-}
-
-// include the licence in the function since it gets written to pubsuffix.js
-function getPublicSuffix(domain) {
- /*
- * Copyright GoInstant, Inc. and other contributors. All rights reserved.
- * 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.
- */
- if (!domain) {
- return null;
- }
- if (domain.match(/^\./)) {
- return null;
- }
-
- domain = domain.toLowerCase();
- var parts = domain.split('.').reverse();
-
- var suffix = '';
- var suffixLen = 0;
- for (var i=0; i suffixLen) {
- return parts.slice(0,suffixLen+1).reverse().join('.');
- }
-
- return null;
-}
-
-function checkPublicSuffix(give,get) {
- var got = getPublicSuffix(give);
- assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got);
-}
-
-// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt
-function pubSufTest() {
- // For this function-scope and this function-scope ONLY:
- // Any copyright is dedicated to the Public Domain.
- // http://creativecommons.org/publicdomain/zero/1.0/
-
- // NULL input.
- checkPublicSuffix(null, null);
- // Mixed case.
- checkPublicSuffix('COM', null);
- checkPublicSuffix('example.COM', 'example.com');
- checkPublicSuffix('WwW.example.COM', 'example.com');
- // Leading dot.
- checkPublicSuffix('.com', null);
- checkPublicSuffix('.example', null);
- checkPublicSuffix('.example.com', null);
- checkPublicSuffix('.example.example', null);
- // Unlisted TLD.
- checkPublicSuffix('example', null);
- checkPublicSuffix('example.example', null);
- checkPublicSuffix('b.example.example', null);
- checkPublicSuffix('a.b.example.example', null);
- // Listed, but non-Internet, TLD.
- checkPublicSuffix('local', null);
- checkPublicSuffix('example.local', null);
- checkPublicSuffix('b.example.local', null);
- checkPublicSuffix('a.b.example.local', null);
- // TLD with only 1 rule.
- checkPublicSuffix('biz', null);
- checkPublicSuffix('domain.biz', 'domain.biz');
- checkPublicSuffix('b.domain.biz', 'domain.biz');
- checkPublicSuffix('a.b.domain.biz', 'domain.biz');
- // TLD with some 2-level rules.
- checkPublicSuffix('com', null);
- checkPublicSuffix('example.com', 'example.com');
- checkPublicSuffix('b.example.com', 'example.com');
- checkPublicSuffix('a.b.example.com', 'example.com');
- checkPublicSuffix('uk.com', null);
- checkPublicSuffix('example.uk.com', 'example.uk.com');
- checkPublicSuffix('b.example.uk.com', 'example.uk.com');
- checkPublicSuffix('a.b.example.uk.com', 'example.uk.com');
- checkPublicSuffix('test.ac', 'test.ac');
- // TLD with only 1 (wildcard) rule.
- checkPublicSuffix('cy', null);
- checkPublicSuffix('c.cy', null);
- checkPublicSuffix('b.c.cy', 'b.c.cy');
- checkPublicSuffix('a.b.c.cy', 'b.c.cy');
- // More complex TLD.
- checkPublicSuffix('jp', null);
- checkPublicSuffix('test.jp', 'test.jp');
- checkPublicSuffix('www.test.jp', 'test.jp');
- checkPublicSuffix('ac.jp', null);
- checkPublicSuffix('test.ac.jp', 'test.ac.jp');
- checkPublicSuffix('www.test.ac.jp', 'test.ac.jp');
- checkPublicSuffix('kyoto.jp', null);
- checkPublicSuffix('c.kyoto.jp', null);
- checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp');
- checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp');
- checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule.
- checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule.
- checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule.
- checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule.
- // TLD with a wildcard rule and exceptions.
- checkPublicSuffix('om', null);
- checkPublicSuffix('test.om', null);
- checkPublicSuffix('b.test.om', 'b.test.om');
- checkPublicSuffix('a.b.test.om', 'b.test.om');
- checkPublicSuffix('songfest.om', 'songfest.om');
- checkPublicSuffix('www.songfest.om', 'songfest.om');
- // US K12.
- checkPublicSuffix('us', null);
- checkPublicSuffix('test.us', 'test.us');
- checkPublicSuffix('www.test.us', 'test.us');
- checkPublicSuffix('ak.us', null);
- checkPublicSuffix('test.ak.us', 'test.ak.us');
- checkPublicSuffix('www.test.ak.us', 'test.ak.us');
- checkPublicSuffix('k12.ak.us', null);
- checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us');
- checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us');
-
-
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/cookie.js
deleted file mode 100644
index c93e927a..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/cookie.js
+++ /dev/null
@@ -1,1107 +0,0 @@
-/*
- * Copyright GoInstant, Inc. and other contributors. All rights reserved.
- * 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.
- */
-
-'use strict';
-var net = require('net');
-var urlParse = require('url').parse;
-var pubsuffix = require('./pubsuffix');
-var Store = require('./store').Store;
-
-var punycode;
-try {
- punycode = require('punycode');
-} catch(e) {
- console.warn("cookie: can't load punycode; won't use punycode for domain normalization");
-}
-
-var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;
-
-// From RFC2616 S2.2:
-var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/;
-
-// From RFC6265 S4.1.1
-// note that it excludes \x3B ";"
-var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/;
-var COOKIE_OCTETS = new RegExp('^'+COOKIE_OCTET.source+'$');
-
-// The name/key cannot be empty but the value can (S5.2):
-var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2$');
-var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2\s*$/;
-
-// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"'
-// Note ';' is \x3B
-var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/;
-var EXTENSION_AV = NON_CTL_SEMICOLON;
-var PATH_VALUE = NON_CTL_SEMICOLON;
-
-// Used for checking whether or not there is a trailing semi-colon
-var TRAILING_SEMICOLON = /;+$/;
-
-/* RFC6265 S5.1.1.5:
- * [fail if] the day-of-month-value is less than 1 or greater than 31
- */
-var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/;
-
-/* RFC6265 S5.1.1.5:
- * [fail if]
- * * the hour-value is greater than 23,
- * * the minute-value is greater than 59, or
- * * the second-value is greater than 59.
- */
-var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/;
-var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/;
-
-var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i;
-var 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
-};
-var NUM_TO_MONTH = [
- 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'
-];
-var NUM_TO_DAY = [
- 'Sun','Mon','Tue','Wed','Thu','Fri','Sat'
-];
-
-var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits
-
-var MAX_TIME = 2147483647000; // 31-bit max
-var MIN_TIME = 0; // 31-bit min
-
-
-// RFC6265 S5.1.1 date parser:
-function parseDate(str,strict) {
- if (!str) {
- return;
- }
- var found_time, found_dom, found_month, found_year;
-
- /* RFC6265 S5.1.1:
- * 2. Process each date-token sequentially in the order the date-tokens
- * appear in the cookie-date
- */
- var tokens = str.split(DATE_DELIM);
- if (!tokens) {
- return;
- }
-
- var date = new Date();
- date.setMilliseconds(0);
-
- for (var i=0; i= 10 ? d : '0'+d;
- var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h;
- var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m;
- var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s;
- return NUM_TO_DAY[date.getUTCDay()] + ', ' +
- d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+
- h+':'+m+':'+s+' GMT';
-}
-
-// S5.1.2 Canonicalized Host Names
-function canonicalDomain(str) {
- if (str == null) {
- return null;
- }
- str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading .
-
- // convert to IDN if any non-ASCII characters
- if (punycode && /[^\u0001-\u007f]/.test(str)) {
- str = punycode.toASCII(str);
- }
-
- return str.toLowerCase();
-}
-
-// S5.1.3 Domain Matching
-function domainMatch(str, domStr, canonicalize) {
- if (str == null || domStr == null) {
- return null;
- }
- if (canonicalize !== false) {
- str = canonicalDomain(str);
- domStr = canonicalDomain(domStr);
- }
-
- /*
- * "The domain string and the string are identical. (Note that both the
- * domain string and the string will have been canonicalized to lower case at
- * this point)"
- */
- if (str == domStr) {
- return true;
- }
-
- /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */
-
- /* "* The string is a host name (i.e., not an IP address)." */
- if (net.isIP(str)) {
- return false;
- }
-
- /* "* The domain string is a suffix of the string" */
- var idx = str.indexOf(domStr);
- if (idx <= 0) {
- return false; // it's a non-match (-1) or prefix (0)
- }
-
- // e.g "a.b.c".indexOf("b.c") === 2
- // 5 === 3+2
- if (str.length !== domStr.length + idx) { // it's not a suffix
- return false;
- }
-
- /* "* The last character of the string that is not included in the domain
- * string is a %x2E (".") character." */
- if (str.substr(idx-1,1) !== '.') {
- return false;
- }
-
- return true;
-}
-
-
-// RFC6265 S5.1.4 Paths and Path-Match
-
-/*
- * "The user agent MUST use an algorithm equivalent to the following algorithm
- * to compute the default-path of a cookie:"
- *
- * Assumption: the path (and not query part or absolute uri) is passed in.
- */
-function defaultPath(path) {
- // "2. If the uri-path is empty or if the first character of the uri-path is not
- // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps.
- if (!path || path.substr(0,1) !== "/") {
- return "/";
- }
-
- // "3. If the uri-path contains no more than one %x2F ("/") character, output
- // %x2F ("/") and skip the remaining step."
- if (path === "/") {
- return path;
- }
-
- var rightSlash = path.lastIndexOf("/");
- if (rightSlash === 0) {
- return "/";
- }
-
- // "4. Output the characters of the uri-path from the first character up to,
- // but not including, the right-most %x2F ("/")."
- return path.slice(0, rightSlash);
-}
-
-/*
- * "A request-path path-matches a given cookie-path if at least one of the
- * following conditions holds:"
- */
-function pathMatch(reqPath,cookiePath) {
- // "o The cookie-path and the request-path are identical."
- if (cookiePath === reqPath) {
- return true;
- }
-
- var idx = reqPath.indexOf(cookiePath);
- if (idx === 0) {
- // "o The cookie-path is a prefix of the request-path, and the last
- // character of the cookie-path is %x2F ("/")."
- if (cookiePath.substr(-1) === "/") {
- return true;
- }
-
- // " o The cookie-path is a prefix of the request-path, and the first
- // character of the request-path that is not included in the cookie- path
- // is a %x2F ("/") character."
- if (reqPath.substr(cookiePath.length,1) === "/") {
- return true;
- }
- }
-
- return false;
-}
-
-function parse(str, strict) {
- str = str.trim();
-
- // S4.1.1 Trailing semi-colons are not part of the specification.
- // If we are not in strict mode we remove the trailing semi-colons.
- var semiColonCheck = TRAILING_SEMICOLON.exec(str);
- if (semiColonCheck) {
- if (strict) {
- return;
- }
- str = str.slice(0, semiColonCheck.index);
- }
-
- // We use a regex to parse the "name-value-pair" part of S5.2
- var firstSemi = str.indexOf(';'); // S5.2 step 1
- var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR;
- var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi));
-
- // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")"
- // constraints as well as trimming any whitespace.
- if (!result) {
- return;
- }
-
- var c = new Cookie();
- c.key = result[1]; // the regexp should trim() already
- c.value = result[3]; // [2] is quotes or empty-string
-
- if (firstSemi === -1) {
- return c;
- }
-
- // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string
- // (including the %x3B (";") in question)." plus later on in the same section
- // "discard the first ";" and trim".
- var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim();
-
- // "If the unparsed-attributes string is empty, skip the rest of these
- // steps."
- if (unparsed.length === 0) {
- return c;
- }
-
- /*
- * S5.2 says that when looping over the items "[p]rocess the attribute-name
- * and attribute-value according to the requirements in the following
- * subsections" for every item. Plus, for many of the individual attributes
- * in S5.3 it says to use the "attribute-value of the last attribute in the
- * cookie-attribute-list". Therefore, in this implementation, we overwrite
- * the previous value.
- */
- var cookie_avs = unparsed.split(/\s*;\s*/);
- while (cookie_avs.length) {
- var av = cookie_avs.shift();
-
- if (strict && !EXTENSION_AV.test(av)) {
- return;
- }
-
- var av_sep = av.indexOf('=');
- var av_key, av_value;
- if (av_sep === -1) {
- av_key = av;
- av_value = null;
- } else {
- av_key = av.substr(0,av_sep);
- av_value = av.substr(av_sep+1);
- }
-
- av_key = av_key.trim().toLowerCase();
- if (av_value) {
- av_value = av_value.trim();
- }
-
- switch(av_key) {
- case 'expires': // S5.2.1
- if (!av_value) {if(strict){return;}else{break;} }
- var exp = parseDate(av_value,strict);
- // "If the attribute-value failed to parse as a cookie date, ignore the
- // cookie-av."
- if (exp == null) { if(strict){return;}else{break;} }
- c.expires = exp;
- // over and underflow not realistically a concern: V8's getTime() seems to
- // store something larger than a 32-bit time_t (even with 32-bit node)
- break;
-
- case 'max-age': // S5.2.2
- if (!av_value) { if(strict){return;}else{break;} }
- // "If the first character of the attribute-value is not a DIGIT or a "-"
- // character ...[or]... If the remainder of attribute-value contains a
- // non-DIGIT character, ignore the cookie-av."
- if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return;}else{break;} }
- var delta = parseInt(av_value,10);
- if (strict && delta <= 0) {
- return; // S4.1.1
- }
- // "If delta-seconds is less than or equal to zero (0), let expiry-time
- // be the earliest representable date and time."
- c.setMaxAge(delta);
- break;
-
- case 'domain': // S5.2.3
- // "If the attribute-value is empty, the behavior is undefined. However,
- // the user agent SHOULD ignore the cookie-av entirely."
- if (!av_value) { if(strict){return;}else{break;} }
- // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E
- // (".") character."
- var domain = av_value.trim().replace(/^\./,'');
- if (!domain) { if(strict){return;}else{break;} } // see "is empty" above
- // "Convert the cookie-domain to lower case."
- c.domain = domain.toLowerCase();
- break;
-
- case 'path': // S5.2.4
- /*
- * "If the attribute-value is empty or if the first character of the
- * attribute-value is not %x2F ("/"):
- * Let cookie-path be the default-path.
- * Otherwise:
- * Let cookie-path be the attribute-value."
- *
- * We'll represent the default-path as null since it depends on the
- * context of the parsing.
- */
- if (!av_value || av_value.substr(0,1) != "/") {
- if(strict){return;}else{break;}
- }
- c.path = av_value;
- break;
-
- case 'secure': // S5.2.5
- /*
- * "If the attribute-name case-insensitively matches the string "Secure",
- * the user agent MUST append an attribute to the cookie-attribute-list
- * with an attribute-name of Secure and an empty attribute-value."
- */
- if (av_value != null) { if(strict){return;} }
- c.secure = true;
- break;
-
- case 'httponly': // S5.2.6 -- effectively the same as 'secure'
- if (av_value != null) { if(strict){return;} }
- c.httpOnly = true;
- break;
-
- default:
- c.extensions = c.extensions || [];
- c.extensions.push(av);
- break;
- }
- }
-
- // ensure a default date for sorting:
- c.creation = new Date();
- return c;
-}
-
-function fromJSON(str) {
- if (!str) {
- return null;
- }
-
- var obj;
- try {
- obj = JSON.parse(str);
- } catch (e) {
- return null;
- }
-
- var c = new Cookie();
- for (var i=0; i 1) {
- var lindex = path.lastIndexOf('/');
- if (lindex === 0) {
- break;
- }
- path = path.substr(0,lindex);
- permutations.push(path);
- }
- permutations.push('/');
- return permutations;
-}
-
-
-function Cookie (opts) {
- if (typeof opts !== "object") {
- return;
- }
- Object.keys(opts).forEach(function (key) {
- if (Cookie.prototype.hasOwnProperty(key)) {
- this[key] = opts[key] || Cookie.prototype[key];
- }
- }.bind(this));
-}
-
-Cookie.parse = parse;
-Cookie.fromJSON = fromJSON;
-
-Cookie.prototype.key = "";
-Cookie.prototype.value = "";
-
-// the order in which the RFC has them:
-Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity
-Cookie.prototype.maxAge = null; // takes precedence over expires for TTL
-Cookie.prototype.domain = null;
-Cookie.prototype.path = null;
-Cookie.prototype.secure = false;
-Cookie.prototype.httpOnly = false;
-Cookie.prototype.extensions = null;
-
-// set by the CookieJar:
-Cookie.prototype.hostOnly = null; // boolean when set
-Cookie.prototype.pathIsDefault = null; // boolean when set
-Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse
-Cookie.prototype.lastAccessed = null; // Date when set
-
-var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) {
- if (p instanceof Function) {
- return;
- }
- return p;
-}));
-var numCookieProperties = cookieProperties.length;
-
-Cookie.prototype.inspect = function inspect() {
- var now = Date.now();
- return 'Cookie="'+this.toString() +
- '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') +
- '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') +
- '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') +
- '"';
-};
-
-Cookie.prototype.validate = function validate() {
- if (!COOKIE_OCTETS.test(this.value)) {
- return false;
- }
- if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) {
- return false;
- }
- if (this.maxAge != null && this.maxAge <= 0) {
- return false; // "Max-Age=" non-zero-digit *DIGIT
- }
- if (this.path != null && !PATH_VALUE.test(this.path)) {
- return false;
- }
-
- var cdomain = this.cdomain();
- if (cdomain) {
- if (cdomain.match(/\.$/)) {
- return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this
- }
- var suffix = pubsuffix.getPublicSuffix(cdomain);
- if (suffix == null) { // it's a public suffix
- return false;
- }
- }
- return true;
-};
-
-Cookie.prototype.setExpires = function setExpires(exp) {
- if (exp instanceof Date) {
- this.expires = exp;
- } else {
- this.expires = parseDate(exp) || "Infinity";
- }
-};
-
-Cookie.prototype.setMaxAge = function setMaxAge(age) {
- if (age === Infinity || age === -Infinity) {
- this.maxAge = age.toString(); // so JSON.stringify() works
- } else {
- this.maxAge = age;
- }
-};
-
-// gives Cookie header format
-Cookie.prototype.cookieString = function cookieString() {
- var val = this.value;
- if (val == null) {
- val = '';
- }
- return this.key+'='+val;
-};
-
-// gives Set-Cookie header format
-Cookie.prototype.toString = function toString() {
- var str = this.cookieString();
-
- if (this.expires != Infinity) {
- if (this.expires instanceof Date) {
- str += '; Expires='+formatDate(this.expires);
- } else {
- str += '; Expires='+this.expires;
- }
- }
-
- if (this.maxAge != null && this.maxAge != Infinity) {
- str += '; Max-Age='+this.maxAge;
- }
-
- if (this.domain && !this.hostOnly) {
- str += '; Domain='+this.domain;
- }
- if (this.path) {
- str += '; Path='+this.path;
- }
-
- if (this.secure) {
- str += '; Secure';
- }
- if (this.httpOnly) {
- str += '; HttpOnly';
- }
- if (this.extensions) {
- this.extensions.forEach(function(ext) {
- str += '; '+ext;
- });
- }
-
- return str;
-};
-
-// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
-// elsewhere)
-// S5.3 says to give the "latest representable date" for which we use Infinity
-// For "expired" we use 0
-Cookie.prototype.TTL = function TTL(now) {
- /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires
- * attribute, the Max-Age attribute has precedence and controls the
- * expiration date of the cookie.
- * (Concurs with S5.3 step 3)
- */
- if (this.maxAge != null) {
- return this.maxAge<=0 ? 0 : this.maxAge*1000;
- }
-
- var expires = this.expires;
- if (expires != Infinity) {
- if (!(expires instanceof Date)) {
- expires = parseDate(expires) || Infinity;
- }
-
- if (expires == Infinity) {
- return Infinity;
- }
-
- return expires.getTime() - (now || Date.now());
- }
-
- return Infinity;
-};
-
-// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
-// elsewhere)
-Cookie.prototype.expiryTime = function expiryTime(now) {
- if (this.maxAge != null) {
- var relativeTo = this.creation || now || new Date();
- var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000;
- return relativeTo.getTime() + age;
- }
-
- if (this.expires == Infinity) {
- return Infinity;
- }
- return this.expires.getTime();
-};
-
-// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
-// elsewhere), except it returns a Date
-Cookie.prototype.expiryDate = function expiryDate(now) {
- var millisec = this.expiryTime(now);
- if (millisec == Infinity) {
- return new Date(MAX_TIME);
- } else if (millisec == -Infinity) {
- return new Date(MIN_TIME);
- } else {
- return new Date(millisec);
- }
-};
-
-// This replaces the "persistent-flag" parts of S5.3 step 3
-Cookie.prototype.isPersistent = function isPersistent() {
- return (this.maxAge != null || this.expires != Infinity);
-};
-
-// Mostly S5.1.2 and S5.2.3:
-Cookie.prototype.cdomain =
-Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() {
- if (this.domain == null) {
- return null;
- }
- return canonicalDomain(this.domain);
-};
-
-
-var memstore;
-function CookieJar(store, rejectPublicSuffixes) {
- if (rejectPublicSuffixes != null) {
- this.rejectPublicSuffixes = rejectPublicSuffixes;
- }
-
- if (!store) {
- memstore = memstore || require('./memstore');
- store = new memstore.MemoryCookieStore();
- }
- this.store = store;
-}
-CookieJar.prototype.store = null;
-CookieJar.prototype.rejectPublicSuffixes = true;
-var CAN_BE_SYNC = [];
-
-CAN_BE_SYNC.push('setCookie');
-CookieJar.prototype.setCookie = function(cookie, url, options, cb) {
- var err;
- var context = (url instanceof Object) ? url : urlParse(url);
- if (options instanceof Function) {
- cb = options;
- options = {};
- }
-
- var host = canonicalDomain(context.hostname);
-
- // S5.3 step 1
- if (!(cookie instanceof Cookie)) {
- cookie = Cookie.parse(cookie, options.strict === true);
- }
- if (!cookie) {
- err = new Error("Cookie failed to parse");
- return cb(options.ignoreError ? null : err);
- }
-
- // S5.3 step 2
- var now = options.now || new Date(); // will assign later to save effort in the face of errors
-
- // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie()
-
- // S5.3 step 4: NOOP; domain is null by default
-
- // S5.3 step 5: public suffixes
- if (this.rejectPublicSuffixes && cookie.domain) {
- var suffix = pubsuffix.getPublicSuffix(cookie.cdomain());
- if (suffix == null) { // e.g. "com"
- err = new Error("Cookie has domain set to a public suffix");
- return cb(options.ignoreError ? null : err);
- }
- }
-
- // S5.3 step 6:
- if (cookie.domain) {
- if (!domainMatch(host, cookie.cdomain(), false)) {
- err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host);
- return cb(options.ignoreError ? null : err);
- }
-
- if (cookie.hostOnly == null) { // don't reset if already set
- cookie.hostOnly = false;
- }
-
- } else {
- cookie.hostOnly = true;
- cookie.domain = host;
- }
-
- // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the
- // request-uri"
- if (!cookie.path) {
- cookie.path = defaultPath(context.pathname);
- cookie.pathIsDefault = true;
- } else {
- if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') {
- cookie.path = cookie.path.slice(0,-1);
- }
- }
-
- // S5.3 step 8: NOOP; secure attribute
- // S5.3 step 9: NOOP; httpOnly attribute
-
- // S5.3 step 10
- if (options.http === false && cookie.httpOnly) {
- err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
- return cb(options.ignoreError ? null : err);
- }
-
- var store = this.store;
-
- if (!store.updateCookie) {
- store.updateCookie = function(oldCookie, newCookie, cb) {
- this.putCookie(newCookie, cb);
- };
- }
-
- function withCookie(err, oldCookie) {
- if (err) {
- return cb(err);
- }
-
- var next = function(err) {
- if (err) {
- return cb(err);
- } else {
- cb(null, cookie);
- }
- };
-
- if (oldCookie) {
- // S5.3 step 11 - "If the cookie store contains a cookie with the same name,
- // domain, and path as the newly created cookie:"
- if (options.http === false && oldCookie.httpOnly) { // step 11.2
- err = new Error("old Cookie is HttpOnly and this isn't an HTTP API");
- return cb(options.ignoreError ? null : err);
- }
- cookie.creation = oldCookie.creation; // step 11.3
- cookie.lastAccessed = now;
- // Step 11.4 (delete cookie) is implied by just setting the new one:
- store.updateCookie(oldCookie, cookie, next); // step 12
-
- } else {
- cookie.creation = cookie.lastAccessed = now;
- store.putCookie(cookie, next); // step 12
- }
- }
-
- store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie);
-};
-
-// RFC6365 S5.4
-CAN_BE_SYNC.push('getCookies');
-CookieJar.prototype.getCookies = function(url, options, cb) {
- var context = (url instanceof Object) ? url : urlParse(url);
- if (options instanceof Function) {
- cb = options;
- options = {};
- }
-
- var host = canonicalDomain(context.hostname);
- var path = context.pathname || '/';
-
- var secure = options.secure;
- if (secure == null && context.protocol &&
- (context.protocol == 'https:' || context.protocol == 'wss:'))
- {
- secure = true;
- }
-
- var http = options.http;
- if (http == null) {
- http = true;
- }
-
- var now = options.now || Date.now();
- var expireCheck = options.expire !== false;
- var allPaths = !!options.allPaths;
- var store = this.store;
-
- function matchingCookie(c) {
- // "Either:
- // The cookie's host-only-flag is true and the canonicalized
- // request-host is identical to the cookie's domain.
- // Or:
- // The cookie's host-only-flag is false and the canonicalized
- // request-host domain-matches the cookie's domain."
- if (c.hostOnly) {
- if (c.domain != host) {
- return false;
- }
- } else {
- if (!domainMatch(host, c.domain, false)) {
- return false;
- }
- }
-
- // "The request-uri's path path-matches the cookie's path."
- if (!allPaths && !pathMatch(path, c.path)) {
- return false;
- }
-
- // "If the cookie's secure-only-flag is true, then the request-uri's
- // scheme must denote a "secure" protocol"
- if (c.secure && !secure) {
- return false;
- }
-
- // "If the cookie's http-only-flag is true, then exclude the cookie if the
- // cookie-string is being generated for a "non-HTTP" API"
- if (c.httpOnly && !http) {
- return false;
- }
-
- // deferred from S5.3
- // non-RFC: allow retention of expired cookies by choice
- if (expireCheck && c.expiryTime() <= now) {
- store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored
- return false;
- }
-
- return true;
- }
-
- store.findCookies(host, allPaths ? null : path, function(err,cookies) {
- if (err) {
- return cb(err);
- }
-
- cookies = cookies.filter(matchingCookie);
-
- // sorting of S5.4 part 2
- if (options.sort !== false) {
- cookies = cookies.sort(cookieCompare);
- }
-
- // S5.4 part 3
- var now = new Date();
- cookies.forEach(function(c) {
- c.lastAccessed = now;
- });
- // TODO persist lastAccessed
-
- cb(null,cookies);
- });
-};
-
-CAN_BE_SYNC.push('getCookieString');
-CookieJar.prototype.getCookieString = function(/*..., cb*/) {
- var args = Array.prototype.slice.call(arguments,0);
- var cb = args.pop();
- var next = function(err,cookies) {
- if (err) {
- cb(err);
- } else {
- cb(null, cookies.map(function(c){
- return c.cookieString();
- }).join('; '));
- }
- };
- args.push(next);
- this.getCookies.apply(this,args);
-};
-
-CAN_BE_SYNC.push('getSetCookieStrings');
-CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) {
- var args = Array.prototype.slice.call(arguments,0);
- var cb = args.pop();
- var next = function(err,cookies) {
- if (err) {
- cb(err);
- } else {
- cb(null, cookies.map(function(c){
- return c.toString();
- }));
- }
- };
- args.push(next);
- this.getCookies.apply(this,args);
-};
-
-// Use a closure to provide a true imperative API for synchronous stores.
-function syncWrap(method) {
- return function() {
- if (!this.store.synchronous) {
- throw new Error('CookieJar store is not synchronous; use async API instead.');
- }
-
- var args = Array.prototype.slice.call(arguments);
- var syncErr, syncResult;
- args.push(function syncCb(err, result) {
- syncErr = err;
- syncResult = result;
- });
- this[method].apply(this, args);
-
- if (syncErr) {
- throw syncErr;
- }
- return syncResult;
- };
-}
-
-// wrap all declared CAN_BE_SYNC methods in the sync wrapper
-CAN_BE_SYNC.forEach(function(method) {
- CookieJar.prototype[method+'Sync'] = syncWrap(method);
-});
-
-module.exports = {
- CookieJar: CookieJar,
- Cookie: Cookie,
- Store: Store,
- parseDate: parseDate,
- formatDate: formatDate,
- parse: parse,
- fromJSON: fromJSON,
- domainMatch: domainMatch,
- defaultPath: defaultPath,
- pathMatch: pathMatch,
- getPublicSuffix: pubsuffix.getPublicSuffix,
- cookieCompare: cookieCompare,
- permuteDomain: permuteDomain,
- permutePath: permutePath,
- canonicalDomain: canonicalDomain,
-};
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/memstore.js
deleted file mode 100644
index fc5774c8..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/memstore.js
+++ /dev/null
@@ -1,123 +0,0 @@
-'use strict';
-var tough = require('./cookie');
-var Store = require('./store').Store;
-var permuteDomain = tough.permuteDomain;
-var permutePath = tough.permutePath;
-var util = require('util');
-
-function MemoryCookieStore() {
- Store.call(this);
- this.idx = {};
-}
-util.inherits(MemoryCookieStore, Store);
-exports.MemoryCookieStore = MemoryCookieStore;
-MemoryCookieStore.prototype.idx = null;
-MemoryCookieStore.prototype.synchronous = true;
-
-// force a default depth:
-MemoryCookieStore.prototype.inspect = function() {
- return "{ idx: "+util.inspect(this.idx, false, 2)+' }';
-};
-
-MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) {
- if (!this.idx[domain]) {
- return cb(null,undefined);
- }
- if (!this.idx[domain][path]) {
- return cb(null,undefined);
- }
- return cb(null,this.idx[domain][path][key]||null);
-};
-
-MemoryCookieStore.prototype.findCookies = function(domain, path, cb) {
- var results = [];
- if (!domain) {
- return cb(null,[]);
- }
-
- var pathMatcher;
- if (!path) {
- // null or '/' means "all paths"
- pathMatcher = function matchAll(domainIndex) {
- for (var curPath in domainIndex) {
- var pathIndex = domainIndex[curPath];
- for (var key in pathIndex) {
- results.push(pathIndex[key]);
- }
- }
- };
-
- } else if (path === '/') {
- pathMatcher = function matchSlash(domainIndex) {
- var pathIndex = domainIndex['/'];
- if (!pathIndex) {
- return;
- }
- for (var key in pathIndex) {
- results.push(pathIndex[key]);
- }
- };
-
- } else {
- var paths = permutePath(path) || [path];
- pathMatcher = function matchRFC(domainIndex) {
- paths.forEach(function(curPath) {
- var pathIndex = domainIndex[curPath];
- if (!pathIndex) {
- return;
- }
- for (var key in pathIndex) {
- results.push(pathIndex[key]);
- }
- });
- };
- }
-
- var domains = permuteDomain(domain) || [domain];
- var idx = this.idx;
- domains.forEach(function(curDomain) {
- var domainIndex = idx[curDomain];
- if (!domainIndex) {
- return;
- }
- pathMatcher(domainIndex);
- });
-
- cb(null,results);
-};
-
-MemoryCookieStore.prototype.putCookie = function(cookie, cb) {
- if (!this.idx[cookie.domain]) {
- this.idx[cookie.domain] = {};
- }
- if (!this.idx[cookie.domain][cookie.path]) {
- this.idx[cookie.domain][cookie.path] = {};
- }
- this.idx[cookie.domain][cookie.path][cookie.key] = cookie;
- cb(null);
-};
-
-MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) {
- // updateCookie() may avoid updating cookies that are identical. For example,
- // lastAccessed may not be important to some stores and an equality
- // comparison could exclude that field.
- this.putCookie(newCookie,cb);
-};
-
-MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) {
- if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) {
- delete this.idx[domain][path][key];
- }
- cb(null);
-};
-
-MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) {
- if (this.idx[domain]) {
- if (path) {
- delete this.idx[domain][path];
- } else {
- delete this.idx[domain];
- }
- }
- return cb(null);
-};
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js
deleted file mode 100644
index a7031473..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************
- * AUTOMATICALLY GENERATED by generate-pubsuffix.js *
- * DO NOT EDIT! *
- ****************************************************/
-
-module.exports.getPublicSuffix = function getPublicSuffix(domain) {
- /*
- * Copyright GoInstant, Inc. and other contributors. All rights reserved.
- * 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.
- */
- if (!domain) return null;
- if (domain.match(/^\./)) return null;
-
- domain = domain.toLowerCase();
- var parts = domain.split('.').reverse();
-
- var suffix = '';
- var suffixLen = 0;
- for (var i=0; i suffixLen) {
- return parts.slice(0,suffixLen+1).reverse().join('.');
- }
-
- return null;
-};
-
-// The following generated structure is used under the MPL version 1.1
-// See public-suffix.txt for more information
-
-var index = module.exports.index = Object.freeze(
-{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true});
-
-// END of automatically generated file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/store.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/store.js
deleted file mode 100644
index f8433dfc..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/lib/store.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-/*jshint unused:false */
-
-function Store() {
-}
-exports.Store = Store;
-
-// Stores may be synchronous, but are still required to use a
-// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync"
-// API that converts from synchronous-callbacks to imperative style.
-Store.prototype.synchronous = false;
-
-Store.prototype.findCookie = function(domain, path, key, cb) {
- throw new Error('findCookie is not implemented');
-};
-
-Store.prototype.findCookies = function(domain, path, cb) {
- throw new Error('findCookies is not implemented');
-};
-
-Store.prototype.putCookie = function(cookie, cb) {
- throw new Error('putCookie is not implemented');
-};
-
-Store.prototype.updateCookie = function(oldCookie, newCookie, cb) {
- // recommended default implementation:
- // return this.putCookie(newCookie, cb);
- throw new Error('updateCookie is not implemented');
-};
-
-Store.prototype.removeCookie = function(domain, path, key, cb) {
- throw new Error('removeCookie is not implemented');
-};
-
-Store.prototype.removeCookies = function removeCookies(domain, path, cb) {
- throw new Error('removeCookies is not implemented');
-};
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt
deleted file mode 100644
index 11dddd00..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt
+++ /dev/null
@@ -1,278 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
deleted file mode 100644
index 97067e54..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright Mathias Bynens
-
-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/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
deleted file mode 100644
index 6dae5c4a..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.png?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.png)](https://gemnasium.com/bestiejs/punycode.js)
-
-A robust Punycode converter that fully complies to [RFC 3492](http://tools.ietf.org/html/rfc3492) and [RFC 5891](http://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms.
-
-This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:
-
-* [The C example code from RFC 3492](http://tools.ietf.org/html/rfc3492#appendix-C)
-* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)
-* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)
-* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)
-* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))
-
-This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc).
-
-## Installation
-
-Via [npm](http://npmjs.org/) (only required for Node.js releases older than v0.6.2):
-
-```bash
-npm install punycode
-```
-
-Via [Bower](http://bower.io/):
-
-```bash
-bower install punycode
-```
-
-Via [Component](https://github.com/component/component):
-
-```bash
-component install bestiejs/punycode.js
-```
-
-In a browser:
-
-```html
-
-```
-
-In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
-
-```js
-var punycode = require('punycode');
-```
-
-In [Rhino](http://www.mozilla.org/rhino/):
-
-```js
-load('punycode.js');
-```
-
-Using an AMD loader like [RequireJS](http://requirejs.org/):
-
-```js
-require(
- {
- 'paths': {
- 'punycode': 'path/to/punycode'
- }
- },
- ['punycode'],
- function(punycode) {
- console.log(punycode);
- }
-);
-```
-
-## API
-
-### `punycode.decode(string)`
-
-Converts a Punycode string of ASCII symbols to a string of Unicode symbols.
-
-```js
-// decode domain name parts
-punycode.decode('maana-pta'); // 'mañana'
-punycode.decode('--dqo34k'); // '☃-⌘'
-```
-
-### `punycode.encode(string)`
-
-Converts a string of Unicode symbols to a Punycode string of ASCII symbols.
-
-```js
-// encode domain name parts
-punycode.encode('mañana'); // 'maana-pta'
-punycode.encode('☃-⌘'); // '--dqo34k'
-```
-
-### `punycode.toUnicode(domain)`
-
-Converts a Punycode string representing a domain name to Unicode. Only the Punycoded parts of the domain name will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.
-
-```js
-// decode domain names
-punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
-punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
-```
-
-### `punycode.toASCII(domain)`
-
-Converts a Unicode string representing a domain name to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn’t matter if you call it with a domain that's already in ASCII.
-
-```js
-// encode domain names
-punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
-punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
-```
-
-### `punycode.ucs2`
-
-#### `punycode.ucs2.decode(string)`
-
-Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](http://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
-
-```js
-punycode.ucs2.decode('abc'); // [0x61, 0x62, 0x63]
-// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:
-punycode.ucs2.decode('\uD834\uDF06'); // [0x1D306]
-```
-
-#### `punycode.ucs2.encode(codePoints)`
-
-Creates a string based on an array of numeric code point values.
-
-```js
-punycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc'
-punycode.ucs2.encode([0x1D306]); // '\uD834\uDF06'
-```
-
-### `punycode.version`
-
-A string representing the current Punycode.js version number.
-
-[Full API documentation is available.](https://github.com/bestiejs/punycode.js/tree/master/docs#readme)
-
-## Unit tests & code coverage
-
-After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
-
-Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`.
-
-To generate [the code coverage report](http://rawgithub.com/bestiejs/punycode.js/master/coverage/punycode.js/punycode.js.html), use `grunt cover`.
-
-Feel free to fork if you see possible improvements!
-
-## Author
-
-| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") |
-|---|
-| [Mathias Bynens](http://mathiasbynens.be/) |
-
-## Contributors
-
-| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") |
-|---|
-| [John-David Dalton](http://allyoucanleet.com/) |
-
-## License
-
-Punycode.js is dual licensed under the [MIT](http://mths.be/mit) and [GPL](http://mths.be/gpl) licenses.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
deleted file mode 100644
index 35237574..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "name": "punycode",
- "version": "1.2.4",
- "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.",
- "homepage": "http://mths.be/punycode",
- "main": "punycode.js",
- "keywords": [
- "punycode",
- "unicode",
- "idn",
- "idna",
- "dns",
- "url",
- "domain"
- ],
- "licenses": [
- {
- "type": "MIT",
- "url": "http://mths.be/mit"
- },
- {
- "type": "GPL",
- "url": "http://mths.be/gpl"
- }
- ],
- "author": {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "http://mathiasbynens.be/"
- },
- "contributors": [
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be",
- "url": "http://mathiasbynens.be/"
- },
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com",
- "url": "http://allyoucanleet.com/"
- }
- ],
- "bugs": {
- "url": "https://github.com/bestiejs/punycode.js/issues"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/bestiejs/punycode.js.git"
- },
- "engines": [
- "node",
- "rhino"
- ],
- "directories": {
- "doc": "docs",
- "test": "tests"
- },
- "scripts": {
- "test": "node tests/tests.js"
- },
- "devDependencies": {
- "grunt": "~0.4.1",
- "grunt-contrib-uglify": "~0.2.2",
- "grunt-shell": "~0.6.4",
- "istanbul": "~0.2.4",
- "qunit-clib": "~1.3.0",
- "qunitjs": "~1.11.0",
- "requirejs": "~2.1.6"
- },
- "readme": "# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.png?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.png)](https://gemnasium.com/bestiejs/punycode.js)\n\nA robust Punycode converter that fully complies to [RFC 3492](http://tools.ietf.org/html/rfc3492) and [RFC 5891](http://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms.\n\nThis JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:\n\n* [The C example code from RFC 3492](http://tools.ietf.org/html/rfc3492#appendix-C)\n* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)\n* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)\n* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)\n* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))\n\nThis project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc).\n\n## Installation\n\nVia [npm](http://npmjs.org/) (only required for Node.js releases older than v0.6.2):\n\n```bash\nnpm install punycode\n```\n\nVia [Bower](http://bower.io/):\n\n```bash\nbower install punycode\n```\n\nVia [Component](https://github.com/component/component):\n\n```bash\ncomponent install bestiejs/punycode.js\n```\n\nIn a browser:\n\n```html\n\n```\n\nIn [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):\n\n```js\nvar punycode = require('punycode');\n```\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('punycode.js');\n```\n\nUsing an AMD loader like [RequireJS](http://requirejs.org/):\n\n```js\nrequire(\n {\n 'paths': {\n 'punycode': 'path/to/punycode'\n }\n },\n ['punycode'],\n function(punycode) {\n console.log(punycode);\n }\n);\n```\n\n## API\n\n### `punycode.decode(string)`\n\nConverts a Punycode string of ASCII symbols to a string of Unicode symbols.\n\n```js\n// decode domain name parts\npunycode.decode('maana-pta'); // 'mañana'\npunycode.decode('--dqo34k'); // '☃-⌘'\n```\n\n### `punycode.encode(string)`\n\nConverts a string of Unicode symbols to a Punycode string of ASCII symbols.\n\n```js\n// encode domain name parts\npunycode.encode('mañana'); // 'maana-pta'\npunycode.encode('☃-⌘'); // '--dqo34k'\n```\n\n### `punycode.toUnicode(domain)`\n\nConverts a Punycode string representing a domain name to Unicode. Only the Punycoded parts of the domain name will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.\n\n```js\n// decode domain names\npunycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'\npunycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'\n```\n\n### `punycode.toASCII(domain)`\n\nConverts a Unicode string representing a domain name to Punycode. Only the non-ASCII parts of the domain name will be converted, i.e. it doesn’t matter if you call it with a domain that's already in ASCII.\n\n```js\n// encode domain names\npunycode.toASCII('mañana.com'); // 'xn--maana-pta.com'\npunycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'\n```\n\n### `punycode.ucs2`\n\n#### `punycode.ucs2.decode(string)`\n\nCreates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](http://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.\n\n```js\npunycode.ucs2.decode('abc'); // [0x61, 0x62, 0x63]\n// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:\npunycode.ucs2.decode('\\uD834\\uDF06'); // [0x1D306]\n```\n\n#### `punycode.ucs2.encode(codePoints)`\n\nCreates a string based on an array of numeric code point values.\n\n```js\npunycode.ucs2.encode([0x61, 0x62, 0x63]); // 'abc'\npunycode.ucs2.encode([0x1D306]); // '\\uD834\\uDF06'\n```\n\n### `punycode.version`\n\nA string representing the current Punycode.js version number.\n\n[Full API documentation is available.](https://github.com/bestiejs/punycode.js/tree/master/docs#readme)\n\n## Unit tests & code coverage\n\nAfter cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.\n\nOnce that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`.\n\nTo generate [the code coverage report](http://rawgithub.com/bestiejs/punycode.js/master/coverage/punycode.js/punycode.js.html), use `grunt cover`.\n\nFeel free to fork if you see possible improvements!\n\n## Author\n\n| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](http://mathiasbynens.be/) |\n\n## Contributors\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## License\n\nPunycode.js is dual licensed under the [MIT](http://mths.be/mit) and [GPL](http://mths.be/gpl) licenses.\n",
- "readmeFilename": "README.md",
- "_id": "punycode@1.2.4",
- "_from": "punycode@>=0.2.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
deleted file mode 100644
index d5b9bc21..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
+++ /dev/null
@@ -1,507 +0,0 @@
-/*! http://mths.be/punycode v1.2.4 by @mathias */
-;(function(root) {
-
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports;
- var freeModule = typeof module == 'object' && module &&
- module.exports == freeExports && module;
- var freeGlobal = typeof global == 'object' && global;
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
- root = freeGlobal;
- }
-
- /**
- * The `punycode` object.
- * @name punycode
- * @type Object
- */
- var punycode,
-
- /** Highest positive signed 32-bit float value */
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
-
- /** Bootstring parameters */
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
-
- /** Regular expressions */
- regexPunycode = /^xn--/,
- regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
-
- /** Error messages */
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
-
- /** Convenience shortcuts */
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
-
- /** Temporary variable */
- key;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error(type) {
- throw RangeError(errors[type]);
- }
-
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var length = array.length;
- while (length--) {
- array[length] = fn(array[length]);
- }
- return array;
- }
-
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings.
- * @private
- * @param {String} domain The domain name.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- return map(string.split(regexSeparators), fn).join('.');
- }
-
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // high surrogate, and there is a next character
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // unmatched surrogate; only append this code unit, in case the next
- // code unit is the high surrogate of a surrogate pair
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
-
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
-
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
-
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * http://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
-
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- function decode(input) {
- // Don't use UCS-2
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
- /** Cached calculation results */
- baseMinusT;
-
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
-
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
-
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
-
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
-
- if (index >= inputLength) {
- error('invalid-input');
- }
-
- digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
-
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
-
- if (digit < t) {
- break;
- }
-
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
-
- w *= baseMinusT;
-
- }
-
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- // Insert `n` at position `i` of the output
- output.splice(i++, 0, n);
-
- }
-
- return ucs2encode(output);
- }
-
- /**
- * Converts a string of Unicode symbols to a Punycode string of ASCII-only
- * symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
- /** `inputLength` will hold the number of code points in `input`. */
- inputLength,
- /** Cached calculation results */
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
-
- // Convert the input in UCS-2 to Unicode
- input = ucs2decode(input);
-
- // Cache the length
- inputLength = input.length;
-
- // Initialize the state
- n = initialN;
- delta = 0;
- bias = initialBias;
-
- // Handle the basic code points
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- handledCPCount = basicLength = output.length;
-
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
-
- // Finish the basic string - if it is not empty - with a delimiter
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
-
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's state to ,
- // but guard against overflow
- handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error('overflow');
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
-
- if (currentValue < n && ++delta > maxInt) {
- error('overflow');
- }
-
- if (currentValue == n) {
- // Represent delta as a generalized variable-length integer
- for (q = delta, k = base; /* no condition */; k += base) {
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) {
- break;
- }
- qMinusT = q - t;
- baseMinusT = base - t;
- output.push(
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
- );
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
-
- ++delta;
- ++n;
-
- }
- return output.join('');
- }
-
- /**
- * Converts a Punycode string representing a domain name to Unicode. Only the
- * Punycoded parts of the domain name will be converted, i.e. it doesn't
- * matter if you call it on a string that has already been converted to
- * Unicode.
- * @memberOf punycode
- * @param {String} domain The Punycode domain name to convert to Unicode.
- * @returns {String} The Unicode representation of the given Punycode
- * string.
- */
- function toUnicode(domain) {
- return mapDomain(domain, function(string) {
- return regexPunycode.test(string)
- ? decode(string.slice(4).toLowerCase())
- : string;
- });
- }
-
- /**
- * Converts a Unicode string representing a domain name to Punycode. Only the
- * non-ASCII parts of the domain name will be converted, i.e. it doesn't
- * matter if you call it with a domain that's already in ASCII.
- * @memberOf punycode
- * @param {String} domain The domain name to convert, as a Unicode string.
- * @returns {String} The Punycode representation of the given domain name.
- */
- function toASCII(domain) {
- return mapDomain(domain, function(string) {
- return regexNonASCII.test(string)
- ? 'xn--' + encode(string)
- : string;
- });
- }
-
- /*--------------------------------------------------------------------------*/
-
- /** Define the public API */
- punycode = {
- /**
- * A string representing the current Punycode.js version number.
- * @memberOf punycode
- * @type String
- */
- 'version': '1.2.4',
- /**
- * An object of methods to convert from JavaScript's internal character
- * representation (UCS-2) to Unicode code points, and back.
- * @see
- * @memberOf punycode
- * @type Object
- */
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
-
- /** Expose `punycode` */
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define('punycode', function() {
- return punycode;
- });
- } else if (freeExports && !freeExports.nodeType) {
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else { // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else { // in Rhino or a web browser
- root.punycode = punycode;
- }
-
-}(this));
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js
deleted file mode 100644
index 24c8af24..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! http://mths.be/punycode v1.2.4 by @mathias */
-!function(a){function b(a){throw RangeError(E[a])}function c(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function d(a,b){return c(a.split(D),b).join(".")}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=H(a>>>10&1023|55296),a=56320|1023&a),b+=H(a)}).join("")}function g(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:t}function h(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function i(a,b,c){var d=0;for(a=c?G(a/x):a>>1,a+=G(a/b);a>F*v>>1;d+=t)a=G(a/F);return G(d+(F+1)*a/(a+w))}function j(a){var c,d,e,h,j,k,l,m,n,o,p=[],q=a.length,r=0,w=z,x=y;for(d=a.lastIndexOf(A),0>d&&(d=0),e=0;d>e;++e)a.charCodeAt(e)>=128&&b("not-basic"),p.push(a.charCodeAt(e));for(h=d>0?d+1:0;q>h;){for(j=r,k=1,l=t;h>=q&&b("invalid-input"),m=g(a.charCodeAt(h++)),(m>=t||m>G((s-r)/k))&&b("overflow"),r+=m*k,n=x>=l?u:l>=x+v?v:l-x,!(n>m);l+=t)o=t-n,k>G(s/o)&&b("overflow"),k*=o;c=p.length+1,x=i(r-j,c,0==j),G(r/c)>s-w&&b("overflow"),w+=G(r/c),r%=c,p.splice(r++,0,w)}return f(p)}function k(a){var c,d,f,g,j,k,l,m,n,o,p,q,r,w,x,B=[];for(a=e(a),q=a.length,c=z,d=0,j=y,k=0;q>k;++k)p=a[k],128>p&&B.push(H(p));for(f=g=B.length,g&&B.push(A);q>f;){for(l=s,k=0;q>k;++k)p=a[k],p>=c&&l>p&&(l=p);for(r=f+1,l-c>G((s-d)/r)&&b("overflow"),d+=(l-c)*r,c=l,k=0;q>k;++k)if(p=a[k],c>p&&++d>s&&b("overflow"),p==c){for(m=d,n=t;o=j>=n?u:n>=j+v?v:n-j,!(o>m);n+=t)x=m-o,w=t-o,B.push(H(h(o+x%w,0))),m=G(x/w);B.push(H(h(m,0))),j=i(d,r,f==g),d=0,++f}++d,++c}return B.join("")}function l(a){return d(a,function(a){return B.test(a)?j(a.slice(4).toLowerCase()):a})}function m(a){return d(a,function(a){return C.test(a)?"xn--"+k(a):a})}var n="object"==typeof exports&&exports,o="object"==typeof module&&module&&module.exports==n&&module,p="object"==typeof global&&global;(p.global===p||p.window===p)&&(a=p);var q,r,s=2147483647,t=36,u=1,v=26,w=38,x=700,y=72,z=128,A="-",B=/^xn--/,C=/[^ -~]/,D=/\x2E|\u3002|\uFF0E|\uFF61/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=t-u,G=Math.floor,H=String.fromCharCode;if(q={version:"1.2.4",ucs2:{decode:e,encode:f},decode:j,encode:k,toASCII:m,toUnicode:l},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return q});else if(n&&!n.nodeType)if(o)o.exports=q;else for(r in q)q.hasOwnProperty(r)&&(n[r]=q[r]);else a.punycode=q}(this);
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/package.json
deleted file mode 100644
index a55afc50..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "author": {
- "name": "GoInstant Inc., a salesforce.com company"
- },
- "license": "MIT",
- "name": "tough-cookie",
- "description": "RFC6265 Cookies and Cookie Jar for node.js",
- "keywords": [
- "HTTP",
- "cookie",
- "cookies",
- "set-cookie",
- "cookiejar",
- "jar",
- "RFC6265",
- "RFC2965"
- ],
- "version": "0.12.1",
- "homepage": "https://github.com/goinstant/tough-cookie",
- "repository": {
- "type": "git",
- "url": "git://github.com/goinstant/tough-cookie.git"
- },
- "bugs": {
- "url": "https://github.com/goinstant/tough-cookie/issues"
- },
- "main": "./lib/cookie",
- "scripts": {
- "test": "vows test.js"
- },
- "engines": {
- "node": ">=0.4.12"
- },
- "dependencies": {
- "punycode": ">=0.2.0"
- },
- "devDependencies": {
- "vows": "0.7.0",
- "async": ">=0.1.12"
- },
- "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n[![Build Status](https://travis-ci.org/goinstant/node-cookie.png?branch=master)](https://travis-ci.org/goinstant/node-cookie)\n\n[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)\n![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)\n\n# Synopsis\n\n``` javascript\nvar tough = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = tough.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new tough.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ntough\n=====\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(function (c) { return (Cookie.parse(c)); });\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n\nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n\nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.setCookieSync(cookieOrString, currentUrl, [{options}])\n-------------------------------------------------------\n\nSynchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n\n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookiesSync(currentUrl, [{options}])\n----------------------------------------\n\nSynchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getCookieStringSync(...)\n-------------------------\n\nSynchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.getSetCookieStrings(...)\n-------------------------\n\nReturns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.\n\n.getSetCookieStringsSync(...)\n-----------------------------\n\nSynchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\nStore\n=====\n\nBase class for CookieJar stores.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nStores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. Stores are asynchronous by default, but if `store.synchronous` is set, then the `*Sync` methods on the CookieJar can be used.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright 2012- GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n",
- "readmeFilename": "README.md",
- "_id": "tough-cookie@0.12.1",
- "_from": "tough-cookie@>=0.12.0"
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/public-suffix.txt
deleted file mode 100644
index 2c201312..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/public-suffix.txt
+++ /dev/null
@@ -1,5229 +0,0 @@
-// ***** BEGIN LICENSE BLOCK *****
-// Version: MPL 1.1/GPL 2.0/LGPL 2.1
-//
-// The contents of this file are subject to the Mozilla Public License Version
-// 1.1 (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-// http://www.mozilla.org/MPL/
-//
-// Software distributed under the License is distributed on an "AS IS" basis,
-// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-// for the specific language governing rights and limitations under the
-// License.
-//
-// The Original Code is the Public Suffix List.
-//
-// The Initial Developer of the Original Code is
-// Jo Hermans .
-// Portions created by the Initial Developer are Copyright (C) 2007
-// the Initial Developer. All Rights Reserved.
-//
-// Contributor(s):
-// Ruben Arakelyan
-// Gervase Markham
-// Pamela Greene
-// David Triendl
-// Jothan Frakes
-// The kind representatives of many TLD registries
-//
-// Alternatively, the contents of this file may be used under the terms of
-// either the GNU General Public License Version 2 or later (the "GPL"), or
-// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-// in which case the provisions of the GPL or the LGPL are applicable instead
-// of those above. If you wish to allow use of your version of this file only
-// under the terms of either the GPL or the LGPL, and not to allow others to
-// use your version of this file under the terms of the MPL, indicate your
-// decision by deleting the provisions above and replace them with the notice
-// and other provisions required by the GPL or the LGPL. If you do not delete
-// the provisions above, a recipient may use your version of this file under
-// the terms of any one of the MPL, the GPL or the LGPL.
-//
-// ***** END LICENSE BLOCK *****
-
-// ===BEGIN ICANN DOMAINS===
-
-// ac : http://en.wikipedia.org/wiki/.ac
-ac
-com.ac
-edu.ac
-gov.ac
-net.ac
-mil.ac
-org.ac
-
-// ad : http://en.wikipedia.org/wiki/.ad
-ad
-nom.ad
-
-// ae : http://en.wikipedia.org/wiki/.ae
-// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php
-ae
-co.ae
-net.ae
-org.ae
-sch.ae
-ac.ae
-gov.ae
-mil.ae
-
-// aero : see http://www.information.aero/index.php?id=66
-aero
-accident-investigation.aero
-accident-prevention.aero
-aerobatic.aero
-aeroclub.aero
-aerodrome.aero
-agents.aero
-aircraft.aero
-airline.aero
-airport.aero
-air-surveillance.aero
-airtraffic.aero
-air-traffic-control.aero
-ambulance.aero
-amusement.aero
-association.aero
-author.aero
-ballooning.aero
-broker.aero
-caa.aero
-cargo.aero
-catering.aero
-certification.aero
-championship.aero
-charter.aero
-civilaviation.aero
-club.aero
-conference.aero
-consultant.aero
-consulting.aero
-control.aero
-council.aero
-crew.aero
-design.aero
-dgca.aero
-educator.aero
-emergency.aero
-engine.aero
-engineer.aero
-entertainment.aero
-equipment.aero
-exchange.aero
-express.aero
-federation.aero
-flight.aero
-freight.aero
-fuel.aero
-gliding.aero
-government.aero
-groundhandling.aero
-group.aero
-hanggliding.aero
-homebuilt.aero
-insurance.aero
-journal.aero
-journalist.aero
-leasing.aero
-logistics.aero
-magazine.aero
-maintenance.aero
-marketplace.aero
-media.aero
-microlight.aero
-modelling.aero
-navigation.aero
-parachuting.aero
-paragliding.aero
-passenger-association.aero
-pilot.aero
-press.aero
-production.aero
-recreation.aero
-repbody.aero
-res.aero
-research.aero
-rotorcraft.aero
-safety.aero
-scientist.aero
-services.aero
-show.aero
-skydiving.aero
-software.aero
-student.aero
-taxi.aero
-trader.aero
-trading.aero
-trainer.aero
-union.aero
-workinggroup.aero
-works.aero
-
-// af : http://www.nic.af/help.jsp
-af
-gov.af
-com.af
-org.af
-net.af
-edu.af
-
-// ag : http://www.nic.ag/prices.htm
-ag
-com.ag
-org.ag
-net.ag
-co.ag
-nom.ag
-
-// ai : http://nic.com.ai/
-ai
-off.ai
-com.ai
-net.ai
-org.ai
-
-// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
-al
-com.al
-edu.al
-gov.al
-mil.al
-net.al
-org.al
-
-// am : http://en.wikipedia.org/wiki/.am
-am
-
-// an : http://www.una.an/an_domreg/default.asp
-an
-com.an
-net.an
-org.an
-edu.an
-
-// ao : http://en.wikipedia.org/wiki/.ao
-// http://www.dns.ao/REGISTR.DOC
-ao
-ed.ao
-gv.ao
-og.ao
-co.ao
-pb.ao
-it.ao
-
-// aq : http://en.wikipedia.org/wiki/.aq
-aq
-
-// ar : http://en.wikipedia.org/wiki/.ar
-*.ar
-!congresodelalengua3.ar
-!educ.ar
-!gobiernoelectronico.ar
-!mecon.ar
-!nacion.ar
-!nic.ar
-!promocion.ar
-!retina.ar
-!uba.ar
-
-// arpa : http://en.wikipedia.org/wiki/.arpa
-// Confirmed by registry 2008-06-18
-e164.arpa
-in-addr.arpa
-ip6.arpa
-iris.arpa
-uri.arpa
-urn.arpa
-
-// as : http://en.wikipedia.org/wiki/.as
-as
-gov.as
-
-// asia : http://en.wikipedia.org/wiki/.asia
-asia
-
-// at : http://en.wikipedia.org/wiki/.at
-// Confirmed by registry 2008-06-17
-at
-ac.at
-co.at
-gv.at
-or.at
-
-// au : http://en.wikipedia.org/wiki/.au
-// http://www.auda.org.au/
-// 2LDs
-com.au
-net.au
-org.au
-edu.au
-gov.au
-csiro.au
-asn.au
-id.au
-// Historic 2LDs (closed to new registration, but sites still exist)
-info.au
-conf.au
-oz.au
-// CGDNs - http://www.cgdn.org.au/
-act.au
-nsw.au
-nt.au
-qld.au
-sa.au
-tas.au
-vic.au
-wa.au
-// 3LDs
-act.edu.au
-nsw.edu.au
-nt.edu.au
-qld.edu.au
-sa.edu.au
-tas.edu.au
-vic.edu.au
-wa.edu.au
-act.gov.au
-// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04
-// nsw.gov.au
-nt.gov.au
-qld.gov.au
-sa.gov.au
-tas.gov.au
-vic.gov.au
-wa.gov.au
-
-// aw : http://en.wikipedia.org/wiki/.aw
-aw
-com.aw
-
-// ax : http://en.wikipedia.org/wiki/.ax
-ax
-
-// az : http://en.wikipedia.org/wiki/.az
-az
-com.az
-net.az
-int.az
-gov.az
-org.az
-edu.az
-info.az
-pp.az
-mil.az
-name.az
-pro.az
-biz.az
-
-// ba : http://en.wikipedia.org/wiki/.ba
-ba
-org.ba
-net.ba
-edu.ba
-gov.ba
-mil.ba
-unsa.ba
-unbi.ba
-co.ba
-com.ba
-rs.ba
-
-// bb : http://en.wikipedia.org/wiki/.bb
-bb
-biz.bb
-com.bb
-edu.bb
-gov.bb
-info.bb
-net.bb
-org.bb
-store.bb
-
-// bd : http://en.wikipedia.org/wiki/.bd
-*.bd
-
-// be : http://en.wikipedia.org/wiki/.be
-// Confirmed by registry 2008-06-08
-be
-ac.be
-
-// bf : http://en.wikipedia.org/wiki/.bf
-bf
-gov.bf
-
-// bg : http://en.wikipedia.org/wiki/.bg
-// https://www.register.bg/user/static/rules/en/index.html
-bg
-a.bg
-b.bg
-c.bg
-d.bg
-e.bg
-f.bg
-g.bg
-h.bg
-i.bg
-j.bg
-k.bg
-l.bg
-m.bg
-n.bg
-o.bg
-p.bg
-q.bg
-r.bg
-s.bg
-t.bg
-u.bg
-v.bg
-w.bg
-x.bg
-y.bg
-z.bg
-0.bg
-1.bg
-2.bg
-3.bg
-4.bg
-5.bg
-6.bg
-7.bg
-8.bg
-9.bg
-
-// bh : http://en.wikipedia.org/wiki/.bh
-bh
-com.bh
-edu.bh
-net.bh
-org.bh
-gov.bh
-
-// bi : http://en.wikipedia.org/wiki/.bi
-// http://whois.nic.bi/
-bi
-co.bi
-com.bi
-edu.bi
-or.bi
-org.bi
-
-// biz : http://en.wikipedia.org/wiki/.biz
-biz
-
-// bj : http://en.wikipedia.org/wiki/.bj
-bj
-asso.bj
-barreau.bj
-gouv.bj
-
-// bm : http://www.bermudanic.bm/dnr-text.txt
-bm
-com.bm
-edu.bm
-gov.bm
-net.bm
-org.bm
-
-// bn : http://en.wikipedia.org/wiki/.bn
-*.bn
-
-// bo : http://www.nic.bo/
-bo
-com.bo
-edu.bo
-gov.bo
-gob.bo
-int.bo
-org.bo
-net.bo
-mil.bo
-tv.bo
-
-// br : http://registro.br/dominio/dpn.html
-// Updated by registry 2011-03-01
-br
-adm.br
-adv.br
-agr.br
-am.br
-arq.br
-art.br
-ato.br
-b.br
-bio.br
-blog.br
-bmd.br
-can.br
-cim.br
-cng.br
-cnt.br
-com.br
-coop.br
-ecn.br
-edu.br
-emp.br
-eng.br
-esp.br
-etc.br
-eti.br
-far.br
-flog.br
-fm.br
-fnd.br
-fot.br
-fst.br
-g12.br
-ggf.br
-gov.br
-imb.br
-ind.br
-inf.br
-jor.br
-jus.br
-lel.br
-mat.br
-med.br
-mil.br
-mus.br
-net.br
-nom.br
-not.br
-ntr.br
-odo.br
-org.br
-ppg.br
-pro.br
-psc.br
-psi.br
-qsl.br
-radio.br
-rec.br
-slg.br
-srv.br
-taxi.br
-teo.br
-tmp.br
-trd.br
-tur.br
-tv.br
-vet.br
-vlog.br
-wiki.br
-zlg.br
-
-// bs : http://www.nic.bs/rules.html
-bs
-com.bs
-net.bs
-org.bs
-edu.bs
-gov.bs
-
-// bt : http://en.wikipedia.org/wiki/.bt
-bt
-com.bt
-edu.bt
-gov.bt
-net.bt
-org.bt
-
-// bv : No registrations at this time.
-// Submitted by registry 2006-06-16
-
-// bw : http://en.wikipedia.org/wiki/.bw
-// http://www.gobin.info/domainname/bw.doc
-// list of other 2nd level tlds ?
-bw
-co.bw
-org.bw
-
-// by : http://en.wikipedia.org/wiki/.by
-// http://tld.by/rules_2006_en.html
-// list of other 2nd level tlds ?
-by
-gov.by
-mil.by
-// Official information does not indicate that com.by is a reserved
-// second-level domain, but it's being used as one (see www.google.com.by and
-// www.yahoo.com.by, for example), so we list it here for safety's sake.
-com.by
-
-// http://hoster.by/
-of.by
-
-// bz : http://en.wikipedia.org/wiki/.bz
-// http://www.belizenic.bz/
-bz
-com.bz
-net.bz
-org.bz
-edu.bz
-gov.bz
-
-// ca : http://en.wikipedia.org/wiki/.ca
-ca
-// ca geographical names
-ab.ca
-bc.ca
-mb.ca
-nb.ca
-nf.ca
-nl.ca
-ns.ca
-nt.ca
-nu.ca
-on.ca
-pe.ca
-qc.ca
-sk.ca
-yk.ca
-// gc.ca: http://en.wikipedia.org/wiki/.gc.ca
-// see also: http://registry.gc.ca/en/SubdomainFAQ
-gc.ca
-
-// cat : http://en.wikipedia.org/wiki/.cat
-cat
-
-// cc : http://en.wikipedia.org/wiki/.cc
-cc
-
-// cd : http://en.wikipedia.org/wiki/.cd
-// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
-cd
-gov.cd
-
-// cf : http://en.wikipedia.org/wiki/.cf
-cf
-
-// cg : http://en.wikipedia.org/wiki/.cg
-cg
-
-// ch : http://en.wikipedia.org/wiki/.ch
-ch
-
-// ci : http://en.wikipedia.org/wiki/.ci
-// http://www.nic.ci/index.php?page=charte
-ci
-org.ci
-or.ci
-com.ci
-co.ci
-edu.ci
-ed.ci
-ac.ci
-net.ci
-go.ci
-asso.ci
-aéroport.ci
-int.ci
-presse.ci
-md.ci
-gouv.ci
-
-// ck : http://en.wikipedia.org/wiki/.ck
-*.ck
-!www.ck
-
-// cl : http://en.wikipedia.org/wiki/.cl
-cl
-gov.cl
-gob.cl
-co.cl
-mil.cl
-
-// cm : http://en.wikipedia.org/wiki/.cm
-cm
-gov.cm
-
-// cn : http://en.wikipedia.org/wiki/.cn
-// Submitted by registry 2008-06-11
-cn
-ac.cn
-com.cn
-edu.cn
-gov.cn
-net.cn
-org.cn
-mil.cn
-公司.cn
-网络.cn
-網絡.cn
-// cn geographic names
-ah.cn
-bj.cn
-cq.cn
-fj.cn
-gd.cn
-gs.cn
-gz.cn
-gx.cn
-ha.cn
-hb.cn
-he.cn
-hi.cn
-hl.cn
-hn.cn
-jl.cn
-js.cn
-jx.cn
-ln.cn
-nm.cn
-nx.cn
-qh.cn
-sc.cn
-sd.cn
-sh.cn
-sn.cn
-sx.cn
-tj.cn
-xj.cn
-xz.cn
-yn.cn
-zj.cn
-hk.cn
-mo.cn
-tw.cn
-
-// co : http://en.wikipedia.org/wiki/.co
-// Submitted by registry 2008-06-11
-co
-arts.co
-com.co
-edu.co
-firm.co
-gov.co
-info.co
-int.co
-mil.co
-net.co
-nom.co
-org.co
-rec.co
-web.co
-
-// com : http://en.wikipedia.org/wiki/.com
-com
-
-// coop : http://en.wikipedia.org/wiki/.coop
-coop
-
-// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
-cr
-ac.cr
-co.cr
-ed.cr
-fi.cr
-go.cr
-or.cr
-sa.cr
-
-// cu : http://en.wikipedia.org/wiki/.cu
-cu
-com.cu
-edu.cu
-org.cu
-net.cu
-gov.cu
-inf.cu
-
-// cv : http://en.wikipedia.org/wiki/.cv
-cv
-
-// cx : http://en.wikipedia.org/wiki/.cx
-// list of other 2nd level tlds ?
-cx
-gov.cx
-
-// cy : http://en.wikipedia.org/wiki/.cy
-*.cy
-
-// cz : http://en.wikipedia.org/wiki/.cz
-cz
-
-// de : http://en.wikipedia.org/wiki/.de
-// Confirmed by registry (with technical
-// reservations) 2008-07-01
-de
-
-// dj : http://en.wikipedia.org/wiki/.dj
-dj
-
-// dk : http://en.wikipedia.org/wiki/.dk
-// Confirmed by registry 2008-06-17
-dk
-
-// dm : http://en.wikipedia.org/wiki/.dm
-dm
-com.dm
-net.dm
-org.dm
-edu.dm
-gov.dm
-
-// do : http://en.wikipedia.org/wiki/.do
-do
-art.do
-com.do
-edu.do
-gob.do
-gov.do
-mil.do
-net.do
-org.do
-sld.do
-web.do
-
-// dz : http://en.wikipedia.org/wiki/.dz
-dz
-com.dz
-org.dz
-net.dz
-gov.dz
-edu.dz
-asso.dz
-pol.dz
-art.dz
-
-// ec : http://www.nic.ec/reg/paso1.asp
-// Submitted by registry 2008-07-04
-ec
-com.ec
-info.ec
-net.ec
-fin.ec
-k12.ec
-med.ec
-pro.ec
-org.ec
-edu.ec
-gov.ec
-gob.ec
-mil.ec
-
-// edu : http://en.wikipedia.org/wiki/.edu
-edu
-
-// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
-ee
-edu.ee
-gov.ee
-riik.ee
-lib.ee
-med.ee
-com.ee
-pri.ee
-aip.ee
-org.ee
-fie.ee
-
-// eg : http://en.wikipedia.org/wiki/.eg
-eg
-com.eg
-edu.eg
-eun.eg
-gov.eg
-mil.eg
-name.eg
-net.eg
-org.eg
-sci.eg
-
-// er : http://en.wikipedia.org/wiki/.er
-*.er
-
-// es : https://www.nic.es/site_ingles/ingles/dominios/index.html
-es
-com.es
-nom.es
-org.es
-gob.es
-edu.es
-
-// et : http://en.wikipedia.org/wiki/.et
-*.et
-
-// eu : http://en.wikipedia.org/wiki/.eu
-eu
-
-// fi : http://en.wikipedia.org/wiki/.fi
-fi
-// aland.fi : http://en.wikipedia.org/wiki/.ax
-// This domain is being phased out in favor of .ax. As there are still many
-// domains under aland.fi, we still keep it on the list until aland.fi is
-// completely removed.
-// TODO: Check for updates (expected to be phased out around Q1/2009)
-aland.fi
-
-// fj : http://en.wikipedia.org/wiki/.fj
-*.fj
-
-// fk : http://en.wikipedia.org/wiki/.fk
-*.fk
-
-// fm : http://en.wikipedia.org/wiki/.fm
-fm
-
-// fo : http://en.wikipedia.org/wiki/.fo
-fo
-
-// fr : http://www.afnic.fr/
-// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs
-fr
-com.fr
-asso.fr
-nom.fr
-prd.fr
-presse.fr
-tm.fr
-// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels
-aeroport.fr
-assedic.fr
-avocat.fr
-avoues.fr
-cci.fr
-chambagri.fr
-chirurgiens-dentistes.fr
-experts-comptables.fr
-geometre-expert.fr
-gouv.fr
-greta.fr
-huissier-justice.fr
-medecin.fr
-notaires.fr
-pharmacien.fr
-port.fr
-veterinaire.fr
-
-// ga : http://en.wikipedia.org/wiki/.ga
-ga
-
-// gb : This registry is effectively dormant
-// Submitted by registry 2008-06-12
-
-// gd : http://en.wikipedia.org/wiki/.gd
-gd
-
-// ge : http://www.nic.net.ge/policy_en.pdf
-ge
-com.ge
-edu.ge
-gov.ge
-org.ge
-mil.ge
-net.ge
-pvt.ge
-
-// gf : http://en.wikipedia.org/wiki/.gf
-gf
-
-// gg : http://www.channelisles.net/applic/avextn.shtml
-gg
-co.gg
-org.gg
-net.gg
-sch.gg
-gov.gg
-
-// gh : http://en.wikipedia.org/wiki/.gh
-// see also: http://www.nic.gh/reg_now.php
-// Although domains directly at second level are not possible at the moment,
-// they have been possible for some time and may come back.
-gh
-com.gh
-edu.gh
-gov.gh
-org.gh
-mil.gh
-
-// gi : http://www.nic.gi/rules.html
-gi
-com.gi
-ltd.gi
-gov.gi
-mod.gi
-edu.gi
-org.gi
-
-// gl : http://en.wikipedia.org/wiki/.gl
-// http://nic.gl
-gl
-
-// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm
-gm
-
-// gn : http://psg.com/dns/gn/gn.txt
-// Submitted by registry 2008-06-17
-ac.gn
-com.gn
-edu.gn
-gov.gn
-org.gn
-net.gn
-
-// gov : http://en.wikipedia.org/wiki/.gov
-gov
-
-// gp : http://www.nic.gp/index.php?lang=en
-gp
-com.gp
-net.gp
-mobi.gp
-edu.gp
-org.gp
-asso.gp
-
-// gq : http://en.wikipedia.org/wiki/.gq
-gq
-
-// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
-// Submitted by registry 2008-06-09
-gr
-com.gr
-edu.gr
-net.gr
-org.gr
-gov.gr
-
-// gs : http://en.wikipedia.org/wiki/.gs
-gs
-
-// gt : http://www.gt/politicas.html
-*.gt
-!www.gt
-
-// gu : http://gadao.gov.gu/registration.txt
-*.gu
-
-// gw : http://en.wikipedia.org/wiki/.gw
-gw
-
-// gy : http://en.wikipedia.org/wiki/.gy
-// http://registry.gy/
-gy
-co.gy
-com.gy
-net.gy
-
-// hk : https://www.hkdnr.hk
-// Submitted by registry 2008-06-11
-hk
-com.hk
-edu.hk
-gov.hk
-idv.hk
-net.hk
-org.hk
-公司.hk
-教育.hk
-敎育.hk
-政府.hk
-個人.hk
-个人.hk
-箇人.hk
-網络.hk
-网络.hk
-组織.hk
-網絡.hk
-网絡.hk
-组织.hk
-組織.hk
-組织.hk
-
-// hm : http://en.wikipedia.org/wiki/.hm
-hm
-
-// hn : http://www.nic.hn/politicas/ps02,,05.html
-hn
-com.hn
-edu.hn
-org.hn
-net.hn
-mil.hn
-gob.hn
-
-// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
-hr
-iz.hr
-from.hr
-name.hr
-com.hr
-
-// ht : http://www.nic.ht/info/charte.cfm
-ht
-com.ht
-shop.ht
-firm.ht
-info.ht
-adult.ht
-net.ht
-pro.ht
-org.ht
-med.ht
-art.ht
-coop.ht
-pol.ht
-asso.ht
-edu.ht
-rel.ht
-gouv.ht
-perso.ht
-
-// hu : http://www.domain.hu/domain/English/sld.html
-// Confirmed by registry 2008-06-12
-hu
-co.hu
-info.hu
-org.hu
-priv.hu
-sport.hu
-tm.hu
-2000.hu
-agrar.hu
-bolt.hu
-casino.hu
-city.hu
-erotica.hu
-erotika.hu
-film.hu
-forum.hu
-games.hu
-hotel.hu
-ingatlan.hu
-jogasz.hu
-konyvelo.hu
-lakas.hu
-media.hu
-news.hu
-reklam.hu
-sex.hu
-shop.hu
-suli.hu
-szex.hu
-tozsde.hu
-utazas.hu
-video.hu
-
-// id : http://en.wikipedia.org/wiki/.id
-// see also: https://register.pandi.or.id/
-id
-ac.id
-co.id
-go.id
-mil.id
-net.id
-or.id
-sch.id
-web.id
-
-// ie : http://en.wikipedia.org/wiki/.ie
-ie
-gov.ie
-
-// il : http://en.wikipedia.org/wiki/.il
-*.il
-
-// im : https://www.nic.im/pdfs/imfaqs.pdf
-im
-co.im
-ltd.co.im
-plc.co.im
-net.im
-gov.im
-org.im
-nic.im
-ac.im
-
-// in : http://en.wikipedia.org/wiki/.in
-// see also: http://www.inregistry.in/policies/
-// Please note, that nic.in is not an offical eTLD, but used by most
-// government institutions.
-in
-co.in
-firm.in
-net.in
-org.in
-gen.in
-ind.in
-nic.in
-ac.in
-edu.in
-res.in
-gov.in
-mil.in
-
-// info : http://en.wikipedia.org/wiki/.info
-info
-
-// int : http://en.wikipedia.org/wiki/.int
-// Confirmed by registry 2008-06-18
-int
-eu.int
-
-// io : http://www.nic.io/rules.html
-// list of other 2nd level tlds ?
-io
-com.io
-
-// iq : http://www.cmc.iq/english/iq/iqregister1.htm
-iq
-gov.iq
-edu.iq
-mil.iq
-com.iq
-org.iq
-net.iq
-
-// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
-// Also see http://www.nic.ir/Internationalized_Domain_Names
-// Two .ir entries added at request of , 2010-04-16
-ir
-ac.ir
-co.ir
-gov.ir
-id.ir
-net.ir
-org.ir
-sch.ir
-// xn--mgba3a4f16a.ir (.ir, Persian YEH)
-ایران.ir
-// xn--mgba3a4fra.ir (.ir, Arabic YEH)
-ايران.ir
-
-// is : http://www.isnic.is/domain/rules.php
-// Confirmed by registry 2008-12-06
-is
-net.is
-com.is
-edu.is
-gov.is
-org.is
-int.is
-
-// it : http://en.wikipedia.org/wiki/.it
-it
-gov.it
-edu.it
-// list of reserved geo-names :
-// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf
-// (There is also a list of reserved geo-names corresponding to Italian
-// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is
-// not included here.)
-agrigento.it
-ag.it
-alessandria.it
-al.it
-ancona.it
-an.it
-aosta.it
-aoste.it
-ao.it
-arezzo.it
-ar.it
-ascoli-piceno.it
-ascolipiceno.it
-ap.it
-asti.it
-at.it
-avellino.it
-av.it
-bari.it
-ba.it
-andria-barletta-trani.it
-andriabarlettatrani.it
-trani-barletta-andria.it
-tranibarlettaandria.it
-barletta-trani-andria.it
-barlettatraniandria.it
-andria-trani-barletta.it
-andriatranibarletta.it
-trani-andria-barletta.it
-traniandriabarletta.it
-bt.it
-belluno.it
-bl.it
-benevento.it
-bn.it
-bergamo.it
-bg.it
-biella.it
-bi.it
-bologna.it
-bo.it
-bolzano.it
-bozen.it
-balsan.it
-alto-adige.it
-altoadige.it
-suedtirol.it
-bz.it
-brescia.it
-bs.it
-brindisi.it
-br.it
-cagliari.it
-ca.it
-caltanissetta.it
-cl.it
-campobasso.it
-cb.it
-carboniaiglesias.it
-carbonia-iglesias.it
-iglesias-carbonia.it
-iglesiascarbonia.it
-ci.it
-caserta.it
-ce.it
-catania.it
-ct.it
-catanzaro.it
-cz.it
-chieti.it
-ch.it
-como.it
-co.it
-cosenza.it
-cs.it
-cremona.it
-cr.it
-crotone.it
-kr.it
-cuneo.it
-cn.it
-dell-ogliastra.it
-dellogliastra.it
-ogliastra.it
-og.it
-enna.it
-en.it
-ferrara.it
-fe.it
-fermo.it
-fm.it
-firenze.it
-florence.it
-fi.it
-foggia.it
-fg.it
-forli-cesena.it
-forlicesena.it
-cesena-forli.it
-cesenaforli.it
-fc.it
-frosinone.it
-fr.it
-genova.it
-genoa.it
-ge.it
-gorizia.it
-go.it
-grosseto.it
-gr.it
-imperia.it
-im.it
-isernia.it
-is.it
-laquila.it
-aquila.it
-aq.it
-la-spezia.it
-laspezia.it
-sp.it
-latina.it
-lt.it
-lecce.it
-le.it
-lecco.it
-lc.it
-livorno.it
-li.it
-lodi.it
-lo.it
-lucca.it
-lu.it
-macerata.it
-mc.it
-mantova.it
-mn.it
-massa-carrara.it
-massacarrara.it
-carrara-massa.it
-carraramassa.it
-ms.it
-matera.it
-mt.it
-medio-campidano.it
-mediocampidano.it
-campidano-medio.it
-campidanomedio.it
-vs.it
-messina.it
-me.it
-milano.it
-milan.it
-mi.it
-modena.it
-mo.it
-monza.it
-monza-brianza.it
-monzabrianza.it
-monzaebrianza.it
-monzaedellabrianza.it
-monza-e-della-brianza.it
-mb.it
-napoli.it
-naples.it
-na.it
-novara.it
-no.it
-nuoro.it
-nu.it
-oristano.it
-or.it
-padova.it
-padua.it
-pd.it
-palermo.it
-pa.it
-parma.it
-pr.it
-pavia.it
-pv.it
-perugia.it
-pg.it
-pescara.it
-pe.it
-pesaro-urbino.it
-pesarourbino.it
-urbino-pesaro.it
-urbinopesaro.it
-pu.it
-piacenza.it
-pc.it
-pisa.it
-pi.it
-pistoia.it
-pt.it
-pordenone.it
-pn.it
-potenza.it
-pz.it
-prato.it
-po.it
-ragusa.it
-rg.it
-ravenna.it
-ra.it
-reggio-calabria.it
-reggiocalabria.it
-rc.it
-reggio-emilia.it
-reggioemilia.it
-re.it
-rieti.it
-ri.it
-rimini.it
-rn.it
-roma.it
-rome.it
-rm.it
-rovigo.it
-ro.it
-salerno.it
-sa.it
-sassari.it
-ss.it
-savona.it
-sv.it
-siena.it
-si.it
-siracusa.it
-sr.it
-sondrio.it
-so.it
-taranto.it
-ta.it
-tempio-olbia.it
-tempioolbia.it
-olbia-tempio.it
-olbiatempio.it
-ot.it
-teramo.it
-te.it
-terni.it
-tr.it
-torino.it
-turin.it
-to.it
-trapani.it
-tp.it
-trento.it
-trentino.it
-tn.it
-treviso.it
-tv.it
-trieste.it
-ts.it
-udine.it
-ud.it
-varese.it
-va.it
-venezia.it
-venice.it
-ve.it
-verbania.it
-vb.it
-vercelli.it
-vc.it
-verona.it
-vr.it
-vibo-valentia.it
-vibovalentia.it
-vv.it
-vicenza.it
-vi.it
-viterbo.it
-vt.it
-
-// je : http://www.channelisles.net/applic/avextn.shtml
-je
-co.je
-org.je
-net.je
-sch.je
-gov.je
-
-// jm : http://www.com.jm/register.html
-*.jm
-
-// jo : http://www.dns.jo/Registration_policy.aspx
-jo
-com.jo
-org.jo
-net.jo
-edu.jo
-sch.jo
-gov.jo
-mil.jo
-name.jo
-
-// jobs : http://en.wikipedia.org/wiki/.jobs
-jobs
-
-// jp : http://en.wikipedia.org/wiki/.jp
-// http://jprs.co.jp/en/jpdomain.html
-// Submitted by registry 2008-06-11
-// Updated by registry 2008-12-04
-jp
-// jp organizational type names
-ac.jp
-ad.jp
-co.jp
-ed.jp
-go.jp
-gr.jp
-lg.jp
-ne.jp
-or.jp
-// jp geographic type names
-// http://jprs.jp/doc/rule/saisoku-1.html
-*.aichi.jp
-*.akita.jp
-*.aomori.jp
-*.chiba.jp
-*.ehime.jp
-*.fukui.jp
-*.fukuoka.jp
-*.fukushima.jp
-*.gifu.jp
-*.gunma.jp
-*.hiroshima.jp
-*.hokkaido.jp
-*.hyogo.jp
-*.ibaraki.jp
-*.ishikawa.jp
-*.iwate.jp
-*.kagawa.jp
-*.kagoshima.jp
-*.kanagawa.jp
-*.kawasaki.jp
-*.kitakyushu.jp
-*.kobe.jp
-*.kochi.jp
-*.kumamoto.jp
-*.kyoto.jp
-*.mie.jp
-*.miyagi.jp
-*.miyazaki.jp
-*.nagano.jp
-*.nagasaki.jp
-*.nagoya.jp
-*.nara.jp
-*.niigata.jp
-*.oita.jp
-*.okayama.jp
-*.okinawa.jp
-*.osaka.jp
-*.saga.jp
-*.saitama.jp
-*.sapporo.jp
-*.sendai.jp
-*.shiga.jp
-*.shimane.jp
-*.shizuoka.jp
-*.tochigi.jp
-*.tokushima.jp
-*.tokyo.jp
-*.tottori.jp
-*.toyama.jp
-*.wakayama.jp
-*.yamagata.jp
-*.yamaguchi.jp
-*.yamanashi.jp
-*.yokohama.jp
-!metro.tokyo.jp
-!pref.aichi.jp
-!pref.akita.jp
-!pref.aomori.jp
-!pref.chiba.jp
-!pref.ehime.jp
-!pref.fukui.jp
-!pref.fukuoka.jp
-!pref.fukushima.jp
-!pref.gifu.jp
-!pref.gunma.jp
-!pref.hiroshima.jp
-!pref.hokkaido.jp
-!pref.hyogo.jp
-!pref.ibaraki.jp
-!pref.ishikawa.jp
-!pref.iwate.jp
-!pref.kagawa.jp
-!pref.kagoshima.jp
-!pref.kanagawa.jp
-!pref.kochi.jp
-!pref.kumamoto.jp
-!pref.kyoto.jp
-!pref.mie.jp
-!pref.miyagi.jp
-!pref.miyazaki.jp
-!pref.nagano.jp
-!pref.nagasaki.jp
-!pref.nara.jp
-!pref.niigata.jp
-!pref.oita.jp
-!pref.okayama.jp
-!pref.okinawa.jp
-!pref.osaka.jp
-!pref.saga.jp
-!pref.saitama.jp
-!pref.shiga.jp
-!pref.shimane.jp
-!pref.shizuoka.jp
-!pref.tochigi.jp
-!pref.tokushima.jp
-!pref.tottori.jp
-!pref.toyama.jp
-!pref.wakayama.jp
-!pref.yamagata.jp
-!pref.yamaguchi.jp
-!pref.yamanashi.jp
-!city.chiba.jp
-!city.fukuoka.jp
-!city.hiroshima.jp
-!city.kawasaki.jp
-!city.kitakyushu.jp
-!city.kobe.jp
-!city.kyoto.jp
-!city.nagoya.jp
-!city.niigata.jp
-!city.okayama.jp
-!city.osaka.jp
-!city.saitama.jp
-!city.sapporo.jp
-!city.sendai.jp
-!city.shizuoka.jp
-!city.yokohama.jp
-
-// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145
-*.ke
-
-// kg : http://www.domain.kg/dmn_n.html
-kg
-org.kg
-net.kg
-com.kg
-edu.kg
-gov.kg
-mil.kg
-
-// kh : http://www.mptc.gov.kh/dns_registration.htm
-*.kh
-
-// ki : http://www.ki/dns/index.html
-ki
-edu.ki
-biz.ki
-net.ki
-org.ki
-gov.ki
-info.ki
-com.ki
-
-// km : http://en.wikipedia.org/wiki/.km
-// http://www.domaine.km/documents/charte.doc
-km
-org.km
-nom.km
-gov.km
-prd.km
-tm.km
-edu.km
-mil.km
-ass.km
-com.km
-// These are only mentioned as proposed suggestions at domaine.km, but
-// http://en.wikipedia.org/wiki/.km says they're available for registration:
-coop.km
-asso.km
-presse.km
-medecin.km
-notaires.km
-pharmaciens.km
-veterinaire.km
-gouv.km
-
-// kn : http://en.wikipedia.org/wiki/.kn
-// http://www.dot.kn/domainRules.html
-kn
-net.kn
-org.kn
-edu.kn
-gov.kn
-
-// kp : http://www.kcce.kp/en_index.php
-com.kp
-edu.kp
-gov.kp
-org.kp
-rep.kp
-tra.kp
-
-// kr : http://en.wikipedia.org/wiki/.kr
-// see also: http://domain.nida.or.kr/eng/registration.jsp
-kr
-ac.kr
-co.kr
-es.kr
-go.kr
-hs.kr
-kg.kr
-mil.kr
-ms.kr
-ne.kr
-or.kr
-pe.kr
-re.kr
-sc.kr
-// kr geographical names
-busan.kr
-chungbuk.kr
-chungnam.kr
-daegu.kr
-daejeon.kr
-gangwon.kr
-gwangju.kr
-gyeongbuk.kr
-gyeonggi.kr
-gyeongnam.kr
-incheon.kr
-jeju.kr
-jeonbuk.kr
-jeonnam.kr
-seoul.kr
-ulsan.kr
-
-// kw : http://en.wikipedia.org/wiki/.kw
-*.kw
-
-// ky : http://www.icta.ky/da_ky_reg_dom.php
-// Confirmed by registry 2008-06-17
-ky
-edu.ky
-gov.ky
-com.ky
-org.ky
-net.ky
-
-// kz : http://en.wikipedia.org/wiki/.kz
-// see also: http://www.nic.kz/rules/index.jsp
-kz
-org.kz
-edu.kz
-net.kz
-gov.kz
-mil.kz
-com.kz
-
-// la : http://en.wikipedia.org/wiki/.la
-// Submitted by registry 2008-06-10
-la
-int.la
-net.la
-info.la
-edu.la
-gov.la
-per.la
-com.la
-org.la
-
-// lb : http://en.wikipedia.org/wiki/.lb
-// Submitted by registry 2008-06-17
-com.lb
-edu.lb
-gov.lb
-net.lb
-org.lb
-
-// lc : http://en.wikipedia.org/wiki/.lc
-// see also: http://www.nic.lc/rules.htm
-lc
-com.lc
-net.lc
-co.lc
-org.lc
-edu.lc
-gov.lc
-
-// li : http://en.wikipedia.org/wiki/.li
-li
-
-// lk : http://www.nic.lk/seclevpr.html
-lk
-gov.lk
-sch.lk
-net.lk
-int.lk
-com.lk
-org.lk
-edu.lk
-ngo.lk
-soc.lk
-web.lk
-ltd.lk
-assn.lk
-grp.lk
-hotel.lk
-
-// lr : http://psg.com/dns/lr/lr.txt
-// Submitted by registry 2008-06-17
-com.lr
-edu.lr
-gov.lr
-org.lr
-net.lr
-
-// ls : http://en.wikipedia.org/wiki/.ls
-ls
-co.ls
-org.ls
-
-// lt : http://en.wikipedia.org/wiki/.lt
-lt
-// gov.lt : http://www.gov.lt/index_en.php
-gov.lt
-
-// lu : http://www.dns.lu/en/
-lu
-
-// lv : http://www.nic.lv/DNS/En/generic.php
-lv
-com.lv
-edu.lv
-gov.lv
-org.lv
-mil.lv
-id.lv
-net.lv
-asn.lv
-conf.lv
-
-// ly : http://www.nic.ly/regulations.php
-ly
-com.ly
-net.ly
-gov.ly
-plc.ly
-edu.ly
-sch.ly
-med.ly
-org.ly
-id.ly
-
-// ma : http://en.wikipedia.org/wiki/.ma
-// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
-ma
-co.ma
-net.ma
-gov.ma
-org.ma
-ac.ma
-press.ma
-
-// mc : http://www.nic.mc/
-mc
-tm.mc
-asso.mc
-
-// md : http://en.wikipedia.org/wiki/.md
-md
-
-// me : http://en.wikipedia.org/wiki/.me
-me
-co.me
-net.me
-org.me
-edu.me
-ac.me
-gov.me
-its.me
-priv.me
-
-// mg : http://www.nic.mg/tarif.htm
-mg
-org.mg
-nom.mg
-gov.mg
-prd.mg
-tm.mg
-edu.mg
-mil.mg
-com.mg
-
-// mh : http://en.wikipedia.org/wiki/.mh
-mh
-
-// mil : http://en.wikipedia.org/wiki/.mil
-mil
-
-// mk : http://en.wikipedia.org/wiki/.mk
-// see also: http://dns.marnet.net.mk/postapka.php
-mk
-com.mk
-org.mk
-net.mk
-edu.mk
-gov.mk
-inf.mk
-name.mk
-
-// ml : http://www.gobin.info/domainname/ml-template.doc
-// see also: http://en.wikipedia.org/wiki/.ml
-ml
-com.ml
-edu.ml
-gouv.ml
-gov.ml
-net.ml
-org.ml
-presse.ml
-
-// mm : http://en.wikipedia.org/wiki/.mm
-*.mm
-
-// mn : http://en.wikipedia.org/wiki/.mn
-mn
-gov.mn
-edu.mn
-org.mn
-
-// mo : http://www.monic.net.mo/
-mo
-com.mo
-net.mo
-org.mo
-edu.mo
-gov.mo
-
-// mobi : http://en.wikipedia.org/wiki/.mobi
-mobi
-
-// mp : http://www.dot.mp/
-// Confirmed by registry 2008-06-17
-mp
-
-// mq : http://en.wikipedia.org/wiki/.mq
-mq
-
-// mr : http://en.wikipedia.org/wiki/.mr
-mr
-gov.mr
-
-// ms : http://en.wikipedia.org/wiki/.ms
-ms
-
-// mt : https://www.nic.org.mt/dotmt/
-*.mt
-
-// mu : http://en.wikipedia.org/wiki/.mu
-mu
-com.mu
-net.mu
-org.mu
-gov.mu
-ac.mu
-co.mu
-or.mu
-
-// museum : http://about.museum/naming/
-// http://index.museum/
-museum
-academy.museum
-agriculture.museum
-air.museum
-airguard.museum
-alabama.museum
-alaska.museum
-amber.museum
-ambulance.museum
-american.museum
-americana.museum
-americanantiques.museum
-americanart.museum
-amsterdam.museum
-and.museum
-annefrank.museum
-anthro.museum
-anthropology.museum
-antiques.museum
-aquarium.museum
-arboretum.museum
-archaeological.museum
-archaeology.museum
-architecture.museum
-art.museum
-artanddesign.museum
-artcenter.museum
-artdeco.museum
-arteducation.museum
-artgallery.museum
-arts.museum
-artsandcrafts.museum
-asmatart.museum
-assassination.museum
-assisi.museum
-association.museum
-astronomy.museum
-atlanta.museum
-austin.museum
-australia.museum
-automotive.museum
-aviation.museum
-axis.museum
-badajoz.museum
-baghdad.museum
-bahn.museum
-bale.museum
-baltimore.museum
-barcelona.museum
-baseball.museum
-basel.museum
-baths.museum
-bauern.museum
-beauxarts.museum
-beeldengeluid.museum
-bellevue.museum
-bergbau.museum
-berkeley.museum
-berlin.museum
-bern.museum
-bible.museum
-bilbao.museum
-bill.museum
-birdart.museum
-birthplace.museum
-bonn.museum
-boston.museum
-botanical.museum
-botanicalgarden.museum
-botanicgarden.museum
-botany.museum
-brandywinevalley.museum
-brasil.museum
-bristol.museum
-british.museum
-britishcolumbia.museum
-broadcast.museum
-brunel.museum
-brussel.museum
-brussels.museum
-bruxelles.museum
-building.museum
-burghof.museum
-bus.museum
-bushey.museum
-cadaques.museum
-california.museum
-cambridge.museum
-can.museum
-canada.museum
-capebreton.museum
-carrier.museum
-cartoonart.museum
-casadelamoneda.museum
-castle.museum
-castres.museum
-celtic.museum
-center.museum
-chattanooga.museum
-cheltenham.museum
-chesapeakebay.museum
-chicago.museum
-children.museum
-childrens.museum
-childrensgarden.museum
-chiropractic.museum
-chocolate.museum
-christiansburg.museum
-cincinnati.museum
-cinema.museum
-circus.museum
-civilisation.museum
-civilization.museum
-civilwar.museum
-clinton.museum
-clock.museum
-coal.museum
-coastaldefence.museum
-cody.museum
-coldwar.museum
-collection.museum
-colonialwilliamsburg.museum
-coloradoplateau.museum
-columbia.museum
-columbus.museum
-communication.museum
-communications.museum
-community.museum
-computer.museum
-computerhistory.museum
-comunicações.museum
-contemporary.museum
-contemporaryart.museum
-convent.museum
-copenhagen.museum
-corporation.museum
-correios-e-telecomunicações.museum
-corvette.museum
-costume.museum
-countryestate.museum
-county.museum
-crafts.museum
-cranbrook.museum
-creation.museum
-cultural.museum
-culturalcenter.museum
-culture.museum
-cyber.museum
-cymru.museum
-dali.museum
-dallas.museum
-database.museum
-ddr.museum
-decorativearts.museum
-delaware.museum
-delmenhorst.museum
-denmark.museum
-depot.museum
-design.museum
-detroit.museum
-dinosaur.museum
-discovery.museum
-dolls.museum
-donostia.museum
-durham.museum
-eastafrica.museum
-eastcoast.museum
-education.museum
-educational.museum
-egyptian.museum
-eisenbahn.museum
-elburg.museum
-elvendrell.museum
-embroidery.museum
-encyclopedic.museum
-england.museum
-entomology.museum
-environment.museum
-environmentalconservation.museum
-epilepsy.museum
-essex.museum
-estate.museum
-ethnology.museum
-exeter.museum
-exhibition.museum
-family.museum
-farm.museum
-farmequipment.museum
-farmers.museum
-farmstead.museum
-field.museum
-figueres.museum
-filatelia.museum
-film.museum
-fineart.museum
-finearts.museum
-finland.museum
-flanders.museum
-florida.museum
-force.museum
-fortmissoula.museum
-fortworth.museum
-foundation.museum
-francaise.museum
-frankfurt.museum
-franziskaner.museum
-freemasonry.museum
-freiburg.museum
-fribourg.museum
-frog.museum
-fundacio.museum
-furniture.museum
-gallery.museum
-garden.museum
-gateway.museum
-geelvinck.museum
-gemological.museum
-geology.museum
-georgia.museum
-giessen.museum
-glas.museum
-glass.museum
-gorge.museum
-grandrapids.museum
-graz.museum
-guernsey.museum
-halloffame.museum
-hamburg.museum
-handson.museum
-harvestcelebration.museum
-hawaii.museum
-health.museum
-heimatunduhren.museum
-hellas.museum
-helsinki.museum
-hembygdsforbund.museum
-heritage.museum
-histoire.museum
-historical.museum
-historicalsociety.museum
-historichouses.museum
-historisch.museum
-historisches.museum
-history.museum
-historyofscience.museum
-horology.museum
-house.museum
-humanities.museum
-illustration.museum
-imageandsound.museum
-indian.museum
-indiana.museum
-indianapolis.museum
-indianmarket.museum
-intelligence.museum
-interactive.museum
-iraq.museum
-iron.museum
-isleofman.museum
-jamison.museum
-jefferson.museum
-jerusalem.museum
-jewelry.museum
-jewish.museum
-jewishart.museum
-jfk.museum
-journalism.museum
-judaica.museum
-judygarland.museum
-juedisches.museum
-juif.museum
-karate.museum
-karikatur.museum
-kids.museum
-koebenhavn.museum
-koeln.museum
-kunst.museum
-kunstsammlung.museum
-kunstunddesign.museum
-labor.museum
-labour.museum
-lajolla.museum
-lancashire.museum
-landes.museum
-lans.museum
-läns.museum
-larsson.museum
-lewismiller.museum
-lincoln.museum
-linz.museum
-living.museum
-livinghistory.museum
-localhistory.museum
-london.museum
-losangeles.museum
-louvre.museum
-loyalist.museum
-lucerne.museum
-luxembourg.museum
-luzern.museum
-mad.museum
-madrid.museum
-mallorca.museum
-manchester.museum
-mansion.museum
-mansions.museum
-manx.museum
-marburg.museum
-maritime.museum
-maritimo.museum
-maryland.museum
-marylhurst.museum
-media.museum
-medical.museum
-medizinhistorisches.museum
-meeres.museum
-memorial.museum
-mesaverde.museum
-michigan.museum
-midatlantic.museum
-military.museum
-mill.museum
-miners.museum
-mining.museum
-minnesota.museum
-missile.museum
-missoula.museum
-modern.museum
-moma.museum
-money.museum
-monmouth.museum
-monticello.museum
-montreal.museum
-moscow.museum
-motorcycle.museum
-muenchen.museum
-muenster.museum
-mulhouse.museum
-muncie.museum
-museet.museum
-museumcenter.museum
-museumvereniging.museum
-music.museum
-national.museum
-nationalfirearms.museum
-nationalheritage.museum
-nativeamerican.museum
-naturalhistory.museum
-naturalhistorymuseum.museum
-naturalsciences.museum
-nature.museum
-naturhistorisches.museum
-natuurwetenschappen.museum
-naumburg.museum
-naval.museum
-nebraska.museum
-neues.museum
-newhampshire.museum
-newjersey.museum
-newmexico.museum
-newport.museum
-newspaper.museum
-newyork.museum
-niepce.museum
-norfolk.museum
-north.museum
-nrw.museum
-nuernberg.museum
-nuremberg.museum
-nyc.museum
-nyny.museum
-oceanographic.museum
-oceanographique.museum
-omaha.museum
-online.museum
-ontario.museum
-openair.museum
-oregon.museum
-oregontrail.museum
-otago.museum
-oxford.museum
-pacific.museum
-paderborn.museum
-palace.museum
-paleo.museum
-palmsprings.museum
-panama.museum
-paris.museum
-pasadena.museum
-pharmacy.museum
-philadelphia.museum
-philadelphiaarea.museum
-philately.museum
-phoenix.museum
-photography.museum
-pilots.museum
-pittsburgh.museum
-planetarium.museum
-plantation.museum
-plants.museum
-plaza.museum
-portal.museum
-portland.museum
-portlligat.museum
-posts-and-telecommunications.museum
-preservation.museum
-presidio.museum
-press.museum
-project.museum
-public.museum
-pubol.museum
-quebec.museum
-railroad.museum
-railway.museum
-research.museum
-resistance.museum
-riodejaneiro.museum
-rochester.museum
-rockart.museum
-roma.museum
-russia.museum
-saintlouis.museum
-salem.museum
-salvadordali.museum
-salzburg.museum
-sandiego.museum
-sanfrancisco.museum
-santabarbara.museum
-santacruz.museum
-santafe.museum
-saskatchewan.museum
-satx.museum
-savannahga.museum
-schlesisches.museum
-schoenbrunn.museum
-schokoladen.museum
-school.museum
-schweiz.museum
-science.museum
-scienceandhistory.museum
-scienceandindustry.museum
-sciencecenter.museum
-sciencecenters.museum
-science-fiction.museum
-sciencehistory.museum
-sciences.museum
-sciencesnaturelles.museum
-scotland.museum
-seaport.museum
-settlement.museum
-settlers.museum
-shell.museum
-sherbrooke.museum
-sibenik.museum
-silk.museum
-ski.museum
-skole.museum
-society.museum
-sologne.museum
-soundandvision.museum
-southcarolina.museum
-southwest.museum
-space.museum
-spy.museum
-square.museum
-stadt.museum
-stalbans.museum
-starnberg.museum
-state.museum
-stateofdelaware.museum
-station.museum
-steam.museum
-steiermark.museum
-stjohn.museum
-stockholm.museum
-stpetersburg.museum
-stuttgart.museum
-suisse.museum
-surgeonshall.museum
-surrey.museum
-svizzera.museum
-sweden.museum
-sydney.museum
-tank.museum
-tcm.museum
-technology.museum
-telekommunikation.museum
-television.museum
-texas.museum
-textile.museum
-theater.museum
-time.museum
-timekeeping.museum
-topology.museum
-torino.museum
-touch.museum
-town.museum
-transport.museum
-tree.museum
-trolley.museum
-trust.museum
-trustee.museum
-uhren.museum
-ulm.museum
-undersea.museum
-university.museum
-usa.museum
-usantiques.museum
-usarts.museum
-uscountryestate.museum
-usculture.museum
-usdecorativearts.museum
-usgarden.museum
-ushistory.museum
-ushuaia.museum
-uslivinghistory.museum
-utah.museum
-uvic.museum
-valley.museum
-vantaa.museum
-versailles.museum
-viking.museum
-village.museum
-virginia.museum
-virtual.museum
-virtuel.museum
-vlaanderen.museum
-volkenkunde.museum
-wales.museum
-wallonie.museum
-war.museum
-washingtondc.museum
-watchandclock.museum
-watch-and-clock.museum
-western.museum
-westfalen.museum
-whaling.museum
-wildlife.museum
-williamsburg.museum
-windmill.museum
-workshop.museum
-york.museum
-yorkshire.museum
-yosemite.museum
-youth.museum
-zoological.museum
-zoology.museum
-ירושלים.museum
-иком.museum
-
-// mv : http://en.wikipedia.org/wiki/.mv
-// "mv" included because, contra Wikipedia, google.mv exists.
-mv
-aero.mv
-biz.mv
-com.mv
-coop.mv
-edu.mv
-gov.mv
-info.mv
-int.mv
-mil.mv
-museum.mv
-name.mv
-net.mv
-org.mv
-pro.mv
-
-// mw : http://www.registrar.mw/
-mw
-ac.mw
-biz.mw
-co.mw
-com.mw
-coop.mw
-edu.mw
-gov.mw
-int.mw
-museum.mw
-net.mw
-org.mw
-
-// mx : http://www.nic.mx/
-// Submitted by registry 2008-06-19
-mx
-com.mx
-org.mx
-gob.mx
-edu.mx
-net.mx
-
-// my : http://www.mynic.net.my/
-my
-com.my
-net.my
-org.my
-gov.my
-edu.my
-mil.my
-name.my
-
-// mz : http://www.gobin.info/domainname/mz-template.doc
-*.mz
-
-// na : http://www.na-nic.com.na/
-// http://www.info.na/domain/
-na
-info.na
-pro.na
-name.na
-school.na
-or.na
-dr.na
-us.na
-mx.na
-ca.na
-in.na
-cc.na
-tv.na
-ws.na
-mobi.na
-co.na
-com.na
-org.na
-
-// name : has 2nd-level tlds, but there's no list of them
-name
-
-// nc : http://www.cctld.nc/
-nc
-asso.nc
-
-// ne : http://en.wikipedia.org/wiki/.ne
-ne
-
-// net : http://en.wikipedia.org/wiki/.net
-net
-
-// nf : http://en.wikipedia.org/wiki/.nf
-nf
-com.nf
-net.nf
-per.nf
-rec.nf
-web.nf
-arts.nf
-firm.nf
-info.nf
-other.nf
-store.nf
-
-// ng : http://psg.com/dns/ng/
-// Submitted by registry 2008-06-17
-ac.ng
-com.ng
-edu.ng
-gov.ng
-net.ng
-org.ng
-
-// ni : http://www.nic.ni/dominios.htm
-*.ni
-
-// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html
-// Confirmed by registry (with technical
-// reservations) 2008-06-08
-nl
-
-// BV.nl will be a registry for dutch BV's (besloten vennootschap)
-bv.nl
-
-// no : http://www.norid.no/regelverk/index.en.html
-// The Norwegian registry has declined to notify us of updates. The web pages
-// referenced below are the official source of the data. There is also an
-// announce mailing list:
-// https://postlister.uninett.no/sympa/info/norid-diskusjon
-no
-// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html
-fhs.no
-vgs.no
-fylkesbibl.no
-folkebibl.no
-museum.no
-idrett.no
-priv.no
-// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html
-mil.no
-stat.no
-dep.no
-kommune.no
-herad.no
-// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html
-// counties
-aa.no
-ah.no
-bu.no
-fm.no
-hl.no
-hm.no
-jan-mayen.no
-mr.no
-nl.no
-nt.no
-of.no
-ol.no
-oslo.no
-rl.no
-sf.no
-st.no
-svalbard.no
-tm.no
-tr.no
-va.no
-vf.no
-// primary and lower secondary schools per county
-gs.aa.no
-gs.ah.no
-gs.bu.no
-gs.fm.no
-gs.hl.no
-gs.hm.no
-gs.jan-mayen.no
-gs.mr.no
-gs.nl.no
-gs.nt.no
-gs.of.no
-gs.ol.no
-gs.oslo.no
-gs.rl.no
-gs.sf.no
-gs.st.no
-gs.svalbard.no
-gs.tm.no
-gs.tr.no
-gs.va.no
-gs.vf.no
-// cities
-akrehamn.no
-åkrehamn.no
-algard.no
-ålgård.no
-arna.no
-brumunddal.no
-bryne.no
-bronnoysund.no
-brønnøysund.no
-drobak.no
-drøbak.no
-egersund.no
-fetsund.no
-floro.no
-florø.no
-fredrikstad.no
-hokksund.no
-honefoss.no
-hønefoss.no
-jessheim.no
-jorpeland.no
-jørpeland.no
-kirkenes.no
-kopervik.no
-krokstadelva.no
-langevag.no
-langevåg.no
-leirvik.no
-mjondalen.no
-mjøndalen.no
-mo-i-rana.no
-mosjoen.no
-mosjøen.no
-nesoddtangen.no
-orkanger.no
-osoyro.no
-osøyro.no
-raholt.no
-råholt.no
-sandnessjoen.no
-sandnessjøen.no
-skedsmokorset.no
-slattum.no
-spjelkavik.no
-stathelle.no
-stavern.no
-stjordalshalsen.no
-stjørdalshalsen.no
-tananger.no
-tranby.no
-vossevangen.no
-// communities
-afjord.no
-åfjord.no
-agdenes.no
-al.no
-ål.no
-alesund.no
-ålesund.no
-alstahaug.no
-alta.no
-áltá.no
-alaheadju.no
-álaheadju.no
-alvdal.no
-amli.no
-åmli.no
-amot.no
-åmot.no
-andebu.no
-andoy.no
-andøy.no
-andasuolo.no
-ardal.no
-årdal.no
-aremark.no
-arendal.no
-ås.no
-aseral.no
-åseral.no
-asker.no
-askim.no
-askvoll.no
-askoy.no
-askøy.no
-asnes.no
-åsnes.no
-audnedaln.no
-aukra.no
-aure.no
-aurland.no
-aurskog-holand.no
-aurskog-høland.no
-austevoll.no
-austrheim.no
-averoy.no
-averøy.no
-balestrand.no
-ballangen.no
-balat.no
-bálát.no
-balsfjord.no
-bahccavuotna.no
-báhccavuotna.no
-bamble.no
-bardu.no
-beardu.no
-beiarn.no
-bajddar.no
-bájddar.no
-baidar.no
-báidár.no
-berg.no
-bergen.no
-berlevag.no
-berlevåg.no
-bearalvahki.no
-bearalváhki.no
-bindal.no
-birkenes.no
-bjarkoy.no
-bjarkøy.no
-bjerkreim.no
-bjugn.no
-bodo.no
-bodø.no
-badaddja.no
-bådåddjå.no
-budejju.no
-bokn.no
-bremanger.no
-bronnoy.no
-brønnøy.no
-bygland.no
-bykle.no
-barum.no
-bærum.no
-bo.telemark.no
-bø.telemark.no
-bo.nordland.no
-bø.nordland.no
-bievat.no
-bievát.no
-bomlo.no
-bømlo.no
-batsfjord.no
-båtsfjord.no
-bahcavuotna.no
-báhcavuotna.no
-dovre.no
-drammen.no
-drangedal.no
-dyroy.no
-dyrøy.no
-donna.no
-dønna.no
-eid.no
-eidfjord.no
-eidsberg.no
-eidskog.no
-eidsvoll.no
-eigersund.no
-elverum.no
-enebakk.no
-engerdal.no
-etne.no
-etnedal.no
-evenes.no
-evenassi.no
-evenášši.no
-evje-og-hornnes.no
-farsund.no
-fauske.no
-fuossko.no
-fuoisku.no
-fedje.no
-fet.no
-finnoy.no
-finnøy.no
-fitjar.no
-fjaler.no
-fjell.no
-flakstad.no
-flatanger.no
-flekkefjord.no
-flesberg.no
-flora.no
-fla.no
-flå.no
-folldal.no
-forsand.no
-fosnes.no
-frei.no
-frogn.no
-froland.no
-frosta.no
-frana.no
-fræna.no
-froya.no
-frøya.no
-fusa.no
-fyresdal.no
-forde.no
-førde.no
-gamvik.no
-gangaviika.no
-gáŋgaviika.no
-gaular.no
-gausdal.no
-gildeskal.no
-gildeskål.no
-giske.no
-gjemnes.no
-gjerdrum.no
-gjerstad.no
-gjesdal.no
-gjovik.no
-gjøvik.no
-gloppen.no
-gol.no
-gran.no
-grane.no
-granvin.no
-gratangen.no
-grimstad.no
-grong.no
-kraanghke.no
-kråanghke.no
-grue.no
-gulen.no
-hadsel.no
-halden.no
-halsa.no
-hamar.no
-hamaroy.no
-habmer.no
-hábmer.no
-hapmir.no
-hápmir.no
-hammerfest.no
-hammarfeasta.no
-hámmárfeasta.no
-haram.no
-hareid.no
-harstad.no
-hasvik.no
-aknoluokta.no
-ákŋoluokta.no
-hattfjelldal.no
-aarborte.no
-haugesund.no
-hemne.no
-hemnes.no
-hemsedal.no
-heroy.more-og-romsdal.no
-herøy.møre-og-romsdal.no
-heroy.nordland.no
-herøy.nordland.no
-hitra.no
-hjartdal.no
-hjelmeland.no
-hobol.no
-hobøl.no
-hof.no
-hol.no
-hole.no
-holmestrand.no
-holtalen.no
-holtålen.no
-hornindal.no
-horten.no
-hurdal.no
-hurum.no
-hvaler.no
-hyllestad.no
-hagebostad.no
-hægebostad.no
-hoyanger.no
-høyanger.no
-hoylandet.no
-høylandet.no
-ha.no
-hå.no
-ibestad.no
-inderoy.no
-inderøy.no
-iveland.no
-jevnaker.no
-jondal.no
-jolster.no
-jølster.no
-karasjok.no
-karasjohka.no
-kárášjohka.no
-karlsoy.no
-galsa.no
-gálsá.no
-karmoy.no
-karmøy.no
-kautokeino.no
-guovdageaidnu.no
-klepp.no
-klabu.no
-klæbu.no
-kongsberg.no
-kongsvinger.no
-kragero.no
-kragerø.no
-kristiansand.no
-kristiansund.no
-krodsherad.no
-krødsherad.no
-kvalsund.no
-rahkkeravju.no
-ráhkkerávju.no
-kvam.no
-kvinesdal.no
-kvinnherad.no
-kviteseid.no
-kvitsoy.no
-kvitsøy.no
-kvafjord.no
-kvæfjord.no
-giehtavuoatna.no
-kvanangen.no
-kvænangen.no
-navuotna.no
-návuotna.no
-kafjord.no
-kåfjord.no
-gaivuotna.no
-gáivuotna.no
-larvik.no
-lavangen.no
-lavagis.no
-loabat.no
-loabát.no
-lebesby.no
-davvesiida.no
-leikanger.no
-leirfjord.no
-leka.no
-leksvik.no
-lenvik.no
-leangaviika.no
-leaŋgaviika.no
-lesja.no
-levanger.no
-lier.no
-lierne.no
-lillehammer.no
-lillesand.no
-lindesnes.no
-lindas.no
-lindås.no
-lom.no
-loppa.no
-lahppi.no
-láhppi.no
-lund.no
-lunner.no
-luroy.no
-lurøy.no
-luster.no
-lyngdal.no
-lyngen.no
-ivgu.no
-lardal.no
-lerdal.no
-lærdal.no
-lodingen.no
-lødingen.no
-lorenskog.no
-lørenskog.no
-loten.no
-løten.no
-malvik.no
-masoy.no
-måsøy.no
-muosat.no
-muosát.no
-mandal.no
-marker.no
-marnardal.no
-masfjorden.no
-meland.no
-meldal.no
-melhus.no
-meloy.no
-meløy.no
-meraker.no
-meråker.no
-moareke.no
-moåreke.no
-midsund.no
-midtre-gauldal.no
-modalen.no
-modum.no
-molde.no
-moskenes.no
-moss.no
-mosvik.no
-malselv.no
-målselv.no
-malatvuopmi.no
-málatvuopmi.no
-namdalseid.no
-aejrie.no
-namsos.no
-namsskogan.no
-naamesjevuemie.no
-nååmesjevuemie.no
-laakesvuemie.no
-nannestad.no
-narvik.no
-narviika.no
-naustdal.no
-nedre-eiker.no
-nes.akershus.no
-nes.buskerud.no
-nesna.no
-nesodden.no
-nesseby.no
-unjarga.no
-unjárga.no
-nesset.no
-nissedal.no
-nittedal.no
-nord-aurdal.no
-nord-fron.no
-nord-odal.no
-norddal.no
-nordkapp.no
-davvenjarga.no
-davvenjárga.no
-nordre-land.no
-nordreisa.no
-raisa.no
-ráisa.no
-nore-og-uvdal.no
-notodden.no
-naroy.no
-nærøy.no
-notteroy.no
-nøtterøy.no
-odda.no
-oksnes.no
-øksnes.no
-oppdal.no
-oppegard.no
-oppegård.no
-orkdal.no
-orland.no
-ørland.no
-orskog.no
-ørskog.no
-orsta.no
-ørsta.no
-os.hedmark.no
-os.hordaland.no
-osen.no
-osteroy.no
-osterøy.no
-ostre-toten.no
-østre-toten.no
-overhalla.no
-ovre-eiker.no
-øvre-eiker.no
-oyer.no
-øyer.no
-oygarden.no
-øygarden.no
-oystre-slidre.no
-øystre-slidre.no
-porsanger.no
-porsangu.no
-porsáŋgu.no
-porsgrunn.no
-radoy.no
-radøy.no
-rakkestad.no
-rana.no
-ruovat.no
-randaberg.no
-rauma.no
-rendalen.no
-rennebu.no
-rennesoy.no
-rennesøy.no
-rindal.no
-ringebu.no
-ringerike.no
-ringsaker.no
-rissa.no
-risor.no
-risør.no
-roan.no
-rollag.no
-rygge.no
-ralingen.no
-rælingen.no
-rodoy.no
-rødøy.no
-romskog.no
-rømskog.no
-roros.no
-røros.no
-rost.no
-røst.no
-royken.no
-røyken.no
-royrvik.no
-røyrvik.no
-rade.no
-råde.no
-salangen.no
-siellak.no
-saltdal.no
-salat.no
-sálát.no
-sálat.no
-samnanger.no
-sande.more-og-romsdal.no
-sande.møre-og-romsdal.no
-sande.vestfold.no
-sandefjord.no
-sandnes.no
-sandoy.no
-sandøy.no
-sarpsborg.no
-sauda.no
-sauherad.no
-sel.no
-selbu.no
-selje.no
-seljord.no
-sigdal.no
-siljan.no
-sirdal.no
-skaun.no
-skedsmo.no
-ski.no
-skien.no
-skiptvet.no
-skjervoy.no
-skjervøy.no
-skierva.no
-skiervá.no
-skjak.no
-skjåk.no
-skodje.no
-skanland.no
-skånland.no
-skanit.no
-skánit.no
-smola.no
-smøla.no
-snillfjord.no
-snasa.no
-snåsa.no
-snoasa.no
-snaase.no
-snåase.no
-sogndal.no
-sokndal.no
-sola.no
-solund.no
-songdalen.no
-sortland.no
-spydeberg.no
-stange.no
-stavanger.no
-steigen.no
-steinkjer.no
-stjordal.no
-stjørdal.no
-stokke.no
-stor-elvdal.no
-stord.no
-stordal.no
-storfjord.no
-omasvuotna.no
-strand.no
-stranda.no
-stryn.no
-sula.no
-suldal.no
-sund.no
-sunndal.no
-surnadal.no
-sveio.no
-svelvik.no
-sykkylven.no
-sogne.no
-søgne.no
-somna.no
-sømna.no
-sondre-land.no
-søndre-land.no
-sor-aurdal.no
-sør-aurdal.no
-sor-fron.no
-sør-fron.no
-sor-odal.no
-sør-odal.no
-sor-varanger.no
-sør-varanger.no
-matta-varjjat.no
-mátta-várjjat.no
-sorfold.no
-sørfold.no
-sorreisa.no
-sørreisa.no
-sorum.no
-sørum.no
-tana.no
-deatnu.no
-time.no
-tingvoll.no
-tinn.no
-tjeldsund.no
-dielddanuorri.no
-tjome.no
-tjøme.no
-tokke.no
-tolga.no
-torsken.no
-tranoy.no
-tranøy.no
-tromso.no
-tromsø.no
-tromsa.no
-romsa.no
-trondheim.no
-troandin.no
-trysil.no
-trana.no
-træna.no
-trogstad.no
-trøgstad.no
-tvedestrand.no
-tydal.no
-tynset.no
-tysfjord.no
-divtasvuodna.no
-divttasvuotna.no
-tysnes.no
-tysvar.no
-tysvær.no
-tonsberg.no
-tønsberg.no
-ullensaker.no
-ullensvang.no
-ulvik.no
-utsira.no
-vadso.no
-vadsø.no
-cahcesuolo.no
-čáhcesuolo.no
-vaksdal.no
-valle.no
-vang.no
-vanylven.no
-vardo.no
-vardø.no
-varggat.no
-várggát.no
-vefsn.no
-vaapste.no
-vega.no
-vegarshei.no
-vegårshei.no
-vennesla.no
-verdal.no
-verran.no
-vestby.no
-vestnes.no
-vestre-slidre.no
-vestre-toten.no
-vestvagoy.no
-vestvågøy.no
-vevelstad.no
-vik.no
-vikna.no
-vindafjord.no
-volda.no
-voss.no
-varoy.no
-værøy.no
-vagan.no
-vågan.no
-voagat.no
-vagsoy.no
-vågsøy.no
-vaga.no
-vågå.no
-valer.ostfold.no
-våler.østfold.no
-valer.hedmark.no
-våler.hedmark.no
-
-// np : http://www.mos.com.np/register.html
-*.np
-
-// nr : http://cenpac.net.nr/dns/index.html
-// Confirmed by registry 2008-06-17
-nr
-biz.nr
-info.nr
-gov.nr
-edu.nr
-org.nr
-net.nr
-com.nr
-
-// nu : http://en.wikipedia.org/wiki/.nu
-nu
-
-// nz : http://en.wikipedia.org/wiki/.nz
-*.nz
-
-// om : http://en.wikipedia.org/wiki/.om
-*.om
-!mediaphone.om
-!nawrastelecom.om
-!nawras.om
-!omanmobile.om
-!omanpost.om
-!omantel.om
-!rakpetroleum.om
-!siemens.om
-!songfest.om
-!statecouncil.om
-
-// org : http://en.wikipedia.org/wiki/.org
-org
-
-// pa : http://www.nic.pa/
-// Some additional second level "domains" resolve directly as hostnames, such as
-// pannet.pa, so we add a rule for "pa".
-pa
-ac.pa
-gob.pa
-com.pa
-org.pa
-sld.pa
-edu.pa
-net.pa
-ing.pa
-abo.pa
-med.pa
-nom.pa
-
-// pe : https://www.nic.pe/InformeFinalComision.pdf
-pe
-edu.pe
-gob.pe
-nom.pe
-mil.pe
-org.pe
-com.pe
-net.pe
-
-// pf : http://www.gobin.info/domainname/formulaire-pf.pdf
-pf
-com.pf
-org.pf
-edu.pf
-
-// pg : http://en.wikipedia.org/wiki/.pg
-*.pg
-
-// ph : http://www.domains.ph/FAQ2.asp
-// Submitted by registry 2008-06-13
-ph
-com.ph
-net.ph
-org.ph
-gov.ph
-edu.ph
-ngo.ph
-mil.ph
-i.ph
-
-// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
-pk
-com.pk
-net.pk
-edu.pk
-org.pk
-fam.pk
-biz.pk
-web.pk
-gov.pk
-gob.pk
-gok.pk
-gon.pk
-gop.pk
-gos.pk
-info.pk
-
-// pl : http://www.dns.pl/english/
-pl
-// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html
-aid.pl
-agro.pl
-atm.pl
-auto.pl
-biz.pl
-com.pl
-edu.pl
-gmina.pl
-gsm.pl
-info.pl
-mail.pl
-miasta.pl
-media.pl
-mil.pl
-net.pl
-nieruchomosci.pl
-nom.pl
-org.pl
-pc.pl
-powiat.pl
-priv.pl
-realestate.pl
-rel.pl
-sex.pl
-shop.pl
-sklep.pl
-sos.pl
-szkola.pl
-targi.pl
-tm.pl
-tourism.pl
-travel.pl
-turystyka.pl
-// ICM functional domains (icm.edu.pl)
-6bone.pl
-art.pl
-mbone.pl
-// Government domains (administred by ippt.gov.pl)
-gov.pl
-uw.gov.pl
-um.gov.pl
-ug.gov.pl
-upow.gov.pl
-starostwo.gov.pl
-so.gov.pl
-sr.gov.pl
-po.gov.pl
-pa.gov.pl
-// other functional domains
-ngo.pl
-irc.pl
-usenet.pl
-// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html
-augustow.pl
-babia-gora.pl
-bedzin.pl
-beskidy.pl
-bialowieza.pl
-bialystok.pl
-bielawa.pl
-bieszczady.pl
-boleslawiec.pl
-bydgoszcz.pl
-bytom.pl
-cieszyn.pl
-czeladz.pl
-czest.pl
-dlugoleka.pl
-elblag.pl
-elk.pl
-glogow.pl
-gniezno.pl
-gorlice.pl
-grajewo.pl
-ilawa.pl
-jaworzno.pl
-jelenia-gora.pl
-jgora.pl
-kalisz.pl
-kazimierz-dolny.pl
-karpacz.pl
-kartuzy.pl
-kaszuby.pl
-katowice.pl
-kepno.pl
-ketrzyn.pl
-klodzko.pl
-kobierzyce.pl
-kolobrzeg.pl
-konin.pl
-konskowola.pl
-kutno.pl
-lapy.pl
-lebork.pl
-legnica.pl
-lezajsk.pl
-limanowa.pl
-lomza.pl
-lowicz.pl
-lubin.pl
-lukow.pl
-malbork.pl
-malopolska.pl
-mazowsze.pl
-mazury.pl
-mielec.pl
-mielno.pl
-mragowo.pl
-naklo.pl
-nowaruda.pl
-nysa.pl
-olawa.pl
-olecko.pl
-olkusz.pl
-olsztyn.pl
-opoczno.pl
-opole.pl
-ostroda.pl
-ostroleka.pl
-ostrowiec.pl
-ostrowwlkp.pl
-pila.pl
-pisz.pl
-podhale.pl
-podlasie.pl
-polkowice.pl
-pomorze.pl
-pomorskie.pl
-prochowice.pl
-pruszkow.pl
-przeworsk.pl
-pulawy.pl
-radom.pl
-rawa-maz.pl
-rybnik.pl
-rzeszow.pl
-sanok.pl
-sejny.pl
-siedlce.pl
-slask.pl
-slupsk.pl
-sosnowiec.pl
-stalowa-wola.pl
-skoczow.pl
-starachowice.pl
-stargard.pl
-suwalki.pl
-swidnica.pl
-swiebodzin.pl
-swinoujscie.pl
-szczecin.pl
-szczytno.pl
-tarnobrzeg.pl
-tgory.pl
-turek.pl
-tychy.pl
-ustka.pl
-walbrzych.pl
-warmia.pl
-warszawa.pl
-waw.pl
-wegrow.pl
-wielun.pl
-wlocl.pl
-wloclawek.pl
-wodzislaw.pl
-wolomin.pl
-wroclaw.pl
-zachpomor.pl
-zagan.pl
-zarow.pl
-zgora.pl
-zgorzelec.pl
-// TASK geographical domains (www.task.gda.pl/uslugi/dns)
-gda.pl
-gdansk.pl
-gdynia.pl
-med.pl
-sopot.pl
-// other geographical domains
-gliwice.pl
-krakow.pl
-poznan.pl
-wroc.pl
-zakopane.pl
-
-// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-pm
-
-// pn : http://www.government.pn/PnRegistry/policies.htm
-pn
-gov.pn
-co.pn
-org.pn
-edu.pn
-net.pn
-
-// pr : http://www.nic.pr/index.asp?f=1
-pr
-com.pr
-net.pr
-org.pr
-gov.pr
-edu.pr
-isla.pr
-pro.pr
-biz.pr
-info.pr
-name.pr
-// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr
-est.pr
-prof.pr
-ac.pr
-
-// pro : http://www.nic.pro/support_faq.htm
-pro
-aca.pro
-bar.pro
-cpa.pro
-jur.pro
-law.pro
-med.pro
-eng.pro
-
-// ps : http://en.wikipedia.org/wiki/.ps
-// http://www.nic.ps/registration/policy.html#reg
-ps
-edu.ps
-gov.ps
-sec.ps
-plo.ps
-com.ps
-org.ps
-net.ps
-
-// pt : http://online.dns.pt/dns/start_dns
-pt
-net.pt
-gov.pt
-org.pt
-edu.pt
-int.pt
-publ.pt
-com.pt
-nome.pt
-
-// pw : http://en.wikipedia.org/wiki/.pw
-pw
-co.pw
-ne.pw
-or.pw
-ed.pw
-go.pw
-belau.pw
-
-// py : http://www.nic.py/faq_a.html#faq_b
-*.py
-
-// qa : http://domains.qa/en/
-qa
-com.qa
-edu.qa
-gov.qa
-mil.qa
-name.qa
-net.qa
-org.qa
-sch.qa
-
-// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
-re
-com.re
-asso.re
-nom.re
-
-// ro : http://www.rotld.ro/
-ro
-com.ro
-org.ro
-tm.ro
-nt.ro
-nom.ro
-info.ro
-rec.ro
-arts.ro
-firm.ro
-store.ro
-www.ro
-
-// rs : http://en.wikipedia.org/wiki/.rs
-rs
-co.rs
-org.rs
-edu.rs
-ac.rs
-gov.rs
-in.rs
-
-// ru : http://www.cctld.ru/ru/docs/aktiv_8.php
-// Industry domains
-ru
-ac.ru
-com.ru
-edu.ru
-int.ru
-net.ru
-org.ru
-pp.ru
-// Geographical domains
-adygeya.ru
-altai.ru
-amur.ru
-arkhangelsk.ru
-astrakhan.ru
-bashkiria.ru
-belgorod.ru
-bir.ru
-bryansk.ru
-buryatia.ru
-cbg.ru
-chel.ru
-chelyabinsk.ru
-chita.ru
-chukotka.ru
-chuvashia.ru
-dagestan.ru
-dudinka.ru
-e-burg.ru
-grozny.ru
-irkutsk.ru
-ivanovo.ru
-izhevsk.ru
-jar.ru
-joshkar-ola.ru
-kalmykia.ru
-kaluga.ru
-kamchatka.ru
-karelia.ru
-kazan.ru
-kchr.ru
-kemerovo.ru
-khabarovsk.ru
-khakassia.ru
-khv.ru
-kirov.ru
-koenig.ru
-komi.ru
-kostroma.ru
-krasnoyarsk.ru
-kuban.ru
-kurgan.ru
-kursk.ru
-lipetsk.ru
-magadan.ru
-mari.ru
-mari-el.ru
-marine.ru
-mordovia.ru
-mosreg.ru
-msk.ru
-murmansk.ru
-nalchik.ru
-nnov.ru
-nov.ru
-novosibirsk.ru
-nsk.ru
-omsk.ru
-orenburg.ru
-oryol.ru
-palana.ru
-penza.ru
-perm.ru
-pskov.ru
-ptz.ru
-rnd.ru
-ryazan.ru
-sakhalin.ru
-samara.ru
-saratov.ru
-simbirsk.ru
-smolensk.ru
-spb.ru
-stavropol.ru
-stv.ru
-surgut.ru
-tambov.ru
-tatarstan.ru
-tom.ru
-tomsk.ru
-tsaritsyn.ru
-tsk.ru
-tula.ru
-tuva.ru
-tver.ru
-tyumen.ru
-udm.ru
-udmurtia.ru
-ulan-ude.ru
-vladikavkaz.ru
-vladimir.ru
-vladivostok.ru
-volgograd.ru
-vologda.ru
-voronezh.ru
-vrn.ru
-vyatka.ru
-yakutia.ru
-yamal.ru
-yaroslavl.ru
-yekaterinburg.ru
-yuzhno-sakhalinsk.ru
-// More geographical domains
-amursk.ru
-baikal.ru
-cmw.ru
-fareast.ru
-jamal.ru
-kms.ru
-k-uralsk.ru
-kustanai.ru
-kuzbass.ru
-magnitka.ru
-mytis.ru
-nakhodka.ru
-nkz.ru
-norilsk.ru
-oskol.ru
-pyatigorsk.ru
-rubtsovsk.ru
-snz.ru
-syzran.ru
-vdonsk.ru
-zgrad.ru
-// State domains
-gov.ru
-mil.ru
-// Technical domains
-test.ru
-
-// rw : http://www.nic.rw/cgi-bin/policy.pl
-rw
-gov.rw
-net.rw
-edu.rw
-ac.rw
-com.rw
-co.rw
-int.rw
-mil.rw
-gouv.rw
-
-// sa : http://www.nic.net.sa/
-sa
-com.sa
-net.sa
-org.sa
-gov.sa
-med.sa
-pub.sa
-edu.sa
-sch.sa
-
-// sb : http://www.sbnic.net.sb/
-// Submitted by registry 2008-06-08
-sb
-com.sb
-edu.sb
-gov.sb
-net.sb
-org.sb
-
-// sc : http://www.nic.sc/
-sc
-com.sc
-gov.sc
-net.sc
-org.sc
-edu.sc
-
-// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
-// Submitted by registry 2008-06-17
-sd
-com.sd
-net.sd
-org.sd
-edu.sd
-med.sd
-gov.sd
-info.sd
-
-// se : http://en.wikipedia.org/wiki/.se
-// Submitted by registry 2008-06-24
-se
-a.se
-ac.se
-b.se
-bd.se
-brand.se
-c.se
-d.se
-e.se
-f.se
-fh.se
-fhsk.se
-fhv.se
-g.se
-h.se
-i.se
-k.se
-komforb.se
-kommunalforbund.se
-komvux.se
-l.se
-lanbib.se
-m.se
-n.se
-naturbruksgymn.se
-o.se
-org.se
-p.se
-parti.se
-pp.se
-press.se
-r.se
-s.se
-sshn.se
-t.se
-tm.se
-u.se
-w.se
-x.se
-y.se
-z.se
-
-// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html
-sg
-com.sg
-net.sg
-org.sg
-gov.sg
-edu.sg
-per.sg
-
-// sh : http://www.nic.sh/rules.html
-// list of 2nd level domains ?
-sh
-
-// si : http://en.wikipedia.org/wiki/.si
-si
-
-// sj : No registrations at this time.
-// Submitted by registry 2008-06-16
-
-// sk : http://en.wikipedia.org/wiki/.sk
-// list of 2nd level domains ?
-sk
-
-// sl : http://www.nic.sl
-// Submitted by registry 2008-06-12
-sl
-com.sl
-net.sl
-edu.sl
-gov.sl
-org.sl
-
-// sm : http://en.wikipedia.org/wiki/.sm
-sm
-
-// sn : http://en.wikipedia.org/wiki/.sn
-sn
-art.sn
-com.sn
-edu.sn
-gouv.sn
-org.sn
-perso.sn
-univ.sn
-
-// so : http://www.soregistry.com/
-so
-com.so
-net.so
-org.so
-
-// sr : http://en.wikipedia.org/wiki/.sr
-sr
-
-// st : http://www.nic.st/html/policyrules/
-st
-co.st
-com.st
-consulado.st
-edu.st
-embaixada.st
-gov.st
-mil.st
-net.st
-org.st
-principe.st
-saotome.st
-store.st
-
-// su : http://en.wikipedia.org/wiki/.su
-su
-
-// sv : http://www.svnet.org.sv/svpolicy.html
-*.sv
-
-// sy : http://en.wikipedia.org/wiki/.sy
-// see also: http://www.gobin.info/domainname/sy.doc
-sy
-edu.sy
-gov.sy
-net.sy
-mil.sy
-com.sy
-org.sy
-
-// sz : http://en.wikipedia.org/wiki/.sz
-// http://www.sispa.org.sz/
-sz
-co.sz
-ac.sz
-org.sz
-
-// tc : http://en.wikipedia.org/wiki/.tc
-tc
-
-// td : http://en.wikipedia.org/wiki/.td
-td
-
-// tel: http://en.wikipedia.org/wiki/.tel
-// http://www.telnic.org/
-tel
-
-// tf : http://en.wikipedia.org/wiki/.tf
-tf
-
-// tg : http://en.wikipedia.org/wiki/.tg
-// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains,
-// although this contradicts wikipedia.
-tg
-
-// th : http://en.wikipedia.org/wiki/.th
-// Submitted by registry 2008-06-17
-th
-ac.th
-co.th
-go.th
-in.th
-mi.th
-net.th
-or.th
-
-// tj : http://www.nic.tj/policy.htm
-tj
-ac.tj
-biz.tj
-co.tj
-com.tj
-edu.tj
-go.tj
-gov.tj
-int.tj
-mil.tj
-name.tj
-net.tj
-nic.tj
-org.tj
-test.tj
-web.tj
-
-// tk : http://en.wikipedia.org/wiki/.tk
-tk
-
-// tl : http://en.wikipedia.org/wiki/.tl
-tl
-gov.tl
-
-// tm : http://www.nic.tm/rules.html
-// list of 2nd level tlds ?
-tm
-
-// tn : http://en.wikipedia.org/wiki/.tn
-// http://whois.ati.tn/
-tn
-com.tn
-ens.tn
-fin.tn
-gov.tn
-ind.tn
-intl.tn
-nat.tn
-net.tn
-org.tn
-info.tn
-perso.tn
-tourism.tn
-edunet.tn
-rnrt.tn
-rns.tn
-rnu.tn
-mincom.tn
-agrinet.tn
-defense.tn
-turen.tn
-
-// to : http://en.wikipedia.org/wiki/.to
-// Submitted by registry 2008-06-17
-to
-com.to
-gov.to
-net.to
-org.to
-edu.to
-mil.to
-
-// tr : http://en.wikipedia.org/wiki/.tr
-*.tr
-!nic.tr
-// Used by government in the TRNC
-// http://en.wikipedia.org/wiki/.nc.tr
-gov.nc.tr
-
-// travel : http://en.wikipedia.org/wiki/.travel
-travel
-
-// tt : http://www.nic.tt/
-tt
-co.tt
-com.tt
-org.tt
-net.tt
-biz.tt
-info.tt
-pro.tt
-int.tt
-coop.tt
-jobs.tt
-mobi.tt
-travel.tt
-museum.tt
-aero.tt
-name.tt
-gov.tt
-edu.tt
-
-// tv : http://en.wikipedia.org/wiki/.tv
-// Not listing any 2LDs as reserved since none seem to exist in practice,
-// Wikipedia notwithstanding.
-tv
-
-// tw : http://en.wikipedia.org/wiki/.tw
-tw
-edu.tw
-gov.tw
-mil.tw
-com.tw
-net.tw
-org.tw
-idv.tw
-game.tw
-ebiz.tw
-club.tw
-網路.tw
-組織.tw
-商業.tw
-
-// tz : http://en.wikipedia.org/wiki/.tz
-// Submitted by registry 2008-06-17
-// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25
-ac.tz
-co.tz
-go.tz
-mil.tz
-ne.tz
-or.tz
-sc.tz
-
-// ua : http://www.nic.net.ua/
-ua
-com.ua
-edu.ua
-gov.ua
-in.ua
-net.ua
-org.ua
-// ua geo-names
-cherkassy.ua
-chernigov.ua
-chernovtsy.ua
-ck.ua
-cn.ua
-crimea.ua
-cv.ua
-dn.ua
-dnepropetrovsk.ua
-donetsk.ua
-dp.ua
-if.ua
-ivano-frankivsk.ua
-kh.ua
-kharkov.ua
-kherson.ua
-khmelnitskiy.ua
-kiev.ua
-kirovograd.ua
-km.ua
-kr.ua
-ks.ua
-kv.ua
-lg.ua
-lugansk.ua
-lutsk.ua
-lviv.ua
-mk.ua
-nikolaev.ua
-od.ua
-odessa.ua
-pl.ua
-poltava.ua
-rovno.ua
-rv.ua
-sebastopol.ua
-sumy.ua
-te.ua
-ternopil.ua
-uzhgorod.ua
-vinnica.ua
-vn.ua
-zaporizhzhe.ua
-zp.ua
-zhitomir.ua
-zt.ua
-
-// Private registries in .ua
-co.ua
-pp.ua
-
-// ug : http://www.registry.co.ug/
-ug
-co.ug
-ac.ug
-sc.ug
-go.ug
-ne.ug
-or.ug
-
-// uk : http://en.wikipedia.org/wiki/.uk
-*.uk
-*.sch.uk
-!bl.uk
-!british-library.uk
-!icnet.uk
-!jet.uk
-!mod.uk
-!nel.uk
-!nhs.uk
-!nic.uk
-!nls.uk
-!national-library-scotland.uk
-!parliament.uk
-!police.uk
-
-// us : http://en.wikipedia.org/wiki/.us
-us
-dni.us
-fed.us
-isa.us
-kids.us
-nsn.us
-// us geographic names
-ak.us
-al.us
-ar.us
-as.us
-az.us
-ca.us
-co.us
-ct.us
-dc.us
-de.us
-fl.us
-ga.us
-gu.us
-hi.us
-ia.us
-id.us
-il.us
-in.us
-ks.us
-ky.us
-la.us
-ma.us
-md.us
-me.us
-mi.us
-mn.us
-mo.us
-ms.us
-mt.us
-nc.us
-nd.us
-ne.us
-nh.us
-nj.us
-nm.us
-nv.us
-ny.us
-oh.us
-ok.us
-or.us
-pa.us
-pr.us
-ri.us
-sc.us
-sd.us
-tn.us
-tx.us
-ut.us
-vi.us
-vt.us
-va.us
-wa.us
-wi.us
-wv.us
-wy.us
-// The registrar notes several more specific domains available in each state,
-// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat
-// haphazard; in some states these domains resolve as addresses, while in others
-// only subdomains are available, or even nothing at all. We include the
-// most common ones where it's clear that different sites are different
-// entities.
-k12.ak.us
-k12.al.us
-k12.ar.us
-k12.as.us
-k12.az.us
-k12.ca.us
-k12.co.us
-k12.ct.us
-k12.dc.us
-k12.de.us
-k12.fl.us
-k12.ga.us
-k12.gu.us
-// k12.hi.us Hawaii has a state-wide DOE login: bug 614565
-k12.ia.us
-k12.id.us
-k12.il.us
-k12.in.us
-k12.ks.us
-k12.ky.us
-k12.la.us
-k12.ma.us
-k12.md.us
-k12.me.us
-k12.mi.us
-k12.mn.us
-k12.mo.us
-k12.ms.us
-k12.mt.us
-k12.nc.us
-k12.nd.us
-k12.ne.us
-k12.nh.us
-k12.nj.us
-k12.nm.us
-k12.nv.us
-k12.ny.us
-k12.oh.us
-k12.ok.us
-k12.or.us
-k12.pa.us
-k12.pr.us
-k12.ri.us
-k12.sc.us
-k12.sd.us
-k12.tn.us
-k12.tx.us
-k12.ut.us
-k12.vi.us
-k12.vt.us
-k12.va.us
-k12.wa.us
-k12.wi.us
-k12.wv.us
-k12.wy.us
-
-cc.ak.us
-cc.al.us
-cc.ar.us
-cc.as.us
-cc.az.us
-cc.ca.us
-cc.co.us
-cc.ct.us
-cc.dc.us
-cc.de.us
-cc.fl.us
-cc.ga.us
-cc.gu.us
-cc.hi.us
-cc.ia.us
-cc.id.us
-cc.il.us
-cc.in.us
-cc.ks.us
-cc.ky.us
-cc.la.us
-cc.ma.us
-cc.md.us
-cc.me.us
-cc.mi.us
-cc.mn.us
-cc.mo.us
-cc.ms.us
-cc.mt.us
-cc.nc.us
-cc.nd.us
-cc.ne.us
-cc.nh.us
-cc.nj.us
-cc.nm.us
-cc.nv.us
-cc.ny.us
-cc.oh.us
-cc.ok.us
-cc.or.us
-cc.pa.us
-cc.pr.us
-cc.ri.us
-cc.sc.us
-cc.sd.us
-cc.tn.us
-cc.tx.us
-cc.ut.us
-cc.vi.us
-cc.vt.us
-cc.va.us
-cc.wa.us
-cc.wi.us
-cc.wv.us
-cc.wy.us
-
-lib.ak.us
-lib.al.us
-lib.ar.us
-lib.as.us
-lib.az.us
-lib.ca.us
-lib.co.us
-lib.ct.us
-lib.dc.us
-lib.de.us
-lib.fl.us
-lib.ga.us
-lib.gu.us
-lib.hi.us
-lib.ia.us
-lib.id.us
-lib.il.us
-lib.in.us
-lib.ks.us
-lib.ky.us
-lib.la.us
-lib.ma.us
-lib.md.us
-lib.me.us
-lib.mi.us
-lib.mn.us
-lib.mo.us
-lib.ms.us
-lib.mt.us
-lib.nc.us
-lib.nd.us
-lib.ne.us
-lib.nh.us
-lib.nj.us
-lib.nm.us
-lib.nv.us
-lib.ny.us
-lib.oh.us
-lib.ok.us
-lib.or.us
-lib.pa.us
-lib.pr.us
-lib.ri.us
-lib.sc.us
-lib.sd.us
-lib.tn.us
-lib.tx.us
-lib.ut.us
-lib.vi.us
-lib.vt.us
-lib.va.us
-lib.wa.us
-lib.wi.us
-lib.wv.us
-lib.wy.us
-
-// k12.ma.us contains school districts in Massachusetts. The 4LDs are
-// managed indepedently except for private (PVT), charter (CHTR) and
-// parochial (PAROCH) schools. Those are delegated dorectly to the
-// 5LD operators.
-pvt.k12.ma.us
-chtr.k12.ma.us
-paroch.k12.ma.us
-
-// uy : http://www.antel.com.uy/
-*.uy
-
-// uz : http://www.reg.uz/registerr.html
-// are there other 2nd level tlds ?
-uz
-com.uz
-co.uz
-
-// va : http://en.wikipedia.org/wiki/.va
-va
-
-// vc : http://en.wikipedia.org/wiki/.vc
-// Submitted by registry 2008-06-13
-vc
-com.vc
-net.vc
-org.vc
-gov.vc
-mil.vc
-edu.vc
-
-// ve : http://registro.nic.ve/nicve/registro/index.html
-*.ve
-
-// vg : http://en.wikipedia.org/wiki/.vg
-vg
-
-// vi : http://www.nic.vi/newdomainform.htm
-// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other
-// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they
-// are available for registration (which they do not seem to be).
-vi
-co.vi
-com.vi
-k12.vi
-net.vi
-org.vi
-
-// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
-vn
-com.vn
-net.vn
-org.vn
-edu.vn
-gov.vn
-int.vn
-ac.vn
-biz.vn
-info.vn
-name.vn
-pro.vn
-health.vn
-
-// vu : http://en.wikipedia.org/wiki/.vu
-// list of 2nd level tlds ?
-vu
-
-// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-wf
-
-// ws : http://en.wikipedia.org/wiki/.ws
-// http://samoanic.ws/index.dhtml
-ws
-com.ws
-net.ws
-org.ws
-gov.ws
-edu.ws
-
-// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
-yt
-
-// IDN ccTLDs
-// Please sort by ISO 3166 ccTLD, then punicode string
-// when submitting patches and follow this format:
-// ("" ) :
-// [optional sponsoring org]
-//
-
-// xn--mgbaam7a8h ("Emerat" Arabic) : AE
-//http://nic.ae/english/arabicdomain/rules.jsp
-امارات
-
-// xn--54b7fta0cc ("Bangla" Bangla) : BD
-বাংলা
-
-// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN
-// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
-中国
-
-// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN
-// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
-中國
-
-// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ
-الجزائر
-
-// xn--wgbh1c ("Egypt" Arabic .masr) : EG
-// http://www.dotmasr.eg/
-مصر
-
-// xn--node ("ge" Georgian (Mkhedruli)) : GE
-გე
-
-// xn--j6w193g ("Hong Kong" Chinese-Han) : HK
-// https://www2.hkirc.hk/register/rules.jsp
-香港
-
-// xn--h2brj9c ("Bharat" Devanagari) : IN
-// India
-भारत
-
-// xn--mgbbh1a71e ("Bharat" Arabic) : IN
-// India
-بھارت
-
-// xn--fpcrj9c3d ("Bharat" Telugu) : IN
-// India
-భారత్
-
-// xn--gecrj9c ("Bharat" Gujarati) : IN
-// India
-ભારત
-
-// xn--s9brj9c ("Bharat" Gurmukhi) : IN
-// India
-ਭਾਰਤ
-
-// xn--45brj9c ("Bharat" Bengali) : IN
-// India
-ভারত
-
-// xn--xkc2dl3a5ee0h ("India" Tamil) : IN
-// India
-இந்தியா
-
-// xn--mgba3a4f16a ("Iran" Persian) : IR
-ایران
-
-// xn--mgba3a4fra ("Iran" Arabic) : IR
-ايران
-
-//xn--mgbayh7gpa ("al-Ordon" Arabic) JO
-//National Information Technology Center (NITC)
-//Royal Scientific Society, Al-Jubeiha
-الاردن
-
-// xn--3e0b707e ("Republic of Korea" Hangul) : KR
-한국
-
-// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK
-// http://nic.lk
-ලංකා
-
-// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK
-// http://nic.lk
-இலங்கை
-
-// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA
-المغرب
-
-// xn--mgb9awbf ("Oman" Arabic) : OM
-عمان
-
-// xn--ygbi2ammx ("Falasteen" Arabic) : PS
-// The Palestinian National Internet Naming Authority (PNINA)
-// http://www.pnina.ps
-فلسطين
-
-// xn--90a3ac ("srb" Cyrillic) : RS
-срб
-
-// xn--p1ai ("rf" Russian-Cyrillic) : RU
-// http://www.cctld.ru/en/docs/rulesrf.php
-рф
-
-// xn--wgbl6a ("Qatar" Arabic) : QA
-// http://www.ict.gov.qa/
-قطر
-
-// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA
-// http://www.nic.net.sa/
-السعودية
-
-// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA
-السعودیة
-
-// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA
-السعودیۃ
-
-// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA
-السعوديه
-
-// xn--ogbpf8fl ("Syria" Arabic) : SY
-سورية
-
-// xn--mgbtf8fl ("Syria" Arabic) variant : SY
-سوريا
-
-// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG
-新加坡
-
-// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG
-சிங்கப்பூர்
-
-// xn--o3cw4h ("Thai" Thai) : TH
-// http://www.thnic.co.th
-ไทย
-
-// xn--pgbs0dh ("Tunis") : TN
-// http://nic.tn
-تونس
-
-// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW
-// http://www.twnic.net/english/dn/dn_07a.htm
-台灣
-
-// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW
-// http://www.twnic.net/english/dn/dn_07a.htm
-台湾
-
-// xn--nnx388a ("Taiwan") variant : TW
-臺灣
-
-// xn--j1amh ("ukr" Cyrillic) : UA
-укр
-
-// xn--mgb2ddes ("AlYemen" Arabic) : YE
-اليمن
-
-// xxx : http://icmregistry.com
-xxx
-
-// ye : http://www.y.net.ye/services/domain_name.htm
-*.ye
-
-// za : http://www.zadna.org.za/slds.html
-*.za
-
-// zm : http://en.wikipedia.org/wiki/.zm
-*.zm
-
-// zw : http://en.wikipedia.org/wiki/.zw
-*.zw
-
-// ===END ICANN DOMAINS===
-// ===BEGIN PRIVATE DOMAINS===
-
-// info.at : http://www.info.at/
-biz.at
-info.at
-
-// priv.at : http://www.nic.priv.at/
-// Submitted by registry 2008-06-09
-priv.at
-
-// co.ca : http://registry.co.ca
-co.ca
-
-// CentralNic : http://www.centralnic.com/names/domains
-// Confirmed by registry 2008-06-09
-ar.com
-br.com
-cn.com
-de.com
-eu.com
-gb.com
-gr.com
-hu.com
-jpn.com
-kr.com
-no.com
-qc.com
-ru.com
-sa.com
-se.com
-uk.com
-us.com
-uy.com
-za.com
-gb.net
-jp.net
-se.net
-uk.net
-ae.org
-us.org
-com.de
-
-// Opera Software, A.S.A.
-// Requested by Yngve Pettersen 2009-11-26
-operaunite.com
-
-// Google, Inc.
-// Requested by Eduardo Vela 2010-09-06
-appspot.com
-
-// iki.fi : Submitted by Hannu Aronsson 2009-11-05
-iki.fi
-
-// c.la : http://www.c.la/
-c.la
-
-// ZaNiC : http://www.za.net/
-// Confirmed by registry 2009-10-03
-za.net
-za.org
-
-// CoDNS B.V.
-// Added 2010-05-23.
-co.nl
-co.no
-
-// Mainseek Sp. z o.o. : http://www.co.pl/
-co.pl
-
-// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
-dyndns-at-home.com
-dyndns-at-work.com
-dyndns-blog.com
-dyndns-free.com
-dyndns-home.com
-dyndns-ip.com
-dyndns-mail.com
-dyndns-office.com
-dyndns-pics.com
-dyndns-remote.com
-dyndns-server.com
-dyndns-web.com
-dyndns-wiki.com
-dyndns-work.com
-dyndns.biz
-dyndns.info
-dyndns.org
-dyndns.tv
-at-band-camp.net
-ath.cx
-barrel-of-knowledge.info
-barrell-of-knowledge.info
-better-than.tv
-blogdns.com
-blogdns.net
-blogdns.org
-blogsite.org
-boldlygoingnowhere.org
-broke-it.net
-buyshouses.net
-cechire.com
-dnsalias.com
-dnsalias.net
-dnsalias.org
-dnsdojo.com
-dnsdojo.net
-dnsdojo.org
-does-it.net
-doesntexist.com
-doesntexist.org
-dontexist.com
-dontexist.net
-dontexist.org
-doomdns.com
-doomdns.org
-dvrdns.org
-dyn-o-saur.com
-dynalias.com
-dynalias.net
-dynalias.org
-dynathome.net
-dyndns.ws
-endofinternet.net
-endofinternet.org
-endoftheinternet.org
-est-a-la-maison.com
-est-a-la-masion.com
-est-le-patron.com
-est-mon-blogueur.com
-for-better.biz
-for-more.biz
-for-our.info
-for-some.biz
-for-the.biz
-forgot.her.name
-forgot.his.name
-from-ak.com
-from-al.com
-from-ar.com
-from-az.net
-from-ca.com
-from-co.net
-from-ct.com
-from-dc.com
-from-de.com
-from-fl.com
-from-ga.com
-from-hi.com
-from-ia.com
-from-id.com
-from-il.com
-from-in.com
-from-ks.com
-from-ky.com
-from-la.net
-from-ma.com
-from-md.com
-from-me.org
-from-mi.com
-from-mn.com
-from-mo.com
-from-ms.com
-from-mt.com
-from-nc.com
-from-nd.com
-from-ne.com
-from-nh.com
-from-nj.com
-from-nm.com
-from-nv.com
-from-ny.net
-from-oh.com
-from-ok.com
-from-or.com
-from-pa.com
-from-pr.com
-from-ri.com
-from-sc.com
-from-sd.com
-from-tn.com
-from-tx.com
-from-ut.com
-from-va.com
-from-vt.com
-from-wa.com
-from-wi.com
-from-wv.com
-from-wy.com
-ftpaccess.cc
-fuettertdasnetz.de
-game-host.org
-game-server.cc
-getmyip.com
-gets-it.net
-go.dyndns.org
-gotdns.com
-gotdns.org
-groks-the.info
-groks-this.info
-ham-radio-op.net
-here-for-more.info
-hobby-site.com
-hobby-site.org
-home.dyndns.org
-homedns.org
-homeftp.net
-homeftp.org
-homeip.net
-homelinux.com
-homelinux.net
-homelinux.org
-homeunix.com
-homeunix.net
-homeunix.org
-iamallama.com
-in-the-band.net
-is-a-anarchist.com
-is-a-blogger.com
-is-a-bookkeeper.com
-is-a-bruinsfan.org
-is-a-bulls-fan.com
-is-a-candidate.org
-is-a-caterer.com
-is-a-celticsfan.org
-is-a-chef.com
-is-a-chef.net
-is-a-chef.org
-is-a-conservative.com
-is-a-cpa.com
-is-a-cubicle-slave.com
-is-a-democrat.com
-is-a-designer.com
-is-a-doctor.com
-is-a-financialadvisor.com
-is-a-geek.com
-is-a-geek.net
-is-a-geek.org
-is-a-green.com
-is-a-guru.com
-is-a-hard-worker.com
-is-a-hunter.com
-is-a-knight.org
-is-a-landscaper.com
-is-a-lawyer.com
-is-a-liberal.com
-is-a-libertarian.com
-is-a-linux-user.org
-is-a-llama.com
-is-a-musician.com
-is-a-nascarfan.com
-is-a-nurse.com
-is-a-painter.com
-is-a-patsfan.org
-is-a-personaltrainer.com
-is-a-photographer.com
-is-a-player.com
-is-a-republican.com
-is-a-rockstar.com
-is-a-socialist.com
-is-a-soxfan.org
-is-a-student.com
-is-a-teacher.com
-is-a-techie.com
-is-a-therapist.com
-is-an-accountant.com
-is-an-actor.com
-is-an-actress.com
-is-an-anarchist.com
-is-an-artist.com
-is-an-engineer.com
-is-an-entertainer.com
-is-by.us
-is-certified.com
-is-found.org
-is-gone.com
-is-into-anime.com
-is-into-cars.com
-is-into-cartoons.com
-is-into-games.com
-is-leet.com
-is-lost.org
-is-not-certified.com
-is-saved.org
-is-slick.com
-is-uberleet.com
-is-very-bad.org
-is-very-evil.org
-is-very-good.org
-is-very-nice.org
-is-very-sweet.org
-is-with-theband.com
-isa-geek.com
-isa-geek.net
-isa-geek.org
-isa-hockeynut.com
-issmarterthanyou.com
-isteingeek.de
-istmein.de
-kicks-ass.net
-kicks-ass.org
-knowsitall.info
-land-4-sale.us
-lebtimnetz.de
-leitungsen.de
-likes-pie.com
-likescandy.com
-merseine.nu
-mine.nu
-misconfused.org
-mypets.ws
-myphotos.cc
-neat-url.com
-office-on-the.net
-on-the-web.tv
-podzone.net
-podzone.org
-readmyblog.org
-saves-the-whales.com
-scrapper-site.net
-scrapping.cc
-selfip.biz
-selfip.com
-selfip.info
-selfip.net
-selfip.org
-sells-for-less.com
-sells-for-u.com
-sells-it.net
-sellsyourhome.org
-servebbs.com
-servebbs.net
-servebbs.org
-serveftp.net
-serveftp.org
-servegame.org
-shacknet.nu
-simple-url.com
-space-to-rent.com
-stuff-4-sale.org
-stuff-4-sale.us
-teaches-yoga.com
-thruhere.net
-traeumtgerade.de
-webhop.biz
-webhop.info
-webhop.net
-webhop.org
-worse-than.tv
-writesthisblog.com
-
-// ===END PRIVATE DOMAINS===
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/test.js
deleted file mode 100644
index 5cbf536c..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tough-cookie/test.js
+++ /dev/null
@@ -1,1625 +0,0 @@
-/*
- * Copyright GoInstant, Inc. and other contributors. All rights reserved.
- * 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.
- */
-'use strict';
-var vows = require('vows');
-var assert = require('assert');
-var async = require('async');
-
-// NOTE use require("tough-cookie") in your own code:
-var tough = require('./lib/cookie');
-var Cookie = tough.Cookie;
-var CookieJar = tough.CookieJar;
-
-
-function dateVows(table) {
- var theVows = { };
- Object.keys(table).forEach(function(date) {
- var expect = table[date];
- theVows[date] = function() {
- var got = tough.parseDate(date) ? 'valid' : 'invalid';
- assert.equal(got, expect ? 'valid' : 'invalid');
- };
- });
- return { "date parsing": theVows };
-}
-
-function matchVows(func,table) {
- var theVows = {};
- table.forEach(function(item) {
- var str = item[0];
- var dom = item[1];
- var expect = item[2];
- var label = str+(expect?" matches ":" doesn't match ")+dom;
- theVows[label] = function() {
- assert.equal(func(str,dom),expect);
- };
- });
- return theVows;
-}
-
-function defaultPathVows(table) {
- var theVows = {};
- table.forEach(function(item) {
- var str = item[0];
- var expect = item[1];
- var label = str+" gives "+expect;
- theVows[label] = function() {
- assert.equal(tough.defaultPath(str),expect);
- };
- });
- return theVows;
-}
-
-var atNow = Date.now();
-function at(offset) { return {now: new Date(atNow+offset)}; }
-
-vows.describe('Cookie Jar')
-.addBatch({
- "all defined": function() {
- assert.ok(Cookie);
- assert.ok(CookieJar);
- },
-})
-.addBatch(
- dateVows({
- "Wed, 09 Jun 2021 10:18:14 GMT": true,
- "Wed, 09 Jun 2021 22:18:14 GMT": true,
- "Tue, 18 Oct 2011 07:42:42.123 GMT": true,
- "18 Oct 2011 07:42:42 GMT": true,
- "8 Oct 2011 7:42:42 GMT": true,
- "8 Oct 2011 7:2:42 GMT": false,
- "Oct 18 2011 07:42:42 GMT": true,
- "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true,
- "09 Jun 2021 10:18:14 GMT": true,
- "99 Jix 3038 48:86:72 ZMT": false,
- '01 Jan 1970 00:00:00 GMT': true,
- '01 Jan 1600 00:00:00 GMT': false, // before 1601
- '01 Jan 1601 00:00:00 GMT': true,
- '10 Feb 81 13:00:00 GMT': true, // implicit year
- 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK
- 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes
- 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC
- })
-)
-.addBatch({
- "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": {
- topic: function() {
- return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false;
- },
- "invalid": function(date) {
- assert.equal(date,false);
- },
- }
-})
-.addBatch({
- "formatting": {
- "a simple cookie": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- return c;
- },
- "validates": function(c) {
- assert.ok(c.validate());
- },
- "to string": function(c) {
- assert.equal(c.toString(), 'a=b');
- },
- },
- "a cookie with spaces in the value": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'beta gamma';
- return c;
- },
- "doesn't validate": function(c) {
- assert.ok(!c.validate());
- },
- "'garbage in, garbage out'": function(c) {
- assert.equal(c.toString(), 'a=beta gamma');
- },
- },
- "with an empty value and HttpOnly": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.httpOnly = true;
- return c;
- },
- "to string": function(c) {
- assert.equal(c.toString(), 'a=; HttpOnly');
- }
- },
- "with an expiry": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- c.setExpires("Oct 18 2011 07:05:03 GMT");
- return c;
- },
- "validates": function(c) {
- assert.ok(c.validate());
- },
- "to string": function(c) {
- assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT');
- },
- "to short string": function(c) {
- assert.equal(c.cookieString(), 'a=b');
- },
- },
- "with a max-age": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- c.setExpires("Oct 18 2011 07:05:03 GMT");
- c.maxAge = 12345;
- return c;
- },
- "validates": function(c) {
- assert.ok(c.validate()); // mabe this one *shouldn't*?
- },
- "to string": function(c) {
- assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345');
- },
- },
- "with a bunch of things": function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- c.setExpires("Oct 18 2011 07:05:03 GMT");
- c.maxAge = 12345;
- c.domain = 'example.com';
- c.path = '/foo';
- c.secure = true;
- c.httpOnly = true;
- c.extensions = ['MyExtension'];
- assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension');
- },
- "a host-only cookie": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- c.hostOnly = true;
- c.domain = 'shouldnt-stringify.example.com';
- c.path = '/should-stringify';
- return c;
- },
- "validates": function(c) {
- assert.ok(c.validate());
- },
- "to string": function(c) {
- assert.equal(c.toString(), 'a=b; Path=/should-stringify');
- },
- },
- "minutes are '10'": {
- topic: function() {
- var c = new Cookie();
- c.key = 'a';
- c.value = 'b';
- c.expires = new Date(1284113410000);
- return c;
- },
- "validates": function(c) {
- assert.ok(c.validate());
- },
- "to string": function(c) {
- var str = c.toString();
- assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT');
- assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT');
- },
- }
- }
-})
-.addBatch({
- "TTL with max-age": function() {
- var c = new Cookie();
- c.maxAge = 123;
- assert.equal(c.TTL(), 123000);
- assert.equal(c.expiryTime(new Date(9000000)), 9123000);
- },
- "TTL with zero max-age": function() {
- var c = new Cookie();
- c.key = 'a'; c.value = 'b';
- c.maxAge = 0; // should be treated as "earliest representable"
- assert.equal(c.TTL(), 0);
- assert.equal(c.expiryTime(new Date(9000000)), -Infinity);
- assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT
- },
- "TTL with negative max-age": function() {
- var c = new Cookie();
- c.key = 'a'; c.value = 'b';
- c.maxAge = -1; // should be treated as "earliest representable"
- assert.equal(c.TTL(), 0);
- assert.equal(c.expiryTime(new Date(9000000)), -Infinity);
- assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT
- },
- "TTL with max-age and expires": function() {
- var c = new Cookie();
- c.maxAge = 123;
- c.expires = new Date(Date.now()+9000);
- assert.equal(c.TTL(), 123000);
- assert.ok(c.isPersistent());
- },
- "TTL with expires": function() {
- var c = new Cookie();
- var now = Date.now();
- c.expires = new Date(now+9000);
- assert.equal(c.TTL(now), 9000);
- assert.equal(c.expiryTime(), c.expires.getTime());
- },
- "TTL with old expires": function() {
- var c = new Cookie();
- c.setExpires('17 Oct 2010 00:00:00 GMT');
- assert.ok(c.TTL() < 0);
- assert.ok(c.isPersistent());
- },
- "default TTL": {
- topic: function() { return new Cookie(); },
- "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) },
- "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) },
- },
-}).addBatch({
- "Parsing": {
- "simple": {
- topic: function() {
- return Cookie.parse('a=bcd',true) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'a') },
- "value": function(c) { assert.equal(c.value, 'bcd') },
- "no path": function(c) { assert.equal(c.path, null) },
- "no domain": function(c) { assert.equal(c.domain, null) },
- "no extensions": function(c) { assert.ok(!c.extensions) },
- },
- "with expiry": {
- topic: function() {
- return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'a') },
- "value": function(c) { assert.equal(c.value, 'bcd') },
- "has expires": function(c) {
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
- assert.equal(c.expires.getTime(), 1318921503000);
- },
- },
- "with expiry and path": {
- topic: function() {
- return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'abc') },
- "value": function(c) { assert.equal(c.value, 'xyzzy!') },
- "has expires": function(c) {
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
- assert.equal(c.expires.getTime(), 1318921503000);
- },
- "has path": function(c) { assert.equal(c.path, '/aBc'); },
- "no httponly or secure": function(c) {
- assert.ok(!c.httpOnly);
- assert.ok(!c.secure);
- },
- },
- "with everything": {
- topic: function() {
- return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'abc') },
- "value": function(c) { assert.equal(c.value, 'xyzzy!') },
- "has expires": function(c) {
- assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be');
- assert.equal(c.expires.getTime(), 1318921503000);
- },
- "has path": function(c) { assert.equal(c.path, '/aBc'); },
- "has domain": function(c) { assert.equal(c.domain, 'example.com'); },
- "has httponly": function(c) { assert.equal(c.httpOnly, true); },
- "has secure": function(c) { assert.equal(c.secure, true); },
- "has max-age": function(c) { assert.equal(c.maxAge, 1234); },
- "has extensions": function(c) {
- assert.ok(c.extensions);
- assert.equal(c.extensions[0], 'Foo=Bar');
- assert.equal(c.extensions[1], 'Baz');
- },
- },
- "invalid expires": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; Expires=xyzzy");
- assert.ok(c);
- assert.equal(c.expires, Infinity);
- },
- },
- "zero max-age": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; Max-Age=0");
- assert.ok(c);
- assert.equal(c.maxAge, 0);
- },
- },
- "negative max-age": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; Max-Age=-1");
- assert.ok(c);
- assert.equal(c.maxAge, -1);
- },
- },
- "empty domain": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; domain=");
- assert.ok(c);
- assert.equal(c.domain, null);
- },
- },
- "dot domain": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; domain=.");
- assert.ok(c);
- assert.equal(c.domain, null);
- },
- },
- "uppercase domain": {
- "strict lowercases": function() {
- var c = Cookie.parse("a=b; domain=EXAMPLE.COM");
- assert.ok(c);
- assert.equal(c.domain, 'example.com');
- },
- "non-strict lowercases": function() {
- var c = Cookie.parse("a=b; domain=EXAMPLE.COM");
- assert.ok(c);
- assert.equal(c.domain, 'example.com');
- },
- },
- "trailing dot in domain": {
- topic: function() {
- return Cookie.parse("a=b; Domain=example.com.", true) || null;
- },
- "has the domain": function(c) { assert.equal(c.domain,"example.com.") },
- "but doesn't validate": function(c) { assert.equal(c.validate(),false) },
- },
- "empty path": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; path=");
- assert.ok(c);
- assert.equal(c.path, null);
- },
- },
- "no-slash path": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; path=xyzzy");
- assert.ok(c);
- assert.equal(c.path, null);
- },
- },
- "trailing semi-colons after path": {
- topic: function () {
- return [
- "a=b; path=/;",
- "c=d;;;;"
- ];
- },
- "strict": function (t) {
- assert.ok(!Cookie.parse(t[0], true));
- assert.ok(!Cookie.parse(t[1], true));
- },
- "non-strict": function (t) {
- var c1 = Cookie.parse(t[0]);
- var c2 = Cookie.parse(t[1]);
- assert.ok(c1);
- assert.ok(c2);
- assert.equal(c1.path, '/');
- }
- },
- "secure-with-value": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; Secure=xyzzy");
- assert.ok(c);
- assert.equal(c.secure, true);
- },
- },
- "httponly-with-value": {
- "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) },
- "non-strict": function() {
- var c = Cookie.parse("a=b; HttpOnly=xyzzy");
- assert.ok(c);
- assert.equal(c.httpOnly, true);
- },
- },
- "garbage": {
- topic: function() {
- return Cookie.parse("\x08", true) || null;
- },
- "doesn't parse": function(c) { assert.equal(c,null) },
- },
- "public suffix domain": {
- topic: function() {
- return Cookie.parse("a=b; domain=kyoto.jp", true) || null;
- },
- "parses fine": function(c) {
- assert.ok(c);
- assert.equal(c.domain, 'kyoto.jp');
- },
- "but fails validation": function(c) {
- assert.ok(c);
- assert.ok(!c.validate());
- },
- },
- "Ironically, Google 'GAPS' cookie has very little whitespace": {
- topic: function() {
- return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly");
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'GAPS') },
- "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') },
- "path": function(c) {
- assert.notEqual(c.path, '/;Expires'); // BUG
- assert.equal(c.path, '/');
- },
- "expires": function(c) {
- assert.notEqual(c.expires, Infinity);
- assert.equal(c.expires.getTime(), 1397700749000);
- },
- "secure": function(c) { assert.ok(c.secure) },
- "httponly": function(c) { assert.ok(c.httpOnly) },
- },
- "lots of equal signs": {
- topic: function() {
- return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly");
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'queryPref') },
- "value": function(c) { assert.equal(c.value, 'b=c&d=e') },
- "path": function(c) {
- assert.equal(c.path, '/f=g');
- },
- "expires": function(c) {
- assert.notEqual(c.expires, Infinity);
- assert.equal(c.expires.getTime(), 1397700749000);
- },
- "httponly": function(c) { assert.ok(c.httpOnly) },
- },
- "spaces in value": {
- "strict": {
- topic: function() {
- return Cookie.parse('a=one two three',true) || null;
- },
- "did not parse": function(c) { assert.isNull(c) },
- },
- "non-strict": {
- topic: function() {
- return Cookie.parse('a=one two three',false) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'a') },
- "value": function(c) { assert.equal(c.value, 'one two three') },
- "no path": function(c) { assert.equal(c.path, null) },
- "no domain": function(c) { assert.equal(c.domain, null) },
- "no extensions": function(c) { assert.ok(!c.extensions) },
- },
- },
- "quoted spaces in value": {
- "strict": {
- topic: function() {
- return Cookie.parse('a="one two three"',true) || null;
- },
- "did not parse": function(c) { assert.isNull(c) },
- },
- "non-strict": {
- topic: function() {
- return Cookie.parse('a="one two three"',false) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'a') },
- "value": function(c) { assert.equal(c.value, 'one two three') },
- "no path": function(c) { assert.equal(c.path, null) },
- "no domain": function(c) { assert.equal(c.domain, null) },
- "no extensions": function(c) { assert.ok(!c.extensions) },
- }
- },
- "non-ASCII in value": {
- "strict": {
- topic: function() {
- return Cookie.parse('farbe=weiß',true) || null;
- },
- "did not parse": function(c) { assert.isNull(c) },
- },
- "non-strict": {
- topic: function() {
- return Cookie.parse('farbe=weiß',false) || null;
- },
- "parsed": function(c) { assert.ok(c) },
- "key": function(c) { assert.equal(c.key, 'farbe') },
- "value": function(c) { assert.equal(c.value, 'weiß') },
- "no path": function(c) { assert.equal(c.path, null) },
- "no domain": function(c) { assert.equal(c.domain, null) },
- "no extensions": function(c) { assert.ok(!c.extensions) },
- },
- },
- }
-})
-.addBatch({
- "domain normalization": {
- "simple": function() {
- var c = new Cookie();
- c.domain = "EXAMPLE.com";
- assert.equal(c.canonicalizedDomain(), "example.com");
- },
- "extra dots": function() {
- var c = new Cookie();
- c.domain = ".EXAMPLE.com";
- assert.equal(c.cdomain(), "example.com");
- },
- "weird trailing dot": function() {
- var c = new Cookie();
- c.domain = "EXAMPLE.ca.";
- assert.equal(c.canonicalizedDomain(), "example.ca.");
- },
- "weird internal dots": function() {
- var c = new Cookie();
- c.domain = "EXAMPLE...ca.";
- assert.equal(c.canonicalizedDomain(), "example...ca.");
- },
- "IDN": function() {
- var c = new Cookie();
- c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek
- assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp");
- }
- }
-})
-.addBatch({
- "Domain Match":matchVows(tough.domainMatch, [
- // str, dom, expect
- ["example.com", "example.com", true],
- ["eXaMpLe.cOm", "ExAmPlE.CoM", true],
- ["no.ca", "yes.ca", false],
- ["wwwexample.com", "example.com", false],
- ["www.example.com", "example.com", true],
- ["example.com", "www.example.com", false],
- ["www.subdom.example.com", "example.com", true],
- ["www.subdom.example.com", "subdom.example.com", true],
- ["example.com", "example.com.", false], // RFC6265 S4.1.2.3
- ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name"
- [null, "example.com", null],
- ["example.com", null, null],
- [null, null, null],
- [undefined, undefined, null],
- ])
-})
-.addBatch({
- "default-path": defaultPathVows([
- [null,"/"],
- ["/","/"],
- ["/file","/"],
- ["/dir/file","/dir"],
- ["noslash","/"],
- ])
-})
-.addBatch({
- "Path-Match": matchVows(tough.pathMatch, [
- // request, cookie, match
- ["/","/",true],
- ["/dir","/",true],
- ["/","/dir",false],
- ["/dir/","/dir/", true],
- ["/dir/file","/dir/",true],
- ["/dir/file","/dir",true],
- ["/directory","/dir",false],
- ])
-})
-.addBatch({
- "Cookie Sorting": {
- topic: function() {
- var cookies = [];
- var now = Date.now();
- cookies.push(Cookie.parse("a=0; Domain=example.com"));
- cookies.push(Cookie.parse("b=1; Domain=www.example.com"));
- cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA"));
- cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA"));
- cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB"));
- cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB"));
-
- // force a stable creation time consistent with the order above since
- // some may have been created at now + 1ms.
- var i = cookies.length;
- cookies.forEach(function(cookie) {
- cookie.creation = new Date(now - 100*(i--));
- });
-
- // weak shuffle:
- cookies = cookies.sort(function(){return Math.random()-0.5});
-
- cookies = cookies.sort(tough.cookieCompare);
- return cookies;
- },
- "got": function(cookies) {
- assert.lengthOf(cookies, 6);
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['e','f','c','d','a','b']);
- },
- }
-})
-.addBatch({
- "CookieJar": {
- "Setting a basic cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com; Path=/");
- assert.strictEqual(c.hostOnly, null);
- assert.instanceOf(c.creation, Date);
- assert.strictEqual(c.lastAccessed, null);
- c.creation = new Date(Date.now()-10000);
- cj.setCookie(c, 'http://example.com/index.html', this.callback);
- },
- "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me
- "gets timestamped": function(c) {
- assert.ok(c.creation);
- assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped
- assert.ok(c.lastAccessed);
- assert.equal(c.creation, c.lastAccessed);
- assert.equal(c.TTL(), Infinity);
- assert.ok(!c.isPersistent());
- },
- },
- "Setting a no-path cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com");
- assert.strictEqual(c.hostOnly, null);
- assert.instanceOf(c.creation, Date);
- assert.strictEqual(c.lastAccessed, null);
- c.creation = new Date(Date.now()-10000);
- cj.setCookie(c, 'http://example.com/index.html', this.callback);
- },
- "domain": function(c) { assert.equal(c.domain, 'example.com') },
- "path is /": function(c) { assert.equal(c.path, '/') },
- "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) },
- },
- "Setting a cookie already marked as host-only": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com");
- assert.strictEqual(c.hostOnly, null);
- assert.instanceOf(c.creation, Date);
- assert.strictEqual(c.lastAccessed, null);
- c.creation = new Date(Date.now()-10000);
- c.hostOnly = true;
- cj.setCookie(c, 'http://example.com/index.html', this.callback);
- },
- "domain": function(c) { assert.equal(c.domain, 'example.com') },
- "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) },
- },
- "Setting a session cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b");
- assert.strictEqual(c.path, null);
- cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback);
- },
- "works": function(c) { assert.instanceOf(c,Cookie) },
- "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') },
- "gets the default path": function(c) { assert.equal(c.path, '/dir') },
- "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) },
- },
- "Setting wrong domain cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/");
- cj.setCookie(c, 'http://example.com/index.html', this.callback);
- },
- "fails": function(err,c) {
- assert.ok(err.message.match(/domain/i));
- assert.ok(!c);
- },
- },
- "Setting sub-domain cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=www.example.com; Path=/");
- cj.setCookie(c, 'http://example.com/index.html', this.callback);
- },
- "fails": function(err,c) {
- assert.ok(err.message.match(/domain/i));
- assert.ok(!c);
- },
- },
- "Setting super-domain cookie": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com; Path=/");
- cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback);
- },
- "success": function(err,c) {
- assert.ok(!err);
- assert.equal(c.domain, 'example.com');
- },
- },
- "Setting a sub-path cookie on a super-domain": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com; Path=/subpath");
- assert.strictEqual(c.hostOnly, null);
- assert.instanceOf(c.creation, Date);
- assert.strictEqual(c.lastAccessed, null);
- c.creation = new Date(Date.now()-10000);
- cj.setCookie(c, 'http://www.example.com/index.html', this.callback);
- },
- "domain is super-domain": function(c) { assert.equal(c.domain, 'example.com') },
- "path is /subpath": function(c) { assert.equal(c.path, '/subpath') },
- "path was NOT derived": function(c) { assert.strictEqual(c.pathIsDefault, null) },
- },
- "Setting HttpOnly cookie over non-HTTP API": {
- topic: function() {
- var cj = new CookieJar();
- var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly");
- cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback);
- },
- "fails": function(err,c) {
- assert.match(err.message, /HttpOnly/i);
- assert.ok(!c);
- },
- },
- },
- "Cookie Jar store eight cookies": {
- topic: function() {
- var cj = new CookieJar();
- var ex = 'http://example.com/index.html';
- var tasks = [];
- tasks.push(function(next) {
- cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next);
- });
- tasks.push(function(next) {
- cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next);
- });
- tasks.push(function(next) {
- cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next);
- });
- tasks.push(function(next) { // path
- cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next);
- });
- tasks.push(function(next) { // host only
- cj.setCookie('e=5',ex,at(4000),next);
- });
- tasks.push(function(next) { // other domain
- cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next);
- });
- tasks.push(function(next) { // expired
- cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next);
- });
- tasks.push(function(next) { // expired via Max-Age
- cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next);
- });
- var cb = this.callback;
- async.parallel(tasks, function(err,results){
- setTimeout(function() {
- cb(err,cj,results);
- }, 2000); // so that 'h=8' expires
- });
- },
- "setup ok": function(err,cj,results) {
- assert.ok(!err);
- assert.ok(cj);
- assert.ok(results);
- },
- "then retrieving for http://nodejs.org": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://nodejs.org',this.callback);
- },
- "get a nodejs cookie": function(cookies) {
- assert.lengthOf(cookies, 1);
- var cookie = cookies[0];
- assert.equal(cookie.domain, 'nodejs.org');
- },
- },
- "then retrieving for https://example.com": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('https://example.com',{secure:true},this.callback);
- },
- "get a secure example cookie with others": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['a','b','c','e']);
- },
- },
- "then retrieving for https://example.com (missing options)": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('https://example.com',this.callback);
- },
- "get a secure example cookie with others": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['a','b','c','e']);
- },
- },
- "then retrieving for http://example.com": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://example.com',this.callback);
- },
- "get a bunch of cookies": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['a','b','e']);
- },
- },
- "then retrieving for http://EXAMPlE.com": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://EXAMPlE.com',this.callback);
- },
- "get a bunch of cookies": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['a','b','e']);
- },
- },
- "then retrieving for http://example.com, non-HTTP": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://example.com',{http:false},this.callback);
- },
- "get a bunch of cookies": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['a','e']);
- },
- },
- "then retrieving for http://example.com/foo/bar": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://example.com/foo/bar',this.callback);
- },
- "get a bunch of cookies": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['d','a','b','e']);
- },
- },
- "then retrieving for http://example.com as a string": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookieString('http://example.com',this.callback);
- },
- "get a single string": function(cookieHeader) {
- assert.equal(cookieHeader, "a=1; b=2; e=5");
- },
- },
- "then retrieving for http://example.com as a set-cookie header": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getSetCookieStrings('http://example.com',this.callback);
- },
- "get a single string": function(cookieHeaders) {
- assert.lengthOf(cookieHeaders, 3);
- assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/");
- assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly");
- assert.equal(cookieHeaders[2], "e=5; Path=/");
- },
- },
- "then retrieving for http://www.example.com/": {
- topic: function(cj,oldResults) {
- assert.ok(oldResults);
- cj.getCookies('http://www.example.com/foo/bar',this.callback);
- },
- "get a bunch of cookies": function(cookies) {
- var names = cookies.map(function(c) {return c.key});
- assert.deepEqual(names, ['d','a','b']); // note lack of 'e'
- },
- },
- },
- "Repeated names": {
- topic: function() {
- var cb = this.callback;
- var cj = new CookieJar();
- var ex = 'http://www.example.com/';
- var sc = cj.setCookie;
- var tasks = [];
- var now = Date.now();
- tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0)));
- tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000)));
- tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000)));
- tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000)));
- async.series(tasks,function(err,results) {
- results = results.filter(function(e) {return e !== undefined});
- cb(err,{cj:cj, cookies:results, now:now});
- });
- },
- "all got set": function(err,t) {
- assert.lengthOf(t.cookies,4);
- },
- "then getting 'em back": {
- topic: function(t) {
- var cj = t.cj;
- cj.getCookies('http://www.example.com/pathA',this.callback);
- },
- "there's just three": function (err,cookies) {
- var vals = cookies.map(function(c) {return c.value});
- // may break with sorting; sorting should put 3333 first due to longest path:
- assert.deepEqual(vals, ['3333','1111','2222']);
- }
- },
- },
- "CookieJar setCookie errors": {
- "public-suffix domain": {
- topic: function() {
- var cj = new CookieJar();
- cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback);
- },
- "errors": function(err,cookie) {
- assert.ok(err);
- assert.ok(!cookie);
- assert.match(err.message, /public suffix/i);
- },
- },
- "wrong domain": {
- topic: function() {
- var cj = new CookieJar();
- cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback);
- },
- "errors": function(err,cookie) {
- assert.ok(err);
- assert.ok(!cookie);
- assert.match(err.message, /not in this host's domain/i);
- },
- },
- "old cookie is HttpOnly": {
- topic: function() {
- var cb = this.callback;
- var next = function (err,c) {
- c = null;
- return cb(err,cj);
- };
- var cj = new CookieJar();
- cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next);
- },
- "initial cookie is set": function(err,cj) {
- assert.ok(!err);
- assert.ok(cj);
- },
- "but when trying to overwrite": {
- topic: function(cj) {
- var cb = this.callback;
- var next = function(err,c) {
- c = null;
- cb(null,err);
- };
- cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},next);
- },
- "it's an error": function(err) {
- assert.ok(err);
- },
- "then, checking the original": {
- topic: function(ignored,cj) {
- assert.ok(cj instanceof CookieJar);
- cj.getCookies('http://example.ca',{http:true},this.callback);
- },
- "cookie has original value": function(err,cookies) {
- assert.equal(err,null);
- assert.lengthOf(cookies, 1);
- assert.equal(cookies[0].value,11);
- },
- },
- },
- },
- },
-})
-.addBatch({
- "JSON": {
- "serialization": {
- topic: function() {
- var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly');
- return JSON.stringify(c);
- },
- "gives a string": function(str) {
- assert.equal(typeof str, "string");
- },
- "date is in ISO format": function(str) {
- assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format');
- },
- },
- "deserialization": {
- topic: function() {
- var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}';
- return Cookie.fromJSON(json);
- },
- "works": function(c) {
- assert.ok(c);
- },
- "key": function(c) { assert.equal(c.key, "alpha") },
- "value": function(c) { assert.equal(c.value, "beta") },
- "domain": function(c) { assert.equal(c.domain, "example.com") },
- "path": function(c) { assert.equal(c.path, "/foo") },
- "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) },
- "secure": function(c) { assert.strictEqual(c.secure, false) },
- "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) },
- "expires is a date object": function(c) {
- assert.equal(c.expires.getTime(), 2147483647000);
- },
- "lastAccessed is a date object": function(c) {
- assert.equal(c.lastAccessed.getTime(), 2000000000123);
- },
- "creation defaulted": function(c) {
- assert.ok(c.creation.getTime());
- }
- },
- "null deserialization": {
- topic: function() {
- return Cookie.fromJSON(null);
- },
- "is null": function(cookie) {
- assert.equal(cookie,null);
- },
- },
- },
- "expiry deserialization": {
- "Infinity": {
- topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'),
- "is infinite": function(c) {
- assert.strictEqual(c.expires, "Infinity");
- assert.equal(c.expires, Infinity);
- },
- },
- },
- "maxAge serialization": {
- topic: function() {
- return function(toSet) {
- var c = new Cookie();
- c.key = 'foo'; c.value = 'bar';
- c.setMaxAge(toSet);
- return JSON.stringify(c);
- };
- },
- "zero": {
- topic: function(f) { return f(0) },
- "looks good": function(str) {
- assert.match(str, /"maxAge":0/);
- },
- },
- "Infinity": {
- topic: function(f) { return f(Infinity) },
- "looks good": function(str) {
- assert.match(str, /"maxAge":"Infinity"/);
- },
- },
- "-Infinity": {
- topic: function(f) { return f(-Infinity) },
- "looks good": function(str) {
- assert.match(str, /"maxAge":"-Infinity"/);
- },
- },
- "null": {
- topic: function(f) { return f(null) },
- "looks good": function(str) {
- assert.match(str, /"maxAge":null/);
- },
- },
- },
- "maxAge deserialization": {
- "number": {
- topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'),
- "is the number": function(c) {
- assert.strictEqual(c.maxAge, 123);
- },
- },
- "null": {
- topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'),
- "is null": function(c) {
- assert.strictEqual(c.maxAge, null);
- },
- },
- "less than zero": {
- topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'),
- "is -123": function(c) {
- assert.strictEqual(c.maxAge, -123);
- },
- },
- "Infinity": {
- topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'),
- "is inf-as-string": function(c) {
- assert.strictEqual(c.maxAge, "Infinity");
- },
- },
- "-Infinity": {
- topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'),
- "is inf-as-string": function(c) {
- assert.strictEqual(c.maxAge, "-Infinity");
- },
- },
- }
-})
-.addBatch({
- "permuteDomain": {
- "base case": {
- topic: tough.permuteDomain.bind(null,'example.com'),
- "got the domain": function(list) {
- assert.deepEqual(list, ['example.com']);
- },
- },
- "two levels": {
- topic: tough.permuteDomain.bind(null,'foo.bar.example.com'),
- "got three things": function(list) {
- assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']);
- },
- },
- "invalid domain": {
- topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'),
- "got three things": function(list) {
- assert.equal(list, null);
- },
- },
- },
- "permutePath": {
- "base case": {
- topic: tough.permutePath.bind(null,'/'),
- "just slash": function(list) {
- assert.deepEqual(list,['/']);
- },
- },
- "single case": {
- topic: tough.permutePath.bind(null,'/foo'),
- "two things": function(list) {
- assert.deepEqual(list,['/foo','/']);
- },
- "path matching": function(list) {
- list.forEach(function(e) {
- assert.ok(tough.pathMatch('/foo',e));
- });
- },
- },
- "double case": {
- topic: tough.permutePath.bind(null,'/foo/bar'),
- "four things": function(list) {
- assert.deepEqual(list,['/foo/bar','/foo','/']);
- },
- "path matching": function(list) {
- list.forEach(function(e) {
- assert.ok(tough.pathMatch('/foo/bar',e));
- });
- },
- },
- "trailing slash": {
- topic: tough.permutePath.bind(null,'/foo/bar/'),
- "three things": function(list) {
- assert.deepEqual(list,['/foo/bar','/foo','/']);
- },
- "path matching": function(list) {
- list.forEach(function(e) {
- assert.ok(tough.pathMatch('/foo/bar/',e));
- });
- },
- },
- }
-})
-.addBatch({
- "Issue 1": {
- topic: function() {
- var cj = new CookieJar();
- cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) {
- this.callback(err,{cj:cj, cookie:cookie});
- }.bind(this));
- },
- "stored a cookie": function(t) {
- assert.ok(t.cookie);
- },
- "cookie's path was modified to remove unnecessary slash": function(t) {
- assert.equal(t.cookie.path, '/some/path');
- },
- "getting it back": {
- topic: function(t) {
- t.cj.getCookies('http://domain/some/path/file', function(err,cookies) {
- this.callback(err, {cj:t.cj, cookies:cookies||[]});
- }.bind(this));
- },
- "got one cookie": function(t) {
- assert.lengthOf(t.cookies, 1);
- },
- "it's the right one": function(t) {
- var c = t.cookies[0];
- assert.equal(c.key, 'hello');
- assert.equal(c.value, 'world');
- },
- }
- }
-})
-.addBatch({
- "expiry option": {
- topic: function() {
- var cb = this.callback;
- var cj = new CookieJar();
- cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) {
-
- cb(err, {cj:cj, cookie:cookie});
- });
- },
- "set the cookie": function(t) {
- assert.ok(t.cookie, "didn't set?!");
- assert.equal(t.cookie.key, 'near');
- },
- "then, retrieving": {
- topic: function(t) {
- var cb = this.callback;
- setTimeout(function() {
- t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) {
- t.cookies = cookies;
- cb(err,t);
- });
- },2000);
- },
- "got the cookie": function(t) {
- assert.lengthOf(t.cookies, 1);
- assert.equal(t.cookies[0].key, 'near');
- },
- }
- }
-})
-.addBatch({
- "trailing semi-colon set into cj": {
- topic: function () {
- var cb = this.callback;
- var cj = new CookieJar();
- var ex = 'http://www.example.com';
- var tasks = [];
- tasks.push(function(next) {
- cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next);
- });
- tasks.push(function(next) {
- cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next);
- });
- async.parallel(tasks, function (err, cookies) {
- cb(null, {
- cj: cj,
- cookies: cookies
- });
- });
- },
- "check number of cookies": function (t) {
- assert.lengthOf(t.cookies, 2, "didn't set");
- },
- "check *broken_path* was set properly": function (t) {
- assert.equal(t.cookies[0].key, "broken_path");
- assert.equal(t.cookies[0].value, "testme");
- assert.equal(t.cookies[0].path, "/");
- },
- "check *b* was set properly": function (t) {
- assert.equal(t.cookies[1].key, "b");
- assert.equal(t.cookies[1].value, "2");
- assert.equal(t.cookies[1].path, "/");
- },
- "retrieve the cookie": {
- topic: function (t) {
- var cb = this.callback;
- t.cj.getCookies('http://www.example.com', {}, function (err, cookies) {
- t.cookies = cookies;
- cb(err, t);
- });
- },
- "get the cookie": function(t) {
- assert.lengthOf(t.cookies, 2);
- assert.equal(t.cookies[0].key, 'broken_path');
- assert.equal(t.cookies[0].value, 'testme');
- assert.equal(t.cookies[1].key, "b");
- assert.equal(t.cookies[1].value, "2");
- assert.equal(t.cookies[1].path, "/");
- },
- },
- }
-})
-.addBatch({
- "Constructor":{
- topic: function () {
- return new Cookie({
- key: 'test',
- value: 'b',
- maxAge: 60
- });
- },
- 'check for key property': function (c) {
- assert.ok(c);
- assert.equal(c.key, 'test');
- },
- 'check for value property': function (c) {
- assert.equal(c.value, 'b');
- },
- 'check for maxAge': function (c) {
- assert.equal(c.maxAge, 60);
- },
- 'check for default values for unspecified properties': function (c) {
- assert.equal(c.expires, "Infinity");
- assert.equal(c.secure, false);
- assert.equal(c.httpOnly, false);
- }
- }
-})
-.addBatch({
- "allPaths option": {
- topic: function() {
- var cj = new CookieJar();
- var tasks = [];
- tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {}));
- tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {}));
- tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {}));
- tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {}));
- tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {}));
- tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {}));
- var cb = this.callback;
- async.parallel(tasks, function(err,results) {
- cb(err, {cj:cj, cookies: results});
- });
- },
- "all set": function(t) {
- assert.equal(t.cookies.length, 6);
- assert.ok(t.cookies.every(function(c) { return !!c }));
- },
- "getting without allPaths": {
- topic: function(t) {
- var cb = this.callback;
- var cj = t.cj;
- cj.getCookies('http://www.example.com/', {}, function(err,cookies) {
- cb(err, {cj:cj, cookies:cookies});
- });
- },
- "found just two cookies": function(t) {
- assert.equal(t.cookies.length, 2);
- },
- "all are path=/": function(t) {
- assert.ok(t.cookies.every(function(c) { return c.path === '/' }));
- },
- "no 'other' cookies": function(t) {
- assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
- },
- },
- "getting without allPaths for /foo": {
- topic: function(t) {
- var cb = this.callback;
- var cj = t.cj;
- cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) {
- cb(err, {cj:cj, cookies:cookies});
- });
- },
- "found four cookies": function(t) {
- assert.equal(t.cookies.length, 4);
- },
- "no 'other' cookies": function(t) {
- assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
- },
- },
- "getting with allPaths:true": {
- topic: function(t) {
- var cb = this.callback;
- var cj = t.cj;
- cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) {
- cb(err, {cj:cj, cookies:cookies});
- });
- },
- "found four cookies": function(t) {
- assert.equal(t.cookies.length, 4);
- },
- "no 'other' cookies": function(t) {
- assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) }));
- },
- },
- }
-})
-.addBatch({
- "remove cookies": {
- topic: function() {
- var jar = new CookieJar();
- var cookie = Cookie.parse("a=b; Domain=example.com; Path=/");
- var cookie2 = Cookie.parse("a=b; Domain=foo.com; Path=/");
- var cookie3 = Cookie.parse("foo=bar; Domain=foo.com; Path=/");
- jar.setCookie(cookie, 'http://example.com/index.html', function(){});
- jar.setCookie(cookie2, 'http://foo.com/index.html', function(){});
- jar.setCookie(cookie3, 'http://foo.com/index.html', function(){});
- return jar;
- },
- "all from matching domain": function(jar){
- jar.store.removeCookies('example.com',null, function(err) {
- assert(err == null);
-
- jar.store.findCookies('example.com', null, function(err, cookies){
- assert(err == null);
- assert(cookies != null);
- assert(cookies.length === 0, 'cookie was not removed');
- });
-
- jar.store.findCookies('foo.com', null, function(err, cookies){
- assert(err == null);
- assert(cookies != null);
- assert(cookies.length === 2, 'cookies should not have been removed');
- });
- });
- },
- "from cookie store matching domain and key": function(jar){
- jar.store.removeCookie('foo.com', '/', 'foo', function(err) {
- assert(err == null);
-
- jar.store.findCookies('foo.com', null, function(err, cookies){
- assert(err == null);
- assert(cookies != null);
- assert(cookies.length === 1, 'cookie was not removed correctly');
- assert(cookies[0].key === 'a', 'wrong cookie was removed');
- });
- });
- }
- }
-})
-.addBatch({
- "Synchronous CookieJar": {
- "setCookieSync": {
- topic: function() {
- var jar = new CookieJar();
- var cookie = Cookie.parse("a=b; Domain=example.com; Path=/");
- cookie = jar.setCookieSync(cookie, 'http://example.com/index.html');
- return cookie;
- },
- "returns a copy of the cookie": function(cookie) {
- assert.instanceOf(cookie, Cookie);
- }
- },
-
- "setCookieSync strict parse error": {
- topic: function() {
- var jar = new CookieJar();
- var opts = { strict: true };
- try {
- jar.setCookieSync("farbe=weiß", 'http://example.com/index.html', opts);
- return false;
- } catch (e) {
- return e;
- }
- },
- "throws the error": function(err) {
- assert.instanceOf(err, Error);
- assert.equal(err.message, "Cookie failed to parse");
- }
- },
-
- "getCookiesSync": {
- topic: function() {
- var jar = new CookieJar();
- var url = 'http://example.com/index.html';
- jar.setCookieSync("a=b; Domain=example.com; Path=/", url);
- jar.setCookieSync("c=d; Domain=example.com; Path=/", url);
- return jar.getCookiesSync(url);
- },
- "returns the cookie array": function(err, cookies) {
- assert.ok(!err);
- assert.ok(Array.isArray(cookies));
- assert.lengthOf(cookies, 2);
- cookies.forEach(function(cookie) {
- assert.instanceOf(cookie, Cookie);
- });
- }
- },
-
- "getCookieStringSync": {
- topic: function() {
- var jar = new CookieJar();
- var url = 'http://example.com/index.html';
- jar.setCookieSync("a=b; Domain=example.com; Path=/", url);
- jar.setCookieSync("c=d; Domain=example.com; Path=/", url);
- return jar.getCookieStringSync(url);
- },
- "returns the cookie header string": function(err, str) {
- assert.ok(!err);
- assert.typeOf(str, 'string');
- }
- },
-
- "getSetCookieStringsSync": {
- topic: function() {
- var jar = new CookieJar();
- var url = 'http://example.com/index.html';
- jar.setCookieSync("a=b; Domain=example.com; Path=/", url);
- jar.setCookieSync("c=d; Domain=example.com; Path=/", url);
- return jar.getSetCookieStringsSync(url);
- },
- "returns the cookie header string": function(err, headers) {
- assert.ok(!err);
- assert.ok(Array.isArray(headers));
- assert.lengthOf(headers, 2);
- headers.forEach(function(header) {
- assert.typeOf(header, 'string');
- });
- }
- },
- }
-})
-.addBatch({
- "Synchronous API on async CookieJar": {
- topic: function() {
- return new tough.Store();
- },
- "setCookieSync": {
- topic: function(store) {
- var jar = new CookieJar(store);
- try {
- jar.setCookieSync("a=b", 'http://example.com/index.html');
- return false;
- } catch(e) {
- return e;
- }
- },
- "fails": function(err) {
- assert.instanceOf(err, Error);
- assert.equal(err.message,
- 'CookieJar store is not synchronous; use async API instead.');
- }
- },
- "getCookiesSync": {
- topic: function(store) {
- var jar = new CookieJar(store);
- try {
- jar.getCookiesSync('http://example.com/index.html');
- return false;
- } catch(e) {
- return e;
- }
- },
- "fails": function(err) {
- assert.instanceOf(err, Error);
- assert.equal(err.message,
- 'CookieJar store is not synchronous; use async API instead.');
- }
- },
- "getCookieStringSync": {
- topic: function(store) {
- var jar = new CookieJar(store);
- try {
- jar.getCookieStringSync('http://example.com/index.html');
- return false;
- } catch(e) {
- return e;
- }
- },
- "fails": function(err) {
- assert.instanceOf(err, Error);
- assert.equal(err.message,
- 'CookieJar store is not synchronous; use async API instead.');
- }
- },
- "getSetCookieStringsSync": {
- topic: function(store) {
- var jar = new CookieJar(store);
- try {
- jar.getSetCookieStringsSync('http://example.com/index.html');
- return false;
- } catch(e) {
- return e;
- }
- },
- "fails": function(err) {
- assert.instanceOf(err, Error);
- assert.equal(err.message,
- 'CookieJar store is not synchronous; use async API instead.');
- }
- },
- }
-})
-.export(module);
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/.jshintrc b/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/.jshintrc
deleted file mode 100644
index 4c1c8d49..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/.jshintrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "node": true,
- "asi": true,
- "laxcomma": true
-}
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/LICENSE
deleted file mode 100644
index a4a9aee0..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/LICENSE
+++ /dev/null
@@ -1,55 +0,0 @@
-Apache License
-
-Version 2.0, January 2004
-
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/README.md
deleted file mode 100644
index bb533d56..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-tunnel-agent
-============
-
-HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/index.js
deleted file mode 100644
index 13c04272..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/index.js
+++ /dev/null
@@ -1,236 +0,0 @@
-'use strict'
-
-var net = require('net')
- , tls = require('tls')
- , http = require('http')
- , https = require('https')
- , events = require('events')
- , assert = require('assert')
- , util = require('util')
- ;
-
-exports.httpOverHttp = httpOverHttp
-exports.httpsOverHttp = httpsOverHttp
-exports.httpOverHttps = httpOverHttps
-exports.httpsOverHttps = httpsOverHttps
-
-
-function httpOverHttp(options) {
- var agent = new TunnelingAgent(options)
- agent.request = http.request
- return agent
-}
-
-function httpsOverHttp(options) {
- var agent = new TunnelingAgent(options)
- agent.request = http.request
- agent.createSocket = createSecureSocket
- return agent
-}
-
-function httpOverHttps(options) {
- var agent = new TunnelingAgent(options)
- agent.request = https.request
- return agent
-}
-
-function httpsOverHttps(options) {
- var agent = new TunnelingAgent(options)
- agent.request = https.request
- agent.createSocket = createSecureSocket
- return agent
-}
-
-
-function TunnelingAgent(options) {
- var self = this
- self.options = options || {}
- self.proxyOptions = self.options.proxy || {}
- self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets
- self.requests = []
- self.sockets = []
-
- self.on('free', function onFree(socket, host, port) {
- for (var i = 0, len = self.requests.length; i < len; ++i) {
- var pending = self.requests[i]
- if (pending.host === host && pending.port === port) {
- // Detect the request to connect same origin server,
- // reuse the connection.
- self.requests.splice(i, 1)
- pending.request.onSocket(socket)
- return
- }
- }
- socket.destroy()
- self.removeSocket(socket)
- })
-}
-util.inherits(TunnelingAgent, events.EventEmitter)
-
-TunnelingAgent.prototype.addRequest = function addRequest(req, options) {
- var self = this
-
- // Legacy API: addRequest(req, host, port, path)
- if (typeof options === 'string') {
- options = {
- host: options,
- port: arguments[2],
- path: arguments[3]
- };
- }
-
- if (self.sockets.length >= this.maxSockets) {
- // We are over limit so we'll add it to the queue.
- self.requests.push({host: host, port: port, request: req})
- return
- }
-
- // If we are under maxSockets create a new one.
- self.createSocket({host: options.host, port: options.port, request: req}, function(socket) {
- socket.on('free', onFree)
- socket.on('close', onCloseOrRemove)
- socket.on('agentRemove', onCloseOrRemove)
- req.onSocket(socket)
-
- function onFree() {
- self.emit('free', socket, options.host, options.port)
- }
-
- function onCloseOrRemove(err) {
- self.removeSocket()
- socket.removeListener('free', onFree)
- socket.removeListener('close', onCloseOrRemove)
- socket.removeListener('agentRemove', onCloseOrRemove)
- }
- })
-}
-
-TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
- var self = this
- var placeholder = {}
- self.sockets.push(placeholder)
-
- var connectOptions = mergeOptions({}, self.proxyOptions,
- { method: 'CONNECT'
- , path: options.host + ':' + options.port
- , agent: false
- }
- )
- if (connectOptions.proxyAuth) {
- connectOptions.headers = connectOptions.headers || {}
- connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
- new Buffer(connectOptions.proxyAuth).toString('base64')
- }
-
- debug('making CONNECT request')
- var connectReq = self.request(connectOptions)
- connectReq.useChunkedEncodingByDefault = false // for v0.6
- connectReq.once('response', onResponse) // for v0.6
- connectReq.once('upgrade', onUpgrade) // for v0.6
- connectReq.once('connect', onConnect) // for v0.7 or later
- connectReq.once('error', onError)
- connectReq.end()
-
- function onResponse(res) {
- // Very hacky. This is necessary to avoid http-parser leaks.
- res.upgrade = true
- }
-
- function onUpgrade(res, socket, head) {
- // Hacky.
- process.nextTick(function() {
- onConnect(res, socket, head)
- })
- }
-
- function onConnect(res, socket, head) {
- connectReq.removeAllListeners()
- socket.removeAllListeners()
-
- if (res.statusCode === 200) {
- assert.equal(head.length, 0)
- debug('tunneling connection has established')
- self.sockets[self.sockets.indexOf(placeholder)] = socket
- cb(socket)
- } else {
- debug('tunneling socket could not be established, statusCode=%d', res.statusCode)
- var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode)
- error.code = 'ECONNRESET'
- options.request.emit('error', error)
- self.removeSocket(placeholder)
- }
- }
-
- function onError(cause) {
- connectReq.removeAllListeners()
-
- debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack)
- var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message)
- error.code = 'ECONNRESET'
- options.request.emit('error', error)
- self.removeSocket(placeholder)
- }
-}
-
-TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
- var pos = this.sockets.indexOf(socket)
- if (pos === -1) return
-
- this.sockets.splice(pos, 1)
-
- var pending = this.requests.shift()
- if (pending) {
- // If we have pending requests and a socket gets closed a new one
- // needs to be created to take over in the pool for the one that closed.
- this.createSocket(pending, function(socket) {
- pending.request.onSocket(socket)
- })
- }
-}
-
-function createSecureSocket(options, cb) {
- var self = this
- TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
- // 0 is dummy port for v0.6
- var secureSocket = tls.connect(0, mergeOptions({}, self.options,
- { servername: options.host
- , socket: socket
- }
- ))
- cb(secureSocket)
- })
-}
-
-
-function mergeOptions(target) {
- for (var i = 1, len = arguments.length; i < len; ++i) {
- var overrides = arguments[i]
- if (typeof overrides === 'object') {
- var keys = Object.keys(overrides)
- for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
- var k = keys[j]
- if (overrides[k] !== undefined) {
- target[k] = overrides[k]
- }
- }
- }
- }
- return target
-}
-
-
-var debug
-if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
- debug = function() {
- var args = Array.prototype.slice.call(arguments)
- if (typeof args[0] === 'string') {
- args[0] = 'TUNNEL: ' + args[0]
- } else {
- args.unshift('TUNNEL:')
- }
- console.error.apply(console, args)
- }
-} else {
- debug = function() {}
-}
-exports.debug = debug // for test
diff --git a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/package.json
deleted file mode 100644
index 881e8b03..00000000
--- a/node_modules/z-schema/node_modules/request/node_modules/tunnel-agent/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com",
- "url": "http://www.futurealoof.com"
- },
- "name": "tunnel-agent",
- "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.",
- "version": "0.4.0",
- "repository": {
- "url": "https://github.com/mikeal/tunnel-agent"
- },
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {},
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/mikeal/tunnel-agent/issues"
- },
- "_id": "tunnel-agent@0.4.0",
- "dist": {
- "shasum": "c5bb9040eb24c1f38682c36be60e7f814c5dcfbc"
- },
- "_from": "tunnel-agent@~0.4.0",
- "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/request/package.json b/node_modules/z-schema/node_modules/request/package.json
deleted file mode 100755
index cfbc0f7b..00000000
--- a/node_modules/z-schema/node_modules/request/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "name": "request",
- "description": "Simplified HTTP request client.",
- "tags": [
- "http",
- "simple",
- "util",
- "utility"
- ],
- "version": "2.36.0",
- "author": {
- "name": "Mikeal Rogers",
- "email": "mikeal.rogers@gmail.com"
- },
- "repository": {
- "type": "git",
- "url": "http://github.com/mikeal/request.git"
- },
- "bugs": {
- "url": "http://github.com/mikeal/request/issues"
- },
- "license": "Apache, Version 2.0",
- "engines": [
- "node >= 0.8.0"
- ],
- "main": "index.js",
- "dependencies": {
- "qs": "~0.6.0",
- "json-stringify-safe": "~5.0.0",
- "mime": "~1.2.9",
- "forever-agent": "~0.5.0",
- "node-uuid": "~1.4.0",
- "tough-cookie": ">=0.12.0",
- "form-data": "~0.1.0",
- "tunnel-agent": "~0.4.0",
- "http-signature": "~0.10.0",
- "oauth-sign": "~0.3.0",
- "hawk": "~1.0.0",
- "aws-sign2": "~0.5.0"
- },
- "optionalDependencies": {
- "tough-cookie": ">=0.12.0",
- "form-data": "~0.1.0",
- "tunnel-agent": "~0.4.0",
- "http-signature": "~0.10.0",
- "oauth-sign": "~0.3.0",
- "hawk": "~1.0.0",
- "aws-sign2": "~0.5.0"
- },
- "scripts": {
- "test": "node tests/run.js"
- },
- "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## UNIX Socket \n\n`request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system. \n\nHTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response.\n\nThus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket`\n\n```javascript\nrequest.get('unix://tmp/unix.socket/httppath')\n```\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload', function optionalCallback (err, httpResponse, body) {\n if (err) {\n return console.error('upload failed:', err);\n }\n console.log('Upload successful! Server responded with:', body);\n})\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')))\nform.append('remote_file', request('http://google.com/doodle.png'))\n\n// Just like always, `r` is a writable stream, and can be used as such (you have until nextTick to pipe it, etc.)\n// Alternatively, you can provide a callback (that's what this example does-- see `optionalCallback` above).\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n// or\nrequest.get('http://some.server.com/').auth(null, null, true, 'bearerToken');\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'bearer': 'bearerToken'\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\nBearer authentication is supported, and is activated when the `bearer` value is available. The value may be either a `String` or a `Function` returning a `String`. Using a function to supply the bearer token is particularly useful if used in conjuction with `defaults` to allow a single function to supply the last known token at the time or sending a request or to compute one on the fly.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri);\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
- "readmeFilename": "README.md",
- "_id": "request@2.36.0",
- "dist": {
- "shasum": "d8f823909f9003da29b4da6a8fb5286e0488f392"
- },
- "_from": "request@>=2.34.0",
- "_resolved": "https://registry.npmjs.org/request/-/request-2.36.0.tgz"
-}
diff --git a/node_modules/z-schema/node_modules/request/request.js b/node_modules/z-schema/node_modules/request/request.js
deleted file mode 100644
index 0110cb2c..00000000
--- a/node_modules/z-schema/node_modules/request/request.js
+++ /dev/null
@@ -1,1362 +0,0 @@
-var optional = require('./lib/optional')
- , http = require('http')
- , https = optional('https')
- , tls = optional('tls')
- , url = require('url')
- , util = require('util')
- , stream = require('stream')
- , qs = require('qs')
- , querystring = require('querystring')
- , crypto = require('crypto')
-
- , oauth = optional('oauth-sign')
- , hawk = optional('hawk')
- , aws = optional('aws-sign2')
- , httpSignature = optional('http-signature')
- , uuid = require('node-uuid')
- , mime = require('mime')
- , tunnel = optional('tunnel-agent')
- , _safeStringify = require('json-stringify-safe')
-
- , ForeverAgent = require('forever-agent')
- , FormData = optional('form-data')
-
- , cookies = require('./lib/cookies')
- , globalCookieJar = cookies.jar()
-
- , copy = require('./lib/copy')
- , debug = require('./lib/debug')
- , getSafe = require('./lib/getSafe')
- , net = require('net')
- ;
-
-function safeStringify (obj) {
- var ret
- try { ret = JSON.stringify(obj) }
- catch (e) { ret = _safeStringify(obj) }
- return ret
-}
-
-var globalPool = {}
-var isUrl = /^https?:|^unix:/
-
-
-// Hacky fix for pre-0.4.4 https
-if (https && !https.Agent) {
- https.Agent = function (options) {
- http.Agent.call(this, options)
- }
- util.inherits(https.Agent, http.Agent)
- https.Agent.prototype._getConnection = function (host, port, cb) {
- var s = tls.connect(port, host, this.options, function () {
- // do other checks here?
- if (cb) cb()
- })
- return s
- }
-}
-
-function isReadStream (rs) {
- return rs.readable && rs.path && rs.mode;
-}
-
-function toBase64 (str) {
- return (new Buffer(str || "", "ascii")).toString("base64")
-}
-
-function md5 (str) {
- return crypto.createHash('md5').update(str).digest('hex')
-}
-
-function Request (options) {
- stream.Stream.call(this)
- this.readable = true
- this.writable = true
-
- if (typeof options === 'string') {
- options = {uri:options}
- }
-
- var reserved = Object.keys(Request.prototype)
- for (var i in options) {
- if (reserved.indexOf(i) === -1) {
- this[i] = options[i]
- } else {
- if (typeof options[i] === 'function') {
- delete options[i]
- }
- }
- }
-
- if (options.method) {
- this.explicitMethod = true
- }
-
- this.canTunnel = options.tunnel !== false && tunnel;
-
- this.init(options)
-}
-util.inherits(Request, stream.Stream)
-Request.prototype.init = function (options) {
- // init() contains all the code to setup the request object.
- // the actual outgoing request is not started until start() is called
- // this function is called from both the constructor and on redirect.
- var self = this
- if (!options) options = {}
-
- if (!self.method) self.method = options.method || 'GET'
- self.localAddress = options.localAddress
-
- debug(options)
- if (!self.pool && self.pool !== false) self.pool = globalPool
- self.dests = self.dests || []
- self.__isRequestRequest = true
-
- // Protect against double callback
- if (!self._callback && self.callback) {
- self._callback = self.callback
- self.callback = function () {
- if (self._callbackCalled) return // Print a warning maybe?
- self._callbackCalled = true
- self._callback.apply(self, arguments)
- }
- self.on('error', self.callback.bind())
- self.on('complete', self.callback.bind(self, null))
- }
-
- if (self.url && !self.uri) {
- // People use this property instead all the time so why not just support it.
- self.uri = self.url
- delete self.url
- }
-
- if (!self.uri) {
- // this will throw if unhandled but is handleable when in a redirect
- return self.emit('error', new Error("options.uri is a required argument"))
- } else {
- if (typeof self.uri == "string") self.uri = url.parse(self.uri)
- }
-
- if (self.strictSSL === false) {
- self.rejectUnauthorized = false
- }
-
- if (self.proxy) {
- if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy)
-
- // do the HTTP CONNECT dance using koichik/node-tunnel
- if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) {
- var tunnelFn = self.proxy.protocol === "http:"
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
-
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: self.proxy.auth
- , headers: { Host: self.uri.hostname + ':' +
- (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }}
- , rejectUnauthorized: self.rejectUnauthorized
- , ca: this.ca }
-
- self.agent = tunnelFn(tunnelOptions)
- self.tunnel = true
- }
- }
-
- if (!self.uri.pathname) {self.uri.pathname = '/'}
-
- if (!self.uri.host && !self.protocol=='unix:') {
- // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar
- // Detect and reject it as soon as possible
- var faultyUri = url.format(self.uri)
- var message = 'Invalid URI "' + faultyUri + '"'
- if (Object.keys(options).length === 0) {
- // No option ? This can be the sign of a redirect
- // As this is a case where the user cannot do anything (they didn't call request directly with this URL)
- // they should be warned that it can be caused by a redirection (can save some hair)
- message += '. This can be caused by a crappy redirection.'
- }
- self.emit('error', new Error(message))
- return // This error was fatal
- }
-
- self._redirectsFollowed = self._redirectsFollowed || 0
- self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10
- self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true
- self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false
- if (self.followRedirect || self.followAllRedirects)
- self.redirects = self.redirects || []
-
- self.headers = self.headers ? copy(self.headers) : {}
-
- self.setHost = false
- if (!self.hasHeader('host')) {
- self.setHeader('host', self.uri.hostname)
- if (self.uri.port) {
- if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') &&
- !(self.uri.port === 443 && self.uri.protocol === 'https:') )
- self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) )
- }
- self.setHost = true
- }
-
- self.jar(self._jar || options.jar)
-
- if (!self.uri.port) {
- if (self.uri.protocol == 'http:') {self.uri.port = 80}
- else if (self.uri.protocol == 'https:') {self.uri.port = 443}
- }
-
- if (self.proxy && !self.tunnel) {
- self.port = self.proxy.port
- self.host = self.proxy.hostname
- } else {
- self.port = self.uri.port
- self.host = self.uri.hostname
- }
-
- self.clientErrorHandler = function (error) {
- if (self._aborted) return
- if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET'
- && self.agent.addRequestNoreuse) {
- self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
- self.start()
- self.req.end()
- return
- }
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
- self.emit('error', error)
- }
-
- self._parserErrorHandler = function (error) {
- if (this.res) {
- if (this.res.request) {
- this.res.request.emit('error', error)
- } else {
- this.res.emit('error', error)
- }
- } else {
- this._httpMessage.emit('error', error)
- }
- }
-
- self._buildRequest = function(){
- var self = this;
-
- if (options.form) {
- self.form(options.form)
- }
-
- if (options.qs) self.qs(options.qs)
-
- if (self.uri.path) {
- self.path = self.uri.path
- } else {
- self.path = self.uri.pathname + (self.uri.search || "")
- }
-
- if (self.path.length === 0) self.path = '/'
-
-
- // Auth must happen last in case signing is dependent on other headers
- if (options.oauth) {
- self.oauth(options.oauth)
- }
-
- if (options.aws) {
- self.aws(options.aws)
- }
-
- if (options.hawk) {
- self.hawk(options.hawk)
- }
-
- if (options.httpSignature) {
- self.httpSignature(options.httpSignature)
- }
-
- if (options.auth) {
- if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username
- if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password
-
- self.auth(
- options.auth.user,
- options.auth.pass,
- options.auth.sendImmediately,
- options.auth.bearer
- )
- }
-
- if (self.uri.auth && !self.hasHeader('authorization')) {
- var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
- self.auth(authPieces[0], authPieces.slice(1).join(':'), true)
- }
- if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) {
- self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':')))
- }
-
-
- if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
-
- if (options.json) {
- self.json(options.json)
- } else if (options.multipart) {
- self.boundary = uuid()
- self.multipart(options.multipart)
- }
-
- if (self.body) {
- var length = 0
- if (!Buffer.isBuffer(self.body)) {
- if (Array.isArray(self.body)) {
- for (var i = 0; i < self.body.length; i++) {
- length += self.body[i].length
- }
- } else {
- self.body = new Buffer(self.body)
- length = self.body.length
- }
- } else {
- length = self.body.length
- }
- if (length) {
- if (!self.hasHeader('content-length')) self.setHeader('content-length', length)
- } else {
- throw new Error('Argument error, options.body.')
- }
- }
-
- var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
- , defaultModules = {'http:':http, 'https:':https, 'unix:':http}
- , httpModules = self.httpModules || {}
- ;
- self.httpModule = httpModules[protocol] || defaultModules[protocol]
-
- if (!self.httpModule) return this.emit('error', new Error("Invalid protocol: " + protocol))
-
- if (options.ca) self.ca = options.ca
-
- if (!self.agent) {
- if (options.agentOptions) self.agentOptions = options.agentOptions
-
- if (options.agentClass) {
- self.agentClass = options.agentClass
- } else if (options.forever) {
- self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
- } else {
- self.agentClass = self.httpModule.Agent
- }
- }
-
- if (self.pool === false) {
- self.agent = false
- } else {
- self.agent = self.agent || self.getAgent()
- if (self.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.maxSockets
- }
- if (self.pool.maxSockets) {
- // Don't use our pooling if node has the refactored client
- self.agent.maxSockets = self.pool.maxSockets
- }
- }
-
- self.on('pipe', function (src) {
- if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.")
- self.src = src
- if (isReadStream(src)) {
- if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path))
- } else {
- if (src.headers) {
- for (var i in src.headers) {
- if (!self.hasHeader(i)) {
- self.setHeader(i, src.headers[i])
- }
- }
- }
- if (self._json && !self.hasHeader('content-type'))
- self.setHeader('content-type', 'application/json')
- if (src.method && !self.explicitMethod) {
- self.method = src.method
- }
- }
-
- // self.on('pipe', function () {
- // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.")
- // })
- })
-
- process.nextTick(function () {
- if (self._aborted) return
-
- if (self._form) {
- self.setHeaders(self._form.getHeaders())
- try {
- var length = self._form.getLengthSync()
- self.setHeader('content-length', length)
- } catch(e){}
- self._form.pipe(self)
- }
- if (self.body) {
- if (Array.isArray(self.body)) {
- self.body.forEach(function (part) {
- self.write(part)
- })
- } else {
- self.write(self.body)
- }
- self.end()
- } else if (self.requestBodyStream) {
- console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
- self.requestBodyStream.pipe(self)
- } else if (!self.src) {
- if (self.method !== 'GET' && typeof self.method !== 'undefined') {
- self.setHeader('content-length', 0)
- }
- self.end()
- }
- self.ntick = true
- })
-
- } // End _buildRequest
-
- self._handleUnixSocketURI = function(self){
- // Parse URI and extract a socket path (tested as a valid socket using net.connect), and a http style path suffix
- // Thus http requests can be made to a socket using the uri unix://tmp/my.socket/urlpath
- // and a request for '/urlpath' will be sent to the unix socket at /tmp/my.socket
-
- self.unixsocket = true;
-
- var full_path = self.uri.href.replace(self.uri.protocol+'/', '');
-
- var lookup = full_path.split('/');
- var error_connecting = true;
-
- var lookup_table = {};
- do { lookup_table[lookup.join('/')]={} } while(lookup.pop())
- for (r in lookup_table){
- try_next(r);
- }
-
- function try_next(table_row){
- var client = net.connect( table_row );
- client.path = table_row
- client.on('error', function(){ lookup_table[this.path].error_connecting=true; this.end(); });
- client.on('connect', function(){ lookup_table[this.path].error_connecting=false; this.end(); });
- table_row.client = client;
- }
-
- wait_for_socket_response();
-
- response_counter = 0;
-
- function wait_for_socket_response(){
- var detach;
- if('undefined' == typeof setImmediate ) detach = process.nextTick
- else detach = setImmediate;
- detach(function(){
- // counter to prevent infinite blocking waiting for an open socket to be found.
- response_counter++;
- var trying = false;
- for (r in lookup_table){
- //console.log(r, lookup_table[r], lookup_table[r].error_connecting)
- if('undefined' == typeof lookup_table[r].error_connecting)
- trying = true;
- }
- if(trying && response_counter<1000)
- wait_for_socket_response()
- else
- set_socket_properties();
- })
- }
-
- function set_socket_properties(){
- var host;
- for (r in lookup_table){
- if(lookup_table[r].error_connecting === false){
- host = r
- }
- }
- if(!host){
- self.emit('error', new Error("Failed to connect to any socket in "+full_path))
- }
- var path = full_path.replace(host, '')
-
- self.socketPath = host
- self.uri.pathname = path
- self.uri.href = path
- self.uri.path = path
- self.host = ''
- self.hostname = ''
- delete self.host
- delete self.hostname
- self._buildRequest();
- }
- }
-
- // Intercept UNIX protocol requests to change properties to match socket
- if(/^unix:/.test(self.uri.protocol)){
- self._handleUnixSocketURI(self);
- } else {
- self._buildRequest();
- }
-
-}
-
-// Must call this when following a redirect from https to http or vice versa
-// Attempts to keep everything as identical as possible, but update the
-// httpModule, Tunneling agent, and/or Forever Agent in use.
-Request.prototype._updateProtocol = function () {
- var self = this
- var protocol = self.uri.protocol
-
- if (protocol === 'https:') {
- // previously was doing http, now doing https
- // if it's https, then we might need to tunnel now.
- if (self.proxy && self.canTunnel) {
- self.tunnel = true
- var tunnelFn = self.proxy.protocol === 'http:'
- ? tunnel.httpsOverHttp : tunnel.httpsOverHttps
- var tunnelOptions = { proxy: { host: self.proxy.hostname
- , port: +self.proxy.port
- , proxyAuth: self.proxy.auth }
- , rejectUnauthorized: self.rejectUnauthorized
- , ca: self.ca }
- self.agent = tunnelFn(tunnelOptions)
- return
- }
-
- self.httpModule = https
- switch (self.agentClass) {
- case ForeverAgent:
- self.agentClass = ForeverAgent.SSL
- break
- case http.Agent:
- self.agentClass = https.Agent
- break
- default:
- // nothing we can do. Just hope for the best.
- return
- }
-
- // if there's an agent, we need to get a new one.
- if (self.agent) self.agent = self.getAgent()
-
- } else {
- // previously was doing https, now doing http
- // stop any tunneling.
- if (self.tunnel) self.tunnel = false
- self.httpModule = http
- switch (self.agentClass) {
- case ForeverAgent.SSL:
- self.agentClass = ForeverAgent
- break
- case https.Agent:
- self.agentClass = http.Agent
- break
- default:
- // nothing we can do. just hope for the best
- return
- }
-
- // if there's an agent, then get a new one.
- if (self.agent) {
- self.agent = null
- self.agent = self.getAgent()
- }
- }
-}
-
-Request.prototype.getAgent = function () {
- var Agent = this.agentClass
- var options = {}
- if (this.agentOptions) {
- for (var i in this.agentOptions) {
- options[i] = this.agentOptions[i]
- }
- }
- if (this.ca) options.ca = this.ca
- if (this.ciphers) options.ciphers = this.ciphers
- if (this.secureProtocol) options.secureProtocol = this.secureProtocol
- if (this.secureOptions) options.secureOptions = this.secureOptions
- if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized
-
- if (this.cert && this.key) {
- options.key = this.key
- options.cert = this.cert
- }
-
- var poolKey = ''
-
- // different types of agents are in different pools
- if (Agent !== this.httpModule.Agent) {
- poolKey += Agent.name
- }
-
- if (!this.httpModule.globalAgent) {
- // node 0.4.x
- options.host = this.host
- options.port = this.port
- if (poolKey) poolKey += ':'
- poolKey += this.host + ':' + this.port
- }
-
- // ca option is only relevant if proxy or destination are https
- var proxy = this.proxy
- if (typeof proxy === 'string') proxy = url.parse(proxy)
- var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
- if (isHttps) {
- if (options.ca) {
- if (poolKey) poolKey += ':'
- poolKey += options.ca
- }
-
- if (typeof options.rejectUnauthorized !== 'undefined') {
- if (poolKey) poolKey += ':'
- poolKey += options.rejectUnauthorized
- }
-
- if (options.cert)
- poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
-
- if (options.ciphers) {
- if (poolKey) poolKey += ':'
- poolKey += options.ciphers
- }
-
- if (options.secureProtocol) {
- if (poolKey) poolKey += ':'
- poolKey += options.secureProtocol
- }
- }
-
- if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) {
- // not doing anything special. Use the globalAgent
- return this.httpModule.globalAgent
- }
-
- // we're using a stored agent. Make sure it's protocol-specific
- poolKey = this.uri.protocol + poolKey
-
- // already generated an agent for this setting
- if (this.pool[poolKey]) return this.pool[poolKey]
-
- return this.pool[poolKey] = new Agent(options)
-}
-
-Request.prototype.start = function () {
- // start() is called once we are ready to send the outgoing HTTP request.
- // this is usually called on the first write(), end() or on nextTick()
- var self = this
-
- if (self._aborted) return
-
- self._started = true
- self.method = self.method || 'GET'
- self.href = self.uri.href
-
- if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) {
- self.setHeader('content-length', self.src.stat.size)
- }
- if (self._aws) {
- self.aws(self._aws, true)
- }
-
- // We have a method named auth, which is completely different from the http.request
- // auth option. If we don't remove it, we're gonna have a bad time.
- var reqOptions = copy(self)
- delete reqOptions.auth
-
- debug('make request', self.uri.href)
- self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self))
-
- if (self.timeout && !self.timeoutTimer) {
- self.timeoutTimer = setTimeout(function () {
- self.req.abort()
- var e = new Error("ETIMEDOUT")
- e.code = "ETIMEDOUT"
- self.emit("error", e)
- }, self.timeout)
-
- // Set additional timeout on socket - in case if remote
- // server freeze after sending headers
- if (self.req.setTimeout) { // only works on node 0.6+
- self.req.setTimeout(self.timeout, function () {
- if (self.req) {
- self.req.abort()
- var e = new Error("ESOCKETTIMEDOUT")
- e.code = "ESOCKETTIMEDOUT"
- self.emit("error", e)
- }
- })
- }
- }
-
- self.req.on('error', self.clientErrorHandler)
- self.req.on('drain', function() {
- self.emit('drain')
- })
- self.on('end', function() {
- if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler)
- })
- self.emit('request', self.req)
-}
-Request.prototype.onResponse = function (response) {
- var self = this
- debug('onResponse', self.uri.href, response.statusCode, response.headers)
- response.on('end', function() {
- debug('response end', self.uri.href, response.statusCode, response.headers)
- });
-
- if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) {
- response.connection.once('error', self._parserErrorHandler)
- }
- if (self._aborted) {
- debug('aborted', self.uri.href)
- response.resume()
- return
- }
- if (self._paused) response.pause()
- else response.resume()
-
- self.response = response
- response.request = self
- response.toJSON = toJSON
-
- // XXX This is different on 0.10, because SSL is strict by default
- if (self.httpModule === https &&
- self.strictSSL &&
- !response.client.authorized) {
- debug('strict ssl error', self.uri.href)
- var sslErr = response.client.authorizationError
- self.emit('error', new Error('SSL Error: '+ sslErr))
- return
- }
-
- if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')]
- if (self.timeout && self.timeoutTimer) {
- clearTimeout(self.timeoutTimer)
- self.timeoutTimer = null
- }
-
- var targetCookieJar = (self._jar && self._jar.setCookie)?self._jar:globalCookieJar;
- var addCookie = function (cookie) {
- //set the cookie if it's domain in the href's domain.
- try {
- targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true});
- } catch (e) {
- self.emit('error', e);
- }
- }
-
- if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) {
- var headerName = hasHeader('set-cookie', response.headers)
- if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie)
- else addCookie(response.headers[headerName])
- }
-
- var redirectTo = null
- if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) {
- var location = response.headers[hasHeader('location', response.headers)]
- debug('redirect', location)
-
- if (self.followAllRedirects) {
- redirectTo = location
- } else if (self.followRedirect) {
- switch (self.method) {
- case 'PATCH':
- case 'PUT':
- case 'POST':
- case 'DELETE':
- // Do not follow redirects
- break
- default:
- redirectTo = location
- break
- }
- }
- } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) {
- var authHeader = response.headers[hasHeader('www-authenticate', response.headers)]
- var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
- debug('reauth', authVerb)
-
- switch (authVerb) {
- case 'basic':
- self.auth(self._user, self._pass, true)
- redirectTo = self.uri
- break
-
- case 'bearer':
- self.auth(null, null, true, self._bearer)
- redirectTo = self.uri
- break
-
- case 'digest':
- // TODO: More complete implementation of RFC 2617.
- // - check challenge.algorithm
- // - support algorithm="MD5-sess"
- // - handle challenge.domain
- // - support qop="auth-int" only
- // - handle Authentication-Info (not necessarily?)
- // - check challenge.stale (not necessarily?)
- // - increase nc (not necessarily?)
- // For reference:
- // http://tools.ietf.org/html/rfc2617#section-3
- // https://github.com/bagder/curl/blob/master/lib/http_digest.c
-
- var challenge = {}
- var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
- for (;;) {
- var match = re.exec(authHeader)
- if (!match) break
- challenge[match[1]] = match[2] || match[3];
- }
-
- var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
- var ha2 = md5(self.method + ':' + self.uri.path)
- var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
- var nc = qop && '00000001'
- var cnonce = qop && uuid().replace(/-/g, '')
- var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
- var authValues = {
- username: self._user,
- realm: challenge.realm,
- nonce: challenge.nonce,
- uri: self.uri.path,
- qop: qop,
- response: digestResponse,
- nc: nc,
- cnonce: cnonce,
- algorithm: challenge.algorithm,
- opaque: challenge.opaque
- }
-
- authHeader = []
- for (var k in authValues) {
- if (!authValues[k]) {
- //ignore
- } else if (k === 'qop' || k === 'nc' || k === 'algorithm') {
- authHeader.push(k + '=' + authValues[k])
- } else {
- authHeader.push(k + '="' + authValues[k] + '"')
- }
- }
- authHeader = 'Digest ' + authHeader.join(', ')
- self.setHeader('authorization', authHeader)
- self._sentAuth = true
-
- redirectTo = self.uri
- break
- }
- }
-
- if (redirectTo) {
- debug('redirect to', redirectTo)
-
- // ignore any potential response body. it cannot possibly be useful
- // to us at this point.
- if (self._paused) response.resume()
-
- if (self._redirectsFollowed >= self.maxRedirects) {
- self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
- return
- }
- self._redirectsFollowed += 1
-
- if (!isUrl.test(redirectTo)) {
- redirectTo = url.resolve(self.uri.href, redirectTo)
- }
-
- var uriPrev = self.uri
- self.uri = url.parse(redirectTo)
-
- // handle the case where we change protocol from https to http or vice versa
- if (self.uri.protocol !== uriPrev.protocol) {
- self._updateProtocol()
- }
-
- self.redirects.push(
- { statusCode : response.statusCode
- , redirectUri: redirectTo
- }
- )
- if (self.followAllRedirects && response.statusCode != 401 && response.statusCode != 307) self.method = 'GET'
- // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215
- delete self.src
- delete self.req
- delete self.agent
- delete self._started
- if (response.statusCode != 401 && response.statusCode != 307) {
- // Remove parameters from the previous response, unless this is the second request
- // for a server that requires digest authentication.
- delete self.body
- delete self._form
- if (self.headers) {
- if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')]
- if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')]
- if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')]
- }
- }
-
- self.emit('redirect');
-
- self.init()
- return // Ignore the rest of the response
- } else {
- self._redirectsFollowed = self._redirectsFollowed || 0
- // Be a good stream and emit end when the response is finished.
- // Hack to emit end on close because of a core bug that never fires end
- response.on('close', function () {
- if (!self._ended) self.response.emit('end')
- })
-
- if (self.encoding) {
- if (self.dests.length !== 0) {
- console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.")
- } else {
- response.setEncoding(self.encoding)
- }
- }
-
- self.emit('response', response)
-
- self.dests.forEach(function (dest) {
- self.pipeDest(dest)
- })
-
- response.on("data", function (chunk) {
- self._destdata = true
- self.emit("data", chunk)
- })
- response.on("end", function (chunk) {
- self._ended = true
- self.emit("end", chunk)
- })
- response.on("close", function () {self.emit("close")})
-
- if (self.callback) {
- var buffer = []
- var bodyLen = 0
- self.on("data", function (chunk) {
- buffer.push(chunk)
- bodyLen += chunk.length
- })
- self.on("end", function () {
- debug('end event', self.uri.href)
- if (self._aborted) {
- debug('aborted', self.uri.href)
- return
- }
-
- if (buffer.length && Buffer.isBuffer(buffer[0])) {
- debug('has body', self.uri.href, bodyLen)
- var body = new Buffer(bodyLen)
- var i = 0
- buffer.forEach(function (chunk) {
- chunk.copy(body, i, 0, chunk.length)
- i += chunk.length
- })
- if (self.encoding === null) {
- response.body = body
- } else {
- response.body = body.toString(self.encoding)
- }
- } else if (buffer.length) {
- // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
- // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
- if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") {
- buffer[0] = buffer[0].substring(1)
- }
- response.body = buffer.join('')
- }
-
- if (self._json) {
- try {
- response.body = JSON.parse(response.body)
- } catch (e) {}
- }
- debug('emitting complete', self.uri.href)
- if(response.body == undefined && !self._json) {
- response.body = "";
- }
- self.emit('complete', response, response.body)
- })
- }
- //if no callback
- else{
- self.on("end", function () {
- if (self._aborted) {
- debug('aborted', self.uri.href)
- return
- }
- self.emit('complete', response);
- });
- }
- }
- debug('finish init function', self.uri.href)
-}
-
-Request.prototype.abort = function () {
- this._aborted = true
-
- if (this.req) {
- this.req.abort()
- }
- else if (this.response) {
- this.response.abort()
- }
-
- this.emit("abort")
-}
-
-Request.prototype.pipeDest = function (dest) {
- var response = this.response
- // Called after the response is received
- if (dest.headers && !dest.headersSent) {
- if (hasHeader('content-type', response.headers)) {
- var ctname = hasHeader('content-type', response.headers)
- if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname])
- else dest.headers[ctname] = response.headers[ctname]
- }
-
- if (hasHeader('content-length', response.headers)) {
- var clname = hasHeader('content-length', response.headers)
- if (dest.setHeader) dest.setHeader(clname, response.headers[clname])
- else dest.headers[clname] = response.headers[clname]
- }
- }
- if (dest.setHeader && !dest.headersSent) {
- for (var i in response.headers) {
- dest.setHeader(i, response.headers[i])
- }
- dest.statusCode = response.statusCode
- }
- if (this.pipefilter) this.pipefilter(response, dest)
-}
-
-// Composable API
-Request.prototype.setHeader = function (name, value, clobber) {
- if (clobber === undefined) clobber = true
- if (clobber || !this.hasHeader(name)) this.headers[name] = value
- else this.headers[this.hasHeader(name)] += ',' + value
- return this
-}
-Request.prototype.setHeaders = function (headers) {
- for (var i in headers) {this.setHeader(i, headers[i])}
- return this
-}
-Request.prototype.hasHeader = function (header, headers) {
- var headers = Object.keys(headers || this.headers)
- , lheaders = headers.map(function (h) {return h.toLowerCase()})
- ;
- header = header.toLowerCase()
- for (var i=0;i=1.2.0",
- "request": ">=2.34.0"
- },
- "devDependencies": {
- "grunt": "latest",
- "grunt-contrib-uglify": "latest",
- "grunt-contrib-jshint": "latest",
- "grunt-simple-mocha": "latest",
- "chai": "latest",
- "mocha": "latest",
- "uglify-js": "latest"
- },
- "bugs": {
- "url": "https://github.com/zaggino/z-schema/issues",
- "email": "zaggino@gmail.com"
- },
- "scripts": {
- "prepublish": "grunt",
- "test": "grunt test"
- },
- "readme": "# z-schema validator\n\n[![NPM version](https://badge.fury.io/js/z-schema.png)](http://badge.fury.io/js/z-schema)\n[![Dependency Status](https://david-dm.org/zaggino/z-schema.png?theme=shields.io)](https://david-dm.org/zaggino/z-schema)\n\nJSON Schema validator for Node.js (draft4 version)\n\nCoded according to:\n\n[json-schema documentation](http://json-schema.org/documentation.html),\n[json-schema-core](http://json-schema.org/latest/json-schema-core.html),\n[json-schema-validation](http://json-schema.org/latest/json-schema-validation.html),\n[json-schema-hypermedia](http://json-schema.org/latest/json-schema-hypermedia.html)\n\nPassing all tests here (even optional, except zeroTerminatedFloats and some URI tests, see more info in [#18](https://github.com/zaggino/z-schema/issues/18)):\n\n[json-schema/JSON-Schema-Test-Suite](https://github.com/json-schema/JSON-Schema-Test-Suite)\n\nWill try to maintain this as much as possible, all bug reports welcome.\n\n### Grunt automatization\n\nIf you need to automatize validation of your schemas, there's a Grunt plugin [grunt-z-schema](https://github.com/petrbela/grunt-z-schema) by [Petr Bela](https://github.com/petrbela)\n\n### How does it compare to others?\n\n[rawgithub.com/zaggino/z-schema/master/benchmark/results.html](https://rawgithub.com/zaggino/z-schema/master/benchmark/results.html)\n\n## Basic Usage\n\n```javascript\nvar ZSchema = require(\"z-schema\");\n```\n\n```javascript\nZSchema.validate(json, schema)\n .then(function(report){\n // successful validation\n // there might be warnings: console.log(report.warnings)\n })\n .catch(function(err){\n console.error(err.errors)\n })\n```\n\nThere is also support for _sync_ mode like this:\n```javascript\nvar validator = new ZSchema({ sync: true });\nvar valid = validator.validate(json, schema);\nif (!valid) {\n var error = validator.getLastError();\n}\n```\n\nUsing traditional callback:\n```javascript\nZSchema.validate(json, schema, function(err, report){\n if(err){\n console.error(err.errors);\n return;\n }\n // successful validation\n // there might be warnings: console.log(report.warnings)\n})\n```\n\nIf you need just to validate your schema, you can do it like this:\n\n```javascript\nvar validator = new ZSchema();\nvalidator.validateSchema(schema)\n .then(function(report){\n })\n .catch(function(err){\n })\n```\n\nOr with Node.js style callback:\n\n```javascript\nvar validator = new ZSchema();\nvalidator.validateSchema(schema, function (err, report) {\n if (err) ...\n});\n```\n\n## Remote references in schemas\n\nYour schemas can include remote references that should be real URIs ([more on that here](http://json-schema.org/latest/json-schema-core.html#anchor22))\nso validator can make a request and download the schema needed. Validator automatically\ncaches these remote requests so they are not repeated with every validation.\n\nIn case you don't have a real server or you'd like to load files from different location,\nyou can preload remote locations into the validator like this:\n\n```javascript\nvar fileContent = fs.readFileSync(__dirname + '/../json_schema_test_suite/remotes/integer.json', 'utf8');\nZSchema.setRemoteReference('http://localhost:1234/integer.json', fileContent);\n```\n\n```http://localhost:1234/integer.json``` doesn't have to be online now, all schemas\nreferencing it will validate against ```string``` that was passed to the function.\n\n## Advanced Usage\n\nYou can pre-compile schemas (for example on your server startup) so your application is not\nbothered by schema compilation and validation when validating ingoing / outgoing objects.\n\nPromises:\n\n```javascript\nvar validator = new ZSchema();\nvalidator.compileSchema(schema)\n .then(function(compiledSchema){\n })\n```\n\nOr callback:\n\n```javascript\nvar validator = new ZSchema();\nvalidator.compileSchema(schema, function (err, compiledSchema) {\n assert.isUndefined(err);\n ...\n});\n```\n\nThen you can re-use compiled schemas easily just the same way as non-compiled.\n\n```javascript\nvar validator = new ZSchema();\nvalidator.validate(json, compiledSchema)\n .then(function(report){\n // ...\n })\n .catch(function(err){\n console.error(err.errors)\n })\n```\n\n## Custom format validators\n\nYou can add validation for your own custom string formats like this:\n(these are added to all validator instances, because it would never make sense to have multiple\nfunctions to validate format with the same name)\n\n```javascript\nvar validator = new ZSchema();\n\nZSchema.registerFormat('xstring', function (str) {\n return str === 'xxx'; // return true/false as a result of validation\n});\n\nvalidator.validate('xxx', {\n 'type': 'string',\n 'format': 'xstring'\n})\n.then(function(){})\n.catch(function(err){})\n```\n\nCustom validators can also be async:\n\nUsing promises:\n\n```javascript\nZSchema.registerFormat('xstring', function (str) {\n return Q.delay(1000).thenResolve(return str === 'xxx'); // return a promise for validation result\n});\n```\n\nUsing classic callback:\n\n```javascript\nZSchema.registerFormat('xstring', function (str, callback) {\n setTimeout(function(){\n callback(null, str === 'xxx');\n // or return custom error: callback(new Error('Bad, bad value!'))\n }, 2000)\n});\n```\n\nAny exception thrown (or returned via classic callback) in custom validation function is written into validation error:\n```javascript\nZSchema.registerFormat('xstring', function (str) {\n throw new Error('Bad, bad value!');\n});\n```\nAnd then expect errors to contain something like this:\n\n```\n[{ code: 'FORMAT',\n message: 'xstring format validation failed: Error: Bad, bad value!',\n path: '#/test',\n params: { format: 'xstring', error: [Error: Bad, bad value!] } } ]\n```\n\n\n## Strict validation\n\nWhen creating new instance of validator, you can specify some options that will alter the validator behaviour like this:\n\n```javascript\nvar validator = new ZSchema({\n option: true\n});\n```\n\n* noExtraKeywords: ```true/false```\n\nwhen true, do not allow unknown keywords in schema\n\n* noZeroLengthStrings: ```true/false```\n\nwhen true, always adds minLength: 1 to schemas where type is string\n\n* noTypeless: ```true/false```\n\nwhen true, every schema must specify a type\n\n* forceAdditional: ```true/false```\n\nwhen true, forces not to leave out some keys on schemas (additionalProperties, additionalItems)\n\n* forceProperties: ```true/false```\n\nwhen true, forces not to leave out properties or patternProperties on type-object schemas\n\n* forceItems: ```true/false```\n\nwhen true, forces not to leave out items on array-type schemas\n\n* forceMaxLength: ```true/false```\n\nwhen true, forces not to leave out maxLength on string-type schemas, when format or enum is not specified\n\n__Alternatively__, you can turn on all of the above options with:\n\n```javascript\nvar validator = new ZSchema({\n strict: true\n});\n```\n\n## More options\n\n* noSchemaCache: ```true/false```\n\nwhen true, disables caching of compiled schemas - cache is used to resolve references to other schemas by their ID\n\n* strictUris: ```true/false```\n\nwhen true, uri's need to be in full rfc3986 format, by default checks for uri-fragment, more info in [#18](https://github.com/zaggino/z-schema/issues/18)\n\n# Pull requests\n\nAvoid JSHint errors - settings for the JSHint are specified in ```.jshintrc```.\nYou can check for errors using ```grunt``` command which runs both jshint and mocha tests.\nPlease check for errors before opening any pull requests.\n\n# Credits\n\n* Written by Martin Zagora, \n* Thanks to Oleksiy Krivoshey, for refactoring and new API (version 2.x) and bugfixing\n",
- "readmeFilename": "README.md",
- "_id": "z-schema@2.4.8",
- "dist": {
- "shasum": "974d5d8641945b8de4b143fad056e7be1fda2517"
- },
- "_from": "z-schema@",
- "_resolved": "https://registry.npmjs.org/z-schema/-/z-schema-2.4.8.tgz"
-}
diff --git a/node_modules/z-schema/src/ZSchema.js b/node_modules/z-schema/src/ZSchema.js
deleted file mode 100644
index ab40be85..00000000
--- a/node_modules/z-schema/src/ZSchema.js
+++ /dev/null
@@ -1,2191 +0,0 @@
-/*
- * Copyright (c) 2013, Martin Zagora
- * Copyright (c) 2013, Oleksiy Krivoshey
- *
- * 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.
- *
- * @license http://opensource.org/licenses/MIT
- */
-
-/*jslint node:true, nomen:true, plusplus:true, regexp:true, vars:true*/
-/*jshint -W044*/
-/*global ZSchema*/
-
-(function () {
- 'use strict';
-
- var Promise = require('bluebird');
- var request = require('request');
-
- // z-schema used Q before bluebird, so alias is here to preserve compatibility
- Promise.prototype.fail = Promise.prototype.catch;
-
- /***** ValidationError class *****/
-
- var ValidationError = function (code, message, params, path) {
- this.code = code;
- this.message = message;
- this.path = path || '';
- this.params = params || {};
- };
-
- ValidationError.prototype = new Error();
-
- ValidationError.messages = {
- 'INVALID_TYPE': 'invalid type: {type} (expected {expected})',
- 'ENUM_MISMATCH': 'No enum match for: {value}',
- 'ANY_OF_MISSING': 'Data does not match any schemas from "anyOf"',
- 'ONE_OF_MISSING': 'Data does not match any schemas from "oneOf"',
- 'ONE_OF_MULTIPLE': 'Data is valid against more than one schema from "oneOf"',
- 'NOT_PASSED': 'Data matches schema from "not"',
- 'UNRESOLVABLE_REFERENCE': 'Reference could not be resolved: {ref}',
- // Numeric errors
- 'MULTIPLE_OF': 'Value {value} is not a multiple of {multipleOf}',
- 'MINIMUM': 'Value {value} is less than minimum {minimum}',
- 'MINIMUM_EXCLUSIVE': 'Value {value} is equal or less than exclusive minimum {minimum}',
- 'MAXIMUM': 'Value {value} is greater than maximum {maximum}',
- 'MAXIMUM_EXCLUSIVE': 'Value {value} is equal or greater than exclusive maximum {maximum}',
- // String errors
- 'MIN_LENGTH': 'String is too short ({length} chars), minimum {minimum}',
- 'MAX_LENGTH': 'String is too long ({length} chars), maximum {maximum}',
- 'PATTERN': 'String does not match pattern: {pattern}',
- // Object errors
- 'OBJECT_PROPERTIES_MINIMUM': 'Too few properties defined ({count}), minimum {minimum}',
- 'OBJECT_PROPERTIES_MAXIMUM': 'Too many properties defined ({count}), maximum {maximum}',
- 'OBJECT_REQUIRED': 'Missing required property: {property}',
- 'OBJECT_ADDITIONAL_PROPERTIES': 'Additional properties not allowed',
- 'OBJECT_DEPENDENCY_KEY': 'Dependency failed - key must exist: {missing} (due to key: {key})',
- // Array errors
- 'ARRAY_LENGTH_SHORT': 'Array is too short ({length}), minimum {minimum}',
- 'ARRAY_LENGTH_LONG': 'Array is too long ({length}), maximum {maximum}',
- 'ARRAY_UNIQUE': 'Array items are not unique (indices {index1} and {index2})',
- 'ARRAY_ADDITIONAL_ITEMS': 'Additional items not allowed',
- // Format errors
- 'FORMAT': '{format} format validation failed: {error}',
- // Schema validation errors
- 'KEYWORD_TYPE_EXPECTED': 'Keyword "{keyword}" is expected to be of type "{type}"',
- 'KEYWORD_UNDEFINED_STRICT': 'Keyword "{keyword}" must be defined in strict mode',
- 'KEYWORD_UNEXPECTED': 'Keyword "{keyword}" is not expected to appear in the schema',
- 'KEYWORD_MUST_BE': 'Keyword "{keyword}" must be {expression}',
- 'KEYWORD_DEPENDENCY': 'Keyword "{keyword1}" requires keyword "{keyword2}"',
- 'KEYWORD_PATTERN': 'Keyword "{keyword}" is not a valid RegExp pattern ({pattern})',
- 'KEYWORD_VALUE_TYPE': 'Each element of keyword "{keyword}" array must be a "{type}"',
- 'UNKNOWN_FORMAT': 'There is no validation function for format "{format}"',
- // Remote errors
- 'SCHEMA_NOT_REACHABLE': 'Validator was not able to read schema located at {uri}',
- 'SCHEMA_TYPE_EXPECTED': 'Schema is expected to be of type "object"'
- };
-
- ValidationError.prototype.addSubError = function (err) {
- if (!this.subErrors) { this.subErrors = []; }
- this.subErrors.push(err);
- };
-
- ValidationError.createError = function (code, params, path) {
- var msg = ValidationError.messages[code];
- params = params || {};
-
- if (typeof msg !== 'string') {
- throw new Error('Unknown error code: ' + code);
- }
-
- msg = msg.replace(/\{([^{}]*)\}/g, function (whole, varName) {
- var subValue = params[varName];
- if (typeof subValue === 'string' || typeof subValue === 'number') {
- return subValue;
- }
- if (subValue && typeof subValue.toString === 'function') {
- return subValue.toString();
- }
- return whole;
- });
-
- return new ValidationError(code, msg, params, path);
- };
-
- /***** Utility methods *****/
-
- var Utils = {
- isBoolean: function (what) {
- return typeof what === 'boolean';
- },
- isString: function (what) {
- return typeof what === 'string';
- },
- isInteger: function (what) {
- return this.isNumber(what) && what % 1 === 0;
- },
- isNumber: function (what) {
- return typeof what === 'number' && Number.isFinite(what);
- },
- isArray: function (what) {
- return Array.isArray(what);
- },
- isObject: function (what) {
- return typeof what === 'object' && what === Object(what) && !Array.isArray(what);
- },
- isFunction: function (what) {
- return typeof what === 'function';
- },
- whatIs: function (what) {
- if (what === undefined) {
- return 'undefined';
- } else if (what === null) {
- return 'null';
- } else if (this.isBoolean(what)) {
- return 'boolean';
- } else if (this.isString(what)) {
- return 'string';
- } else if (this.isArray(what)) {
- return 'array';
- } else if (this.isInteger(what)) {
- return 'integer';
- } else if (this.isNumber(what)) {
- return 'number';
- } else if (this.isObject(what)) {
- return 'object';
- } else if (this.isFunction(what)) {
- return 'function';
- } else if (Number.isNaN(what)) {
- return 'not-a-number';
- } else {
- throw new Error('Utils.whatIs does not know what this is: ' + what);
- }
- },
- isUniqueArray: function (arr, match) {
- match = match || {};
- var i, j, l = arr.length;
- for (i = 0; i < l; i++) {
- for (j = i + 1; j < l; j++) {
- if (this.areEqual(arr[i], arr[j])) {
- match.index1 = i;
- match.index2 = j;
- return false;
- }
- }
- }
- return true;
- },
- isAbsoluteUri: function (str) {
- return Utils.getRegExp('^https?\:\/\/').test(str);
- },
- forEach: function (obj, callback, context) {
- if (Array.isArray(obj)) {
- return obj.forEach(callback, context);
- } else if (Utils.isObject(obj)) {
- var key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- callback.call(context, obj[key], key);
- }
- }
- }
- },
- map: function (obj, callback, thisArg) {
- var index = -1,
- result = [];
-
- Utils.forEach(obj, function (val, key) {
- result[++index] = callback.call(thisArg, val, key);
- });
-
- return result;
- },
- defaults: function (main, def) {
- Utils.forEach(def, function (val, key) {
- if (main[key] === undefined) {
- main[key] = val;
- }
- });
- return main;
- },
- uniq: function (arr) {
- var rv = [];
- arr.forEach(function (val) {
- if (rv.indexOf(val) === -1) {
- rv.push(val);
- }
- });
- return rv;
- },
- difference: function (bigSet, subSet) {
- var rv = [];
- bigSet.forEach(function (val) {
- if (subSet.indexOf(val) === -1) {
- rv.push(val);
- }
- });
- return rv;
- },
- areEqual: function (json1, json2) {
- // http://json-schema.org/latest/json-schema-core.html#rfc.section.3.6
-
- // Two JSON values are said to be equal if and only if:
- // both are nulls; or
- // both are booleans, and have the same value; or
- // both are strings, and have the same value; or
- // both are numbers, and have the same mathematical value; or
- if (json1 === json2) {
- return true;
- }
-
- var i, len;
-
- // both are arrays, and:
- if (this.isArray(json1) && this.isArray(json2)) {
- // have the same number of items; and
- if (json1.length !== json2.length) {
- return false;
- }
- // items at the same index are equal according to this definition; or
- len = json1.length;
- for (i = 0; i < len; i++) {
- if (!this.areEqual(json1[i], json2[i])) {
- return false;
- }
- }
- return true;
- }
-
- // both are objects, and:
- if (this.isObject(json1) && this.isObject(json2)) {
- // have the same set of property names; and
- var keys1 = Object.keys(json1);
- var keys2 = Object.keys(json2);
- if (!this.areEqual(keys1, keys2)) {
- return false;
- }
- // values for a same property name are equal according to this definition.
- len = keys1.length;
- for (i = 0; i < len; i++) {
- if (!this.areEqual(json1[keys1[i]], json2[keys1[i]])) {
- return false;
- }
- }
- return true;
- }
-
- return false;
- },
- decodeJSONPointer: function (str) {
- // http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07#section-3
- return decodeURIComponent(str).replace(/~[0-1]/g, function (x) {
- return x === '~1' ? '/' : '~';
- });
- },
- _getRegExpCache: {},
- getRegExp: function (pattern) {
- if (!this._getRegExpCache[pattern]) {
- this._getRegExpCache[pattern] = new RegExp(pattern);
- }
- return this._getRegExpCache[pattern];
- },
- _getRemoteSchemaCache: {},
- getRemoteSchema: function (urlWithQuery, callback) {
- var self = this,
- url = urlWithQuery.split('#')[0];
-
- function returnSchemaFromString(str, url) {
- var sch;
-
- try {
- sch = JSON.parse(str);
- } catch (e) {
- delete self._getRemoteSchemaCache[url];
- throw new Error('Not a JSON data at: ' + url + ', ' + e);
- }
-
- // override in case of 'lying' schemas?
- if (!sch.id) {
- sch.id = url;
- }
- if (!sch.$schema) {
- sch.$schema = url;
- }
- sch.__$downloadedFrom = url;
- return callback ? callback(undefined, sch) : sch;
- }
-
- if (self._getRemoteSchemaCache[url]) {
- return returnSchemaFromString(self._getRemoteSchemaCache[url], url);
- }
-
- if (!callback) {
- // sync mode, checking in cache only
- return;
- }
-
- request(url, function (error, response, body) {
- if (error) {
- callback(error);
- return;
- }
- returnSchemaFromString(self._getRemoteSchemaCache[url] = body, url);
- });
- },
- // query should be valid json pointer
- resolveSchemaQuery: function resolveSchemaQuery(schema, rootSchema, queryStr, allowNull, sync) {
- ZSchema.expect.string(queryStr);
- if (queryStr === '#') {
- return rootSchema;
- }
-
- var rv = null;
- var uriPart = queryStr.split('#')[0];
- var queryPart = queryStr.split('#')[1];
-
- if (uriPart) {
- if (uriPart.indexOf('http:') === 0 || uriPart.indexOf('https:') === 0) {
- // remote
- if (!rootSchema.__remotes || !rootSchema.__remotes[uriPart]) {
- if (!sync) {
- throw new Error('Remote is not downloaded: ' + uriPart);
- } else {
- throw new Error('Use .setRemoteReference to download references in sync mode: ' + uriPart);
- }
- }
- rv = rootSchema.__remotes[uriPart];
- } else {
- // it's a local ID
- rv = Utils.resolveSchemaId(rootSchema, uriPart);
- }
- } else {
- rv = rootSchema;
- }
-
- // we have the schema and query to resolve in it
- if (rv && queryPart) {
- var queries = ('#' + queryPart).split('/');
- while (queries.length > 0) {
- var key = Utils.decodeJSONPointer(queries.shift());
- if (key.indexOf('#') === -1) {
- rv = rv[key];
- } else if (key !== '#') {
- rv = Utils.resolveSchemaId(rv, key);
- }
- }
- }
-
- if (!rv && !allowNull) {
- throw new Error('Could not resolve schema reference: ' + queryStr);
- }
-
- return rv;
- },
- resolveSchemaId: function (schema, id) {
- if (!this.isObject(schema) && !this.isArray(schema)) {
- return;
- }
- if (schema.id === id) {
- return schema;
- }
- var rv = null;
- Utils.forEach(schema, function (val, key) {
- // prevent recursing through z-schema properties
- if (typeof key === 'string' && key.indexOf('__$') === 0) { return; }
-
- if (!rv) {
- rv = Utils.resolveSchemaId(val, id);
- }
- });
- return rv;
- }
- };
-
- /*
- * these functions are used to validate formats
- * method registerFormat is available for adding new formats
- */
- /*jshint maxlen: false*/
- var FormatValidators = {
- 'date': function (date) {
- if (!Utils.isString(date)) {
- return true;
- }
- // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
- var matches = Utils.getRegExp('^([0-9]{4})-([0-9]{2})-([0-9]{2})$').exec(date);
- if (matches === null) {
- return false;
- }
- // var year = matches[1];
- var month = matches[2];
- var day = matches[3];
- if (month < '01' || month > '12' || day < '01' || day > '31') {
- return false;
- }
- return true;
- },
- 'date-time': function (dateTime) {
- if (!Utils.isString(dateTime)) {
- return true;
- }
- // date-time from http://tools.ietf.org/html/rfc3339#section-5.6
- var s = dateTime.toLowerCase().split('t');
- if (!FormatValidators.date(s[0])) {
- return false;
- }
- var matches = Utils.getRegExp('^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$').exec(s[1]);
- if (matches === null) {
- return false;
- }
- var hour = matches[1];
- var minute = matches[2];
- var second = matches[3];
- // var fraction = matches[4];
- // var timezone = matches[5];
- if (hour > '23' || minute > '59' || second > '59') {
- return false;
- }
- return true;
- },
- 'email': function (email) {
- // http://fightingforalostcause.net/misc/2006/compare-email-regex.php
- return typeof email !== 'string' || Utils.getRegExp(/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i).test(email);
- },
- 'hostname': function (hostname) {
- if (!Utils.isString(hostname)) {
- return true;
- }
- /*
- http://json-schema.org/latest/json-schema-validation.html#anchor114
- A string instance is valid against this attribute if it is a valid
- representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
-
- http://tools.ietf.org/html/rfc1034#section-3.5
-
- ::= any one of the ten digits 0 through 9
- var digit = /[0-9]/;
-
- ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case
- var letter = /[a-zA-Z]/;
-
- ::= |
- var letDig = /[0-9a-zA-Z]/;
-
- ::= | "-"
- var letDigHyp = /[-0-9a-zA-Z]/;
-
- ::= |
- var ldhStr = /[-0-9a-zA-Z]+/;
-
-