You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2015/04/01 16:22:50 UTC
[23/52] [abbrv] [partial] cordova-firefoxos git commit: CB-4548
Install new node-firefox-* dependencies in node_modules
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/async.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/async.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/async.js
new file mode 100644
index 0000000..6f32b10
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/async.js
@@ -0,0 +1,111 @@
+/**
+ * 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:</p>
+ *
+ * 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 = require("./global.js").process;
+
+function Async() {
+ this._isTickUsed = false;
+ this._length = 0;
+ this._lateBuffer = new Queue();
+ this._functionBuffer = new Queue(25000 * 3);
+ 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) {
+ schedule(this.consumeFunctionBuffer);
+ this._isTickUsed = true;
+ }
+};
+
+Async.prototype._reset = function Async$_reset() {
+ this._isTickUsed = false;
+ this._length = 0;
+};
+
+module.exports = new Async();
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/bluebird.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/bluebird.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/bluebird.js
new file mode 100644
index 0000000..6fd85f1
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/bluebird.js
@@ -0,0 +1,25 @@
+/**
+ * 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:</p>
+ *
+ * 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
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/call_get.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/call_get.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/call_get.js
new file mode 100644
index 0000000..2a3c1f5
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/call_get.js
@@ -0,0 +1,55 @@
+/**
+ * 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:</p>
+ *
+ * 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) {
+ Promise.prototype.call = function Promise$call(propertyName) {
+ var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
+
+ return this._then(function(obj) {
+ return obj[propertyName].apply(obj, args);
+ },
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ this.call
+ );
+ };
+
+ function Promise$getter(obj) {
+ var prop = typeof this === "string"
+ ? this
+ : ("" + this);
+ return obj[prop];
+ }
+ Promise.prototype.get = function Promise$get(propertyName) {
+ return this._then(
+ Promise$getter,
+ void 0,
+ void 0,
+ propertyName,
+ void 0,
+ this.get
+ );
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/cancel.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/cancel.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/cancel.js
new file mode 100644
index 0000000..542b488
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/cancel.js
@@ -0,0 +1,77 @@
+/**
+ * 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:</p>
+ *
+ * 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 async = require("./async.js");
+ var CancellationError = errors.CancellationError;
+ var SYNC_TOKEN = {};
+
+ Promise.prototype._cancel = function Promise$_cancel() {
+ if (!this.isCancellable()) return this;
+ var parent;
+ if ((parent = this._cancellationParent) !== void 0) {
+ parent.cancel(SYNC_TOKEN);
+ return;
+ }
+ var err = new CancellationError();
+ this._attachExtraTrace(err);
+ this._rejectUnchecked(err);
+ };
+
+ Promise.prototype.cancel = function Promise$cancel(token) {
+ if (!this.isCancellable()) return this;
+ if (token === SYNC_TOKEN) {
+ this._cancel();
+ return this;
+ }
+ async.invokeLater(this._cancel, this, void 0);
+ 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._setTrace(this.uncancellable, this);
+ ret._follow(this);
+ ret._unsetCancellable();
+ if (this._isBound()) ret._setBoundTo(this._boundTo);
+ return ret;
+ };
+
+ Promise.prototype.fork =
+ function Promise$fork(didFulfill, didReject, didProgress) {
+ var ret = this._then(didFulfill, didReject, didProgress,
+ void 0, void 0, this.fork);
+
+ ret._setCancellable();
+ ret._cancellationParent = void 0;
+ return ret;
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/captured_trace.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/captured_trace.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/captured_trace.js
new file mode 100644
index 0000000..af34f11
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/captured_trace.js
@@ -0,0 +1,237 @@
+/**
+ * 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:</p>
+ *
+ * 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(?:[\\w.]*Promise(?:Array|Spawn)?\\$_\\w+|" +
+ "tryCatch(?:1|2|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;
+var areNamesMangled = false;
+
+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) {
+ if (!areNamesMangled) {
+ }
+ this.captureStackTrace(ignoreUntil, 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.error === "object") {
+ console.log(message);
+ }
+ }
+};
+
+areNamesMangled = CapturedTrace.prototype.captureStackTrace.name !==
+ "CapturedTrace$captureStackTrace";
+
+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 (!areNamesMangled && 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, fn) {
+ var name = fn.name;
+ var stack = new Error().stack;
+ var split = stack.split(rline);
+ var i, len = split.length;
+ for (i = 0; i < len; i += 2) {
+ if (split[i] === name) {
+ break;
+ }
+ }
+ split = split.slice(i + 2);
+ len = split.length - 2;
+ var ret = "";
+ for (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;
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/catch_filter.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/catch_filter.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/catch_filter.js
new file mode 100644
index 0000000..8b42af1
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/catch_filter.js
@@ -0,0 +1,93 @@
+/**
+ * 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:</p>
+ *
+ * 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;
+
+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._isBound() ? promise._boundTo : void 0;
+ 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;
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/direct_resolve.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/direct_resolve.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/direct_resolve.js
new file mode 100644
index 0000000..f4d5384
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/direct_resolve.js
@@ -0,0 +1,83 @@
+/**
+ * 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:</p>
+ *
+ * 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,
+ this.thenReturn
+ );
+ }
+ return this._then(returner, void 0, void 0,
+ value, void 0, this.thenReturn);
+};
+
+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,
+ this.thenThrow
+ );
+ }
+ return this._then(thrower, void 0, void 0,
+ reason, void 0, this.thenThrow);
+};
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors.js
new file mode 100644
index 0000000..35fb66e
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors.js
@@ -0,0 +1,114 @@
+/**
+ * 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:</p>
+ *
+ * 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 global = require("./global.js");
+var Objectfreeze = require("./es5.js").freeze;
+var util = require("./util.js");
+var inherits = util.inherits;
+var notEnumerableProp = util.notEnumerableProp;
+var Error = global.Error;
+
+function markAsOriginatingFromRejection(e) {
+ try {
+ notEnumerableProp(e, "isAsync", true);
+ }
+ catch(ignore) {}
+}
+
+function originatesFromRejection(e) {
+ if (e == null) return false;
+ return ((e instanceof RejectionError) ||
+ e["isAsync"] === 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 = global.TypeError;
+if (typeof TypeError !== "function") {
+ TypeError = subError("TypeError", "type error");
+}
+var RangeError = global.RangeError;
+if (typeof RangeError !== "function") {
+ RangeError = subError("RangeError", "range error");
+}
+var CancellationError = subError("CancellationError", "cancellation error");
+var TimeoutError = subError("TimeoutError", "timeout error");
+
+function RejectionError(message) {
+ this.name = "RejectionError";
+ this.message = message;
+ this.cause = message;
+ this.isAsync = true;
+
+ if (message instanceof Error) {
+ this.message = message.message;
+ this.stack = message.stack;
+ }
+ else if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+
+}
+inherits(RejectionError, Error);
+
+var key = "__BluebirdErrorTypes__";
+var errorTypes = global[key];
+if (!errorTypes) {
+ errorTypes = Objectfreeze({
+ CancellationError: CancellationError,
+ TimeoutError: TimeoutError,
+ RejectionError: RejectionError
+ });
+ notEnumerableProp(global, key, errorTypes);
+}
+
+module.exports = {
+ Error: Error,
+ TypeError: TypeError,
+ RangeError: RangeError,
+ CancellationError: errorTypes.CancellationError,
+ RejectionError: errorTypes.RejectionError,
+ TimeoutError: errorTypes.TimeoutError,
+ originatesFromRejection: originatesFromRejection,
+ markAsOriginatingFromRejection: markAsOriginatingFromRejection,
+ canAttach: canAttach
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors_api_rejection.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors_api_rejection.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors_api_rejection.js
new file mode 100644
index 0000000..e953e3b
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/errors_api_rejection.js
@@ -0,0 +1,38 @@
+/**
+ * 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:</p>
+ *
+ * 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;
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/es5.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/es5.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/es5.js
new file mode 100644
index 0000000..e22a0a9
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/es5.js
@@ -0,0 +1,89 @@
+/**
+ * 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:</p>
+ *
+ * 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;
+
+ function ObjectKeys(o) {
+ var ret = [];
+ for (var key in o) {
+ if (has.call(o, key)) {
+ ret.push(key);
+ }
+ }
+ return ret;
+ }
+
+ function ObjectDefineProperty(o, key, desc) {
+ o[key] = desc.value;
+ return o;
+ }
+
+ function ObjectFreeze(obj) {
+ return obj;
+ }
+
+ function ObjectGetPrototypeOf(obj) {
+ try {
+ return Object(obj).constructor.prototype;
+ }
+ catch (e) {
+ return proto;
+ }
+ }
+
+ 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
+ };
+}
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/filter.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/filter.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/filter.js
new file mode 100644
index 0000000..a4b8ae7
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/filter.js
@@ -0,0 +1,53 @@
+/**
+ * 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:</p>
+ *
+ * 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 isArray = require("./util.js").isArray;
+
+ function Promise$_filter(booleans) {
+ var values = this._settledValue;
+ 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;
+ return ret;
+ }
+
+ var ref = {ref: null};
+ Promise.filter = function Promise$Filter(promises, fn) {
+ return Promise.map(promises, fn, ref)
+ ._then(Promise$_filter, void 0, void 0,
+ ref.ref, void 0, Promise.filter);
+ };
+
+ Promise.prototype.filter = function Promise$filter(fn) {
+ return this.map(fn, ref)
+ ._then(Promise$_filter, void 0, void 0,
+ ref.ref, void 0, this.filter);
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/finally.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/finally.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/finally.js
new file mode 100644
index 0000000..ef1e0ef
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/finally.js
@@ -0,0 +1,132 @@
+/**
+ * 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:</p>
+ *
+ * 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) {
+ 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 makeReturner(r) {
+ return function Promise$_returner() {
+ return r;
+ };
+ }
+ function makeThrower(r) {
+ return function Promise$_thrower() {
+ throw r;
+ };
+ }
+ function promisedFinally(ret, reasonOrValue, isFulfilled) {
+ var useConstantFunction =
+ wrapsPrimitiveReceiver && isPrimitive(reasonOrValue);
+
+ if (isFulfilled) {
+ return ret._then(
+ useConstantFunction
+ ? returnThis
+ : makeReturner(reasonOrValue),
+ thrower, void 0, reasonOrValue, void 0, promisedFinally);
+ }
+ else {
+ return ret._then(
+ useConstantFunction
+ ? throwThis
+ : makeThrower(reasonOrValue),
+ thrower, void 0, reasonOrValue, void 0, promisedFinally);
+ }
+ }
+
+ 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 = Promise._cast(ret, finallyHandler, 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 = Promise._cast(ret, tapHandler, void 0);
+ if (maybePromise instanceof Promise) {
+ return promisedFinally(maybePromise, value, true);
+ }
+ }
+ return value;
+ }
+
+ Promise.prototype._passThroughHandler =
+ function Promise$_passThroughHandler(handler, isFinally, caller) {
+ 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, caller);
+ };
+
+ Promise.prototype.lastly =
+ Promise.prototype["finally"] = function Promise$finally(handler) {
+ return this._passThroughHandler(handler, true, this.lastly);
+ };
+
+ Promise.prototype.tap = function Promise$tap(handler) {
+ return this._passThroughHandler(handler, false, this.tap);
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/generators.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/generators.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/generators.js
new file mode 100644
index 0000000..9632ae7
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/generators.js
@@ -0,0 +1,56 @@
+/**
+ * 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:</p>
+ *
+ * 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) {
+ var PromiseSpawn = require("./promise_spawn.js")(Promise, INTERNAL);
+ var errors = require("./errors.js");
+ var TypeError = errors.TypeError;
+ var deprecated = require("./util.js").deprecated;
+
+ Promise.coroutine = function Promise$Coroutine(generatorFunction) {
+ if (typeof generatorFunction !== "function") {
+ throw new TypeError("generatorFunction must be a function");
+ }
+ var PromiseSpawn$ = PromiseSpawn;
+ return function anonymous() {
+ var generator = generatorFunction.apply(this, arguments);
+ var spawn = new PromiseSpawn$(void 0, void 0, anonymous);
+ spawn._generator = generator;
+ spawn._next(void 0);
+ return spawn.promise();
+ };
+ };
+
+ Promise.coroutine.addYieldHandler = PromiseSpawn.addYieldHandler;
+
+ 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, Promise.spawn);
+ var ret = spawn.promise();
+ spawn._run(Promise.spawn);
+ return ret;
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/global.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/global.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/global.js
new file mode 100644
index 0000000..1ab1947
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/global.js
@@ -0,0 +1,42 @@
+/**
+ * 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:</p>
+ *
+ * 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(){
+ if (typeof this !== "undefined") {
+ return this;
+ }
+ if (typeof process !== "undefined" &&
+ typeof global !== "undefined" &&
+ typeof process.execPath === "string") {
+ return global;
+ }
+ if (typeof window !== "undefined" &&
+ typeof document !== "undefined" &&
+ typeof navigator !== "undefined" && navigator !== null &&
+ typeof navigator.appName === "string") {
+ if(window.wrappedJSObject !== undefined){
+ return window.wrappedJSObject;
+ }
+ return window;
+ }
+})();
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/map.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/map.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/map.js
new file mode 100644
index 0000000..b2a36b0
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/map.js
@@ -0,0 +1,127 @@
+/**
+ * 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:</p>
+ *
+ * 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, Promise$_CreatePromiseArray, PromiseArray, apiRejection) {
+
+ function Promise$_mapper(values) {
+ var fn = this;
+ var receiver = void 0;
+
+ if (typeof fn !== "function") {
+ receiver = fn.receiver;
+ fn = fn.fn;
+ }
+ var shouldDefer = false;
+
+ var ret = new Array(values.length);
+
+ if (receiver === void 0) {
+ for (var i = 0, len = values.length; i < len; ++i) {
+ var value = fn(values[i], i, len);
+ if (!shouldDefer) {
+ var maybePromise = Promise._cast(value,
+ Promise$_mapper, void 0);
+ if (maybePromise instanceof Promise) {
+ if (maybePromise.isFulfilled()) {
+ ret[i] = maybePromise._settledValue;
+ continue;
+ }
+ else {
+ shouldDefer = true;
+ }
+ value = maybePromise;
+ }
+ }
+ ret[i] = value;
+ }
+ }
+ else {
+ for (var i = 0, len = values.length; i < len; ++i) {
+ var value = fn.call(receiver, values[i], i, len);
+ if (!shouldDefer) {
+ var maybePromise = Promise._cast(value,
+ Promise$_mapper, void 0);
+ if (maybePromise instanceof Promise) {
+ if (maybePromise.isFulfilled()) {
+ ret[i] = maybePromise._settledValue;
+ continue;
+ }
+ else {
+ shouldDefer = true;
+ }
+ value = maybePromise;
+ }
+ }
+ ret[i] = value;
+ }
+ }
+ return shouldDefer
+ ? Promise$_CreatePromiseArray(ret, PromiseArray,
+ Promise$_mapper, void 0).promise()
+ : ret;
+ }
+
+ function Promise$_Map(promises, fn, useBound, caller, ref) {
+ if (typeof fn !== "function") {
+ return apiRejection("fn must be a function");
+ }
+
+ if (useBound === true && promises._isBound()) {
+ fn = {
+ fn: fn,
+ receiver: promises._boundTo
+ };
+ }
+
+ var ret = Promise$_CreatePromiseArray(
+ promises,
+ PromiseArray,
+ caller,
+ useBound === true && promises._isBound()
+ ? promises._boundTo
+ : void 0
+ ).promise();
+
+ if (ref !== void 0) {
+ ref.ref = ret;
+ }
+
+ return ret._then(
+ Promise$_mapper,
+ void 0,
+ void 0,
+ fn,
+ void 0,
+ caller
+ );
+ }
+
+ Promise.prototype.map = function Promise$map(fn, ref) {
+ return Promise$_Map(this, fn, true, this.map, ref);
+ };
+
+ Promise.map = function Promise$Map(promises, fn, ref) {
+ return Promise$_Map(promises, fn, false, Promise.map, ref);
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/nodeify.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/nodeify.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/nodeify.js
new file mode 100644
index 0000000..9fe25f9
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/nodeify.js
@@ -0,0 +1,64 @@
+/**
+ * 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:</p>
+ *
+ * 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$_successAdapter(val, receiver) {
+ var nodeback = this;
+ var ret = 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) {
+ if (typeof nodeback == "function") {
+ this._then(
+ Promise$_successAdapter,
+ Promise$_errorAdapter,
+ void 0,
+ nodeback,
+ this._isBound() ? this._boundTo : null,
+ this.nodeify
+ );
+ return;
+ }
+ return this;
+ };
+};
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/b2b43200/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/progress.js
----------------------------------------------------------------------
diff --git a/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/progress.js b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/progress.js
new file mode 100644
index 0000000..106bc58
--- /dev/null
+++ b/node_modules/node-firefox-find-devices/node_modules/adbkit/node_modules/bluebird/js/main/progress.js
@@ -0,0 +1,113 @@
+/**
+ * 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:</p>
+ *
+ * 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, isPromiseArrayProxy) {
+ 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, this.progressed);
+ };
+
+ Promise.prototype._progress = function Promise$_progress(progressValue) {
+ if (this._isFollowingOrFulfilledOrRejected()) return;
+ this._progressUnchecked(progressValue);
+
+ };
+
+ Promise.prototype._progressHandlerAt =
+ function Promise$_progressHandlerAt(index) {
+ if (index === 0) return this._progressHandler0;
+ return this[index + 2 - 5];
+ };
+
+ Promise.prototype._doProgressWith =
+ function Promise$_doProgressWith(progression) {
+ var progressValue = progression.value;
+ var handler = progression.handler;
+ var promise = progression.promise;
+ var receiver = progression.receiver;
+
+ this._pushContext();
+ var ret = tryCatch1(handler, receiver, progressValue);
+ this._popContext();
+
+ 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 (Promise.is(ret)) {
+ ret._then(promise._progress, null, null, promise, void 0,
+ this._progress);
+ }
+ else {
+ promise._progress(ret);
+ }
+ };
+
+
+ Promise.prototype._progressUnchecked =
+ function Promise$_progressUnchecked(progressValue) {
+ if (!this.isPending()) return;
+ var len = this._length();
+
+ for (var i = 0; i < len; i += 5) {
+ var handler = this._progressHandlerAt(i);
+ var promise = this._promiseAt(i);
+ if (!Promise.is(promise)) {
+ var receiver = this._receiverAt(i);
+ if (typeof handler === "function") {
+ handler.call(receiver, progressValue, promise);
+ }
+ else if (Promise.is(receiver) && receiver._isProxied()) {
+ receiver._progressUnchecked(progressValue);
+ }
+ else if (isPromiseArrayProxy(receiver, promise)) {
+ 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(promise._progress, promise, progressValue);
+ }
+ }
+ };
+};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org