Socket
Socket
Sign inDemoInstall

@sentry/integrations

Package Overview
Dependencies
Maintainers
9
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.4.0 to 5.4.1

30

build/tracing.js

@@ -46,2 +46,25 @@ (function (__window) {

function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** An error emitted by Sentry SDKs and related utilities. */

@@ -443,3 +466,8 @@ var SentryError = /** @class */ (function (_super) {

if (options.headers) {
options.headers = __assign({}, options.headers, getCurrentHub().traceHeaders());
if (Array.isArray(options.headers)) {
options.headers = __spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
}
else {
options.headers = __assign({}, options.headers, getCurrentHub().traceHeaders());
}
}

@@ -446,0 +474,0 @@ else {

2

build/tracing.min.js

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

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

@@ -140,3 +140,8 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (options.headers) {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
if (Array.isArray(options.headers)) {
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
}
else {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
}
}

@@ -143,0 +148,0 @@ else {

@@ -139,3 +139,8 @@ import * as tslib_1 from "tslib";

if (options.headers) {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
if (Array.isArray(options.headers)) {
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders()));
}
else {
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders());
}
}

@@ -142,0 +147,0 @@ else {

{
"name": "@sentry/integrations",
"version": "5.4.0",
"version": "5.4.1",
"description": "Pluggable integrations that can be used to enchance JS SDKs",

@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

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