couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [46/51] [abbrv] [partial] couchdb-nmo git commit: Remove node_modules from repo
Date Mon, 30 Nov 2015 09:37:28 GMT
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/promise_array.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/promise_array.js b/node_modules/bluebird/js/main/promise_array.js
deleted file mode 100644
index 6dac866..0000000
--- a/node_modules/bluebird/js/main/promise_array.js
+++ /dev/null
@@ -1,142 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
-    apiRejection) {
-var util = require("./util.js");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
-    switch(val) {
-    case -2: return [];
-    case -3: return {};
-    }
-}
-
-function PromiseArray(values) {
-    var promise = this._promise = new Promise(INTERNAL);
-    var parent;
-    if (values instanceof Promise) {
-        parent = values;
-        promise._propagateFrom(parent, 1 | 4);
-    }
-    this._values = values;
-    this._length = 0;
-    this._totalResolved = 0;
-    this._init(undefined, -2);
-}
-PromiseArray.prototype.length = function () {
-    return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
-    return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
-    var values = tryConvertToPromise(this._values, this._promise);
-    if (values instanceof Promise) {
-        values = values._target();
-        this._values = values;
-        if (values._isFulfilled()) {
-            values = values._value();
-            if (!isArray(values)) {
-                var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a    See http://goo.gl/s8MMhc\u000a");
-                this.__hardReject__(err);
-                return;
-            }
-        } else if (values._isPending()) {
-            values._then(
-                init,
-                this._reject,
-                undefined,
-                this,
-                resolveValueIfEmpty
-           );
-            return;
-        } else {
-            this._reject(values._reason());
-            return;
-        }
-    } else if (!isArray(values)) {
-        this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a    See http://goo.gl/s8MMhc\u000a")._reason());
-        return;
-    }
-
-    if (values.length === 0) {
-        if (resolveValueIfEmpty === -5) {
-            this._resolveEmptyArray();
-        }
-        else {
-            this._resolve(toResolutionValue(resolveValueIfEmpty));
-        }
-        return;
-    }
-    var len = this.getActualLength(values.length);
-    this._length = len;
-    this._values = this.shouldCopyValues() ? new Array(len) : this._values;
-    var promise = this._promise;
-    for (var i = 0; i < len; ++i) {
-        var isResolved = this._isResolved();
-        var maybePromise = tryConvertToPromise(values[i], promise);
-        if (maybePromise instanceof Promise) {
-            maybePromise = maybePromise._target();
-            if (isResolved) {
-                maybePromise._unsetRejectionIsUnhandled();
-            } else if (maybePromise._isPending()) {
-                maybePromise._proxyPromiseArray(this, i);
-            } else if (maybePromise._isFulfilled()) {
-                this._promiseFulfilled(maybePromise._value(), i);
-            } else {
-                this._promiseRejected(maybePromise._reason(), i);
-            }
-        } else if (!isResolved) {
-            this._promiseFulfilled(maybePromise, i);
-        }
-    }
-};
-
-PromiseArray.prototype._isResolved = function () {
-    return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
-    this._values = null;
-    this._promise._fulfill(value);
-};
-
-PromiseArray.prototype.__hardReject__ =
-PromiseArray.prototype._reject = function (reason) {
-    this._values = null;
-    this._promise._rejectCallback(reason, false, true);
-};
-
-PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
-    this._promise._progress({
-        index: index,
-        value: progressValue
-    });
-};
-
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
-    this._values[index] = value;
-    var totalResolved = ++this._totalResolved;
-    if (totalResolved >= this._length) {
-        this._resolve(this._values);
-    }
-};
-
-PromiseArray.prototype._promiseRejected = function (reason, index) {
-    this._totalResolved++;
-    this._reject(reason);
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
-    return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
-    return len;
-};
-
-return PromiseArray;
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/promise_resolver.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/promise_resolver.js b/node_modules/bluebird/js/main/promise_resolver.js
deleted file mode 100644
index b180a32..0000000
--- a/node_modules/bluebird/js/main/promise_resolver.js
+++ /dev/null
@@ -1,123 +0,0 @@
-"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 haveGetters = util.haveGetters;
-var es5 = require("./es5.js");
-
-function isUntypedError(obj) {
-    return obj instanceof Error &&
-        es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
-    var ret;
-    if (isUntypedError(obj)) {
-        ret = new OperationalError(obj);
-        ret.name = obj.name;
-        ret.message = obj.message;
-        ret.stack = obj.stack;
-        var keys = es5.keys(obj);
-        for (var i = 0; i < keys.length; ++i) {
-            var key = keys[i];
-            if (!rErrorKey.test(key)) {
-                ret[key] = obj[key];
-            }
-        }
-        return ret;
-    }
-    util.markAsOriginatingFromRejection(obj);
-    return obj;
-}
-
-function nodebackForPromise(promise) {
-    return function(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;
-    };
-}
-
-
-var PromiseResolver;
-if (!haveGetters) {
-    PromiseResolver = function (promise) {
-        this.promise = promise;
-        this.asCallback = nodebackForPromise(promise);
-        this.callback = this.asCallback;
-    };
-}
-else {
-    PromiseResolver = function (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 () {
-    return "[object PromiseResolver]";
-};
-
-PromiseResolver.prototype.resolve =
-PromiseResolver.prototype.fulfill = function (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.\u000a\u000a    See http://goo.gl/sdkXL9\u000a");
-    }
-    this.promise._resolveCallback(value);
-};
-
-PromiseResolver.prototype.reject = function (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.\u000a\u000a    See http://goo.gl/sdkXL9\u000a");
-    }
-    this.promise._rejectCallback(reason);
-};
-
-PromiseResolver.prototype.progress = function (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.\u000a\u000a    See http://goo.gl/sdkXL9\u000a");
-    }
-    this.promise._progress(value);
-};
-
-PromiseResolver.prototype.cancel = function (err) {
-    this.promise.cancel(err);
-};
-
-PromiseResolver.prototype.timeout = function () {
-    this.reject(new TimeoutError("timeout"));
-};
-
-PromiseResolver.prototype.isResolved = function () {
-    return this.promise.isResolved();
-};
-
-PromiseResolver.prototype.toJSON = function () {
-    return this.promise.toJSON();
-};
-
-module.exports = PromiseResolver;

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/promisify.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/promisify.js b/node_modules/bluebird/js/main/promisify.js
deleted file mode 100644
index 0355344..0000000
--- a/node_modules/bluebird/js/main/promisify.js
+++ /dev/null
@@ -1,291 +0,0 @@
-"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 defaultPromisified = {__isPromisified__: true};
-var noCopyPropsPattern =
-    /^(?:length|name|arguments|caller|callee|prototype|__isPromisified__)$/;
-var defaultFilter = function(name, func) {
-    return util.isIdentifier(name) &&
-        name.charAt(0) !== "_" &&
-        !util.isClass(func);
-};
-
-function propsFilter(key) {
-    return !noCopyPropsPattern.test(key);
-}
-
-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 '%s'-suffix\u000a\u000a    See http://goo.gl/iWrZbw\u000a"
-                        .replace("%s", 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];
-        var passesDefaultFilter = filter === defaultFilter
-            ? true : defaultFilter(key, value, obj);
-        if (typeof value === "function" &&
-            !isPromisified(value) &&
-            !hasPromisified(obj, key, suffix) &&
-            filter(key, value, obj, passesDefaultFilter)) {
-            ret.push(key, value);
-        }
-    }
-    checkValid(ret, suffix, suffixRegexp);
-    return ret;
-}
-
-var escapeIdentRegex = function(str) {
-    return str.replace(/([$])/, "\\$");
-};
-
-var makeNodePromisifiedEval;
-if (!false) {
-var switchCaseArgumentOrder = function(likelyArgumentCount) {
-    var ret = [likelyArgumentCount];
-    var min = Math.max(0, likelyArgumentCount - 1 - 3);
-    for(var i = likelyArgumentCount - 1; i >= min; --i) {
-        ret.push(i);
-    }
-    for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
-        ret.push(i);
-    }
-    return ret;
-};
-
-var argumentSequence = function(argumentCount) {
-    return util.filledRange(argumentCount, "_arg", "");
-};
-
-var parameterDeclaration = function(parameterCount) {
-    return util.filledRange(
-        Math.max(parameterCount, 3), "_arg", "");
-};
-
-var parameterCount = function(fn) {
-    if (typeof fn.length === "number") {
-        return Math.max(Math.min(fn.length, 1023 + 1), 0);
-    }
-    return 0;
-};
-
-makeNodePromisifiedEval =
-function(callback, receiver, originalName, fn) {
-    var newParameterCount = Math.max(0, parameterCount(fn) - 1);
-    var argumentOrder = switchCaseArgumentOrder(newParameterCount);
-    var shouldProxyThis = typeof callback === "string" || receiver === THIS;
-
-    function generateCallForArgumentCount(count) {
-        var args = argumentSequence(count).join(", ");
-        var comma = count > 0 ? ", " : "";
-        var ret;
-        if (shouldProxyThis) {
-            ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
-        } else {
-            ret = receiver === undefined
-                ? "ret = callback({{args}}, nodeback); break;\n"
-                : "ret = callback.call(receiver, {{args}}, nodeback); 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]);
-        }
-
-        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] = nodeback;                                              \n\
-            [CodeForCall]                                                    \n\
-            break;                                                           \n\
-        ".replace("[CodeForCall]", (shouldProxyThis
-                                ? "ret = callback.apply(this, args);\n"
-                                : "ret = callback.apply(receiver, args);\n"));
-        return ret;
-    }
-
-    var getFunctionCode = typeof callback === "string"
-                                ? ("this != null ? this['"+callback+"'] : fn")
-                                : "fn";
-
-    return new Function("Promise",
-                        "fn",
-                        "receiver",
-                        "withAppended",
-                        "maybeWrapAsError",
-                        "nodebackForPromise",
-                        "tryCatch",
-                        "errorObj",
-                        "INTERNAL","'use strict';                            \n\
-        var ret = function (Parameters) {                                    \n\
-            'use strict';                                                    \n\
-            var len = arguments.length;                                      \n\
-            var promise = new Promise(INTERNAL);                             \n\
-            promise._captureStackTrace();                                    \n\
-            var nodeback = nodebackForPromise(promise);                      \n\
-            var ret;                                                         \n\
-            var callback = tryCatch([GetFunctionCode]);                      \n\
-            switch(len) {                                                    \n\
-                [CodeForSwitchCase]                                          \n\
-            }                                                                \n\
-            if (ret === errorObj) {                                          \n\
-                promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
-            }                                                                \n\
-            return promise;                                                  \n\
-        };                                                                   \n\
-        ret.__isPromisified__ = true;                                        \n\
-        return ret;                                                          \n\
-        "
-        .replace("Parameters", parameterDeclaration(newParameterCount))
-        .replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
-        .replace("[GetFunctionCode]", getFunctionCode))(
-            Promise,
-            fn,
-            receiver,
-            withAppended,
-            maybeWrapAsError,
-            nodebackForPromise,
-            util.tryCatch,
-            util.errorObj,
-            INTERNAL
-        );
-};
-}
-
-function makeNodePromisifiedClosure(callback, receiver, _, fn) {
-    var defaultThis = (function() {return this;})();
-    var method = callback;
-    if (typeof method === "string") {
-        callback = fn;
-    }
-    function promisified() {
-        var _receiver = receiver;
-        if (receiver === THIS) _receiver = this;
-        var promise = new Promise(INTERNAL);
-        promise._captureStackTrace();
-        var cb = typeof method === "string" && this !== defaultThis
-            ? this[method] : callback;
-        var fn = nodebackForPromise(promise);
-        try {
-            cb.apply(_receiver, withAppended(arguments, fn));
-        } catch(e) {
-            promise._rejectCallback(maybeWrapAsError(e), true, true);
-        }
-        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, function() {
-                    return makeNodePromisified(key, THIS, key, fn, suffix);
-                });
-    }
-    util.toFastProperties(obj);
-    return obj;
-}
-
-function promisify(callback, receiver) {
-    return makeNodePromisified(callback, receiver, undefined, callback);
-}
-
-Promise.promisify = function (fn, receiver) {
-    if (typeof fn !== "function") {
-        throw new TypeError("fn must be a function\u000a\u000a    See http://goo.gl/916lJJ\u000a");
-    }
-    if (isPromisified(fn)) {
-        return fn;
-    }
-    var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
-    util.copyDescriptors(fn, ret, propsFilter);
-    return ret;
-};
-
-Promise.promisifyAll = function (target, options) {
-    if (typeof target !== "function" && typeof target !== "object") {
-        throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a    See http://goo.gl/9ITlV0\u000a");
-    }
-    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\u000a\u000a    See http://goo.gl/8FZo5V\u000a");
-    }
-
-    var keys = util.inheritedDataKeys(target);
-    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);
-};
-};
-

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/props.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/props.js b/node_modules/bluebird/js/main/props.js
deleted file mode 100644
index d6f9e64..0000000
--- a/node_modules/bluebird/js/main/props.js
+++ /dev/null
@@ -1,79 +0,0 @@
-"use strict";
-module.exports = function(
-    Promise, PromiseArray, tryConvertToPromise, apiRejection) {
-var util = require("./util.js");
-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 () {
-    this._init$(undefined, -3) ;
-};
-
-PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
-    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 (value, index) {
-    this._promise._progress({
-        key: this._values[index + this.length()],
-        value: value
-    });
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues = function () {
-    return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength = function (len) {
-    return len >> 1;
-};
-
-function props(promises) {
-    var ret;
-    var castValue = tryConvertToPromise(promises);
-
-    if (!isObject(castValue)) {
-        return apiRejection("cannot await properties of a non-object\u000a\u000a    See http://goo.gl/OsFKC8\u000a");
-    } else if (castValue instanceof Promise) {
-        ret = castValue._then(
-            Promise.props, undefined, undefined, undefined, undefined);
-    } else {
-        ret = new PropertiesPromiseArray(castValue).promise();
-    }
-
-    if (castValue instanceof Promise) {
-        ret._propagateFrom(castValue, 4);
-    }
-    return ret;
-}
-
-Promise.prototype.props = function () {
-    return props(this);
-};
-
-Promise.props = function (promises) {
-    return props(promises);
-};
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/queue.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/queue.js b/node_modules/bluebird/js/main/queue.js
deleted file mode 100644
index 84d57d5..0000000
--- a/node_modules/bluebird/js/main/queue.js
+++ /dev/null
@@ -1,90 +0,0 @@
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
-    for (var j = 0; j < len; ++j) {
-        dst[j + dstIndex] = src[j + srcIndex];
-        src[j + srcIndex] = void 0;
-    }
-}
-
-function Queue(capacity) {
-    this._capacity = capacity;
-    this._length = 0;
-    this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
-    return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (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._unshiftOne = function(value) {
-    var capacity = this._capacity;
-    this._checkCapacity(this.length() + 1);
-    var front = this._front;
-    var i = (((( front - 1 ) &
-                    ( capacity - 1) ) ^ capacity ) - capacity );
-    this[i] = value;
-    this._front = i;
-    this._length = this.length() + 1;
-};
-
-Queue.prototype.unshift = function(fn, receiver, arg) {
-    this._unshiftOne(arg);
-    this._unshiftOne(receiver);
-    this._unshiftOne(fn);
-};
-
-Queue.prototype.push = function (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 () {
-    var front = this._front,
-        ret = this[front];
-
-    this[front] = undefined;
-    this._front = (front + 1) & (this._capacity - 1);
-    this._length--;
-    return ret;
-};
-
-Queue.prototype.length = function () {
-    return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
-    if (this._capacity < size) {
-        this._resizeTo(this._capacity << 1);
-    }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
-    var oldCapacity = this._capacity;
-    this._capacity = capacity;
-    var front = this._front;
-    var length = this._length;
-    var moveItemsCount = (front + length) & (oldCapacity - 1);
-    arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/race.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/race.js b/node_modules/bluebird/js/main/race.js
deleted file mode 100644
index 30e7bb0..0000000
--- a/node_modules/bluebird/js/main/race.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-module.exports = function(
-    Promise, INTERNAL, tryConvertToPromise, apiRejection) {
-var isArray = require("./util.js").isArray;
-
-var raceLater = function (promise) {
-    return promise.then(function(array) {
-        return race(array, promise);
-    });
-};
-
-function race(promises, parent) {
-    var maybePromise = tryConvertToPromise(promises);
-
-    if (maybePromise instanceof Promise) {
-        return raceLater(maybePromise);
-    } else if (!isArray(promises)) {
-        return apiRejection("expecting an array, a promise or a thenable\u000a\u000a    See http://goo.gl/s8MMhc\u000a");
-    }
-
-    var ret = new Promise(INTERNAL);
-    if (parent !== undefined) {
-        ret._propagateFrom(parent, 4 | 1);
-    }
-    var fulfill = ret._fulfill;
-    var reject = ret._reject;
-    for (var i = 0, len = promises.length; i < len; ++i) {
-        var val = promises[i];
-
-        if (val === undefined && !(i in promises)) {
-            continue;
-        }
-
-        Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
-    }
-    return ret;
-}
-
-Promise.race = function (promises) {
-    return race(promises, undefined);
-};
-
-Promise.prototype.race = function () {
-    return race(this, undefined);
-};
-
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/reduce.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/reduce.js b/node_modules/bluebird/js/main/reduce.js
deleted file mode 100644
index 3192220..0000000
--- a/node_modules/bluebird/js/main/reduce.js
+++ /dev/null
@@ -1,146 +0,0 @@
-"use strict";
-module.exports = function(Promise,
-                          PromiseArray,
-                          apiRejection,
-                          tryConvertToPromise,
-                          INTERNAL) {
-var async = require("./async.js");
-var util = require("./util.js");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-function ReductionPromiseArray(promises, fn, accum, _each) {
-    this.constructor$(promises);
-    this._promise._captureStackTrace();
-    this._preservedValues = _each === INTERNAL ? [] : null;
-    this._zerothIsAccum = (accum === undefined);
-    this._gotAccum = false;
-    this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
-    this._valuesPhase = undefined;
-    var maybePromise = tryConvertToPromise(accum, this._promise);
-    var rejected = false;
-    var isPromise = maybePromise instanceof Promise;
-    if (isPromise) {
-        maybePromise = maybePromise._target();
-        if (maybePromise._isPending()) {
-            maybePromise._proxyPromiseArray(this, -1);
-        } else if (maybePromise._isFulfilled()) {
-            accum = maybePromise._value();
-            this._gotAccum = true;
-        } else {
-            this._reject(maybePromise._reason());
-            rejected = true;
-        }
-    }
-    if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
-    this._callback = fn;
-    this._accum = accum;
-    if (!rejected) async.invoke(init, this, undefined);
-}
-function init() {
-    this._init$(undefined, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._init = function () {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray = function () {
-    if (this._gotAccum || this._zerothIsAccum) {
-        this._resolve(this._preservedValues !== null
-                        ? [] : this._accum);
-    }
-};
-
-ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
-    var values = this._values;
-    values[index] = value;
-    var length = this.length();
-    var preservedValues = this._preservedValues;
-    var isEach = preservedValues !== null;
-    var gotAccum = this._gotAccum;
-    var valuesPhase = this._valuesPhase;
-    var valuesPhaseIndex;
-    if (!valuesPhase) {
-        valuesPhase = this._valuesPhase = new Array(length);
-        for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
-            valuesPhase[valuesPhaseIndex] = 0;
-        }
-    }
-    valuesPhaseIndex = valuesPhase[index];
-
-    if (index === 0 && this._zerothIsAccum) {
-        this._accum = value;
-        this._gotAccum = gotAccum = true;
-        valuesPhase[index] = ((valuesPhaseIndex === 0)
-            ? 1 : 2);
-    } else if (index === -1) {
-        this._accum = value;
-        this._gotAccum = gotAccum = true;
-    } else {
-        if (valuesPhaseIndex === 0) {
-            valuesPhase[index] = 1;
-        } else {
-            valuesPhase[index] = 2;
-            this._accum = value;
-        }
-    }
-    if (!gotAccum) return;
-
-    var callback = this._callback;
-    var receiver = this._promise._boundTo;
-    var ret;
-
-    for (var i = this._reducingIndex; i < length; ++i) {
-        valuesPhaseIndex = valuesPhase[i];
-        if (valuesPhaseIndex === 2) {
-            this._reducingIndex = i + 1;
-            continue;
-        }
-        if (valuesPhaseIndex !== 1) return;
-        value = values[i];
-        this._promise._pushContext();
-        if (isEach) {
-            preservedValues.push(value);
-            ret = tryCatch(callback).call(receiver, value, i, length);
-        }
-        else {
-            ret = tryCatch(callback)
-                .call(receiver, this._accum, value, i, length);
-        }
-        this._promise._popContext();
-
-        if (ret === errorObj) return this._reject(ret.e);
-
-        var maybePromise = tryConvertToPromise(ret, this._promise);
-        if (maybePromise instanceof Promise) {
-            maybePromise = maybePromise._target();
-            if (maybePromise._isPending()) {
-                valuesPhase[i] = 4;
-                return maybePromise._proxyPromiseArray(this, i);
-            } else if (maybePromise._isFulfilled()) {
-                ret = maybePromise._value();
-            } else {
-                return this._reject(maybePromise._reason());
-            }
-        }
-
-        this._reducingIndex = i + 1;
-        this._accum = ret;
-    }
-
-    this._resolve(isEach ? preservedValues : this._accum);
-};
-
-function reduce(promises, fn, initialValue, _each) {
-    if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a    See http://goo.gl/916lJJ\u000a");
-    var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
-    return array.promise();
-}
-
-Promise.prototype.reduce = function (fn, initialValue) {
-    return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function (promises, fn, initialValue, _each) {
-    return reduce(promises, fn, initialValue, _each);
-};
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/schedule.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/schedule.js b/node_modules/bluebird/js/main/schedule.js
deleted file mode 100644
index 2355ffb..0000000
--- a/node_modules/bluebird/js/main/schedule.js
+++ /dev/null
@@ -1,39 +0,0 @@
-"use strict";
-var schedule;
-var noAsyncScheduler = function() {
-    throw new Error("No async scheduler available\u000a\u000a    See http://goo.gl/m3OTXk\u000a");
-};
-if (require("./util.js").isNode) {
-    var version = process.versions.node.split(".").map(Number);
-    schedule = (version[0] === 0 && version[1] > 10) || (version[0] > 0)
-        ? global.setImmediate : process.nextTick;
-
-    if (!schedule) {
-        if (typeof setImmediate !== "undefined") {
-            schedule = setImmediate;
-        } else if (typeof setTimeout !== "undefined") {
-            schedule = setTimeout;
-        } else {
-            schedule = noAsyncScheduler;
-        }
-    }
-} else if (typeof MutationObserver !== "undefined") {
-    schedule = function(fn) {
-        var div = document.createElement("div");
-        var observer = new MutationObserver(fn);
-        observer.observe(div, {attributes: true});
-        return function() { div.classList.toggle("foo"); };
-    };
-    schedule.isStatic = true;
-} else if (typeof setImmediate !== "undefined") {
-    schedule = function (fn) {
-        setImmediate(fn);
-    };
-} else if (typeof setTimeout !== "undefined") {
-    schedule = function (fn) {
-        setTimeout(fn, 0);
-    };
-} else {
-    schedule = noAsyncScheduler;
-}
-module.exports = schedule;

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/settle.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/settle.js b/node_modules/bluebird/js/main/settle.js
deleted file mode 100644
index f9299c2..0000000
--- a/node_modules/bluebird/js/main/settle.js
+++ /dev/null
@@ -1,40 +0,0 @@
-"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 (index, inspection) {
-    this._values[index] = inspection;
-    var totalResolved = ++this._totalResolved;
-    if (totalResolved >= this._length) {
-        this._resolve(this._values);
-    }
-};
-
-SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
-    var ret = new PromiseInspection();
-    ret._bitField = 268435456;
-    ret._settledValue = value;
-    this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
-    var ret = new PromiseInspection();
-    ret._bitField = 134217728;
-    ret._settledValue = reason;
-    this._promiseResolved(index, ret);
-};
-
-Promise.settle = function (promises) {
-    return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function () {
-    return new SettledPromiseArray(this).promise();
-};
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/some.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/some.js b/node_modules/bluebird/js/main/some.js
deleted file mode 100644
index f3968cf..0000000
--- a/node_modules/bluebird/js/main/some.js
+++ /dev/null
@@ -1,125 +0,0 @@
-"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 () {
-    if (!this._initialized) {
-        return;
-    }
-    if (this._howMany === 0) {
-        this._resolve([]);
-        return;
-    }
-    this._init$(undefined, -5);
-    var isArrayResolved = isArray(this._values);
-    if (!this._isResolved() &&
-        isArrayResolved &&
-        this._howMany > this._canPossiblyFulfill()) {
-        this._reject(this._getRangeError(this.length()));
-    }
-};
-
-SomePromiseArray.prototype.init = function () {
-    this._initialized = true;
-    this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function () {
-    this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function () {
-    return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany = function (count) {
-    this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled = function (value) {
-    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 (reason) {
-    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 () {
-    return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function () {
-    return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected = function (reason) {
-    this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled = function (value) {
-    this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill = function () {
-    return this.length() - this._rejected();
-};
-
-SomePromiseArray.prototype._getRangeError = function (count) {
-    var message = "Input array must contain at least " +
-            this._howMany + " items but contains only " + count + " items";
-    return new RangeError(message);
-};
-
-SomePromiseArray.prototype._resolveEmptyArray = function () {
-    this._reject(this._getRangeError(0));
-};
-
-function some(promises, howMany) {
-    if ((howMany | 0) !== howMany || howMany < 0) {
-        return apiRejection("expecting a positive integer\u000a\u000a    See http://goo.gl/1wAmHx\u000a");
-    }
-    var ret = new SomePromiseArray(promises);
-    var promise = ret.promise();
-    ret.setHowMany(howMany);
-    ret.init();
-    return promise;
-}
-
-Promise.some = function (promises, howMany) {
-    return some(promises, howMany);
-};
-
-Promise.prototype.some = function (howMany) {
-    return some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/synchronous_inspection.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/synchronous_inspection.js b/node_modules/bluebird/js/main/synchronous_inspection.js
deleted file mode 100644
index 7aac149..0000000
--- a/node_modules/bluebird/js/main/synchronous_inspection.js
+++ /dev/null
@@ -1,94 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
-    if (promise !== undefined) {
-        promise = promise._target();
-        this._bitField = promise._bitField;
-        this._settledValue = promise._settledValue;
-    }
-    else {
-        this._bitField = 0;
-        this._settledValue = undefined;
-    }
-}
-
-PromiseInspection.prototype.value = function () {
-    if (!this.isFulfilled()) {
-        throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a    See http://goo.gl/hc1DLj\u000a");
-    }
-    return this._settledValue;
-};
-
-PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
-    if (!this.isRejected()) {
-        throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a    See http://goo.gl/hPuiwB\u000a");
-    }
-    return this._settledValue;
-};
-
-PromiseInspection.prototype.isFulfilled =
-Promise.prototype._isFulfilled = function () {
-    return (this._bitField & 268435456) > 0;
-};
-
-PromiseInspection.prototype.isRejected =
-Promise.prototype._isRejected = function () {
-    return (this._bitField & 134217728) > 0;
-};
-
-PromiseInspection.prototype.isPending =
-Promise.prototype._isPending = function () {
-    return (this._bitField & 402653184) === 0;
-};
-
-PromiseInspection.prototype.isResolved =
-Promise.prototype._isResolved = function () {
-    return (this._bitField & 402653184) > 0;
-};
-
-Promise.prototype.isPending = function() {
-    return this._target()._isPending();
-};
-
-Promise.prototype.isRejected = function() {
-    return this._target()._isRejected();
-};
-
-Promise.prototype.isFulfilled = function() {
-    return this._target()._isFulfilled();
-};
-
-Promise.prototype.isResolved = function() {
-    return this._target()._isResolved();
-};
-
-Promise.prototype._value = function() {
-    return this._settledValue;
-};
-
-Promise.prototype._reason = function() {
-    this._unsetRejectionIsUnhandled();
-    return this._settledValue;
-};
-
-Promise.prototype.value = function() {
-    var target = this._target();
-    if (!target.isFulfilled()) {
-        throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a    See http://goo.gl/hc1DLj\u000a");
-    }
-    return target._settledValue;
-};
-
-Promise.prototype.reason = function() {
-    var target = this._target();
-    if (!target.isRejected()) {
-        throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a    See http://goo.gl/hPuiwB\u000a");
-    }
-    target._unsetRejectionIsUnhandled();
-    return target._settledValue;
-};
-
-
-Promise.PromiseInspection = PromiseInspection;
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/thenables.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/thenables.js b/node_modules/bluebird/js/main/thenables.js
deleted file mode 100644
index c858f86..0000000
--- a/node_modules/bluebird/js/main/thenables.js
+++ /dev/null
@@ -1,89 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = require("./util.js");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
-    if (isObject(obj)) {
-        if (obj instanceof Promise) {
-            return obj;
-        }
-        else if (isAnyBluebirdPromise(obj)) {
-            var ret = new Promise(INTERNAL);
-            obj._then(
-                ret._fulfillUnchecked,
-                ret._rejectUncheckedCheckError,
-                ret._progressUnchecked,
-                ret,
-                null
-            );
-            return ret;
-        }
-        var then = util.tryCatch(getThen)(obj);
-        if (then === errorObj) {
-            if (context) context._pushContext();
-            var ret = Promise.reject(then.e);
-            if (context) context._popContext();
-            return ret;
-        } else if (typeof then === "function") {
-            return doThenable(obj, then, context);
-        }
-    }
-    return obj;
-}
-
-function getThen(obj) {
-    return obj.then;
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
-    return hasProp.call(obj, "_promise0");
-}
-
-function doThenable(x, then, context) {
-    var promise = new Promise(INTERNAL);
-    var ret = promise;
-    if (context) context._pushContext();
-    promise._captureStackTrace();
-    if (context) context._popContext();
-    var synchronous = true;
-    var result = util.tryCatch(then).call(x,
-                                        resolveFromThenable,
-                                        rejectFromThenable,
-                                        progressFromThenable);
-    synchronous = false;
-    if (promise && result === errorObj) {
-        promise._rejectCallback(result.e, true, true);
-        promise = null;
-    }
-
-    function resolveFromThenable(value) {
-        if (!promise) return;
-        if (x === value) {
-            promise._rejectCallback(
-                Promise._makeSelfResolutionError(), false, true);
-        } else {
-            promise._resolveCallback(value);
-        }
-        promise = null;
-    }
-
-    function rejectFromThenable(reason) {
-        if (!promise) return;
-        promise._rejectCallback(reason, synchronous, true);
-        promise = null;
-    }
-
-    function progressFromThenable(value) {
-        if (!promise) return;
-        if (typeof promise._progress === "function") {
-            promise._progress(value);
-        }
-    }
-    return ret;
-}
-
-return tryConvertToPromise;
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/timers.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/timers.js b/node_modules/bluebird/js/main/timers.js
deleted file mode 100644
index ecf1b57..0000000
--- a/node_modules/bluebird/js/main/timers.js
+++ /dev/null
@@ -1,58 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = require("./util.js");
-var TimeoutError = Promise.TimeoutError;
-
-var afterTimeout = function (promise, message) {
-    if (!promise.isPending()) return;
-    if (typeof message !== "string") {
-        message = "operation timed out";
-    }
-    var err = new TimeoutError(message);
-    util.markAsOriginatingFromRejection(err);
-    promise._attachExtraTrace(err);
-    promise._cancel(err);
-};
-
-var afterValue = function(value) { return delay(+this).thenReturn(value); };
-var delay = Promise.delay = function (value, ms) {
-    if (ms === undefined) {
-        ms = value;
-        value = undefined;
-        var ret = new Promise(INTERNAL);
-        setTimeout(function() { ret._fulfill(); }, ms);
-        return ret;
-    }
-    ms = +ms;
-    return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
-};
-
-Promise.prototype.delay = function (ms) {
-    return delay(this, ms);
-};
-
-function successClear(value) {
-    var handle = this;
-    if (handle instanceof Number) handle = +handle;
-    clearTimeout(handle);
-    return value;
-}
-
-function failureClear(reason) {
-    var handle = this;
-    if (handle instanceof Number) handle = +handle;
-    clearTimeout(handle);
-    throw reason;
-}
-
-Promise.prototype.timeout = function (ms, message) {
-    ms = +ms;
-    var ret = this.then().cancellable();
-    ret._cancellationParent = this;
-    var handle = setTimeout(function timeoutTimeout() {
-        afterTimeout(ret, message);
-    }, ms);
-    return ret._then(successClear, failureClear, undefined, handle, undefined);
-};
-
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/using.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/using.js b/node_modules/bluebird/js/main/using.js
deleted file mode 100644
index 4038711..0000000
--- a/node_modules/bluebird/js/main/using.js
+++ /dev/null
@@ -1,202 +0,0 @@
-"use strict";
-module.exports = function (Promise, apiRejection, tryConvertToPromise,
-    createContext) {
-    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._settledValue;
-        }
-        return inspections;
-    }
-
-    function thrower(e) {
-        setTimeout(function(){throw e;}, 0);
-    }
-
-    function castPreservingDisposable(thenable) {
-        var maybePromise = tryConvertToPromise(thenable);
-        if (maybePromise !== thenable &&
-            typeof thenable._isDisposable === "function" &&
-            typeof thenable._getDisposer === "function" &&
-            thenable._isDisposable()) {
-            maybePromise._setDisposable(thenable._getDisposer());
-        }
-        return maybePromise;
-    }
-    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 = castPreservingDisposable(resources[i++]);
-            if (maybePromise instanceof Promise &&
-                maybePromise._isDisposable()) {
-                try {
-                    maybePromise = tryConvertToPromise(
-                        maybePromise._getDisposer().tryDispose(inspection),
-                        resources.promise);
-                } 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, context) {
-        this._data = data;
-        this._promise = promise;
-        this._context = context;
-    }
-
-    Disposer.prototype.data = function () {
-        return this._data;
-    };
-
-    Disposer.prototype.promise = function () {
-        return this._promise;
-    };
-
-    Disposer.prototype.resource = function () {
-        if (this.promise().isFulfilled()) {
-            return this.promise().value();
-        }
-        return null;
-    };
-
-    Disposer.prototype.tryDispose = function(inspection) {
-        var resource = this.resource();
-        var context = this._context;
-        if (context !== undefined) context._pushContext();
-        var ret = resource !== null
-            ? this.doDispose(resource, inspection) : null;
-        if (context !== undefined) context._popContext();
-        this._promise._unsetDisposable();
-        this._data = null;
-        return ret;
-    };
-
-    Disposer.isDisposer = function (d) {
-        return (d != null &&
-                typeof d.resource === "function" &&
-                typeof d.tryDispose === "function");
-    };
-
-    function FunctionDisposer(fn, promise, context) {
-        this.constructor$(fn, promise, context);
-    }
-    inherits(FunctionDisposer, Disposer);
-
-    FunctionDisposer.prototype.doDispose = function (resource, inspection) {
-        var fn = this.data();
-        return fn.call(resource, resource, inspection);
-    };
-
-    function maybeUnwrapDisposer(value) {
-        if (Disposer.isDisposer(value)) {
-            this.resources[this.index]._setDisposable(value);
-            return value.promise();
-        }
-        return value;
-    }
-
-    Promise.using = function () {
-        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\u000a\u000a    See http://goo.gl/916lJJ\u000a");
-        len--;
-        var resources = new Array(len);
-        for (var i = 0; i < len; ++i) {
-            var resource = arguments[i];
-            if (Disposer.isDisposer(resource)) {
-                var disposer = resource;
-                resource = resource.promise();
-                resource._setDisposable(disposer);
-            } else {
-                var maybePromise = tryConvertToPromise(resource);
-                if (maybePromise instanceof Promise) {
-                    resource =
-                        maybePromise._then(maybeUnwrapDisposer, null, null, {
-                            resources: resources,
-                            index: i
-                    }, undefined);
-                }
-            }
-            resources[i] = resource;
-        }
-
-        var promise = Promise.settle(resources)
-            .then(inspectionMapper)
-            .then(function(vals) {
-                promise._pushContext();
-                var ret;
-                try {
-                    ret = fn.apply(undefined, vals);
-                } finally {
-                    promise._popContext();
-                }
-                return ret;
-            })
-            ._then(
-                disposerSuccess, disposerFail, undefined, resources, undefined);
-        resources.promise = promise;
-        return promise;
-    };
-
-    Promise.prototype._setDisposable = function (disposer) {
-        this._bitField = this._bitField | 262144;
-        this._disposer = disposer;
-    };
-
-    Promise.prototype._isDisposable = function () {
-        return (this._bitField & 262144) > 0;
-    };
-
-    Promise.prototype._getDisposer = function () {
-        return this._disposer;
-    };
-
-    Promise.prototype._unsetDisposable = function () {
-        this._bitField = this._bitField & (~262144);
-        this._disposer = undefined;
-    };
-
-    Promise.prototype.disposer = function (fn) {
-        if (typeof fn === "function") {
-            return new FunctionDisposer(fn, this, createContext());
-        }
-        throw new TypeError();
-    };
-
-};

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/js/main/util.js
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/js/main/util.js b/node_modules/bluebird/js/main/util.js
deleted file mode 100644
index fbee5de..0000000
--- a/node_modules/bluebird/js/main/util.js
+++ /dev/null
@@ -1,280 +0,0 @@
-"use strict";
-var es5 = require("./es5.js");
-var canEvaluate = typeof navigator == "undefined";
-var haveGetters = (function(){
-    try {
-        var o = {};
-        es5.defineProperty(o, "f", {
-            get: function () {
-                return 3;
-            }
-        });
-        return o.f === 3;
-    }
-    catch (e) {
-        return false;
-    }
-
-})();
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-function tryCatcher() {
-    try {
-        return tryCatchTarget.apply(this, arguments);
-    } catch (e) {
-        errorObj.e = e;
-        return errorObj;
-    }
-}
-function tryCatch(fn) {
-    tryCatchTarget = fn;
-    return tryCatcher;
-}
-
-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 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(safeToString(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] : undefined;
-    }
-}
-
-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) {
-        var oProto = Object.prototype;
-        var getKeys = Object.getOwnPropertyNames;
-        return function(obj) {
-            var ret = [];
-            var visitedKeys = Object.create(null);
-            while (obj != null && obj !== oProto) {
-                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.names(fn.prototype);
-            if (es5.isES5) return keys.length > 1;
-            return keys.length > 0 &&
-                   !(keys.length === 1 && keys[0] === "constructor");
-        }
-        return false;
-    } catch (e) {
-        return false;
-    }
-}
-
-function toFastProperties(obj) {
-    /*jshint -W027,-W055,-W031*/
-    function f() {}
-    f.prototype = obj;
-    var l = 8;
-    while (l--) new f();
-    return obj;
-    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;
-}
-
-function safeToString(obj) {
-    try {
-        return obj + "";
-    } catch (e) {
-        return "[no string representation]";
-    }
-}
-
-function markAsOriginatingFromRejection(e) {
-    try {
-        notEnumerableProp(e, "isOperational", true);
-    }
-    catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
-    if (e == null) return false;
-    return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
-        e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
-    return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
-    if (!("stack" in new Error())) {
-        return function(value) {
-            if (canAttachTrace(value)) return value;
-            try {throw new Error(safeToString(value));}
-            catch(err) {return err;}
-        };
-    } else {
-        return function(value) {
-            if (canAttachTrace(value)) return value;
-            return new Error(safeToString(value));
-        };
-    }
-})();
-
-function classString(obj) {
-    return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
-    var keys = es5.names(from);
-    for (var i = 0; i < keys.length; ++i) {
-        var key = keys[i];
-        if (filter(key)) {
-            es5.defineProperty(to, key, es5.getDescriptor(from, key));
-        }
-    }
-}
-
-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,
-    tryCatch: tryCatch,
-    inherits: inherits,
-    withAppended: withAppended,
-    maybeWrapAsError: maybeWrapAsError,
-    wrapsPrimitiveReceiver: wrapsPrimitiveReceiver,
-    toFastProperties: toFastProperties,
-    filledRange: filledRange,
-    toString: safeToString,
-    canAttachTrace: canAttachTrace,
-    ensureErrorObject: ensureErrorObject,
-    originatesFromRejection: originatesFromRejection,
-    markAsOriginatingFromRejection: markAsOriginatingFromRejection,
-    classString: classString,
-    copyDescriptors: copyDescriptors,
-    hasDevTools: typeof chrome !== "undefined" && chrome &&
-                 typeof chrome.loadTimes === "function",
-    isNode: typeof process !== "undefined" &&
-        classString(process).toLowerCase() === "[object process]"
-};
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bluebird/package.json
----------------------------------------------------------------------
diff --git a/node_modules/bluebird/package.json b/node_modules/bluebird/package.json
deleted file mode 100644
index 17406ec..0000000
--- a/node_modules/bluebird/package.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
-  "name": "bluebird",
-  "description": "Full featured Promises/A+ implementation with exceptionally good performance",
-  "version": "2.9.25",
-  "keywords": [
-    "promise",
-    "performance",
-    "promises",
-    "promises-a",
-    "promises-aplus",
-    "async",
-    "await",
-    "deferred",
-    "deferreds",
-    "future",
-    "flow control",
-    "dsl",
-    "fluent interface"
-  ],
-  "scripts": {
-    "lint": "node scripts/jshint.js",
-    "test": "node tools/test.js",
-    "istanbul": "istanbul",
-    "prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify"
-  },
-  "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": {
-    "acorn": "~0.6.0",
-    "baconjs": "^0.7.43",
-    "bluebird": "^2.9.2",
-    "body-parser": "^1.10.2",
-    "browserify": "^8.1.1",
-    "cli-table": "~0.3.1",
-    "co": "^4.2.0",
-    "cross-spawn": "^0.2.3",
-    "glob": "^4.3.2",
-    "grunt-saucelabs": "~8.4.1",
-    "highland": "^2.3.0",
-    "istanbul": "^0.3.5",
-    "jshint": "^2.6.0",
-    "jshint-stylish": "~0.2.0",
-    "mkdirp": "~0.5.0",
-    "mocha": "~2.1",
-    "open": "~0.0.5",
-    "optimist": "~0.6.1",
-    "rimraf": "~2.2.6",
-    "rx": "^2.3.25",
-    "serve-static": "^1.7.1",
-    "sinon": "~1.7.3",
-    "uglify-js": "~2.4.16"
-  },
-  "main": "./js/main/bluebird.js",
-  "browser": "./js/browser/bluebird.js",
-  "files": [
-    "js/browser",
-    "js/main",
-    "js/zalgo",
-    "LICENSE",
-    "zalgo.js"
-  ],
-  "gitHead": "13d7fbfc429422ea2dc9086371b4fd188b42038a",
-  "_id": "bluebird@2.9.25",
-  "_shasum": "6e36bd04064d9534c07160b9f7f26c5a738fe16a",
-  "_from": "bluebird@>=2.9.24 <2.10.0",
-  "_npmVersion": "2.7.1",
-  "_nodeVersion": "1.6.2",
-  "_npmUser": {
-    "name": "esailija",
-    "email": "petka_antonov@hotmail.com"
-  },
-  "maintainers": [
-    {
-      "name": "esailija",
-      "email": "petka_antonov@hotmail.com"
-    }
-  ],
-  "dist": {
-    "shasum": "6e36bd04064d9534c07160b9f7f26c5a738fe16a",
-    "tarball": "http://registry.npmjs.org/bluebird/-/bluebird-2.9.25.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.25.tgz",
-  "readme": "ERROR: No README data found!"
-}

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/.npmignore
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/.npmignore b/node_modules/bulkbadger/.npmignore
deleted file mode 100644
index 7a0fc07..0000000
--- a/node_modules/bulkbadger/.npmignore
+++ /dev/null
@@ -1,14 +0,0 @@
-*.swp
-.*.swp
-
-.DS_Store
-*~
-.project
-.settings
-npm-debug.log
-coverage.html
-.idea
-lib-cov
-
-node_modules
-

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/LICENSE
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/LICENSE b/node_modules/bulkbadger/LICENSE
deleted file mode 100644
index 6c53ca0..0000000
--- a/node_modules/bulkbadger/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Robert Kowalski ("Author")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/README.md
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/README.md b/node_modules/bulkbadger/README.md
deleted file mode 100644
index a7bba79..0000000
--- a/node_modules/bulkbadger/README.md
+++ /dev/null
@@ -1,180 +0,0 @@
-# BulkBadger
-
-
-Takes a stream of Line Delimited JSON, e.g. from MongoDB Queries,
-PostgreSQL (> 9.2) Queries or from the filesystem and makes them
-suitable for bulk imports into other systems, most notably CouchDB, by
-batching the line delimited JSON.
-
-
-```js
-stream.pipe(new BulkBadger({chunksize: 300}).pipe(outputStream)
-```
-
-**Input**:
-
-```js
-{"rocko": "artischocko"}
-{"zett": "zettmeister"}
-{"mr": "mussie"}
-```
-
-**Output**:
-
-```js
-{"docs": [
-  {"rocko": "artischocko"},
-  {"zett": "zettmeister"},
-  {"mr": "mussie"}
-]}
-```
-
-**Output chunksize set to 2:**
-
-```js
-[
-  {"docs":[{"rocko":"artischocko"},{"zett":"zettmeister"}]},
-  {"docs":[{"mr":"mussie"}]}
-]
-```
-
-## Options
-
-```
-chunksize:        amount of docs in each chunk, default: 200
-```
-
-
-## Examples
-
-### Use a regular JSON file from the fs as input
-
-**testjson.json:**
-
-```js
-[
-  {"a": "b"},
-  {"b": "c"},
-  {"c": "d"}
-]
-
-```
-
-```js
-var BulkBadger = require('bulkbadger')
-
-var fs = require('fs')
-var JSONStream = require('JSONStream')
-
-fs
-  .createReadStream('./testjson.json')
-  .pipe(JSONStream.parse('*'))
-  .pipe(new BulkBadger({chunksize: 2}))
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)
-
-```
-
-### Use a CSV file as input
-
-
-```js
-var BulkBadger = require('bulkbadger')
-
-var parse = require('csv-parse')
-var fs = require('fs')
-var transform = require('stream-transform')
-var JSONStream = require('JSONStream')
-
-
-var parser = parse({comment: '#', delimiter: ':'})
-var input = fs.createReadStream('/etc/passwd')
-
-
-var transformer = transform(function (record, cb) {
-
-  var username = record[0]
-  var pw = record[1]
-  var uid = record[2]
-  var gid = record[3]
-  var comment = record[4]
-  var home = record[5]
-  var shell = record[6]
-
-  cb(null, {
-    id: username,
-    pw: pw,
-    uid: uid,
-    gid: gid,
-    comment: comment,
-    home: home,
-    shell: shell
-  })
-
-})
-
-input
-  .pipe(parser)
-  .pipe(transformer)
-  .pipe(new BulkBadger({chunksize: 2}))
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)
-
-```
-
-### Stream from MongoDB into CouchDB
-
-```js
-var MongoClient = require('mongodb').MongoClient
-var BulkBadger = require('bulkbadger')
-var CouchBulkImporter = require('./index.js').CouchBulkImporter
-
-var url = 'mongodb://localhost:27017/test'
-// Use connect method to connect to the Server
-MongoClient.connect(url, function (err, db) {
-  console.log('Connected correctly to server')
-  var col = db.collection('restaurants')
-  var stream = col.find({}, {})
-  stream
-    .pipe(new BulkBadger({chunksize: 300}))
-    .pipe(new CouchBulkImporter({
-      url: 'http://tester:testerpass@localhost:5984/restaurant'
-    })).on('error', function (e) {
-      console.log('Oh noes!')
-      console.log(e)
-    })
-
-  stream.on('error', function (e) {
-    console.log('Oh noes!')
-    console.log(e)
-  })
-  stream.on('end', function () {
-    console.log('migration finished')
-    db.close()
-  })
-})
-```
-
-### Use Line-Delimited JSON as input
-
-**ldjson.json:**
-
-```js
-{"rocko": "artischocko"}
-{"zett": "zettmeister"}
-{"mr": "mussie"}
-```
-
-```js
-var fs = require('fs')
-var JSONStream = require('JSONStream')
-
-var BulkBadger = require('bulkbadger')
-
-fs
-  .createReadStream(__dirname + '/ldjson.json')
-  .pipe(JSONStream.parse())
-  .pipe(new BulkBadger({chunksize: 2}))
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)
-  ```

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/csv.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/csv.js b/node_modules/bulkbadger/examples/csv.js
deleted file mode 100644
index adbd669..0000000
--- a/node_modules/bulkbadger/examples/csv.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var BulkBadger = require('../')
-
-var parse = require('csv-parse')
-var fs = require('fs')
-var transform = require('stream-transform')
-var JSONStream = require('JSONStream')
-
-var parser = parse({comment: '#', delimiter: ':'})
-var input = fs.createReadStream('/etc/passwd')
-
-
-var transformer = transform(function (record, cb) {
-
-  var username = record[0]
-  var pw = record[1]
-  var uid = record[2]
-  var gid = record[3]
-  var comment = record[4]
-  var home = record[5]
-  var shell = record[6]
-
-  cb(null, {
-    id: username,
-    pw: pw,
-    uid: uid,
-    gid: gid,
-    comment: comment,
-    home: home,
-    shell: shell
-  })
-})
-
-input
-  .pipe(parser)
-  .pipe(transformer)
-  .pipe(new BulkBadger())
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/json.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/json.js b/node_modules/bulkbadger/examples/json.js
deleted file mode 100644
index d6e7014..0000000
--- a/node_modules/bulkbadger/examples/json.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var fs = require('fs')
-var JSONStream = require('JSONStream')
-
-var BulkBadger = require('../')
-
-fs
-  .createReadStream(__dirname + '/testjson.json')
-  .pipe(JSONStream.parse('*'))
-  .pipe(new BulkBadger({chunksize: 2}))
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/ldjson.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/ldjson.js b/node_modules/bulkbadger/examples/ldjson.js
deleted file mode 100644
index 72d2006..0000000
--- a/node_modules/bulkbadger/examples/ldjson.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var fs = require('fs')
-var JSONStream = require('JSONStream')
-
-var BulkBadger = require('../')
-
-fs
-  .createReadStream(__dirname + '/ldjson.json')
-  .pipe(JSONStream.parse())
-  .pipe(new BulkBadger({chunksize: 2}))
-  .pipe(JSONStream.stringify())
-  .pipe(process.stdout)

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/ldjson.json
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/ldjson.json b/node_modules/bulkbadger/examples/ldjson.json
deleted file mode 100644
index db96ee7..0000000
--- a/node_modules/bulkbadger/examples/ldjson.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{"rocko": "artischocko"}
-{"zett": "zettmeister"}
-{"mr": "mussie"}

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/mongo.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/mongo.js b/node_modules/bulkbadger/examples/mongo.js
deleted file mode 100644
index 7926c93..0000000
--- a/node_modules/bulkbadger/examples/mongo.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var MongoClient = require('mongodb').MongoClient
-var BulkBadger = require('../')
-var CouchBulkImporter = require('couchbulkimporter')
-
-var url = 'mongodb://localhost:27017/test'
-// Use connect method to connect to the Server
-MongoClient.connect(url, function (err, db) {
-  console.log('Connected correctly to server')
-  var col = db.collection('restaurants')
-  var stream = col.find({}, {})
-  stream
-    .pipe(new BulkBadger({chunksize: 300}))
-    .pipe(new CouchBulkImporter({
-      url: 'http://tester:testerpass@localhost:5984/restaurant'
-    })).on('error', function (e) {
-      console.log('Oh noes!')
-      console.log(e)
-    })
-
-  stream.on('error', function (e) {
-    console.log('Oh noes!')
-    console.log(e)
-  })
-  stream.on('end', function () {
-    console.log('migration finished')
-    db.close()
-  })
-})

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/examples/testjson.json
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/examples/testjson.json b/node_modules/bulkbadger/examples/testjson.json
deleted file mode 100644
index b9c562a..0000000
--- a/node_modules/bulkbadger/examples/testjson.json
+++ /dev/null
@@ -1,5 +0,0 @@
-[
-  {"a": "b"},
-  {"b": "c"},
-  {"c": "d"}
-]

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/index.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/index.js b/node_modules/bulkbadger/index.js
deleted file mode 100644
index bba7198..0000000
--- a/node_modules/bulkbadger/index.js
+++ /dev/null
@@ -1,41 +0,0 @@
-const util = require('util')
-const Transform = require('stream').Transform
-
-module.exports = BulkBadger
-function BulkBadger (options) {
-
-  if (!options) options = {}
-  if (!options.chunksize) options.chunksize = 200
-
-  Transform.call(this, {
-    decodeStrings: false,
-    objectMode: true
-  })
-
-  this.buffer = []
-  this.chunksize = options.chunksize
-}
-
-util.inherits(BulkBadger, Transform)
-
-BulkBadger.prototype._transform = transform
-function transform (chunk, encoding, done) {
-
-  this.buffer.push(chunk)
-  if (this.buffer.length >= this.chunksize) {
-    this.push({docs: this.buffer})
-    this.buffer = []
-  }
-
-  done()
-}
-
-BulkBadger.prototype._flush = flush
-function flush (done) {
-
-  this.buffer.length && this.push({docs: this.buffer})
-  done()
-}
-
-// Happy badging!
-// https://www.youtube.com/watch?v=EIyixC9NsLI

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/.bin/JSONStream
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/.bin/JSONStream b/node_modules/bulkbadger/node_modules/.bin/JSONStream
deleted file mode 120000
index 4490737..0000000
--- a/node_modules/bulkbadger/node_modules/.bin/JSONStream
+++ /dev/null
@@ -1 +0,0 @@
-../JSONStream/index.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/.npmignore
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/.npmignore b/node_modules/bulkbadger/node_modules/JSONStream/.npmignore
deleted file mode 100644
index a9a9d58..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/*
-node_modules

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/.travis.yml
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/.travis.yml b/node_modules/bulkbadger/node_modules/JSONStream/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
-  - "0.10"

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.APACHE2
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.APACHE2 b/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.APACHE2
deleted file mode 100644
index 6366c04..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.APACHE2
+++ /dev/null
@@ -1,15 +0,0 @@
-Apache License, Version 2.0
-
-Copyright (c) 2011 Dominic Tarr
-
-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.

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.MIT
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.MIT b/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.MIT
deleted file mode 100644
index 6eafbd7..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/LICENSE.MIT
+++ /dev/null
@@ -1,24 +0,0 @@
-The MIT License
-
-Copyright (c) 2011 Dominic Tarr
-
-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.

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/examples/all_docs.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/examples/all_docs.js b/node_modules/bulkbadger/node_modules/JSONStream/examples/all_docs.js
deleted file mode 100644
index fa87fe5..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/examples/all_docs.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var request = require('request')
-  , JSONStream = require('JSONStream')
-  , es = require('event-stream')
-
-var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array)
-  , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})
-  , logger = es.mapSync(function (data) {  //create a stream that logs to stderr,
-    console.error(data)
-    return data  
-  })
-
-req.pipe(parser)
-parser.pipe(logger)

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/6436833c/node_modules/bulkbadger/node_modules/JSONStream/index.js
----------------------------------------------------------------------
diff --git a/node_modules/bulkbadger/node_modules/JSONStream/index.js b/node_modules/bulkbadger/node_modules/JSONStream/index.js
deleted file mode 100755
index ec30105..0000000
--- a/node_modules/bulkbadger/node_modules/JSONStream/index.js
+++ /dev/null
@@ -1,201 +0,0 @@
-#! /usr/bin/env node
-
-var Parser = require('jsonparse')
-  , through = require('through')
-
-/*
-
-  the value of this.stack that creationix's jsonparse has is weird.
-
-  it makes this code ugly, but his problem is way harder that mine,
-  so i'll forgive him.
-
-*/
-
-exports.parse = function (path, map) {
-
-  var parser = new Parser()
-  var stream = through(function (chunk) {
-    if('string' === typeof chunk)
-      chunk = new Buffer(chunk)
-    parser.write(chunk)
-  },
-  function (data) {
-    if(data)
-      stream.write(data)
-    stream.queue(null)
-  })
-
-  if('string' === typeof path)
-    path = path.split('.').map(function (e) {
-      if (e === '*')
-        return true
-      else if (e === '') // '..'.split('.') returns an empty string
-        return {recurse: true}
-      else
-        return e
-    })
-
-
-  var count = 0, _key
-  if(!path || !path.length)
-    path = null
-
-  parser.onValue = function (value) {
-    if (!this.root)
-      stream.root = value
-
-    if(! path) return
-
-    var i = 0 // iterates on path
-    var j  = 0 // iterates on stack
-    while (i < path.length) {
-      var key = path[i]
-      var c
-      j++
-
-      if (key && !key.recurse) {
-        c = (j === this.stack.length) ? this : this.stack[j]
-        if (!c) return
-        if (! check(key, c.key)) return
-        i++
-      } else {
-        i++
-        var nextKey = path[i]
-        if (! nextKey) return
-        while (true) {
-          c = (j === this.stack.length) ? this : this.stack[j]
-          if (!c) return
-          if (check(nextKey, c.key)) {
-            i++;
-            this.stack[j].value = null
-            break
-          }
-          j++
-        }
-      }
-
-    }
-    if (j !== this.stack.length) return
-
-    count ++
-    var actualPath = this.stack.slice(1).map(function(element) { return element.key }).concat([this.key])
-    var data = this.value[this.key]
-    if(null != data)
-      if(null != (data = map ? map(data, actualPath) : data))
-        stream.queue(data)
-    delete this.value[this.key]
-    for(var k in this.stack)
-      this.stack[k].value = null
-  }
-  parser._onToken = parser.onToken;
-
-  parser.onToken = function (token, value) {
-    parser._onToken(token, value);
-    if (this.stack.length === 0) {
-      if (stream.root) {
-        if(!path)
-          stream.queue(stream.root)
-        count = 0;
-        stream.root = null;
-      }
-    }
-  }
-  
-  parser.onError = function (err) {
-    if(err.message.indexOf("at position") > -1)
-      err.message = "Invalid JSON (" + err.message + ")";
-    stream.emit('error', err)
-  }
-
-
-  return stream
-}
-
-function check (x, y) {
-  if ('string' === typeof x)
-    return y == x
-  else if (x && 'function' === typeof x.exec)
-    return x.exec(y)
-  else if ('boolean' === typeof x)
-    return x
-  else if ('function' === typeof x)
-    return x(y)
-  return false
-}
-
-exports.stringify = function (op, sep, cl, indent) {
-  indent = indent || 0
-  if (op === false){
-    op = ''
-    sep = '\n'
-    cl = ''
-  } else if (op == null) {
-
-    op = '[\n'
-    sep = '\n,\n'
-    cl = '\n]\n'
-
-  }
-
-  //else, what ever you like
-
-  var stream
-    , first = true
-    , anyData = false
-  stream = through(function (data) {
-    anyData = true
-    var json = JSON.stringify(data, null, indent)
-    if(first) { first = false ; stream.queue(op + json)}
-    else stream.queue(sep + json)
-  },
-  function (data) {
-    if(!anyData)
-      stream.queue(op)
-    stream.queue(cl)
-    stream.queue(null)
-  })
-
-  return stream
-}
-
-exports.stringifyObject = function (op, sep, cl, indent) {
-  indent = indent || 0
-  if (op === false){
-    op = ''
-    sep = '\n'
-    cl = ''
-  } else if (op == null) {
-
-    op = '{\n'
-    sep = '\n,\n'
-    cl = '\n}\n'
-
-  }
-
-  //else, what ever you like
-
-  var first = true
-    , anyData = false
-  stream = through(function (data) {
-    anyData = true
-    var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent)
-    if(first) { first = false ; this.queue(op + json)}
-    else this.queue(sep + json)
-  },
-  function (data) {
-    if(!anyData) this.queue(op)
-    this.queue(cl)
-
-    this.queue(null)
-  })
-
-  return stream
-}
-
-if(!module.parent && process.title !== 'browser') {
-  process.stdin
-    .pipe(exports.parse(process.argv[2]))
-    .pipe(exports.stringify('[', ',\n', ']\n', 2))
-    .pipe(process.stdout)
-}


Mime
View raw message