Comparing version 3.6.1 to 3.7.0
{ | ||
"name": "raven-js", | ||
"version": "3.6.1", | ||
"version": "3.7.0", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "main": "dist/raven.js", |
# Changelog | ||
## 3.7.0 | ||
* BUGFIX: Add missing return types from TypeScript declaration file. See: https://github.com/getsentry/raven-js/pull/718 | ||
* BUGFIX: Fix "Permission denied" error in Firefox via WebDriver. See: https://github.com/getsentry/raven-js/pull/720 | ||
* REMOVED: Legacy stack trace parsing from Opera 9, 10. See: https://github.com/getsentry/raven-js/pull/716 | ||
## 3.6.1 | ||
@@ -4,0 +9,0 @@ * BUGFIX: Fix `trimHeadFrames` appearing in some data payloads when using synthetic traces. See: https://github.com/getsentry/raven-js/pull/714 |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Angular=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){function c(){this.$get=["$window",function(b){return a}]}function e(a){a.decorator("$exceptionHandler",["Raven","$delegate",f])}function f(a,b){return function(c,d){a.captureException(c,{extra:{cause:d}}),b(c,d)}}b=b||window.angular,b&&(b.module("ngRaven",[]).provider("Raven",c).config(["$provide",e]),a.setDataCallback(function(a,b){d.a(a),b&&b(a)}))}var e=/^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;d.a=function(a){var b=a.exception;if(b){b=b.values[0];var c=e.exec(b.value);c&&(b.type=c[1],b.value=c[2],a.message=b.type+": "+b.value,a.extra.angularDocs=c[3].substr(0,250))}},b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=angular.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Console=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c){b=b||window.console||{},c=c||{};for(var d=c.levels||["debug","info","warn","error"],f=d.pop(),g=function(b,c){a.captureMessage(b,c)};f;)e(b,f,g),f=d.pop()}var e=a(2).wrapMethod;b.exports=d},{2:2}],2:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=console.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Ember=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Ember){var c=b.onerror;b.onerror=function(b){a.captureException(b),"function"==typeof c&&c.call(this,b)},b.RSVP.on("error",function(b){b instanceof Error?a.captureException(b,{extra:{context:"Unhandled Promise error detected"}}):a.captureMessage("Unhandled Promise error detected",{extra:{reason:b}})})}}b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=ember.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Require=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";function e(c){"function"==typeof a&&a.amd&&(window.define=c.wrap({deep:!1},a),window.require=c.wrap({deep:!1},b))}c.exports=e},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=require.min.js.map |
@@ -1,2 +0,2 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Vue=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Vue,b&&b.config){var c=b.config.errorHandler;b.config.errorHandler=function(d,e){a.captureException(d,{extra:{componentName:b.util.formatComponentName(e),propsData:e.$options.propsData}}),"function"==typeof c&&c.call(this,d,e)}}}b.exports=d},{}]},{},[1])(1)}); | ||
//# sourceMappingURL=vue.min.js.map |
@@ -1,3 +0,3 @@ | ||
/*! Raven.js 3.6.1 (8c680b0) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b="undefined"!=typeof document,this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=window.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=window.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}var f=a(7),g=a(2),h=a(6),i=a(1),j=h.isFunction,k=h.isUndefined,l=h.isError,m=h.isEmptyObject,n=h.hasKey,o=h.joinRegExp,p=h.each,q=h.objectMerge,r=h.truncate,s=h.urlencode,t=h.uuid4,u=h.htmlTreeAsString,v=h.parseUrl,w=h.isString,x=h.fill,y=a(3).wrapMethod,z="source protocol user pass host port path".split(" "),A=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;e.prototype={VERSION:"3.6.1",debug:!1,TraceKit:f,config:function(a,b){var c=this;if(this.e)return this.v("error","Error: Raven has already been configured"),this;if(!a)return this;b&&p(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:c.i[a]=b}),this.setDSN(a),this.i.ignoreErrors.push(/^Script error\.?$/),this.i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this.i.ignoreErrors=o(this.i.ignoreErrors),this.i.ignoreUrls=this.i.ignoreUrls.length?o(this.i.ignoreUrls):!1,this.i.whitelistUrls=this.i.whitelistUrls.length?o(this.i.whitelistUrls):!1,this.i.includePaths=o(this.i.includePaths),this.i.maxBreadcrumbs=Math.max(0,Math.min(this.i.maxBreadcrumbs||100,100));var d={xhr:!0,console:!0,dom:!0,location:!0},e=this.i.autoBreadcrumbs;return"[object Object]"==={}.toString.call(e)?e=q(d,e):e!==!1&&(e=d),this.i.autoBreadcrumbs=e,f.collectWindowErrors=!!this.i.collectWindowErrors,this},install:function(){var a=this;return this.isSetup()&&!this.k&&(f.report.subscribe(function(){a.w.apply(a,arguments)}),this.x(),a.i.autoBreadcrumbs&&this.y(),this.z(),this.k=!0),Error.stackTraceLimit=this.i.stackTraceLimit,this},setDSN:function(a){var b=this.A(a),c=b.path.lastIndexOf("/"),d=b.path.substr(1,c);this.B=a,this.f=b.user,this.C=b.pass&&b.pass.substr(1),this.g=b.path.substr(c+1),this.e=this.D(b),this.E=this.e+"/"+d+"api/"+this.g+"/store/"},context:function(a,b,c){return j(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,g=!a||a&&a.deep!==!1;for(c&&j(c)&&c.apply(this,arguments);f--;)d[f]=g?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(h){throw e.F(),e.captureException(h,a),h}}var e=this;if(k(b)&&!j(a))return a;if(j(a)&&(b=a,a=void 0),!j(b))return b;try{if(b.G)return b}catch(f){return b}if(b.H)return b.H;for(var g in b)n(b,g)&&(d[g]=b[g]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return f.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!l(a))return this.captureMessage(a,q({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=f.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){var c=q({message:a+""},b);if(b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=q({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var g=f.computeStackTrace(d),h=this.L(g,b);c.stacktrace={frames:h.reverse()}}return this.M(c),this}},captureBreadcrumb:function(a){var b=q({timestamp:d()/1e3},a);return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=Array.prototype.slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(i(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=j(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=j(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return this.a?this.e?!0:(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1):!1},afterLoad:function(){var a=window.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(window.document){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new g("Missing eventId");var c=a.dsn||this.B;if(!c)throw new g("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var h=this.D(this.A(c)),i=document.createElement("script");i.async=!0,i.src=h+"/api/embed/error-page/"+e,(document.head||document.body).appendChild(i)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=document.createEventObject(),c.eventType=a);for(d in b)n(b,d)&&(c[d]=b[d]);if(document.createEvent)document.dispatchEvent(c);else try{document.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=u(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=v(this.t.href),d=v(b),e=v(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;e.length>f;++f)e[f]=arguments[f];var g=e[0];return j(g)&&(e[0]=c.wrap(g)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=window[a]&&window[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(x(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&("click"===d?j=c.P(d):"keypress"===d&&(j=c.R())),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),x(b,"removeEventListener",function(a){return function(b,c,d,e){return c=c&&(c.H?c.H:c),a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;x(window,"setTimeout",a,d),x(window,"setInterval",a,d),window.requestAnimationFrame&&x(window,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],g=0;f.length>g;g++)b(f[g]);var h=window.jQuery||window.$;h&&h.fn&&h.fn.ready&&x(h.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},y:function(){function a(a,c){a in c&&j(c[a])&&x(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in window){var e=XMLHttpRequest.prototype;x(e,"open",function(a){return function(c,d){return w(d)&&-1===d.indexOf(b.f)&&(this.T={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),x(e,"send",function(c){return function(d){function e(){if(f.T&&(1===f.readyState||4===f.readyState)){try{f.T.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.T})}}for(var f=this,g=["onload","onerror","onprogress"],h=0;g.length>h;h++)a(g[h],f);return"onreadystatechange"in f&&j(f.onreadystatechange)?x(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.dom&&this.b&&(document.addEventListener?(document.addEventListener("click",b.P("click"),!1),document.addEventListener("keypress",b.R(),!1)):(document.attachEvent("onclick",b.P("click")),document.attachEvent("onkeypress",b.R())));var f=window.chrome,g=f&&f.app&&f.app.runtime,h=!g&&window.history&&history.pushState;if(c.location&&h){var i=window.onpopstate;window.onpopstate=function(){var a=b.t.href;return b.S(b.u,a),i?i.apply(this,arguments):void 0},x(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in window&&console.log){var k=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};p(["debug","info","warn","error","log"],function(a,b){y(console,b,k)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},z:function(){var a=this;p(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=A.exec(a),c={},d=7;try{for(;d--;)c[z[d]]=b[d]||""}catch(e){throw new g("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new g("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(p(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;b.trimHeadFrames>e&&d.length>e;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},V:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=q({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.M(h)}},W:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=r(a.message,b)),a.exception){var c=a.exception.values[0];c.value=r(c.value,b)}return a},X:function(){if(this.b&&document.location&&document.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=document.location.href,document.referrer&&(a.headers.Referer=document.referrer),a}},M:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.X();e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=q(c,a),a.tags=q(q({},this.h.tags),a.tags),a.extra=q(q({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),m(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),j(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!m(a)&&(!j(b.shouldSendCallback)||b.shouldSendCallback(a))&&this.Y(a)},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=t()),a=this.W(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.C&&(e.sentry_secret=this.C);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.E;(d.transport||this.Z).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},Z:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+s(a.auth)),c.send(i(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){k(b)?delete this.h[a]:this.h[a]=q(this.h[a]||{},b)}},e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6,7:7}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(a){return void 0===a}function e(a){return"function"==typeof a}function f(a){return"[object String]"===u.toString.call(a)}function g(a){return"object"==typeof a&&null!==a}function h(a){for(var b in a)return!1;return!0}function i(a){var b=u.toString.call(a);return g(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function j(a,b){var c,e;if(d(a.length))for(c in a)m(a,c)&&b.call(null,c,a[c]);else if(e=a.length)for(c=0;e>c;c++)b.call(null,c,a[c])}function k(a,b){return b?(j(b,function(b,c){a[b]=c}),a):a}function l(a,b){return!b||b>=a.length?a:a.substr(0,b)+"…"}function m(a,b){return u.hasOwnProperty.call(a,b)}function n(a){for(var b,c=[],d=0,e=a.length;e>d;d++)b=a[d],f(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function o(a){var b=[];return j(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function p(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function q(){var a=window.crypto||window.msCrypto;if(!d(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);4>b.length;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function r(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=s(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function s(a){var b,c,d,e,g,h=[];if(!a||!a.tagName)return"";if(h.push(a.tagName.toLowerCase()),a.id&&h.push("#"+a.id),b=a.className,b&&f(b))for(c=b.split(" "),g=0;c.length>g;g++)h.push("."+c[g]);var i=["type","name","title","alt"];for(g=0;i.length>g;g++)d=i[g],e=a.getAttribute(d),e&&h.push("["+d+'="'+e+'"]');return h.join("")}function t(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var u=Object.prototype;b.exports={isUndefined:d,isFunction:e,isString:f,isObject:g,isEmptyObject:h,isError:i,each:j,objectMerge:k,truncate:l,hasKey:m,joinRegExp:n,urlencode:o,uuid4:q,htmlTreeAsString:r,htmlElementAsString:s,parseUrl:p,fill:t}},{}],7:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e=a(6),f=e.hasKey,g=e.isString,h=e.isUndefined,i={collectWindowErrors:!0,debug:!1},j=[].slice,k="?",l=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;i.report=function(){function a(a){m(),s.push(a)}function b(a){for(var b=s.length-1;b>=0;--b)s[b]===a&&s.splice(b,1)}function c(){n(),s=[]}function e(a,b){var c=null;if(!b||i.collectWindowErrors){for(var d in s)if(f(s,d))try{s[d].apply(null,[a].concat(j.call(arguments,2)))}catch(e){c=e}if(c)throw c}}function h(a,b,c,f,h){var j=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,b,c,a),o();else if(h)j=i.computeStackTrace(h),e(j,!0);else{var m,n={url:b,line:c,column:f},p=void 0,r=a;if(g(a)){var m=a.match(l);m&&(p=m[1],r=m[2])}n.func=k,j={name:p,message:r,url:d(),stack:[n]},e(j,!0)}return q?q.apply(this,arguments):!1}function m(){r||(q=window.onerror,window.onerror=h,r=!0)}function n(){r&&(window.onerror=q,r=!1,q=void 0)}function o(){var a=v,b=t;t=null,v=null,u=null,e.apply(null,[a,!1].concat(b))}function p(a,b){var c=j.call(arguments,1);if(v){if(u===a)return;o()}var d=i.computeStackTrace(a);if(v=d,u=a,t=c,window.setTimeout(function(){u===a&&o()},d.incomplete?2e3:0),b!==!1)throw a}var q,r,s=[],t=null,u=null,v=null;return p.subscribe=a,p.unsubscribe=b,p.uninstall=c,p}(),i.computeStackTrace=function(){function a(a){if(!h(a.stack)&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],l=(/^(.*) is undefined$/.exec(a.message),0),m=i.length;m>l;++l){if(b=e.exec(i[l])){var n=b[2]&&-1!==b[2].indexOf("native");c={url:n?null:b[2],func:b[1]||k,args:n?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=g.exec(i[l]))c={url:b[2],func:b[1]||k,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[l])))continue;c={url:b[3],func:b[1]||k,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=k),j.push(c)}return j.length?(j[0].column||h(a.columnNumber)||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a){var b=a.stacktrace;if(!h(a.stacktrace)&&a.stacktrace){for(var c,e=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,g=b.split("\n"),i=[],j=0;g.length>j;j+=2){var l=null;(c=e.exec(g[j]))?l={url:c[2],line:+c[1],column:null,func:c[3],args:[]}:(c=f.exec(g[j]))&&(l={url:c[6],line:+c[1],column:+c[2],func:c[3]||c[4],args:c[5]?c[5].split(","):[]}),l&&(!l.func&&l.line&&(l.func=k),i.push(l))}return i.length?{name:a.name,message:a.message,url:d(),stack:i}:null}}function c(a){var b=a.message.split("\n");if(4>b.length)return null;for(var c,e=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,f=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,g=/^\s*Line (\d+) of function script\s*$/i,h=[],i=(document.getElementsByTagName("script"),2);b.length>i;i+=2){var j=null;if(c=e.exec(b[i]))j={url:c[2],func:c[3],args:[],line:+c[1],column:null};else if(c=f.exec(b[i])){j={url:c[3],func:c[4],args:[],line:+c[1],column:null}}else if(c=g.exec(b[i])){var l=window.location.href.replace(/#.*$/,"");j={url:l,func:"",args:[],line:c[1],column:null}}j&&(j.func||(j.func=k),h.push(j))}return h.length?{name:a.name,message:b[0],url:d(),stack:h}:null}function e(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=k),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function f(a,b){for(var c,h,j=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=f.caller;o&&!n;o=o.caller)if(o!==g&&o!==i.report){if(h={url:null,func:k,line:null,column:null},o.name?h.func=o.name:(c=j.exec(o.toString()))&&(h.func=c[1]),"undefined"==typeof h.func)try{h.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(h)}b&&l.splice(0,b);var q={name:a.name,message:a.message,url:d(),stack:l};return e(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function g(e,g){var h=null;g=null==g?0:+g;try{if(h=b(e))return h}catch(j){if(i.debug)throw j}try{if(h=a(e))return h}catch(j){if(i.debug)throw j}try{if(h=c(e))return h}catch(j){if(i.debug)throw j}try{if(h=f(e,g+1))return h}catch(j){if(i.debug)throw j}return{name:e.name,message:e.message,url:d()}}return g.augmentStackTraceWithInitialElement=e,g.computeStackTraceFromStackProp=a,g}(),b.exports=i},{6:6}]},{},[5])(5)}); | ||
/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b="undefined"!=typeof document,this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=window.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=window.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}var f=a(7),g=a(2),h=a(6),i=a(1),j=h.isFunction,k=h.isUndefined,l=h.isError,m=h.isEmptyObject,n=h.hasKey,o=h.joinRegExp,p=h.each,q=h.objectMerge,r=h.truncate,s=h.urlencode,t=h.uuid4,u=h.htmlTreeAsString,v=h.parseUrl,w=h.isString,x=h.fill,y=a(3).wrapMethod,z="source protocol user pass host port path".split(" "),A=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;e.prototype={VERSION:"3.7.0",debug:!1,TraceKit:f,config:function(a,b){var c=this;if(this.e)return this.v("error","Error: Raven has already been configured"),this;if(!a)return this;b&&p(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:c.i[a]=b}),this.setDSN(a),this.i.ignoreErrors.push(/^Script error\.?$/),this.i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this.i.ignoreErrors=o(this.i.ignoreErrors),this.i.ignoreUrls=this.i.ignoreUrls.length?o(this.i.ignoreUrls):!1,this.i.whitelistUrls=this.i.whitelistUrls.length?o(this.i.whitelistUrls):!1,this.i.includePaths=o(this.i.includePaths),this.i.maxBreadcrumbs=Math.max(0,Math.min(this.i.maxBreadcrumbs||100,100));var d={xhr:!0,console:!0,dom:!0,location:!0},e=this.i.autoBreadcrumbs;return"[object Object]"==={}.toString.call(e)?e=q(d,e):e!==!1&&(e=d),this.i.autoBreadcrumbs=e,f.collectWindowErrors=!!this.i.collectWindowErrors,this},install:function(){var a=this;return this.isSetup()&&!this.k&&(f.report.subscribe(function(){a.w.apply(a,arguments)}),this.x(),a.i.autoBreadcrumbs&&this.y(),this.z(),this.k=!0),Error.stackTraceLimit=this.i.stackTraceLimit,this},setDSN:function(a){var b=this.A(a),c=b.path.lastIndexOf("/"),d=b.path.substr(1,c);this.B=a,this.f=b.user,this.C=b.pass&&b.pass.substr(1),this.g=b.path.substr(c+1),this.e=this.D(b),this.E=this.e+"/"+d+"api/"+this.g+"/store/"},context:function(a,b,c){return j(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,g=!a||a&&a.deep!==!1;for(c&&j(c)&&c.apply(this,arguments);f--;)d[f]=g?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(h){throw e.F(),e.captureException(h,a),h}}var e=this;if(k(b)&&!j(a))return a;if(j(a)&&(b=a,a=void 0),!j(b))return b;try{if(b.G)return b;if(b.H)return b.H}catch(f){return b}for(var g in b)n(b,g)&&(d[g]=b[g]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return f.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!l(a))return this.captureMessage(a,q({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=f.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){var c=q({message:a+""},b);if(b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=q({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var g=f.computeStackTrace(d),h=this.L(g,b);c.stacktrace={frames:h.reverse()}}return this.M(c),this}},captureBreadcrumb:function(a){var b=q({timestamp:d()/1e3},a);return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=Array.prototype.slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(i(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=j(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=j(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return this.a?this.e?!0:(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1):!1},afterLoad:function(){var a=window.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(window.document){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new g("Missing eventId");var c=a.dsn||this.B;if(!c)throw new g("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var h=this.D(this.A(c)),i=document.createElement("script");i.async=!0,i.src=h+"/api/embed/error-page/"+e,(document.head||document.body).appendChild(i)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=document.createEventObject(),c.eventType=a);for(d in b)n(b,d)&&(c[d]=b[d]);if(document.createEvent)document.dispatchEvent(c);else try{document.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=u(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=v(this.t.href),d=v(b),e=v(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;e.length>f;++f)e[f]=arguments[f];var g=e[0];return j(g)&&(e[0]=c.wrap(g)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=window[a]&&window[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(x(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&("click"===d?j=c.P(d):"keypress"===d&&(j=c.R())),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),x(b,"removeEventListener",function(a){return function(b,c,d,e){try{c=c&&(c.H?c.H:c)}catch(f){}return a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;x(window,"setTimeout",a,d),x(window,"setInterval",a,d),window.requestAnimationFrame&&x(window,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],g=0;f.length>g;g++)b(f[g]);var h=window.jQuery||window.$;h&&h.fn&&h.fn.ready&&x(h.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},y:function(){function a(a,c){a in c&&j(c[a])&&x(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in window){var e=XMLHttpRequest.prototype;x(e,"open",function(a){return function(c,d){return w(d)&&-1===d.indexOf(b.f)&&(this.T={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),x(e,"send",function(c){return function(d){function e(){if(f.T&&(1===f.readyState||4===f.readyState)){try{f.T.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.T})}}for(var f=this,g=["onload","onerror","onprogress"],h=0;g.length>h;h++)a(g[h],f);return"onreadystatechange"in f&&j(f.onreadystatechange)?x(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.dom&&this.b&&(document.addEventListener?(document.addEventListener("click",b.P("click"),!1),document.addEventListener("keypress",b.R(),!1)):(document.attachEvent("onclick",b.P("click")),document.attachEvent("onkeypress",b.R())));var f=window.chrome,g=f&&f.app&&f.app.runtime,h=!g&&window.history&&history.pushState;if(c.location&&h){var i=window.onpopstate;window.onpopstate=function(){var a=b.t.href;return b.S(b.u,a),i?i.apply(this,arguments):void 0},x(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in window&&console.log){var k=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};p(["debug","info","warn","error","log"],function(a,b){y(console,b,k)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},z:function(){var a=this;p(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=A.exec(a),c={},d=7;try{for(;d--;)c[z[d]]=b[d]||""}catch(e){throw new g("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new g("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(p(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;b.trimHeadFrames>e&&d.length>e;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},V:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=q({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.M(h)}},W:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=r(a.message,b)),a.exception){var c=a.exception.values[0];c.value=r(c.value,b)}return a},X:function(){if(this.b&&document.location&&document.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=document.location.href,document.referrer&&(a.headers.Referer=document.referrer),a}},M:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.X();e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=q(c,a),a.tags=q(q({},this.h.tags),a.tags),a.extra=q(q({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),m(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),j(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!m(a)&&(!j(b.shouldSendCallback)||b.shouldSendCallback(a))&&this.Y(a)},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=t()),a=this.W(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.C&&(e.sentry_secret=this.C);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.E;(d.transport||this.Z).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},Z:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+s(a.auth)),c.send(i(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){k(b)?delete this.h[a]:this.h[a]=q(this.h[a]||{},b)}},e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6,7:7}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(a){return void 0===a}function e(a){return"function"==typeof a}function f(a){return"[object String]"===u.toString.call(a)}function g(a){return"object"==typeof a&&null!==a}function h(a){for(var b in a)return!1;return!0}function i(a){var b=u.toString.call(a);return g(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function j(a,b){var c,e;if(d(a.length))for(c in a)m(a,c)&&b.call(null,c,a[c]);else if(e=a.length)for(c=0;e>c;c++)b.call(null,c,a[c])}function k(a,b){return b?(j(b,function(b,c){a[b]=c}),a):a}function l(a,b){return!b||b>=a.length?a:a.substr(0,b)+"…"}function m(a,b){return u.hasOwnProperty.call(a,b)}function n(a){for(var b,c=[],d=0,e=a.length;e>d;d++)b=a[d],f(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function o(a){var b=[];return j(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function p(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function q(){var a=window.crypto||window.msCrypto;if(!d(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);4>b.length;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function r(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=s(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function s(a){var b,c,d,e,g,h=[];if(!a||!a.tagName)return"";if(h.push(a.tagName.toLowerCase()),a.id&&h.push("#"+a.id),b=a.className,b&&f(b))for(c=b.split(" "),g=0;c.length>g;g++)h.push("."+c[g]);var i=["type","name","title","alt"];for(g=0;i.length>g;g++)d=i[g],e=a.getAttribute(d),e&&h.push("["+d+'="'+e+'"]');return h.join("")}function t(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var u=Object.prototype;b.exports={isUndefined:d,isFunction:e,isString:f,isObject:g,isEmptyObject:h,isError:i,each:j,objectMerge:k,truncate:l,hasKey:m,joinRegExp:n,urlencode:o,uuid4:q,htmlTreeAsString:r,htmlElementAsString:s,parseUrl:p,fill:t}},{}],7:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e=a(6),f=e.hasKey,g=e.isString,h=e.isUndefined,i={collectWindowErrors:!0,debug:!1},j=[].slice,k="?",l=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;i.report=function(){function a(a){m(),s.push(a)}function b(a){for(var b=s.length-1;b>=0;--b)s[b]===a&&s.splice(b,1)}function c(){n(),s=[]}function e(a,b){var c=null;if(!b||i.collectWindowErrors){for(var d in s)if(f(s,d))try{s[d].apply(null,[a].concat(j.call(arguments,2)))}catch(e){c=e}if(c)throw c}}function h(a,b,c,f,h){var j=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,b,c,a),o();else if(h)j=i.computeStackTrace(h),e(j,!0);else{var m,n={url:b,line:c,column:f},p=void 0,r=a;if(g(a)){var m=a.match(l);m&&(p=m[1],r=m[2])}n.func=k,j={name:p,message:r,url:d(),stack:[n]},e(j,!0)}return q?q.apply(this,arguments):!1}function m(){r||(q=window.onerror,window.onerror=h,r=!0)}function n(){r&&(window.onerror=q,r=!1,q=void 0)}function o(){var a=v,b=t;t=null,v=null,u=null,e.apply(null,[a,!1].concat(b))}function p(a,b){var c=j.call(arguments,1);if(v){if(u===a)return;o()}var d=i.computeStackTrace(a);if(v=d,u=a,t=c,window.setTimeout(function(){u===a&&o()},d.incomplete?2e3:0),b!==!1)throw a}var q,r,s=[],t=null,u=null,v=null;return p.subscribe=a,p.unsubscribe=b,p.uninstall=c,p}(),i.computeStackTrace=function(){function a(a){if(!h(a.stack)&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],l=(/^(.*) is undefined$/.exec(a.message),0),m=i.length;m>l;++l){if(b=e.exec(i[l])){var n=b[2]&&-1!==b[2].indexOf("native");c={url:n?null:b[2],func:b[1]||k,args:n?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=g.exec(i[l]))c={url:b[2],func:b[1]||k,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[l])))continue;c={url:b[3],func:b[1]||k,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=k),j.push(c)}return j.length?(j[0].column||h(a.columnNumber)||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=k),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function c(a,f){for(var g,h,j=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=c.caller;o&&!n;o=o.caller)if(o!==e&&o!==i.report){if(h={url:null,func:k,line:null,column:null},o.name?h.func=o.name:(g=j.exec(o.toString()))&&(h.func=g[1]),"undefined"==typeof h.func)try{h.func=g.input.substring(0,g.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(h)}f&&l.splice(0,f);var q={name:a.name,message:a.message,url:d(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function e(b,e){var f=null;e=null==e?0:+e;try{if(f=a(b))return f}catch(g){if(i.debug)throw g}try{if(f=c(b,e+1))return f}catch(g){if(i.debug)throw g}return{name:b.name,message:b.message,url:d()}}return e.augmentStackTraceWithInitialElement=b,e.computeStackTraceFromStackProp=a,e}(),b.exports=i},{6:6}]},{},[5])(5)}); | ||
//# sourceMappingURL=raven.min.js.map |
{ | ||
"@dist/raven.js": { | ||
"hashes": { | ||
"sha256": "ecZRD/BsOVlzLCDJwinYdV6NWcOnmWHN0Uw7cWnFJ2k=", | ||
"sha512": "Yf6vesrTj/GDukFf+vrtsRHNgTrjgvdHaZKS3mr+J2XKTsrHdqVor7cRd8Jao2hx5RzQaE2V8kQK41Y0w3bWtQ==" | ||
"sha256": "8w74dun2R8nzK1pIpqvuiHpesGXgBuqS15iCDzdxXUE=", | ||
"sha512": "I02dMJiw7GzEeeulDDbZepZc0MWNTOPIoGPc2XH0IbWPjOUWHoEHxK6IOxUGART1EIDb2FYpLUUHkrEb/Y6z7A==" | ||
}, | ||
"type": null, | ||
"integrity": "sha256-ecZRD/BsOVlzLCDJwinYdV6NWcOnmWHN0Uw7cWnFJ2k= sha512-Yf6vesrTj/GDukFf+vrtsRHNgTrjgvdHaZKS3mr+J2XKTsrHdqVor7cRd8Jao2hx5RzQaE2V8kQK41Y0w3bWtQ==", | ||
"integrity": "sha256-8w74dun2R8nzK1pIpqvuiHpesGXgBuqS15iCDzdxXUE= sha512-I02dMJiw7GzEeeulDDbZepZc0MWNTOPIoGPc2XH0IbWPjOUWHoEHxK6IOxUGART1EIDb2FYpLUUHkrEb/Y6z7A==", | ||
"path": "dist/raven.js" | ||
@@ -13,9 +13,9 @@ }, | ||
"hashes": { | ||
"sha256": "VmYZPllL21g2wCZj3YU5Yi9fjyITrkuFZgEMM+qeyLY=", | ||
"sha512": "wtDbnF+apf6MpUPOc0D1wP+gbAZb3inbQU3wmhd+eTbND1jI989Akpj84yZRvfJb/Hq2nRhZJif2M6QGQfkBJw==" | ||
"sha256": "uCHaQ1E26fWBtMtos5BZpowPGZopSfsJM7n0PAOSzo8=", | ||
"sha512": "Umw+gSg7aL2QUNiF2SROJziXE3RNe8S8GB57fwEMyvcTxc11YoSfj7zMXvHTkcKquYuSZ8ggZaYFspTgL9QO2Q==" | ||
}, | ||
"type": null, | ||
"integrity": "sha256-VmYZPllL21g2wCZj3YU5Yi9fjyITrkuFZgEMM+qeyLY= sha512-wtDbnF+apf6MpUPOc0D1wP+gbAZb3inbQU3wmhd+eTbND1jI989Akpj84yZRvfJb/Hq2nRhZJif2M6QGQfkBJw==", | ||
"integrity": "sha256-uCHaQ1E26fWBtMtos5BZpowPGZopSfsJM7n0PAOSzo8= sha512-Umw+gSg7aL2QUNiF2SROJziXE3RNe8S8GB57fwEMyvcTxc11YoSfj7zMXvHTkcKquYuSZ8ggZaYFspTgL9QO2Q==", | ||
"path": "dist/raven.min.js" | ||
} | ||
} |
{ | ||
"name": "raven-js", | ||
"version": "3.6.1", | ||
"version": "3.7.0", | ||
"license": "BSD-2-Clause", | ||
@@ -9,3 +9,3 @@ "homepage": "https://github.com/getsentry/raven-js", | ||
"test": "grunt test && npm run-script test-typescript", | ||
"test-typescript": "node_modules/typescript/bin/tsc --noEmit typescript/raven-tests.ts" | ||
"test-typescript": "node_modules/typescript/bin/tsc --noEmit --noImplicitAny typescript/raven-tests.ts" | ||
}, | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -5,4 +5,11 @@ # Raven.js [![Build Status](https://travis-ci.org/getsentry/raven-js.svg?branch=master)](https://travis-ci.org/getsentry/raven-js) | ||
**Raven.js v2.0 requires Sentry v8.0.0 or later.** | ||
## Requirements | ||
The latest version of Raven.js is guaranteed to work with [hosted Sentry](https://sentry.io). | ||
For on-premise users: | ||
* Raven.js [3.6](https://github.com/getsentry/raven-js/releases/tag/3.6.0) requires Sentry server 8.6.0 or later | ||
* Raven.js [2.0](https://github.com/getsentry/raven-js/releases/tag/2.0.0) requires Sentry server 8.0.0 or later | ||
## Resources | ||
@@ -9,0 +16,0 @@ |
@@ -92,3 +92,3 @@ /*global XDomainRequest:false*/ | ||
// See: https://github.com/getsentry/raven-js/issues/465 | ||
VERSION: '3.6.1', | ||
VERSION: '3.7.0', | ||
@@ -262,4 +262,9 @@ debug: false, | ||
} | ||
// If this has already been wrapped in the past, return that | ||
if (func.__raven_wrapper__ ){ | ||
return func.__raven_wrapper__ ; | ||
} | ||
} catch (e) { | ||
// Just accessing the __raven__ prop in some Selenium environments | ||
// Just accessing custom props in some Selenium environments | ||
// can cause a "Permission denied" exception (see raven-js#495). | ||
@@ -270,7 +275,2 @@ // Bail on wrapping and return the function as-is (defers to window.onerror). | ||
// If this has already been wrapped in the past, return that | ||
if (func.__raven_wrapper__ ){ | ||
return func.__raven_wrapper__ ; | ||
} | ||
function wrapped() { | ||
@@ -870,3 +870,7 @@ var args = [], i = arguments.length, | ||
return function (evt, fn, capture, secure) { | ||
fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn); | ||
try { | ||
fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn); | ||
} catch (e) { | ||
// ignore, accessing __raven_wrapper__ will throw in some Selenium environments | ||
} | ||
return orig.call(this, evt, fn, capture, secure); | ||
@@ -873,0 +877,0 @@ }; |
@@ -174,73 +174,11 @@ /*global Mocha, assert*/ | ||
it('should parse Opera 8.54 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_854); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 7); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '?', args: [], line: 44, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: '?', args: [], line: 31, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: '?', args: [], line: 18, column: null }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: '?', args: [], line: 4, column: null }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: '?', args: [], line: 7, column: null }); | ||
assert.deepEqual(stackFrames.stack[5], { url: 'http://path/to/file.js', func: '?', args: [], line: 11, column: null }); | ||
assert.deepEqual(stackFrames.stack[6], { url: 'http://path/to/file.js', func: '?', args: [], line: 15, column: null }); | ||
}); | ||
it('should parse Opera 9.02 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_902); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 7); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '?', args: [], line: 44, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: '?', args: [], line: 31, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: '?', args: [], line: 18, column: null }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: '?', args: [], line: 4, column: null }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: '?', args: [], line: 7, column: null }); | ||
assert.deepEqual(stackFrames.stack[5], { url: 'http://path/to/file.js', func: '?', args: [], line: 11, column: null }); | ||
assert.deepEqual(stackFrames.stack[6], { url: 'http://path/to/file.js', func: '?', args: [], line: 15, column: null }); | ||
}); | ||
it('should parse Opera 9.27 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_927); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 3); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '?', args: [], line: 43, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: '?', args: [], line: 31, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: '?', args: [], line: 18, column: null }); | ||
}); | ||
it('should parse Opera 9.64 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_964); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 6); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '?', args: [], line: 27, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: 'printStackTrace', args: [], line: 18, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: 'bar', args: [], line: 4, column: null }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: 'bar', args: [], line: 7, column: null }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: 'foo', args: [], line: 11, column: null }); | ||
assert.deepEqual(stackFrames.stack[5], { url: 'http://path/to/file.js', func: '?', args: [], line: 15, column: null }); | ||
}); | ||
it('should parse Opera 10 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_10); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 7); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '?', args: [], line: 42, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: '?', args: [], line: 27, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: 'printStackTrace', args: [], line: 18, column: null }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: 'bar', args: [], line: 4, column: null }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: 'bar', args: [], line: 7, column: null }); | ||
assert.deepEqual(stackFrames.stack[5], { url: 'http://path/to/file.js', func: 'foo', args: [], line: 11, column: null }); | ||
assert.deepEqual(stackFrames.stack[6], { url: 'http://path/to/file.js', func: '?', args: [], line: 15, column: null }); | ||
}); | ||
it('should parse Opera 11 error', function () { | ||
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.OPERA_11); | ||
assert.ok(stackFrames); | ||
assert.deepEqual(stackFrames.stack.length, 7); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: 'createException', args: [], line: 42, column: 12 }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://path/to/file.js', func: 'run', args: ['ex'], line: 27, column: 8 }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://path/to/file.js', func: 'printStackTrace', args: ['options'], line: 18, column: 4 }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: 'bar', args: ['n'], line: 4, column: 5 }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: 'bar', args: ['n'], line: 7, column: 4 }); | ||
assert.deepEqual(stackFrames.stack[5], { url: 'http://path/to/file.js', func: 'foo', args: [], line: 11, column: 4 }); | ||
assert.deepEqual(stackFrames.stack[6], { url: 'http://path/to/file.js', func: '?', args: [], line: 15, column: 3 }); | ||
assert.deepEqual(stackFrames.stack.length, 5); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://path/to/file.js', func: '<anonymous function: run>', args: ['[arguments not available]'], line: 27, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://domain.com:1234/path/to/file.js', func: 'bar', args: ['[arguments not available]'], line: 18, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://domain.com:1234/path/to/file.js', func: 'foo', args: ['[arguments not available]'], line: 11, column: null }); | ||
assert.deepEqual(stackFrames.stack[3], { url: 'http://path/to/file.js', func: '<anonymous function>', args: [], line: 15, column: null }); | ||
assert.deepEqual(stackFrames.stack[4], { url: 'http://path/to/file.js', func: 'Error created at <anonymous function>', args: [], line: 15, column: null }); | ||
}); | ||
@@ -253,5 +191,5 @@ | ||
assert.deepEqual(stackFrames.stack.length, 3); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://localhost:8000/ExceptionLab.html', func: '<anonymous function>', args: ['x'], line: 48, column: 12 }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://localhost:8000/ExceptionLab.html', func: 'dumpException3', args: [], line: 46, column: 8 }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://localhost:8000/ExceptionLab.html', func: '<anonymous function>', args: ['event'], line: 1, column: 0 }); | ||
assert.deepEqual(stackFrames.stack[0], { url: 'http://localhost:8000/ExceptionLab.html', func: '<anonymous function>', args: ['[arguments not available]'], line: 48, column: null }); | ||
assert.deepEqual(stackFrames.stack[1], { url: 'http://localhost:8000/ExceptionLab.html', func: 'dumpException3', args: ['[arguments not available]'], line: 46, column: null }); | ||
assert.deepEqual(stackFrames.stack[2], { url: 'http://localhost:8000/ExceptionLab.html', func: '<anonymous function>', args: ['[arguments not available]'], line: 1, column: null }); | ||
}); | ||
@@ -258,0 +196,0 @@ |
@@ -62,6 +62,6 @@ import Raven = require('..'); | ||
Raven.setDataCallback(function (data) {}); | ||
Raven.setDataCallback(function (data, original) {}); | ||
Raven.setShouldSendCallback(function (data) {}); | ||
Raven.setShouldSendCallback(function (data, original) {}); | ||
Raven.setDataCallback(function (data: any) {}); | ||
Raven.setDataCallback(function (data: any, original: any) {}); | ||
Raven.setShouldSendCallback(function (data: any) {}); | ||
Raven.setShouldSendCallback(function (data: any, original: any) {}); | ||
@@ -68,0 +68,0 @@ Raven.showReportDialog({ |
@@ -214,3 +214,3 @@ // Type definitions for Raven.js | ||
/** Show Sentry user feedback dialog */ | ||
showReportDialog(options: Object); | ||
showReportDialog(options: Object): void; | ||
} | ||
@@ -217,0 +217,0 @@ |
@@ -449,149 +449,2 @@ 'use strict'; | ||
/** | ||
* Computes stack trace information from the stacktrace property. | ||
* Opera 10 uses this property. | ||
* @param {Error} ex | ||
* @return {?Object.<string, *>} Stack trace information. | ||
*/ | ||
function computeStackTraceFromStacktraceProp(ex) { | ||
// Access and store the stacktrace property before doing ANYTHING | ||
// else to it because Opera is not very good at providing it | ||
// reliably in other circumstances. | ||
var stacktrace = ex.stacktrace; | ||
if (isUndefined(ex.stacktrace) || !ex.stacktrace) return; | ||
var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i, | ||
opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i, | ||
lines = stacktrace.split('\n'), | ||
stack = [], | ||
parts; | ||
for (var line = 0; line < lines.length; line += 2) { | ||
var element = null; | ||
if ((parts = opera10Regex.exec(lines[line]))) { | ||
element = { | ||
'url': parts[2], | ||
'line': +parts[1], | ||
'column': null, | ||
'func': parts[3], | ||
'args':[] | ||
}; | ||
} else if ((parts = opera11Regex.exec(lines[line]))) { | ||
element = { | ||
'url': parts[6], | ||
'line': +parts[1], | ||
'column': +parts[2], | ||
'func': parts[3] || parts[4], | ||
'args': parts[5] ? parts[5].split(',') : [] | ||
}; | ||
} | ||
if (element) { | ||
if (!element.func && element.line) { | ||
element.func = UNKNOWN_FUNCTION; | ||
} | ||
stack.push(element); | ||
} | ||
} | ||
if (!stack.length) { | ||
return null; | ||
} | ||
return { | ||
'name': ex.name, | ||
'message': ex.message, | ||
'url': getLocationHref(), | ||
'stack': stack | ||
}; | ||
} | ||
/** | ||
* NOT TESTED. | ||
* Computes stack trace information from an error message that includes | ||
* the stack trace. | ||
* Opera 9 and earlier use this method if the option to show stack | ||
* traces is turned on in opera:config. | ||
* @param {Error} ex | ||
* @return {?Object.<string, *>} Stack information. | ||
*/ | ||
function computeStackTraceFromOperaMultiLineMessage(ex) { | ||
// Opera includes a stack trace into the exception message. An example is: | ||
// | ||
// Statement on line 3: Undefined variable: undefinedFunc | ||
// Backtrace: | ||
// Line 3 of linked script file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.js: In function zzz | ||
// undefinedFunc(a); | ||
// Line 7 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function yyy | ||
// zzz(x, y, z); | ||
// Line 3 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function xxx | ||
// yyy(a, a, a); | ||
// Line 1 of function script | ||
// try { xxx('hi'); return false; } catch(ex) { TraceKit.report(ex); } | ||
// ... | ||
var lines = ex.message.split('\n'); | ||
if (lines.length < 4) { | ||
return null; | ||
} | ||
var lineRE1 = /^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i, | ||
lineRE2 = /^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i, | ||
lineRE3 = /^\s*Line (\d+) of function script\s*$/i, | ||
stack = [], | ||
scripts = document.getElementsByTagName('script'), | ||
parts; | ||
for (var line = 2; line < lines.length; line += 2) { | ||
var item = null; | ||
if ((parts = lineRE1.exec(lines[line]))) { | ||
item = { | ||
'url': parts[2], | ||
'func': parts[3], | ||
'args': [], | ||
'line': +parts[1], | ||
'column': null | ||
}; | ||
} else if ((parts = lineRE2.exec(lines[line]))) { | ||
item = { | ||
'url': parts[3], | ||
'func': parts[4], | ||
'args': [], | ||
'line': +parts[1], | ||
'column': null // TODO: Check to see if inline#1 (+parts[2]) points to the script number or column number. | ||
}; | ||
var relativeLine = (+parts[1]); // relative to the start of the <SCRIPT> block | ||
} else if ((parts = lineRE3.exec(lines[line]))) { | ||
var url = window.location.href.replace(/#.*$/, ''); | ||
item = { | ||
'url': url, | ||
'func': '', | ||
'args': [], | ||
'line': parts[1], | ||
'column': null | ||
}; | ||
} | ||
if (item) { | ||
if (!item.func) { | ||
item.func = UNKNOWN_FUNCTION; | ||
} | ||
stack.push(item); | ||
} | ||
} | ||
if (!stack.length) { | ||
return null; // could not parse multiline exception message as Opera stack trace | ||
} | ||
return { | ||
'name': ex.name, | ||
'message': lines[0], | ||
'url': getLocationHref(), | ||
'stack': stack | ||
}; | ||
} | ||
/** | ||
* Adds information about the first frame to incomplete stack traces. | ||
@@ -721,16 +574,2 @@ * Safari and IE require this to get complete data on the first frame. | ||
try { | ||
// This must be tried first because Opera 10 *destroys* | ||
// its stacktrace property if you try to access the stack | ||
// property first!! | ||
stack = computeStackTraceFromStacktraceProp(ex); | ||
if (stack) { | ||
return stack; | ||
} | ||
} catch (e) { | ||
if (TraceKit.debug) { | ||
throw e; | ||
} | ||
} | ||
try { | ||
stack = computeStackTraceFromStackProp(ex); | ||
@@ -747,13 +586,2 @@ if (stack) { | ||
try { | ||
stack = computeStackTraceFromOperaMultiLineMessage(ex); | ||
if (stack) { | ||
return stack; | ||
} | ||
} catch (e) { | ||
if (TraceKit.debug) { | ||
throw e; | ||
} | ||
} | ||
try { | ||
stack = computeStackTraceByWalkingCallerChain(ex, depth + 1); | ||
@@ -760,0 +588,0 @@ if (stack) { |
Sorry, the diff of this file is too big to display
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 too big to display
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
21
615654
9744