@sentry/integrations
Advanced tools
Comparing version 5.10.2 to 5.11.0
@@ -6,7 +6,2 @@ (function (__window) { | ||
/** | ||
* Consumes the promise and logs the error when it rejects. | ||
* @param promise A promise to forget. | ||
*/ | ||
/*! ***************************************************************************** | ||
@@ -41,2 +36,18 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
var __assign = function() { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
/** | ||
* Consumes the promise and logs the error when it rejects. | ||
* @param promise A promise to forget. | ||
*/ | ||
var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method | ||
@@ -382,27 +393,37 @@ /** | ||
RewriteFrames.prototype.process = function (event) { | ||
var frames = this._getFramesFromEvent(event); | ||
if (frames) { | ||
for (var i in frames) { | ||
// tslint:disable-next-line | ||
frames[i] = this._iteratee(frames[i]); | ||
} | ||
if (event.exception && Array.isArray(event.exception.values)) { | ||
return this._processExceptionsEvent(event); | ||
} | ||
if (event.stacktrace) { | ||
return this._processStacktraceEvent(event); | ||
} | ||
return event; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._getFramesFromEvent = function (event) { | ||
var exception = event.exception; | ||
if (exception) { | ||
try { | ||
return exception.values && exception.values[0].stacktrace && exception.values[0].stacktrace.frames; | ||
} | ||
catch (_oO) { | ||
return undefined; | ||
} | ||
RewriteFrames.prototype._processExceptionsEvent = function (event) { | ||
var _this = this; | ||
try { | ||
return __assign({}, event, { exception: __assign({}, event.exception, { | ||
// The check for this is performed inside `process` call itself, safe to skip here | ||
// tslint:disable-next-line:no-non-null-assertion | ||
values: event.exception.values.map(function (value) { return (__assign({}, value, { stacktrace: _this._processStacktrace(value.stacktrace) })); }) }) }); | ||
} | ||
else if (event.stacktrace) { | ||
return event.stacktrace.frames; | ||
catch (_oO) { | ||
return event; | ||
} | ||
return undefined; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktraceEvent = function (event) { | ||
try { | ||
return __assign({}, event, { stacktrace: this._processStacktrace(event.stacktrace) }); | ||
} | ||
catch (_oO) { | ||
return event; | ||
} | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktrace = function (stacktrace) { | ||
var _this = this; | ||
return __assign({}, stacktrace, { frames: stacktrace && stacktrace.frames && stacktrace.frames.map(function (f) { return _this._iteratee(f); }) }); | ||
}; | ||
/** | ||
@@ -409,0 +430,0 @@ * @inheritDoc |
@@ -1,2 +0,2 @@ | ||
!function(t){var e={};Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r]);return t});!function(t){function e(e){var r=this.constructor,o=t.call(this,e)||this;return o.message=e,o.name=r.prototype.constructor.name,n(o,r.prototype),o}(function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})(e,t)}(Error);var o={};function i(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:o}function a(t){var e=i();if(!("console"in e))return t();var r=e.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&r[t].__sentry_original__&&(n[t]=r[t],r[t]=r[t].__sentry_original__)});var o=t();return Object.keys(n).forEach(function(t){r[t]=n[t]}),o}var c=i(),s="Sentry Logger ",f=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){c.console.log(s+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){c.console.warn(s+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){c.console.error(s+"[Error]: "+t.join(" "))})},t}();c.__SENTRY__=c.__SENTRY__||{};c.__SENTRY__.logger||(c.__SENTRY__.logger=new f);var u,l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=!1,o=t.length-1;o>=-1&&!n;o--){var i=o>=0?t[o]:"/";i&&(r=i+"/"+r,n="/"===i.charAt(0))}return(n?"/":"")+(r=function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}(r.split("/").filter(function(t){return!!t}),!n).join("/"))||"."}function _(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}function h(t,e){var r,n,o=(r=t,n=l.exec(r),n?n.slice(1):[])[2];return e&&o.substr(-1*e.length)===e&&(o=o.substr(0,o.length-e.length)),o}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(u||(u={}));i();var v=function(){function t(e){var r=this;void 0===e&&(e={}),this.name=t.id,this._iteratee=function(t){if(!t.filename)return t;var e=/^[A-Z]:\\/.test(t.filename),n=/^\//.test(t.filename);if(t.filename&&(e||n)){var o=e?t.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):t.filename,i=r._root?function(t,e){t=p(t).substr(1),e=p(e).substr(1);for(var r=_(t.split("/")),n=_(e.split("/")),o=Math.min(r.length,n.length),i=o,a=0;a<o;a++)if(r[a]!==n[a]){i=a;break}var c=[];for(a=i;a<r.length;a++)c.push("..");return(c=c.concat(n.slice(i))).join("/")}(r._root,o):h(o);t.filename="app:///"+i}return t},e.root&&(this._root=e.root),e.iteratee&&(this._iteratee=e.iteratee)}return t.prototype.setupOnce=function(e,r){e(function(e){var n=r().getIntegration(t);return n?n.process(e):e})},t.prototype.process=function(t){var e=this._getFramesFromEvent(t);if(e)for(var r in e)e[r]=this._iteratee(e[r]);return t},t.prototype._getFramesFromEvent=function(t){var e=t.exception;if(e)try{return e.values&&e.values[0].stacktrace&&e.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames},t.id="RewriteFrames",t}();for(var g in e.RewriteFrames=v,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},e)Object.prototype.hasOwnProperty.call(e,g)&&(t.Sentry.Integrations[g]=e[g])}(window); | ||
!function(t){var e={};Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r]);return t});!function(t){function e(e){var r=this.constructor,n=t.call(this,e)||this;return n.message=e,n.name=r.prototype.constructor.name,o(n,r.prototype),n}(function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})(e,t)}(Error);var i={};function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function a(t){var e=c();if(!("console"in e))return t();var r=e.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&r[t].__sentry_original__&&(n[t]=r[t],r[t]=r[t].__sentry_original__)});var o=t();return Object.keys(n).forEach(function(t){r[t]=n[t]}),o}var s=c(),f="Sentry Logger ",u=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){s.console.log(f+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){s.console.warn(f+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&a(function(){s.console.error(f+"[Error]: "+t.join(" "))})},t}();s.__SENTRY__=s.__SENTRY__||{};s.__SENTRY__.logger||(s.__SENTRY__.logger=new u);var p,l=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function _(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=!1,o=t.length-1;o>=-1&&!n;o--){var i=o>=0?t[o]:"/";i&&(r=i+"/"+r,n="/"===i.charAt(0))}return(n?"/":"")+(r=function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}(r.split("/").filter(function(t){return!!t}),!n).join("/"))||"."}function h(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}function v(t,e){var r,n,o=(r=t,n=l.exec(r),n?n.slice(1):[])[2];return e&&o.substr(-1*e.length)===e&&(o=o.substr(0,o.length-e.length)),o}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(p||(p={}));c();var y=function(){function t(e){var r=this;void 0===e&&(e={}),this.name=t.id,this._iteratee=function(t){if(!t.filename)return t;var e=/^[A-Z]:\\/.test(t.filename),n=/^\//.test(t.filename);if(t.filename&&(e||n)){var o=e?t.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):t.filename,i=r._root?function(t,e){t=_(t).substr(1),e=_(e).substr(1);for(var r=h(t.split("/")),n=h(e.split("/")),o=Math.min(r.length,n.length),i=o,c=0;c<o;c++)if(r[c]!==n[c]){i=c;break}var a=[];for(c=i;c<r.length;c++)a.push("..");return(a=a.concat(n.slice(i))).join("/")}(r._root,o):v(o);t.filename="app:///"+i}return t},e.root&&(this._root=e.root),e.iteratee&&(this._iteratee=e.iteratee)}return t.prototype.setupOnce=function(e,r){e(function(e){var n=r().getIntegration(t);return n?n.process(e):e})},t.prototype.process=function(t){return t.exception&&Array.isArray(t.exception.values)?this._processExceptionsEvent(t):t.stacktrace?this._processStacktraceEvent(t):t},t.prototype._processExceptionsEvent=function(t){var e=this;try{return n({},t,{exception:n({},t.exception,{values:t.exception.values.map(function(t){return n({},t,{stacktrace:e._processStacktrace(t.stacktrace)})})})})}catch(e){return t}},t.prototype._processStacktraceEvent=function(t){try{return n({},t,{stacktrace:this._processStacktrace(t.stacktrace)})}catch(e){return t}},t.prototype._processStacktrace=function(t){var e=this;return n({},t,{frames:t&&t.frames&&t.frames.map(function(t){return e._iteratee(t)})})},t.id="RewriteFrames",t}();for(var g in e.RewriteFrames=y,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},e)Object.prototype.hasOwnProperty.call(e,g)&&(t.Sentry.Integrations[g]=e[g])}(window); | ||
//# sourceMappingURL=rewriteframes.min.js.map |
@@ -35,4 +35,8 @@ import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types'; | ||
/** JSDoc */ | ||
private _getFramesFromEvent; | ||
private _processExceptionsEvent; | ||
/** JSDoc */ | ||
private _processStacktraceEvent; | ||
/** JSDoc */ | ||
private _processStacktrace; | ||
} | ||
export {}; |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var utils_1 = require("@sentry/utils"); | ||
@@ -57,27 +58,37 @@ /** Rewrite event frames paths */ | ||
RewriteFrames.prototype.process = function (event) { | ||
var frames = this._getFramesFromEvent(event); | ||
if (frames) { | ||
for (var i in frames) { | ||
// tslint:disable-next-line | ||
frames[i] = this._iteratee(frames[i]); | ||
} | ||
if (event.exception && Array.isArray(event.exception.values)) { | ||
return this._processExceptionsEvent(event); | ||
} | ||
if (event.stacktrace) { | ||
return this._processStacktraceEvent(event); | ||
} | ||
return event; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._getFramesFromEvent = function (event) { | ||
var exception = event.exception; | ||
if (exception) { | ||
try { | ||
return exception.values && exception.values[0].stacktrace && exception.values[0].stacktrace.frames; | ||
} | ||
catch (_oO) { | ||
return undefined; | ||
} | ||
RewriteFrames.prototype._processExceptionsEvent = function (event) { | ||
var _this = this; | ||
try { | ||
return tslib_1.__assign({}, event, { exception: tslib_1.__assign({}, event.exception, { | ||
// The check for this is performed inside `process` call itself, safe to skip here | ||
// tslint:disable-next-line:no-non-null-assertion | ||
values: event.exception.values.map(function (value) { return (tslib_1.__assign({}, value, { stacktrace: _this._processStacktrace(value.stacktrace) })); }) }) }); | ||
} | ||
else if (event.stacktrace) { | ||
return event.stacktrace.frames; | ||
catch (_oO) { | ||
return event; | ||
} | ||
return undefined; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktraceEvent = function (event) { | ||
try { | ||
return tslib_1.__assign({}, event, { stacktrace: this._processStacktrace(event.stacktrace) }); | ||
} | ||
catch (_oO) { | ||
return event; | ||
} | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktrace = function (stacktrace) { | ||
var _this = this; | ||
return tslib_1.__assign({}, stacktrace, { frames: stacktrace && stacktrace.frames && stacktrace.frames.map(function (f) { return _this._iteratee(f); }) }); | ||
}; | ||
/** | ||
@@ -84,0 +95,0 @@ * @inheritDoc |
@@ -35,4 +35,8 @@ import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types'; | ||
/** JSDoc */ | ||
private _getFramesFromEvent; | ||
private _processExceptionsEvent; | ||
/** JSDoc */ | ||
private _processStacktraceEvent; | ||
/** JSDoc */ | ||
private _processStacktrace; | ||
} | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
import * as tslib_1 from "tslib"; | ||
import { basename, relative } from '@sentry/utils'; | ||
@@ -56,27 +57,37 @@ /** Rewrite event frames paths */ | ||
RewriteFrames.prototype.process = function (event) { | ||
var frames = this._getFramesFromEvent(event); | ||
if (frames) { | ||
for (var i in frames) { | ||
// tslint:disable-next-line | ||
frames[i] = this._iteratee(frames[i]); | ||
} | ||
if (event.exception && Array.isArray(event.exception.values)) { | ||
return this._processExceptionsEvent(event); | ||
} | ||
if (event.stacktrace) { | ||
return this._processStacktraceEvent(event); | ||
} | ||
return event; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._getFramesFromEvent = function (event) { | ||
var exception = event.exception; | ||
if (exception) { | ||
try { | ||
return exception.values && exception.values[0].stacktrace && exception.values[0].stacktrace.frames; | ||
} | ||
catch (_oO) { | ||
return undefined; | ||
} | ||
RewriteFrames.prototype._processExceptionsEvent = function (event) { | ||
var _this = this; | ||
try { | ||
return tslib_1.__assign({}, event, { exception: tslib_1.__assign({}, event.exception, { | ||
// The check for this is performed inside `process` call itself, safe to skip here | ||
// tslint:disable-next-line:no-non-null-assertion | ||
values: event.exception.values.map(function (value) { return (tslib_1.__assign({}, value, { stacktrace: _this._processStacktrace(value.stacktrace) })); }) }) }); | ||
} | ||
else if (event.stacktrace) { | ||
return event.stacktrace.frames; | ||
catch (_oO) { | ||
return event; | ||
} | ||
return undefined; | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktraceEvent = function (event) { | ||
try { | ||
return tslib_1.__assign({}, event, { stacktrace: this._processStacktrace(event.stacktrace) }); | ||
} | ||
catch (_oO) { | ||
return event; | ||
} | ||
}; | ||
/** JSDoc */ | ||
RewriteFrames.prototype._processStacktrace = function (stacktrace) { | ||
var _this = this; | ||
return tslib_1.__assign({}, stacktrace, { frames: stacktrace && stacktrace.frames && stacktrace.frames.map(function (f) { return _this._iteratee(f); }) }); | ||
}; | ||
/** | ||
@@ -83,0 +94,0 @@ * @inheritDoc |
{ | ||
"name": "@sentry/integrations", | ||
"version": "5.10.2", | ||
"version": "5.11.0", | ||
"description": "Pluggable integrations that can be used to enchance JS SDKs", | ||
@@ -19,4 +19,4 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "5.10.0", | ||
"@sentry/utils": "5.10.2", | ||
"@sentry/types": "5.11.0", | ||
"@sentry/utils": "5.11.0", | ||
"tslib": "^1.9.3" | ||
@@ -23,0 +23,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1320289
6705
+ Added@sentry/types@5.11.0(transitive)
+ Added@sentry/utils@5.11.0(transitive)
- Removed@sentry/types@5.10.0(transitive)
- Removed@sentry/utils@5.10.2(transitive)
Updated@sentry/types@5.11.0
Updated@sentry/utils@5.11.0