Socket
Socket
Sign inDemoInstall

@sentry/integrations

Package Overview
Dependencies
Maintainers
13
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.16.0-beta.3 to 5.16.0-beta.4

21

build/vue.js

@@ -390,7 +390,12 @@ (function (__window) {

_this._tracingActivity = tracingIntegration.constructor.pushActivity('Vue Application Render');
// tslint:disable-next-line:no-unsafe-any
var transaction = tracingIntegration.constructor.getTransaction();
if (transaction) {
// tslint:disable-next-line:no-unsafe-any
_this._rootSpan = transaction.startChild({
description: 'Application Render',
op: 'Vue',
});
}
}
_this._rootSpan = getCurrentHub().startSpan({
description: 'Application Render',
op: 'Vue',
});
});

@@ -419,3 +424,3 @@ }

if (_this._rootSpan) {
spans[op] = _this._rootSpan.child({
spans[op] = _this._rootSpan.startChild({
description: "Vue <" + name + ">",

@@ -483,5 +488,2 @@ op: op,

this._rootSpanTimer = setTimeout(function () {
if (_this._rootSpan) {
_this._rootSpan.timestamp = timestamp;
}
if (_this._tracingActivity) {

@@ -494,2 +496,5 @@ // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.

tracingIntegration.constructor.popActivity(_this._tracingActivity);
if (_this._rootSpan) {
_this._rootSpan.finish(timestamp);
}
}

@@ -496,0 +501,0 @@ }

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

!function(t){var o={};Object.defineProperty(o,"__esModule",{value:!0});var n=function(t,o){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])})(t,o)};var r=function(){return(r=Object.assign||function(t){for(var o,n=1,r=arguments.length;n<r;n++)for(var e in o=arguments[n])Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e]);return t}).apply(this,arguments)};function e(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),a=[];try{for(;(void 0===o||o-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,o){return t.__proto__=o,t}:function(t,o){for(var n in o)t.hasOwnProperty(n)||(t[n]=o[n]);return t});!function(t){function o(o){var n=this.constructor,r=t.call(this,o)||this;return r.message=o,r.name=n.prototype.constructor.name,i(r,n.prototype),r}(function(t,o){function r(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)})(o,t)}(Error);function a(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var c={};function s(){return a()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:c}function p(t){var o=s();if(!("console"in o))return t();var n=o.console,r={};["debug","info","warn","error","log","assert"].forEach(function(t){t in o.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});var e=t();return Object.keys(r).forEach(function(t){n[t]=r[t]}),e}var u=Date.now(),f=0,_={now:function(){var t=Date.now()-u;return t<f&&(t=f),f=t,t},timeOrigin:u},l=function(){if(a())try{return(t=module,o="perf_hooks",t.require(o)).performance}catch(t){return _}var t,o;return s().performance&&void 0===performance.timeOrigin&&(performance.timeOrigin=performance.timing&&performance.timing.navigationStart||u),s().performance||_}();function g(){return(l.timeOrigin+l.now())/1e3}var h=s(),y="Sentry Logger ",m=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=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.log(y+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.warn(y+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.error(y+"[Error]: "+t.join(" "))})},t}();h.__SENTRY__=h.__SENTRY__||{};var d,v=h.__SENTRY__.logger||(h.__SENTRY__.logger=new m),b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function S(t,o){var n,r,e=(n=t,r=b.exec(n),r?r.slice(1):[])[2];return o&&e.substr(-1*o.length)===o&&(e=e.substr(0,e.length-o.length)),e}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(d||(d={}));s();var O={id:"Tracing"},E={activated:"activate",beforeCreate:"create",beforeDestroy:"destroy",beforeMount:"mount",beforeUpdate:"update",created:"create",deactivated:"activate",destroyed:"destroy",mounted:"mount",updated:"update"},w=/(?:^|[-_/])(\w)/g,V="root",T=function(){function t(o){var n=this;this.name=t.id,this._componentsCache={},this._applyTracingHooks=function(t,o){if(!t.$options.$_sentryPerfHook){t.$options.$_sentryPerfHook=!0;var r=n._getComponentName(t),i=r===V,a={};n._options.tracingOptions.hooks.forEach(function(c){var s=i?function(r){var e=g();n._rootSpan?n._finishRootSpan(e,o):t.$once("hook:"+r,function(){var t=o().getIntegration(O);t&&(n._tracingActivity=t.constructor.pushActivity("Vue Application Render")),n._rootSpan=o().startSpan({description:"Application Render",op:"Vue"})})}.bind(n,c):function(e){var i=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.includes(r):n._options.tracingOptions.trackComponents;if(n._rootSpan&&i){var c=g(),s=E[e],p=a[s];p?(p.finish(),n._finishRootSpan(c,o)):t.$once("hook:"+e,function(){n._rootSpan&&(a[s]=n._rootSpan.child({description:"Vue <"+r+">",op:s}))})}}.bind(n,c),p=t.$options[c];Array.isArray(p)?t.$options[c]=function(){for(var t=[],o=0;o<arguments.length;o++)t=t.concat(e(arguments[o]));return t}([s],p):t.$options[c]="function"==typeof p?[s,p]:[s]})}},this._options=r({Vue:s().Vue,attachProps:!0,logErrors:!1,tracing:!0},o,{tracingOptions:r({hooks:["beforeMount","mounted","beforeUpdate","updated"],timeout:2e3,trackComponents:!1},o.tracingOptions)})}return t.prototype._getComponentName=function(t){if(!t)return"anonymous component";if(t.$root===t)return V;if(!t.$options)return"anonymous component";if(t.$options.name)return t.$options.name;if(t.$options._componentTag)return t.$options._componentTag;if(t.$options.__file){var o=S(t.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[o]||(this._componentsCache[o]=o.replace(w,function(t,o){return o?o.toUpperCase():""}))}return"anonymous component"},t.prototype._finishRootSpan=function(t,o){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout(function(){if(n._rootSpan&&(n._rootSpan.timestamp=t),n._tracingActivity){var r=o().getIntegration(O);r&&r.constructor.popActivity(n._tracingActivity)}},this._options.tracingOptions.timeout)},t.prototype._startTracing=function(t){var o=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){t().getIntegration(O)?o(this,t):v.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},t.prototype._attachErrorHandler=function(o){var n=this;if(this._options.Vue.config){var r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(e,i,a){var c={};if(i)try{c.componentName=n._getComponentName(i),n._options.attachProps&&(c.propsData=i.$options.propsData)}catch(t){v.warn("Unable to extract metadata from Vue component.")}a&&(c.lifecycleHook=a),o().getIntegration(t)&&setTimeout(function(){o().withScope(function(t){t.setContext("vue",c),o().captureException(e)})}),"function"==typeof r&&r.call(n._options.Vue,e,i,a),n._options.logErrors&&(n._options.Vue.util.warn("Error in "+a+': "'+e.toString()+'"',i),console.error(e))}}else v.error("Vue instance is missing required `config` attribute")},t.prototype.setupOnce=function(t,o){this._options.Vue?(this._attachErrorHandler(o),this._options.tracing&&this._startTracing(o)):v.error("Vue integration is missing a Vue instance")},t.id="Vue",t}();for(var $ in o.Vue=T,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},o)Object.prototype.hasOwnProperty.call(o,$)&&(t.Sentry.Integrations[$]=o[$])}(window);
!function(t){var o={};Object.defineProperty(o,"__esModule",{value:!0});var n=function(t,o){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])})(t,o)};var r=function(){return(r=Object.assign||function(t){for(var o,n=1,r=arguments.length;n<r;n++)for(var e in o=arguments[n])Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e]);return t}).apply(this,arguments)};function e(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),a=[];try{for(;(void 0===o||o-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,o){return t.__proto__=o,t}:function(t,o){for(var n in o)t.hasOwnProperty(n)||(t[n]=o[n]);return t});!function(t){function o(o){var n=this.constructor,r=t.call(this,o)||this;return r.message=o,r.name=n.prototype.constructor.name,i(r,n.prototype),r}(function(t,o){function r(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)})(o,t)}(Error);function a(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var c={};function s(){return a()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:c}function p(t){var o=s();if(!("console"in o))return t();var n=o.console,r={};["debug","info","warn","error","log","assert"].forEach(function(t){t in o.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});var e=t();return Object.keys(r).forEach(function(t){n[t]=r[t]}),e}var u=Date.now(),f=0,_={now:function(){var t=Date.now()-u;return t<f&&(t=f),f=t,t},timeOrigin:u},l=function(){if(a())try{return(t=module,o="perf_hooks",t.require(o)).performance}catch(t){return _}var t,o;return s().performance&&void 0===performance.timeOrigin&&(performance.timeOrigin=performance.timing&&performance.timing.navigationStart||u),s().performance||_}();function g(){return(l.timeOrigin+l.now())/1e3}var h=s(),y="Sentry Logger ",m=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=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.log(y+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.warn(y+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];this._enabled&&p(function(){h.console.error(y+"[Error]: "+t.join(" "))})},t}();h.__SENTRY__=h.__SENTRY__||{};var d,v=h.__SENTRY__.logger||(h.__SENTRY__.logger=new m),b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function S(t,o){var n,r,e=(n=t,r=b.exec(n),r?r.slice(1):[])[2];return o&&e.substr(-1*o.length)===o&&(e=e.substr(0,e.length-o.length)),e}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(d||(d={}));s();var O={id:"Tracing"},E={activated:"activate",beforeCreate:"create",beforeDestroy:"destroy",beforeMount:"mount",beforeUpdate:"update",created:"create",deactivated:"activate",destroyed:"destroy",mounted:"mount",updated:"update"},w=/(?:^|[-_/])(\w)/g,T="root",V=function(){function t(o){var n=this;this.name=t.id,this._componentsCache={},this._applyTracingHooks=function(t,o){if(!t.$options.$_sentryPerfHook){t.$options.$_sentryPerfHook=!0;var r=n._getComponentName(t),i=r===T,a={};n._options.tracingOptions.hooks.forEach(function(c){var s=i?function(r){var e=g();n._rootSpan?n._finishRootSpan(e,o):t.$once("hook:"+r,function(){var t=o().getIntegration(O);if(t){n._tracingActivity=t.constructor.pushActivity("Vue Application Render");var r=t.constructor.getTransaction();r&&(n._rootSpan=r.startChild({description:"Application Render",op:"Vue"}))}})}.bind(n,c):function(e){var i=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.includes(r):n._options.tracingOptions.trackComponents;if(n._rootSpan&&i){var c=g(),s=E[e],p=a[s];p?(p.finish(),n._finishRootSpan(c,o)):t.$once("hook:"+e,function(){n._rootSpan&&(a[s]=n._rootSpan.startChild({description:"Vue <"+r+">",op:s}))})}}.bind(n,c),p=t.$options[c];Array.isArray(p)?t.$options[c]=function(){for(var t=[],o=0;o<arguments.length;o++)t=t.concat(e(arguments[o]));return t}([s],p):t.$options[c]="function"==typeof p?[s,p]:[s]})}},this._options=r({Vue:s().Vue,attachProps:!0,logErrors:!1,tracing:!0},o,{tracingOptions:r({hooks:["beforeMount","mounted","beforeUpdate","updated"],timeout:2e3,trackComponents:!1},o.tracingOptions)})}return t.prototype._getComponentName=function(t){if(!t)return"anonymous component";if(t.$root===t)return T;if(!t.$options)return"anonymous component";if(t.$options.name)return t.$options.name;if(t.$options._componentTag)return t.$options._componentTag;if(t.$options.__file){var o=S(t.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[o]||(this._componentsCache[o]=o.replace(w,function(t,o){return o?o.toUpperCase():""}))}return"anonymous component"},t.prototype._finishRootSpan=function(t,o){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout(function(){if(n._tracingActivity){var r=o().getIntegration(O);r&&(r.constructor.popActivity(n._tracingActivity),n._rootSpan&&n._rootSpan.finish(t))}},this._options.tracingOptions.timeout)},t.prototype._startTracing=function(t){var o=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){t().getIntegration(O)?o(this,t):v.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},t.prototype._attachErrorHandler=function(o){var n=this;if(this._options.Vue.config){var r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(e,i,a){var c={};if(i)try{c.componentName=n._getComponentName(i),n._options.attachProps&&(c.propsData=i.$options.propsData)}catch(t){v.warn("Unable to extract metadata from Vue component.")}a&&(c.lifecycleHook=a),o().getIntegration(t)&&setTimeout(function(){o().withScope(function(t){t.setContext("vue",c),o().captureException(e)})}),"function"==typeof r&&r.call(n._options.Vue,e,i,a),n._options.logErrors&&(n._options.Vue.util.warn("Error in "+a+': "'+e.toString()+'"',i),console.error(e))}}else v.error("Vue instance is missing required `config` attribute")},t.prototype.setupOnce=function(t,o){this._options.Vue?(this._attachErrorHandler(o),this._options.tracing&&this._startTracing(o)):v.error("Vue integration is missing a Vue instance")},t.id="Vue",t}();for(var $ in o.Vue=V,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},o)Object.prototype.hasOwnProperty.call(o,$)&&(t.Sentry.Integrations[$]=o[$])}(window);
//# sourceMappingURL=vue.min.js.map

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

_this._tracingActivity = tracingIntegration.constructor.pushActivity('Vue Application Render');
// tslint:disable-next-line:no-unsafe-any
var transaction = tracingIntegration.constructor.getTransaction();
if (transaction) {
// tslint:disable-next-line:no-unsafe-any
_this._rootSpan = transaction.startChild({
description: 'Application Render',
op: 'Vue',
});
}
}
_this._rootSpan = getCurrentHub().startSpan({
description: 'Application Render',
op: 'Vue',
});
});

@@ -104,3 +109,3 @@ }

if (_this._rootSpan) {
spans[op] = _this._rootSpan.child({
spans[op] = _this._rootSpan.startChild({
description: "Vue <" + name + ">",

@@ -168,5 +173,2 @@ op: op,

this._rootSpanTimer = setTimeout(function () {
if (_this._rootSpan) {
_this._rootSpan.timestamp = timestamp;
}
if (_this._tracingActivity) {

@@ -179,2 +181,5 @@ // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.

tracingIntegration.constructor.popActivity(_this._tracingActivity);
if (_this._rootSpan) {
_this._rootSpan.finish(timestamp);
}
}

@@ -181,0 +186,0 @@ }

@@ -74,7 +74,12 @@ import * as tslib_1 from "tslib";

_this._tracingActivity = tracingIntegration.constructor.pushActivity('Vue Application Render');
// tslint:disable-next-line:no-unsafe-any
var transaction = tracingIntegration.constructor.getTransaction();
if (transaction) {
// tslint:disable-next-line:no-unsafe-any
_this._rootSpan = transaction.startChild({
description: 'Application Render',
op: 'Vue',
});
}
}
_this._rootSpan = getCurrentHub().startSpan({
description: 'Application Render',
op: 'Vue',
});
});

@@ -103,3 +108,3 @@ }

if (_this._rootSpan) {
spans[op] = _this._rootSpan.child({
spans[op] = _this._rootSpan.startChild({
description: "Vue <" + name + ">",

@@ -167,5 +172,2 @@ op: op,

this._rootSpanTimer = setTimeout(function () {
if (_this._rootSpan) {
_this._rootSpan.timestamp = timestamp;
}
if (_this._tracingActivity) {

@@ -178,2 +180,5 @@ // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.

tracingIntegration.constructor.popActivity(_this._tracingActivity);
if (_this._rootSpan) {
_this._rootSpan.finish(timestamp);
}
}

@@ -180,0 +185,0 @@ }

{
"name": "@sentry/integrations",
"version": "5.16.0-beta.3",
"description": "Pluggable integrations that can be used to enchance JS SDKs",
"version": "5.16.0-beta.4",
"description": "Pluggable integrations that can be used to enhance JS SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",

@@ -19,4 +19,4 @@ "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations",

"dependencies": {
"@sentry/types": "5.16.0-beta.3",
"@sentry/utils": "5.16.0-beta.3",
"@sentry/types": "5.16.0-beta.4",
"@sentry/utils": "5.16.0-beta.4",
"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

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