better-promise-error-log
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -9,2 +9,6 @@ # Changelog | ||
## [1.5.1] - 2019-05-01 | ||
### Changed | ||
- Updated jsonifyError to 1.4.5 (no longer crashes on circular references) | ||
## [1.5.0] - 2019-01-30 | ||
@@ -78,8 +82,9 @@ ### Changed | ||
[Unreleased]: https://github.com/papb/jsonify-error/compare/v1.5.0...HEAD | ||
[1.4.5]: https://github.com/papb/jsonify-error/compare/v1.4.5...v1.5.0 | ||
[1.4.4]: https://github.com/papb/jsonify-error/compare/v1.4.4...v1.4.5 | ||
[1.4.3]: https://github.com/papb/jsonify-error/compare/v1.4.3...v1.4.4 | ||
[1.4.2]: https://github.com/papb/jsonify-error/compare/v1.4.2...v1.4.3 | ||
[1.4.1]: https://github.com/papb/jsonify-error/compare/v1.4.1...v1.4.2 | ||
[Unreleased]: https://github.com/papb/jsonify-error/compare/v1.5.1...HEAD | ||
[1.5.1]: https://github.com/papb/jsonify-error/compare/v1.5.0...v1.5.1 | ||
[1.5.0]: https://github.com/papb/jsonify-error/compare/v1.4.5...v1.5.0 | ||
[1.4.5]: https://github.com/papb/jsonify-error/compare/v1.4.4...v1.4.5 | ||
[1.4.4]: https://github.com/papb/jsonify-error/compare/v1.4.3...v1.4.4 | ||
[1.4.3]: https://github.com/papb/jsonify-error/compare/v1.4.2...v1.4.3 | ||
[1.4.2]: https://github.com/papb/jsonify-error/compare/v1.4.1...v1.4.2 | ||
[1.4.1]: https://github.com/papb/jsonify-error/compare/v1.4.0...v1.4.1 | ||
@@ -86,0 +91,0 @@ [1.4.0]: https://github.com/papb/jsonify-error/compare/v1.3.0...v1.4.0 |
@@ -29,3 +29,32 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
},{"jsonify-error":3}],3:[function(require,module,exports){ | ||
},{"jsonify-error":4}],3:[function(require,module,exports){ | ||
exports = module.exports = stringify | ||
exports.getSerialize = serializer | ||
function stringify(obj, replacer, spaces, cycleReplacer) { | ||
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) | ||
} | ||
function serializer(replacer, cycleReplacer) { | ||
var stack = [], keys = [] | ||
if (cycleReplacer == null) cycleReplacer = function(key, value) { | ||
if (stack[0] === value) return "[Circular ~]" | ||
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" | ||
} | ||
return function(key, value) { | ||
if (stack.length > 0) { | ||
var thisPos = stack.indexOf(this) | ||
~thisPos ? stack.splice(thisPos + 1) : stack.push(this) | ||
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) | ||
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) | ||
} | ||
else stack.push(value) | ||
return replacer == null ? value : replacer.call(this, key, value) | ||
} | ||
} | ||
},{}],4:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -44,3 +73,3 @@ | ||
module.exports.asString = toString; | ||
},{"./lib/jsonify-error":7,"./lib/log":4,"./lib/override-console":8,"./lib/override-error-methods":9,"./lib/to-string":10}],4:[function(require,module,exports){ | ||
},{"./lib/jsonify-error":8,"./lib/log":5,"./lib/override-console":9,"./lib/override-error-methods":10,"./lib/to-string":11}],5:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -54,3 +83,3 @@ | ||
}; | ||
},{"./../map-arg":5}],5:[function(require,module,exports){ | ||
},{"./../map-arg":6}],6:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -65,3 +94,3 @@ | ||
}; | ||
},{"./../jsonify-error":7}],6:[function(require,module,exports){ | ||
},{"./../jsonify-error":8}],7:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -79,3 +108,3 @@ | ||
}; | ||
},{}],7:[function(require,module,exports){ | ||
},{}],8:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -104,3 +133,3 @@ | ||
}; | ||
},{"./get-superclasses":6}],8:[function(require,module,exports){ | ||
},{"./get-superclasses":7}],9:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -128,3 +157,3 @@ | ||
}; | ||
},{"./map-arg":5}],9:[function(require,module,exports){ | ||
},{"./map-arg":6}],10:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -160,5 +189,6 @@ | ||
}; | ||
},{"./jsonify-error":7,"./to-string":10}],10:[function(require,module,exports){ | ||
},{"./jsonify-error":8,"./to-string":11}],11:[function(require,module,exports){ | ||
"use strict"; | ||
const stringify = require("json-stringify-safe"); | ||
const jsonifyError = require("./jsonify-error"); | ||
@@ -180,5 +210,6 @@ | ||
const asJSON = jsonifyError(error); | ||
return `${asJSON.className}: ${asJSON.message} ${JSON.stringify(asJSON, null, amountOfSpaces)}`; | ||
return `${asJSON.className}: ${asJSON.message} ${stringify(asJSON, null, amountOfSpaces)}`; | ||
}; | ||
},{"./jsonify-error":7}]},{},[1]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9iZXR0ZXItcHJvbWlzZS1lcnJvci1sb2ctYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbG9nLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbWFwLWFyZy5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9y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HJldHVybiBgJHthc0pTT04uY2xhc3NOYW1lfTogJHthc0pTT04ubWVzc2FnZX0gJHtKU09OLnN0cmluZ2lmeShhc0pTT04sIG51bGwsIGFtb3VudE9mU3BhY2VzKX1gO1xufTsiXX0= | ||
},{"./jsonify-error":8,"json-stringify-safe":3}]},{},[1]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9iZXR0ZXItcHJvbWlzZS1lcnJvci1sb2ctYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9qc29uLXN0cmluZ2lmeS1zYWZlL3N0cmluZ2lmeS5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbG9nLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbWFwLWFyZy5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2xpYi9nZXQtc3VwZXJjbGFzc2VzLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2pzb25pZnktZXJyb3IuanMiLCJub2RlX21vZHVsZXMvanNvbmlmeS1lcnJvci9saWIvb3ZlcnJpZGUtY29uc29sZS5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2xpYi9vdmVycmlkZS1lcnJvci1tZXRob2RzLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL3RvLXN0cmluZy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBOztBQUNBLFFBQVEsZ0NBQVI7OztBQ0RBO0FBQ0E7O0FBQ0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gbXVzdCBiZSBpbnN0YW5jZSBvZiBFcnJvci5cIik7XG4gICAgY29uc3QgYXNKU09OID0ganNvbmlmeUVycm9yKGVycm9yKTtcbiAgICByZXR1cm4gYCR7YXNKU09OLmNsYXNzTmFtZX06ICR7YXNKU09OLm1lc3NhZ2V9ICR7c3RyaW5naWZ5KGFzSlNPTiwgbnVsbCwgYW1vdW50T2ZTcGFjZXMpfWA7XG59O1xuIl19 |
@@ -1,1 +0,1 @@ | ||
!function(){return function r(e,o,n){function t(i,c){if(!o[i]){if(!e[i]){var a="function"==typeof require&&require;if(!c&&a)return a(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[i]={exports:{}};e[i][0].call(l.exports,function(r){return t(e[i][1][r]||r)},l,l.exports,r,e,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}}()({1:[function(r,e,o){"use strict";r("./lib/better-promise-error-log")},{"./lib/better-promise-error-log":2}],2:[function(r,e,o){"use strict";var n=r("jsonify-error");window.addEventListener("unhandledrejection",function(r){var e=void 0;r.reason&&(e=r.reason),r.detail&&r.detail.reason&&(e=r.detail.reason),e instanceof Error?console.error("Unhandled error in promise:",n(e)):e?console.error("Unhandled rejection in promise:",e):console.error("Unhandled rejection in promise with undefined reason.")})},{"jsonify-error":3}],3:[function(r,e,o){"use strict";const n=r("./lib/jsonify-error"),t=r("./lib/override-console"),s=r("./lib/override-error-methods"),i=r("./lib/log"),c=r("./lib/to-string");e.exports=n,e.exports.overrideConsole=t,e.exports.overrideErrorMethods=s,e.exports.log=i,e.exports.asString=c},{"./lib/jsonify-error":7,"./lib/log":4,"./lib/override-console":8,"./lib/override-error-methods":9,"./lib/to-string":10}],4:[function(r,e,o){"use strict";const n=r("./../map-arg");e.exports=function(r){console.error(n(r))}},{"./../map-arg":5}],5:[function(r,e,o){"use strict";const n=r("./../jsonify-error");e.exports=function(r){return r instanceof Error?n(r):r}},{"./../jsonify-error":7}],6:[function(r,e,o){"use strict";e.exports=function(r){const e=[];let o=Object.getPrototypeOf(r);for(null!==o&&(o=Object.getPrototypeOf(o));null!==o;)e.push(o.constructor.name),o=Object.getPrototypeOf(o);return e}},{}],7:[function(r,e,o){"use strict";const n=r("./get-superclasses");e.exports=function(r){if(!(r instanceof Error))return r;const e={};e.name=r.name||"<no name available>",e.className=r.constructor.name||"<no class name available>",e.message=r.message||"<no message available>",e.superclasses=n(r),e.enumerableFields={};for(const o in r)"function"!=typeof r[o]&&(e.enumerableFields[o]=r[o]);return"string"==typeof r.stack&&r.stack.length>0?e.stack=r.stack.split("\n").map(r=>r.replace(/^\s+/,"")).filter(r=>r):e.stack=r.stack||"<no stack trace available>",e}},{"./get-superclasses":6}],8:[function(r,e,o){"use strict";const n=r("./map-arg"),t=["log","debug","info","warn","error"];let s=!1;e.exports=function(){if(s)return;s=!0;const r={};for(const e of t)console[e]&&(r[e]=console[e].bind(console),console[e]=function(...o){r[e](...o.map(n))})}},{"./map-arg":5}],9:[function(r,e,o){"use strict";const n=r("./jsonify-error"),t=r("./to-string");e.exports=function(){Error.prototype.toJSON=function(){return n(this)},Error.prototype.toString=function(r=4){return t(this,r)}}},{"./jsonify-error":7,"./to-string":10}],10:[function(r,e,o){"use strict";const n=r("./jsonify-error");e.exports=function(r,e=4){if(!(r instanceof Error))throw new TypeError("jsonifyError.toString() error: First argument must be instance of Error.");const o=n(r);return`${o.className}: ${o.message} ${JSON.stringify(o,null,e)}`}},{"./jsonify-error":7}]},{},[1]); | ||
!function(){return function r(e,o,n){function t(i,c){if(!o[i]){if(!e[i]){var a="function"==typeof require&&require;if(!c&&a)return a(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[i]={exports:{}};e[i][0].call(l.exports,function(r){return t(e[i][1][r]||r)},l,l.exports,r,e,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}}()({1:[function(r,e,o){"use strict";r("./lib/better-promise-error-log")},{"./lib/better-promise-error-log":2}],2:[function(r,e,o){"use strict";var n=r("jsonify-error");window.addEventListener("unhandledrejection",function(r){var e=void 0;r.reason&&(e=r.reason),r.detail&&r.detail.reason&&(e=r.detail.reason),e instanceof Error?console.error("Unhandled error in promise:",n(e)):e?console.error("Unhandled rejection in promise:",e):console.error("Unhandled rejection in promise with undefined reason.")})},{"jsonify-error":4}],3:[function(r,e,o){function n(r,e){var o=[],n=[];return null==e&&(e=function(r,e){return o[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,o.indexOf(e)).join(".")+"]"}),function(t,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?n.splice(i,1/0,t):n.push(t),~o.indexOf(s)&&(s=e.call(this,t,s))}else o.push(s);return null==r?s:r.call(this,t,s)}}(e.exports=function(r,e,o,t){return JSON.stringify(r,n(e,t),o)}).getSerialize=n},{}],4:[function(r,e,o){"use strict";const n=r("./lib/jsonify-error"),t=r("./lib/override-console"),s=r("./lib/override-error-methods"),i=r("./lib/log"),c=r("./lib/to-string");e.exports=n,e.exports.overrideConsole=t,e.exports.overrideErrorMethods=s,e.exports.log=i,e.exports.asString=c},{"./lib/jsonify-error":8,"./lib/log":5,"./lib/override-console":9,"./lib/override-error-methods":10,"./lib/to-string":11}],5:[function(r,e,o){"use strict";const n=r("./../map-arg");e.exports=function(r){console.error(n(r))}},{"./../map-arg":6}],6:[function(r,e,o){"use strict";const n=r("./../jsonify-error");e.exports=function(r){return r instanceof Error?n(r):r}},{"./../jsonify-error":8}],7:[function(r,e,o){"use strict";e.exports=function(r){const e=[];let o=Object.getPrototypeOf(r);for(null!==o&&(o=Object.getPrototypeOf(o));null!==o;)e.push(o.constructor.name),o=Object.getPrototypeOf(o);return e}},{}],8:[function(r,e,o){"use strict";const n=r("./get-superclasses");e.exports=function(r){if(!(r instanceof Error))return r;const e={};e.name=r.name||"<no name available>",e.className=r.constructor.name||"<no class name available>",e.message=r.message||"<no message available>",e.superclasses=n(r),e.enumerableFields={};for(const o in r)"function"!=typeof r[o]&&(e.enumerableFields[o]=r[o]);return"string"==typeof r.stack&&r.stack.length>0?e.stack=r.stack.split("\n").map(r=>r.replace(/^\s+/,"")).filter(r=>r):e.stack=r.stack||"<no stack trace available>",e}},{"./get-superclasses":7}],9:[function(r,e,o){"use strict";const n=r("./map-arg"),t=["log","debug","info","warn","error"];let s=!1;e.exports=function(){if(s)return;s=!0;const r={};for(const e of t)console[e]&&(r[e]=console[e].bind(console),console[e]=function(...o){r[e](...o.map(n))})}},{"./map-arg":6}],10:[function(r,e,o){"use strict";const n=r("./jsonify-error"),t=r("./to-string");e.exports=function(){Error.prototype.toJSON=function(){return n(this)},Error.prototype.toString=function(r=4){return t(this,r)}}},{"./jsonify-error":8,"./to-string":11}],11:[function(r,e,o){"use strict";const n=r("json-stringify-safe"),t=r("./jsonify-error");e.exports=function(r,e=4){if(!(r instanceof Error))throw new TypeError("jsonifyError.toString() error: First argument must be instance of Error.");const o=t(r);return`${o.className}: ${o.message} ${n(o,null,e)}`}},{"./jsonify-error":8,"json-stringify-safe":3}]},{},[1]); |
@@ -26,3 +26,32 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
}); | ||
},{"jsonify-error":3}],3:[function(require,module,exports){ | ||
},{"jsonify-error":4}],3:[function(require,module,exports){ | ||
exports = module.exports = stringify | ||
exports.getSerialize = serializer | ||
function stringify(obj, replacer, spaces, cycleReplacer) { | ||
return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) | ||
} | ||
function serializer(replacer, cycleReplacer) { | ||
var stack = [], keys = [] | ||
if (cycleReplacer == null) cycleReplacer = function(key, value) { | ||
if (stack[0] === value) return "[Circular ~]" | ||
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" | ||
} | ||
return function(key, value) { | ||
if (stack.length > 0) { | ||
var thisPos = stack.indexOf(this) | ||
~thisPos ? stack.splice(thisPos + 1) : stack.push(this) | ||
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) | ||
if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) | ||
} | ||
else stack.push(value) | ||
return replacer == null ? value : replacer.call(this, key, value) | ||
} | ||
} | ||
},{}],4:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -41,3 +70,3 @@ | ||
module.exports.asString = toString; | ||
},{"./lib/jsonify-error":7,"./lib/log":4,"./lib/override-console":8,"./lib/override-error-methods":9,"./lib/to-string":10}],4:[function(require,module,exports){ | ||
},{"./lib/jsonify-error":8,"./lib/log":5,"./lib/override-console":9,"./lib/override-error-methods":10,"./lib/to-string":11}],5:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -51,3 +80,3 @@ | ||
}; | ||
},{"./../map-arg":5}],5:[function(require,module,exports){ | ||
},{"./../map-arg":6}],6:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -62,3 +91,3 @@ | ||
}; | ||
},{"./../jsonify-error":7}],6:[function(require,module,exports){ | ||
},{"./../jsonify-error":8}],7:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -76,3 +105,3 @@ | ||
}; | ||
},{}],7:[function(require,module,exports){ | ||
},{}],8:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -101,3 +130,3 @@ | ||
}; | ||
},{"./get-superclasses":6}],8:[function(require,module,exports){ | ||
},{"./get-superclasses":7}],9:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -125,3 +154,3 @@ | ||
}; | ||
},{"./map-arg":5}],9:[function(require,module,exports){ | ||
},{"./map-arg":6}],10:[function(require,module,exports){ | ||
"use strict"; | ||
@@ -157,5 +186,6 @@ | ||
}; | ||
},{"./jsonify-error":7,"./to-string":10}],10:[function(require,module,exports){ | ||
},{"./jsonify-error":8,"./to-string":11}],11:[function(require,module,exports){ | ||
"use strict"; | ||
const stringify = require("json-stringify-safe"); | ||
const jsonifyError = require("./jsonify-error"); | ||
@@ -177,5 +207,6 @@ | ||
const asJSON = jsonifyError(error); | ||
return `${asJSON.className}: ${asJSON.message} ${JSON.stringify(asJSON, null, amountOfSpaces)}`; | ||
return `${asJSON.className}: ${asJSON.message} ${stringify(asJSON, null, amountOfSpaces)}`; | ||
}; | ||
},{"./jsonify-error":7}]},{},[1]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9iZXR0ZXItcHJvbWlzZS1lcnJvci1sb2ctYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbG9nLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbWFwLWFyZy5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2xpYi9nZXQtc3VwZXJjbGFzc2VzLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2pzb25pZnktZXJyb3IuanMiLCJub2RlX21vZHVsZXMvanNvbmlmeS1lcnJvci9saWIvb3ZlcnJpZGUtY29uc29sZS5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2xpYi9vdmVycmlkZS1lcnJvci1tZXRob2RzLmpzIiwib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Ugb2YgRXJyb3JcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiB0b1N0cmluZyhlcnJvciwgYW1vdW50T2ZTcGFjZXMgPSA0KSB7XG4gICAgaWYgKCEoZXJyb3IgaW5zdGFuY2VvZiBFcnJvcikpIHRocm93IG5ldyBUeXBlRXJyb3IoXCJqc29uaWZ5RXJyb3IudG9TdHJpbmcoKSBlcnJvcjogRmlyc3QgYXJndW1lbnQgbXVzdCBiZSBpbnN0YW5jZSBvZiBFcnJvci5cIik7XG4gICAgY29uc3QgYXNKU09OID0ganNvbmlmeUVycm9yKGVycm9yKTtcbiAgICByZXR1cm4gYCR7YXNKU09OLmNsYXNzTmFtZX06ICR7YXNKU09OLm1lc3NhZ2V9ICR7SlNPTi5zdHJpbmdpZnkoYXNKU09OLCBudWxsLCBhbW91bnRPZlNwYWNlcyl9YDtcbn07Il19 | ||
},{"./jsonify-error":8,"json-stringify-safe":3}]},{},[1]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9iZXR0ZXItcHJvbWlzZS1lcnJvci1sb2ctYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9qc29uLXN0cmluZ2lmeS1zYWZlL3N0cmluZ2lmeS5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbG9nLmpzIiwibm9kZV9tb2R1bGVzL2pzb25pZnktZXJyb3IvbGliL2Jyb3dzZXItc3BlY2lmaWMvbWFwLWFyZy5qcyIsIm5vZGVfbW9kdWxlcy9qc29uaWZ5LWVycm9yL2xpYi9nZXQtc3VwZXJjbGFzc2VzLmpzIiwibm9kZV9tb2R1b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51bGwsIGFtb3VudE9mU3BhY2VzKX1gO1xufTtcbiJdfQ== |
@@ -1,1 +0,1 @@ | ||
!function(){return function r(e,o,n){function t(i,c){if(!o[i]){if(!e[i]){var a="function"==typeof require&&require;if(!c&&a)return a(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[i]={exports:{}};e[i][0].call(l.exports,function(r){return t(e[i][1][r]||r)},l,l.exports,r,e,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}}()({1:[function(r,e,o){"use strict";r("./lib/better-promise-error-log")},{"./lib/better-promise-error-log":2}],2:[function(r,e,o){"use strict";const n=r("jsonify-error");window.addEventListener("unhandledrejection",function(r){let e=void 0;r.reason&&(e=r.reason),r.detail&&r.detail.reason&&(e=r.detail.reason),e instanceof Error?console.error("Unhandled error in promise:",n(e)):e?console.error("Unhandled rejection in promise:",e):console.error("Unhandled rejection in promise with undefined reason.")})},{"jsonify-error":3}],3:[function(r,e,o){"use strict";const n=r("./lib/jsonify-error"),t=r("./lib/override-console"),s=r("./lib/override-error-methods"),i=r("./lib/log"),c=r("./lib/to-string");e.exports=n,e.exports.overrideConsole=t,e.exports.overrideErrorMethods=s,e.exports.log=i,e.exports.asString=c},{"./lib/jsonify-error":7,"./lib/log":4,"./lib/override-console":8,"./lib/override-error-methods":9,"./lib/to-string":10}],4:[function(r,e,o){"use strict";const n=r("./../map-arg");e.exports=function(r){console.error(n(r))}},{"./../map-arg":5}],5:[function(r,e,o){"use strict";const n=r("./../jsonify-error");e.exports=function(r){return r instanceof Error?n(r):r}},{"./../jsonify-error":7}],6:[function(r,e,o){"use strict";e.exports=function(r){const e=[];let o=Object.getPrototypeOf(r);for(null!==o&&(o=Object.getPrototypeOf(o));null!==o;)e.push(o.constructor.name),o=Object.getPrototypeOf(o);return e}},{}],7:[function(r,e,o){"use strict";const n=r("./get-superclasses");e.exports=function(r){if(!(r instanceof Error))return r;const e={};e.name=r.name||"<no name available>",e.className=r.constructor.name||"<no class name available>",e.message=r.message||"<no message available>",e.superclasses=n(r),e.enumerableFields={};for(const o in r)"function"!=typeof r[o]&&(e.enumerableFields[o]=r[o]);return"string"==typeof r.stack&&r.stack.length>0?e.stack=r.stack.split("\n").map(r=>r.replace(/^\s+/,"")).filter(r=>r):e.stack=r.stack||"<no stack trace available>",e}},{"./get-superclasses":6}],8:[function(r,e,o){"use strict";const n=r("./map-arg"),t=["log","debug","info","warn","error"];let s=!1;e.exports=function(){if(s)return;s=!0;const r={};for(const e of t)console[e]&&(r[e]=console[e].bind(console),console[e]=function(...o){r[e](...o.map(n))})}},{"./map-arg":5}],9:[function(r,e,o){"use strict";const n=r("./jsonify-error"),t=r("./to-string");e.exports=function(){Error.prototype.toJSON=function(){return n(this)},Error.prototype.toString=function(r=4){return t(this,r)}}},{"./jsonify-error":7,"./to-string":10}],10:[function(r,e,o){"use strict";const n=r("./jsonify-error");e.exports=function(r,e=4){if(!(r instanceof Error))throw new TypeError("jsonifyError.toString() error: First argument must be instance of Error.");const o=n(r);return`${o.className}: ${o.message} ${JSON.stringify(o,null,e)}`}},{"./jsonify-error":7}]},{},[1]); | ||
!function(){return function r(e,o,n){function t(i,c){if(!o[i]){if(!e[i]){var u="function"==typeof require&&require;if(!c&&u)return u(i,!0);if(s)return s(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var l=o[i]={exports:{}};e[i][0].call(l.exports,function(r){return t(e[i][1][r]||r)},l,l.exports,r,e,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}}()({1:[function(r,e,o){"use strict";r("./lib/better-promise-error-log")},{"./lib/better-promise-error-log":2}],2:[function(r,e,o){"use strict";const n=r("jsonify-error");window.addEventListener("unhandledrejection",function(r){let e=void 0;r.reason&&(e=r.reason),r.detail&&r.detail.reason&&(e=r.detail.reason),e instanceof Error?console.error("Unhandled error in promise:",n(e)):e?console.error("Unhandled rejection in promise:",e):console.error("Unhandled rejection in promise with undefined reason.")})},{"jsonify-error":4}],3:[function(r,e,o){function n(r,e){var o=[],n=[];return null==e&&(e=function(r,e){return o[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,o.indexOf(e)).join(".")+"]"}),function(t,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?n.splice(i,1/0,t):n.push(t),~o.indexOf(s)&&(s=e.call(this,t,s))}else o.push(s);return null==r?s:r.call(this,t,s)}}(e.exports=function(r,e,o,t){return JSON.stringify(r,n(e,t),o)}).getSerialize=n},{}],4:[function(r,e,o){"use strict";const n=r("./lib/jsonify-error"),t=r("./lib/override-console"),s=r("./lib/override-error-methods"),i=r("./lib/log"),c=r("./lib/to-string");e.exports=n,e.exports.overrideConsole=t,e.exports.overrideErrorMethods=s,e.exports.log=i,e.exports.asString=c},{"./lib/jsonify-error":8,"./lib/log":5,"./lib/override-console":9,"./lib/override-error-methods":10,"./lib/to-string":11}],5:[function(r,e,o){"use strict";const n=r("./../map-arg");e.exports=function(r){console.error(n(r))}},{"./../map-arg":6}],6:[function(r,e,o){"use strict";const n=r("./../jsonify-error");e.exports=function(r){return r instanceof Error?n(r):r}},{"./../jsonify-error":8}],7:[function(r,e,o){"use strict";e.exports=function(r){const e=[];let o=Object.getPrototypeOf(r);for(null!==o&&(o=Object.getPrototypeOf(o));null!==o;)e.push(o.constructor.name),o=Object.getPrototypeOf(o);return e}},{}],8:[function(r,e,o){"use strict";const n=r("./get-superclasses");e.exports=function(r){if(!(r instanceof Error))return r;const e={};e.name=r.name||"<no name available>",e.className=r.constructor.name||"<no class name available>",e.message=r.message||"<no message available>",e.superclasses=n(r),e.enumerableFields={};for(const o in r)"function"!=typeof r[o]&&(e.enumerableFields[o]=r[o]);return"string"==typeof r.stack&&r.stack.length>0?e.stack=r.stack.split("\n").map(r=>r.replace(/^\s+/,"")).filter(r=>r):e.stack=r.stack||"<no stack trace available>",e}},{"./get-superclasses":7}],9:[function(r,e,o){"use strict";const n=r("./map-arg"),t=["log","debug","info","warn","error"];let s=!1;e.exports=function(){if(s)return;s=!0;const r={};for(const e of t)console[e]&&(r[e]=console[e].bind(console),console[e]=function(...o){r[e](...o.map(n))})}},{"./map-arg":6}],10:[function(r,e,o){"use strict";const n=r("./jsonify-error"),t=r("./to-string");e.exports=function(){Error.prototype.toJSON=function(){return n(this)},Error.prototype.toString=function(r=4){return t(this,r)}}},{"./jsonify-error":8,"./to-string":11}],11:[function(r,e,o){"use strict";const n=r("json-stringify-safe"),t=r("./jsonify-error");e.exports=function(r,e=4){if(!(r instanceof Error))throw new TypeError("jsonifyError.toString() error: First argument must be instance of Error.");const o=t(r);return`${o.className}: ${o.message} ${n(o,null,e)}`}},{"./jsonify-error":8,"json-stringify-safe":3}]},{},[1]); |
{ | ||
"name": "better-promise-error-log", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Better error logs for unhandled errors in promises", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
"build:es5-min": "uglifyjs dist/better-promise-error-log.es5.js --compress --mangle --source-map -o dist/better-promise-error-log.es5.min.js", | ||
"build:crlf": "node helpers/ensure-crlf.js", | ||
"build:lf": "node helpers/ensure-lf.js", | ||
"build": "run-s build:*", | ||
@@ -45,3 +45,3 @@ "lint": "eslint .", | ||
"chalk": "^2.4.1", | ||
"jsonify-error": "^1.4.3" | ||
"jsonify-error": "^1.4.5" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
@@ -30,3 +30,3 @@ better-promise-error-log | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/better-promise-error-log@1.5.0/dist/better-promise-error-log.min.js" integrity="sha384-iMqka3vcgPpNOnr5S8FLFdDHhoe1aYDK0akBCYabtBl/u+rSkzii6SRO/WKCfyhV" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/better-promise-error-log@1.5.1/dist/better-promise-error-log.min.js" integrity="sha384-Q+LkmIUamDGF1TaL4yP4B02sLm+krrSWSCs/jZ9cECm7b2FrgfkFhZOI3LLS9rzm" crossorigin="anonymous"></script> | ||
``` | ||
@@ -33,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68449
465
Updatedjsonify-error@^1.4.5