Socket
Socket
Sign inDemoInstall

@sentry/integrations

Package Overview
Dependencies
Maintainers
12
Versions
385
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/integrations - npm Package Compare versions

Comparing version 5.8.0 to 5.10.0-beta.0

build/express.js

13

build/angular.js

@@ -103,3 +103,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -115,5 +115,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -125,4 +125,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -134,3 +134,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -137,0 +138,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -273,3 +273,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -285,5 +285,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -295,4 +295,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -304,3 +304,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -336,3 +337,3 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

var len = 0;
var separator = ' > ';
var separator = " > ";
var sepLength = separator.length;

@@ -346,3 +347,5 @@ var nextStr = void 0;

// (ignore this limit if we are on the first iteration)
if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
if (nextStr === "html" ||
(height > 1 &&
len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
break;

@@ -357,3 +360,3 @@ }

catch (_oO) {
return '<unknown>';
return "<unknown>";
}

@@ -375,3 +378,3 @@ }

if (!elem || !elem.tagName) {
return '';
return "";
}

@@ -389,3 +392,3 @@ out.push(elem.tagName.toLowerCase());

}
var attrWhitelist = ['type', 'name', 'title', 'alt'];
var attrWhitelist = ["type", "name", "title", "alt"];
for (i = 0; i < attrWhitelist.length; i++) {

@@ -398,3 +401,3 @@ key = attrWhitelist[i];

}
return out.join('');
return out.join("");
}

@@ -401,0 +404,0 @@

@@ -103,3 +103,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -115,5 +115,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -125,4 +125,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -134,3 +134,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -137,0 +138,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -92,3 +92,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -104,5 +104,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -114,4 +114,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -123,3 +123,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -126,0 +127,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -189,3 +189,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -201,5 +201,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -211,4 +211,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -220,3 +220,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -252,3 +253,3 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

var len = 0;
var separator = ' > ';
var separator = " > ";
var sepLength = separator.length;

@@ -262,3 +263,5 @@ var nextStr = void 0;

// (ignore this limit if we are on the first iteration)
if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
if (nextStr === "html" ||
(height > 1 &&
len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
break;

@@ -273,3 +276,3 @@ }

catch (_oO) {
return '<unknown>';
return "<unknown>";
}

@@ -291,3 +294,3 @@ }

if (!elem || !elem.tagName) {
return '';
return "";
}

@@ -305,3 +308,3 @@ out.push(elem.tagName.toLowerCase());

}
var attrWhitelist = ['type', 'name', 'title', 'alt'];
var attrWhitelist = ["type", "name", "title", "alt"];
for (i = 0; i < attrWhitelist.length; i++) {

@@ -314,3 +317,3 @@ key = attrWhitelist[i];

}
return out.join('');
return out.join("");
}

@@ -317,0 +320,0 @@

@@ -103,3 +103,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -115,5 +115,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -125,4 +125,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -134,3 +134,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -137,0 +138,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -92,3 +92,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -104,5 +104,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -114,4 +114,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -123,3 +123,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -126,0 +127,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -136,3 +136,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -148,5 +148,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -158,4 +158,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -167,3 +167,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -410,25 +411,4 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

}
if (this._options.autoStartOnDomReady !== false) {
getGlobalObject().addEventListener('DOMContentLoaded', function () {
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href);
});
getGlobalObject().document.onreadystatechange = function () {
if (document.readyState === 'complete') {
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href);
}
};
}
};
/**
* Starts a new trace
* @param hub The hub to start the trace on
* @param transaction Optional transaction
*/
Tracing.startTrace = function (hub, transaction) {
hub.configureScope(function (scope) {
scope.startSpan();
scope.setTransaction(transaction);
});
};
/**
* JSDoc

@@ -472,2 +452,7 @@ */

});
if (isMatchingPattern(url_1, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted = false;
}
if (isWhitelisted && this.setRequestHeader) {

@@ -499,23 +484,29 @@ Object.keys(headers_1).forEach(function (key) {

// @ts-ignore
var self = getCurrentHub().getIntegration(Tracing);
var hub = getCurrentHub();
var self = hub.getIntegration(Tracing);
if (self && self._options.tracingOrigins) {
var url_2 = args[0];
var options = (args[1] = args[1] || {});
var whiteListed_1 = false;
var isWhitelisted_1 = false;
self._options.tracingOrigins.forEach(function (whiteListUrl) {
if (!whiteListed_1) {
whiteListed_1 = isMatchingPattern(url_2, whiteListUrl);
if (!isWhitelisted_1) {
isWhitelisted_1 = isMatchingPattern(url_2, whiteListUrl);
}
});
if (whiteListed_1) {
if (isMatchingPattern(url_2, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted_1 = false;
}
if (isWhitelisted_1) {
if (options.headers) {
if (Array.isArray(options.headers)) {
options.headers = __spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
options.headers = __spread(options.headers, Object.entries(hub.traceHeaders()));
}
else {
options.headers = __assign({}, options.headers, getCurrentHub().traceHeaders());
options.headers = __assign({}, options.headers, hub.traceHeaders());
}
}
else {
options.headers = getCurrentHub().traceHeaders();
options.headers = hub.traceHeaders();
}

@@ -522,0 +513,0 @@ }

@@ -1,2 +0,2 @@

!function(t){var e={};Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});!function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=n.prototype.constructor.name,i(r,n.prototype),r}(function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(e,t)}(Error);var a={};function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function s(t){var e=c();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&n[t].__sentry__&&(r[t]=n[t].__sentry_wrapped__,n[t]=n[t].__sentry_original__)});var o=t();return Object.keys(r).forEach(function(t){n[t]=r[t]}),o}var f=c(),u="Sentry Logger ",p=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&&s(function(){f.console.log(u+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&s(function(){f.console.warn(u+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&s(function(){f.console.error(u+"[Error]: "+t.join(" "))})},t}();f.__SENTRY__=f.__SENTRY__||{};var l,_=f.__SENTRY__.logger||(f.__SENTRY__.logger=new p);function h(t,e){return n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e);var n}function d(t,e,n){if(e in t){var r=t[e],o=n(r);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:o}})}catch(t){}t[e]=o}}function y(){if(!function(){if(!("fetch"in c()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}())return!1;var t=function(t){return-1!==t.toString().indexOf("native")},e=c(),n=null,r=e.document;if(r){var o=r.createElement("iframe");o.hidden=!0;try{r.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(n=t(o.contentWindow.fetch)),r.head.removeChild(o)}catch(t){_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return null===n&&(n=t(e.fetch)),n}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(l||(l={}));var g=function(){function t(e){if(void 0===e&&(e={}),this._options=e,this.name=t.id,!Array.isArray(e.tracingOrigins)||0===e.tracingOrigins.length){var n=["localhost",/^\//];_.warn("Sentry: You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),_.warn("Sentry: We added a reasonable default for you: "+n),e.tracingOrigins=n}}return t.prototype.setupOnce=function(e,n){!1!==this._options.traceXHR&&this._traceXHR(n),!1!==this._options.traceFetch&&this._traceFetch(n),!1!==this._options.autoStartOnDomReady&&(c().addEventListener("DOMContentLoaded",function(){t.startTrace(n(),c().location.href)}),c().document.onreadystatechange=function(){"complete"===document.readyState&&t.startTrace(n(),c().location.href)})},t.startTrace=function(t,e){t.configureScope(function(t){t.startSpan(),t.setTransaction(e)})},t.prototype._traceXHR=function(e){if("XMLHttpRequest"in c()){var n=XMLHttpRequest.prototype;d(n,"open",function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=e().getIntegration(t);return i&&(i._xhrUrl=r[1]),n.apply(this,r)}}),d(n,"send",function(n){return function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=e().getIntegration(t);if(a&&a._xhrUrl&&a._options.tracingOrigins){var c=a._xhrUrl,s=e().traceHeaders();a._options.tracingOrigins.some(function(t){return h(c,t)})&&this.setRequestHeader&&Object.keys(s).forEach(function(t){r.setRequestHeader(t,s[t])})}return n.apply(this,o)}})}},t.prototype._traceFetch=function(e){y()&&d(c(),"fetch",function(n){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e().getIntegration(t);if(s&&s._options.tracingOrigins){var f=i[0],u=i[1]=i[1]||{},p=!1;s._options.tracingOrigins.forEach(function(t){p||(p=h(f,t))}),p&&(u.headers?Array.isArray(u.headers)?u.headers=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}(u.headers,Object.entries(e().traceHeaders())):u.headers=r({},u.headers,e().traceHeaders()):u.headers=e().traceHeaders())}return n.apply(c(),i)}})},t.id="Tracing",t}();for(var v in e.Tracing=g,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},e)Object.prototype.hasOwnProperty.call(e,v)&&(t.Sentry.Integrations[v]=e[v])}(window);
!function(t){var r={};Object.defineProperty(r,"__esModule",{value:!0});var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function o(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,i=e.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,r){return t.__proto__=r,t}:function(t,r){for(var e in r)t.hasOwnProperty(e)||(t[e]=r[e]);return t});!function(t){function r(r){var e=this.constructor,n=t.call(this,r)||this;return n.message=r,n.name=e.prototype.constructor.name,i(n,e.prototype),n}(function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)})(r,t)}(Error);var a={};function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function s(t){var r=c();if(!("console"in r))return t();var e=r.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in r.console&&e[t].__sentry__&&(n[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});var o=t();return Object.keys(n).forEach(function(t){e[t]=n[t]}),o}var f=c(),u="Sentry Logger ",p=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=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.log(u+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.warn(u+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.error(u+"[Error]: "+t.join(" "))})},t}();f.__SENTRY__=f.__SENTRY__||{};var l,_=f.__SENTRY__.logger||(f.__SENTRY__.logger=new p);function y(t,r){return e=r,"[object RegExp]"===Object.prototype.toString.call(e)?r.test(t):"string"==typeof r&&-1!==t.indexOf(r);var e}function h(t,r,e){if(r in t){var n=t[r],o=e(n);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n},__sentry_wrapped__:{enumerable:!1,value:o}})}catch(t){}t[r]=o}}function d(){if(!function(){if(!("fetch"in c()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}())return!1;var t=function(t){return-1!==t.toString().indexOf("native")},r=c(),e=null,n=r.document;if(n){var o=n.createElement("iframe");o.hidden=!0;try{n.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(e=t(o.contentWindow.fetch)),n.head.removeChild(o)}catch(t){_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return null===e&&(e=t(r.fetch)),e}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(l||(l={}));var g=function(){function t(r){if(void 0===r&&(r={}),this._options=r,this.name=t.id,!Array.isArray(r.tracingOrigins)||0===r.tracingOrigins.length){var e=["localhost",/^\//];_.warn("Sentry: You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),_.warn("Sentry: We added a reasonable default for you: "+e),r.tracingOrigins=e}}return t.prototype.setupOnce=function(t,r){!1!==this._options.traceXHR&&this._traceXHR(r),!1!==this._options.traceFetch&&this._traceFetch(r)},t.prototype._traceXHR=function(r){if("XMLHttpRequest"in c()){var e=XMLHttpRequest.prototype;h(e,"open",function(e){return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=r().getIntegration(t);return i&&(i._xhrUrl=n[1]),e.apply(this,n)}}),h(e,"send",function(e){return function(){for(var n=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=r().getIntegration(t);if(a&&a._xhrUrl&&a._options.tracingOrigins){var c=a._xhrUrl,s=r().traceHeaders(),f=a._options.tracingOrigins.some(function(t){return y(c,t)});y(c,"sentry_key")&&(f=!1),f&&this.setRequestHeader&&Object.keys(s).forEach(function(t){n.setRequestHeader(t,s[t])})}return e.apply(this,o)}})}},t.prototype._traceFetch=function(r){d()&&h(c(),"fetch",function(e){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=r(),f=s.getIntegration(t);if(f&&f._options.tracingOrigins){var u=i[0],p=i[1]=i[1]||{},l=!1;f._options.tracingOrigins.forEach(function(t){l||(l=y(u,t))}),y(u,"sentry_key")&&(l=!1),l&&(p.headers?Array.isArray(p.headers)?p.headers=function(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(o(arguments[r]));return t}(p.headers,Object.entries(s.traceHeaders())):p.headers=n({},p.headers,s.traceHeaders()):p.headers=s.traceHeaders())}return e.apply(c(),i)}})},t.id="Tracing",t}();for(var v in r.Tracing=g,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},r)Object.prototype.hasOwnProperty.call(r,v)&&(t.Sentry.Integrations[v]=r[v])}(window);
//# sourceMappingURL=tracing.min.js.map

@@ -102,3 +102,3 @@ (function (__window) {

// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
return (Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]");
}

@@ -114,5 +114,5 @@ var fallbackGlobalObject = {};

? global
: typeof window !== 'undefined'
: typeof window !== "undefined"
? window
: typeof self !== 'undefined'
: typeof self !== "undefined"
? self

@@ -124,4 +124,4 @@ : fallbackGlobalObject);

var global = getGlobalObject();
var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
if (!('console' in global)) {
var levels = ["debug", "info", "warn", "error", "log", "assert"];
if (!("console" in global)) {
return callback();

@@ -133,3 +133,4 @@ }

levels.forEach(function (level) {
if (level in global.console && originalConsole[level].__sentry__) {
if (level in global.console &&
originalConsole[level].__sentry__) {
wrappedLevels[level] = originalConsole[level].__sentry_wrapped__;

@@ -136,0 +137,0 @@ originalConsole[level] = originalConsole[level].__sentry_original__;

@@ -6,2 +6,3 @@ export { Angular } from './angular';

export { Ember } from './ember';
export { Express } from './express';
export { ExtraErrorData } from './extraerrordata';

@@ -13,2 +14,3 @@ export { ReportingObserver } from './reportingobserver';

export { Transaction } from './transaction';
export { TransactionActivity } from './transactionactivity';
export { Vue } from './vue';

@@ -12,2 +12,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

exports.Ember = ember_1.Ember;
var express_1 = require("./express");
exports.Express = express_1.Express;
var extraerrordata_1 = require("./extraerrordata");

@@ -25,4 +27,6 @@ exports.ExtraErrorData = extraerrordata_1.ExtraErrorData;

exports.Transaction = transaction_1.Transaction;
var transactionactivity_1 = require("./transactionactivity");
exports.TransactionActivity = transactionactivity_1.TransactionActivity;
var vue_1 = require("./vue");
exports.Vue = vue_1.Vue;
//# sourceMappingURL=index.js.map

@@ -7,3 +7,2 @@ import { EventProcessor, Hub, Integration } from '@sentry/types';

traceXHR?: boolean;
autoStartOnDomReady?: boolean;
}

@@ -39,8 +38,2 @@ /**

/**
* Starts a new trace
* @param hub The hub to start the trace on
* @param transaction Optional transaction
*/
static startTrace(hub: Hub, transaction?: string): void;
/**
* JSDoc

@@ -47,0 +40,0 @@ */

@@ -37,25 +37,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

}
if (this._options.autoStartOnDomReady !== false) {
utils_1.getGlobalObject().addEventListener('DOMContentLoaded', function () {
Tracing.startTrace(getCurrentHub(), utils_1.getGlobalObject().location.href);
});
utils_1.getGlobalObject().document.onreadystatechange = function () {
if (document.readyState === 'complete') {
Tracing.startTrace(getCurrentHub(), utils_1.getGlobalObject().location.href);
}
};
}
};
/**
* Starts a new trace
* @param hub The hub to start the trace on
* @param transaction Optional transaction
*/
Tracing.startTrace = function (hub, transaction) {
hub.configureScope(function (scope) {
scope.startSpan();
scope.setTransaction(transaction);
});
};
/**
* JSDoc

@@ -99,2 +78,7 @@ */

});
if (utils_1.isMatchingPattern(url_1, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted = false;
}
if (isWhitelisted && this.setRequestHeader) {

@@ -126,23 +110,29 @@ Object.keys(headers_1).forEach(function (key) {

// @ts-ignore
var self = getCurrentHub().getIntegration(Tracing);
var hub = getCurrentHub();
var self = hub.getIntegration(Tracing);
if (self && self._options.tracingOrigins) {
var url_2 = args[0];
var options = (args[1] = args[1] || {});
var whiteListed_1 = false;
var isWhitelisted_1 = false;
self._options.tracingOrigins.forEach(function (whiteListUrl) {
if (!whiteListed_1) {
whiteListed_1 = utils_1.isMatchingPattern(url_2, whiteListUrl);
if (!isWhitelisted_1) {
isWhitelisted_1 = utils_1.isMatchingPattern(url_2, whiteListUrl);
}
});
if (whiteListed_1) {
if (utils_1.isMatchingPattern(url_2, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted_1 = false;
}
if (isWhitelisted_1) {
if (options.headers) {
if (Array.isArray(options.headers)) {
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
options.headers = tslib_1.__spread(options.headers, Object.entries(hub.traceHeaders()));
}
else {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
options.headers = tslib_1.__assign({}, options.headers, hub.traceHeaders());
}
}
else {
options.headers = getCurrentHub().traceHeaders();
options.headers = hub.traceHeaders();
}

@@ -149,0 +139,0 @@ }

@@ -6,2 +6,3 @@ export { Angular } from './angular';

export { Ember } from './ember';
export { Express } from './express';
export { ExtraErrorData } from './extraerrordata';

@@ -13,2 +14,3 @@ export { ReportingObserver } from './reportingobserver';

export { Transaction } from './transaction';
export { TransactionActivity } from './transactionactivity';
export { Vue } from './vue';

@@ -6,2 +6,3 @@ export { Angular } from './angular';

export { Ember } from './ember';
export { Express } from './express';
export { ExtraErrorData } from './extraerrordata';

@@ -13,3 +14,4 @@ export { ReportingObserver } from './reportingobserver';

export { Transaction } from './transaction';
export { TransactionActivity } from './transactionactivity';
export { Vue } from './vue';
//# sourceMappingURL=index.js.map

@@ -7,3 +7,2 @@ import { EventProcessor, Hub, Integration } from '@sentry/types';

traceXHR?: boolean;
autoStartOnDomReady?: boolean;
}

@@ -39,8 +38,2 @@ /**

/**
* Starts a new trace
* @param hub The hub to start the trace on
* @param transaction Optional transaction
*/
static startTrace(hub: Hub, transaction?: string): void;
/**
* JSDoc

@@ -47,0 +40,0 @@ */

@@ -36,25 +36,4 @@ import * as tslib_1 from "tslib";

}
if (this._options.autoStartOnDomReady !== false) {
getGlobalObject().addEventListener('DOMContentLoaded', function () {
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href);
});
getGlobalObject().document.onreadystatechange = function () {
if (document.readyState === 'complete') {
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href);
}
};
}
};
/**
* Starts a new trace
* @param hub The hub to start the trace on
* @param transaction Optional transaction
*/
Tracing.startTrace = function (hub, transaction) {
hub.configureScope(function (scope) {
scope.startSpan();
scope.setTransaction(transaction);
});
};
/**
* JSDoc

@@ -98,2 +77,7 @@ */

});
if (isMatchingPattern(url_1, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted = false;
}
if (isWhitelisted && this.setRequestHeader) {

@@ -125,23 +109,29 @@ Object.keys(headers_1).forEach(function (key) {

// @ts-ignore
var self = getCurrentHub().getIntegration(Tracing);
var hub = getCurrentHub();
var self = hub.getIntegration(Tracing);
if (self && self._options.tracingOrigins) {
var url_2 = args[0];
var options = (args[1] = args[1] || {});
var whiteListed_1 = false;
var isWhitelisted_1 = false;
self._options.tracingOrigins.forEach(function (whiteListUrl) {
if (!whiteListed_1) {
whiteListed_1 = isMatchingPattern(url_2, whiteListUrl);
if (!isWhitelisted_1) {
isWhitelisted_1 = isMatchingPattern(url_2, whiteListUrl);
}
});
if (whiteListed_1) {
if (isMatchingPattern(url_2, 'sentry_key')) {
// If sentry_key is in the url, it's an internal store request to sentry
// we do not want to add the trace header to store requests
isWhitelisted_1 = false;
}
if (isWhitelisted_1) {
if (options.headers) {
if (Array.isArray(options.headers)) {
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
options.headers = tslib_1.__spread(options.headers, Object.entries(hub.traceHeaders()));
}
else {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
options.headers = tslib_1.__assign({}, options.headers, hub.traceHeaders());
}
}
else {
options.headers = getCurrentHub().traceHeaders();
options.headers = hub.traceHeaders();
}

@@ -148,0 +138,0 @@ }

{
"name": "@sentry/integrations",
"version": "5.8.0",
"version": "5.10.0-beta.0",
"description": "Pluggable integrations that can be used to enchance JS SDKs",

@@ -19,7 +19,8 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/types": "5.7.1",
"@sentry/utils": "5.8.0",
"@sentry/types": "5.10.0-beta.0",
"@sentry/utils": "5.10.0-beta.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@types/express": "^4.17.1",
"chai": "^4.1.2",

@@ -26,0 +27,0 @@ "jest": "^24.7.1",

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

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

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc