@honeybadger-io/js
Advanced tools
Comparing version 3.0.0-alpha.5 to 3.0.0-alpha.6
@@ -20,2 +20,3 @@ // Type definitions for honeybadger.js | ||
apiKey: string | undefined | ||
endpoint: string, | ||
developmentEnvironments: string[] | ||
@@ -22,0 +23,0 @@ environment: string | undefined |
@@ -391,2 +391,7 @@ (function (global, factory) { | ||
} | ||
function endpoint(config, path) { | ||
var endpoint = config.endpoint.trim().replace(/\/$/, ''); | ||
path = path.trim().replace(/(^\/|\/$)/g, ''); | ||
return endpoint + "/" + path; | ||
} | ||
@@ -396,3 +401,3 @@ var notifier = { | ||
url: 'https://github.com/honeybadger-io/honeybadger-js', | ||
version: '3.0.0-alpha.5' | ||
version: '3.0.0-alpha.6' | ||
}; | ||
@@ -407,3 +412,3 @@ var Client = /** @class */ (function () { | ||
this.__afterNotifyHandlers = []; | ||
this.config = __assign({ apiKey: null, environment: null, projectRoot: null, component: null, action: null, revision: null, reportData: null, breadcrumbsEnabled: true, maxBreadcrumbs: 40, maxObjectDepth: 8, ignorePatterns: [], logger: console, developmentEnvironments: ['dev', 'development', 'test'], disabled: false, debug: false, __plugins: [] }, opts); | ||
this.config = __assign({ apiKey: null, endpoint: 'https://api.honeybadger.io', environment: null, projectRoot: null, component: null, action: null, revision: null, reportData: null, breadcrumbsEnabled: true, maxBreadcrumbs: 40, maxObjectDepth: 8, ignorePatterns: [], logger: console, developmentEnvironments: ['dev', 'development', 'test'], disabled: false, debug: false, __plugins: [] }, opts); | ||
this.logger = logger(this); | ||
@@ -1224,3 +1229,3 @@ } | ||
var x_1 = new XMLHttpRequest(); | ||
x_1.open('POST', 'https://api.honeybadger.io/v1/notices/js', this.config.async); | ||
x_1.open('POST', endpoint(this.config, '/v1/notices/js'), this.config.async); | ||
x_1.setRequestHeader('X-API-Key', this.config.apiKey); | ||
@@ -1227,0 +1232,0 @@ x_1.setRequestHeader('Content-Type', 'application/json'); |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Honeybadger=t()}(this,function(){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o="<unknown>";function t(e){return e.split("\n").reduce(function(e,t){t=function(e){var t=i.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),e=a.exec(t[2]);r&&null!=e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3]);return{file:n?null:t[2],methodName:t[1]||o,arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){e=c.exec(e);return e?{file:e[2],methodName:e[1]||o,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(t)||function(e){var t=s.exec(e);if(!t)return null;var n=t[3]&&-1<t[3].indexOf(" > eval"),e=u.exec(t[3]);n&&null!=e&&(t[3]=e[1],t[4]=e[2],t[5]=null);return{file:t[3],methodName:t[1]||o,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){e=f.exec(e);return e?{file:e[2],methodName:e[1]||o,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(t)||function(e){e=l.exec(e);return e?{file:e[3],methodName:e[1]||o,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}(t);return t&&e.push(t),e},[])}var i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/;var c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var l=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var f=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function d(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r}function p(e,t){var n=d(e,t);return e.context&&t.context&&(n.context=d(e.context,t.context)),n}function h(e,t,n){void 0===n&&(n=void 0);for(var r=0,o=t.length;r<o;r++)t[r](n,e);return 1}function m(e){if("object"!=typeof e)return{};var t,n={};for(t in e)n[t]=e[t];return n}function g(e,c){void 0===c&&(c=8);var s=[];return function t(e,n){if(void 0===n&&(n=0),c<=n)return"[DEPTH]";if(/function|symbol/.test(typeof(r=e))||null===r||"object"==typeof r&&void 0===r.hasOwnProperty)return Object.prototype.toString.call(e);var r;if(function(e){if(e&&"object"==typeof e){for(var t=0;t<s.length;t++)if(s[t]===e)return 1;s.push(e)}}(e))return"[RECURSION]";if(Array.isArray(e))return e.map(function(e){return t(e,n+1)});if("object"!=typeof e)return e;var o,i={};for(o in e){var a=e[o];Object.prototype.hasOwnProperty.call(e,o)&&null!=o&&null!=a&&(i[o]=t(a,n+1))}return i}(e)}function y(o){function e(r){return function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"debug"===r&&!o.config.debug||(t.unshift("[Honeybadger]"),(e=o.config.logger)[r].apply(e,t))}}return{log:e("log"),info:e("info"),debug:e("debug"),warn:e("warn"),error:e("error")}}function b(e){return e?"[object Error]"===Object.prototype.toString.call(e)?d(e,{name:e.name,message:e.message,stack:e.stack}):"object"==typeof e?m(e):{message:String(e)}:{}}function _(e,t,n){if(e&&t&&n&&t in e){for(var r=e[t];r&&r.__hb_original;)r=r.__hb_original;e[t]=n(r),e[t].__hb_original=r}}var v={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"3.0.0-alpha.5"},e=(w.prototype.factory=function(e){throw new Error("Must implement __factory in subclass")},w.prototype.getVersion=function(){return v.version},w.prototype.configure=function(e){var t,n=this;for(t in void 0===e&&(e={}),e)this.config[t]=e[t];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach(function(e){return e.load(n)})),this},w.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},w.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},w.prototype.setContext=function(e){return"object"==typeof e&&(this.__context=d(this.__context,e)),this},w.prototype.resetContext=function(e){return this.__context="object"==typeof e?d({},e):{},this},w.prototype.notify=function(e,t,n){return void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.config.apiKey?this.config.disabled?(this.logger.warn("Deprecation warning: instead of `disabled: true`, use `reportData: false` to explicitly disable Honeybadger reporting. (Dropping notice: honeybadger.js is disabled)"),!1):this.__reportData()?(e=b(e),t&&"object"!=typeof t&&(t={name:String(t)}),t&&(e=p(e,t)),"object"==typeof n&&(e=p(e,n)),!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return;return 1}(e)&&(!!function(e,t){for(var n=0,r=t.length;n<r;n++)if(!1===(0,t[n])(e))return;return 1}(e=d(e,{name:e.name||"Error",context:d(this.__context,e.context),projectRoot:e.projectRoot||this.config.projectRoot,environment:e.environment||this.config.environment,component:e.component||this.config.component,action:e.action||this.config.action,revision:e.revision||this.config.revision}),this.__beforeNotifyHandlers)&&(r=e,n=this.config.ignorePatterns,(!Array.isArray(n)||!n.some(function(e){return e.test(r.message)}))&&(this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:e.message,name:e.name,stack:e.stack}}),e.__breadcrumbs=this.config.breadcrumbsEnabled?this.__breadcrumbs.slice():[],this.__send(e))))):(this.logger.debug("Dropping notice: honeybadger.js is in development mode"),!1):(this.logger.warn("Unable to send error report: no API key has been configured"),!1);var r},w.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){var n=m((t=t||{}).metadata),r=t.category||"custom",t=(new Date).toISOString();this.__breadcrumbs.push({category:r,message:e,metadata:n,timestamp:t});t=this.config.maxBreadcrumbs;return this.__breadcrumbs.length>t&&(this.__breadcrumbs=this.__breadcrumbs.slice(this.__breadcrumbs.length-t)),this}},w.prototype.__reportData=function(){return null!==this.config.reportData?this.config.reportData:!(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},w.prototype.__send=function(e){throw new Error("Must implement send in subclass")},w.prototype.__buildPayload=function(e){return{notifier:v,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:function(e){if("string"!=typeof e)return[];try{return t(e).map(function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}})}catch(e){return[]}}(e.stack),raw_backtrace:e.stack,fingerprint:e.fingerprint},request:{url:e.url,component:e.component,action:e.action,context:e.context,cgi_data:e.cgiData||{},params:e.params},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision}}},w);function w(e){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__context={},this.__breadcrumbs=[],this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=r({apiKey:null,environment:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,ignorePatterns:[],logger:console,developmentEnvironments:["dev","development","test"],disabled:!1,debug:!1,__plugins:[]},e),this.logger=y(this)}function E(n){if(!n||!n.tagName)return"";var r=n.tagName.toLowerCase();if("html"===r)return"";n.id&&(r+="#"+n.id);var e=n.getAttribute("class");e&&e.split(/\s+/).forEach(function(e){r+="."+e}),["alt","name","title","type"].forEach(function(e){var t=n.getAttribute(e);t&&(r+="["+e+'="'+t+'"]')});e=function(t){try{var e=t.parentNode.childNodes,n=[];return Array.prototype.forEach.call(e,function(e){e.tagName&&e.tagName===t.tagName&&n.push(e)}),n}catch(e){return[]}}(n);return 1<e.length&&(r+=":nth-child("+(Array.prototype.indexOf.call(e,n)+1)+")"),r}function x(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)}function j(e){return-1!==e.toString().indexOf("native")}function k(e){e=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:e[2],host:e[4],pathname:e[5]}}function N(e){var t=k(e),e=k(document.URL);return!t.host||!t.protocol||t.protocol===e.protocol&&t.host===e.host?t.pathname:t.protocol+"://"+t.host+t.pathname}var O,T,S,R,H,P,A,C,q,D=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}(),L=0;function B(){this.constructor=S}function M(e){void 0===e&&(e={});var t=T.call(this,r({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},e))||this;return t.__errorsSent=0,t.__lastWrapErr=void 0,t.__beforeNotifyHandlers=[function(e){return t.__exceedsMaxErrors()?(t.logger.debug("Dropping notice: max errors exceeded",e),!1):(e.url||(e.url=document.URL),!0)}],t}return new(n(S=M,R=T=e),S.prototype=null===R?Object.create(R):(B.prototype=R.prototype,new B),M.prototype.resetMaxErrors=function(){return this.__errorsSent=0},M.prototype.wrap=function(e){return this.__wrap(e,{catch:!0})},M.prototype.factory=function(e){return new M(e)},M.prototype.__buildPayload=function(e){var t={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};t.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(t.HTTP_REFERER=document.referrer),"string"==typeof e.cookies?t.HTTP_COOKIE=e.cookies:"object"==typeof e.cookies&&(t.HTTP_COOKIE=function(e){if("object"==typeof e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(";")}}(e.cookies));e=T.prototype.__buildPayload.call(this,e);return e.request.cgi_data=d(t,e.request.cgi_data),e},M.prototype.__send=function(t){var e=this;this.__incrementErrorsCount();var n=this.__buildPayload(t),r=Array.prototype.slice.call(this.__afterNotifyHandlers);t.afterNotify&&r.unshift(t.afterNotify);try{var o=new XMLHttpRequest;o.open("POST","https://api.honeybadger.io/v1/notices/js",this.config.async),o.setRequestHeader("X-API-Key",this.config.apiKey),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","text/json, application/json"),o.send(JSON.stringify(g(n,this.config.maxObjectDepth))),o.onload=function(){if(201!==o.status)return h(t,r,new Error("Bad HTTP response: "+o.status)),void e.logger.debug("Unable to send error report: "+o.status+": "+o.statusText,o,t);h(d(t,{id:JSON.parse(o.response).id}),r),e.logger.debug("Error report sent",t)}}catch(e){h(t,r,e),this.logger.error("Unable to send error report: error while initializing request",e,t)}return!0},M.prototype.__wrap=function(e,t){void 0===t&&(t={});var n,r,o=e;t=t||{};try{return"function"!=typeof o?o:(r=o,"function"!=typeof Object.isExtensible||Object.isExtensible(r)?(o.___hb||(n=this,o.___hb=function(){var e=n.config.onerror;if(!t.catch&&!D&&e)return o.apply(this,arguments);try{return o.apply(this,arguments)}catch(e){if(n.__lastWrapErr===e)throw e;throw n.__lastWrapErr=e,L+=1,clearTimeout(O),O=setTimeout(function(){L=0}),n.addBreadcrumb(t.component?t.component+": "+e.name:e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),n.notify(e),e}}),o.___hb.___hb=o.___hb,o.___hb):o)}catch(e){return o}},M.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},M.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},M)({__plugins:[(void 0===q&&(q=window),{load:function(a){void 0===a.config.onerror&&(a.config.onerror=!0),_(q,"onerror",function(i){return function(e,t,n,r,o){return function(e,t,n,r,o){if(a.logger.debug("window.onerror callback invoked",arguments),0<L)return a.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),--L;a.config.onerror&&(0===n&&/Script error\.?/.test(e)?a.logger.info("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments):((o=b(o)).name||(o.name="window.onerror"),o.message||(o.message=e),o.stack||(o.stack=[o.message,"\n at ? (",t||"unknown",":",n||0,":",r||0,")"].join("")),a.addBreadcrumb("window.onerror"!==o.name&&o.name?"window.onerror: "+o.name:"window.onerror",{category:"error",metadata:{name:o.name,message:o.message,stack:o.stack}}),a.notify(o)))}(e,t,n,r,o),"function"==typeof i&&i.apply(window,arguments)}})}}),(void 0===C&&(C=window),{load:function(n){void 0===n.config.onunhandledrejection&&(n.config.onunhandledrejection=!0),_(C,"onunhandledrejection",function(t){return function(e){!function(e){if(n.logger.debug("window.onunhandledrejection callback invoked",arguments),n.config.onunhandledrejection){var t=e.reason;if(t instanceof Error){e=t.message+"\n at ? (unknown:0)",e=t.stack||e,e={name:t.name,message:"UnhandledPromiseRejectionWarning: "+t,stack:e};return n.addBreadcrumb("window.onunhandledrejection: "+e.name,{category:"error",metadata:e}),n.notify(e)}t="string"==typeof t?t:JSON.stringify(t);n.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: "+t})}}(e),"function"==typeof t&&t.apply(this,arguments)}})}}),(void 0===A&&(A=window),{load:function(i){function e(o){return function(r){return function(e,t){if("function"!=typeof e)return r(e,t);var n=Array.prototype.slice.call(arguments,2);return e=i.__wrap(e,o),r(function(){e.apply(void 0,n)},t)}}}_(A,"setTimeout",e({component:"setTimeout"})),_(A,"setInterval",e({component:"setInterval"}))}}),(void 0===P&&(P=window),{load:function(a){["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"].forEach(function(e){var t=P[e]&&P[e].prototype;t&&Object.prototype.hasOwnProperty.call(t,"addEventListener")&&(_(t,"addEventListener",function(o){var i={component:e+".prototype.addEventListener"};return function(e,t,n,r){try{t&&null!=t.handleEvent&&(t.handleEvent=a.__wrap(t.handleEvent,i))}catch(e){a.logger.error(e)}return o.call(this,e,a.__wrap(t,i),n,r)}}),_(t,"removeEventListener",function(o){return function(e,t,n,r){return o.call(this,e,t,n,r),o.call(this,e,a.__wrap(t),n,r)}}))})}}),(void 0===H&&(H=window),{load:function(a){function e(e){return!0===a.config.breadcrumbsEnabled||(e?!0===a.config.breadcrumbsEnabled[e]:!1!==a.config.breadcrumbsEnabled)}function n(e,t){r=t,a.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:t}})}function t(t){return function(){var e=2<arguments.length?arguments[2]:void 0;return e&&n(r,String(e)),t.apply(this,arguments)}}var r;e("console")&&["debug","info","warn","error","log"].forEach(function(r){_(H.console,r,function(n){return function(){var e,t=Array.prototype.slice.call(arguments),e=(e=t,Array.isArray(e)?e.map(function(e){try{return String(e)}catch(e){return"[unknown]"}}).join(" "):""),t={category:"log",metadata:{level:r,arguments:g(t,3)}};a.addBreadcrumb(e,t),"function"==typeof n&&Function.prototype.apply.call(n,H.console,arguments)}})}),e("dom")&&H.addEventListener("click",function(e){var t,n,r;try{t=E(e.target),n=function e(t){var n=E(t);if(t.parentNode&&t.parentNode.tagName&&0<(t=e(t.parentNode)).length)return t+" > "+n;return n}(e.target),r=x(e.target)}catch(e){t="UI Click",r=n="[unknown]"}0!==t.length&&a.addBreadcrumb(t,{category:"ui.click",metadata:{selector:n,text:r,event:e}})},!0),e("network")&&(_(XMLHttpRequest.prototype,"open",function(r){return function(){var e=arguments[1],t="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],n=t+" "+N(e);this.__hb_xhr={type:"xhr",method:t,url:e,message:n},"function"==typeof r&&r.apply(this,arguments)}}),_(XMLHttpRequest.prototype,"send",function(e){return function(){var t=this;function n(){var e;4===t.readyState&&(e=void 0,t.__hb_xhr&&(t.__hb_xhr.status_code=t.status,e=t.__hb_xhr.message,delete t.__hb_xhr.message),a.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:t.__hb_xhr}))}"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?_(t,"onreadystatechange",function(e){return function(){n(),"function"==typeof e&&e.apply(this,arguments)}}):t.onreadystatechange=n,"function"==typeof e&&e.apply(t,arguments)}})),!e("network")||function(){if(window.fetch){if(j(window.fetch))return 1;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&j(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}}}()&&_(H,"fetch",function(i){return function(){var e,t=arguments[0],n="GET";"string"==typeof t?e=t:"Request"in H&&t instanceof Request?(e=t.url,t.method&&(n=t.method)):e=String(t),arguments[1]&&arguments[1].method&&(n=arguments[1].method),"string"==typeof n&&(n=n.toUpperCase());var r=n+" "+N(e),o={type:"fetch",method:n,url:e};return i.apply(this,arguments).then(function(e){return o.status_code=e.status,a.addBreadcrumb(r,{category:"request",metadata:o}),e}).catch(function(e){throw a.addBreadcrumb("fetch error",{category:"error",metadata:o}),e})}}),e("navigation")&&(r=H.location.href,_(H,"onpopstate",function(e){return function(){if(n(r,H.location.href),e)return e.apply(this,arguments)}}),_(H.history,"pushState",t),_(H.history,"replaceState",t))}})]})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Honeybadger=t()}(this,function(){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o="<unknown>";function t(e){return e.split("\n").reduce(function(e,t){t=function(e){var t=i.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),e=a.exec(t[2]);r&&null!=e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3]);return{file:n?null:t[2],methodName:t[1]||o,arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){e=c.exec(e);return e?{file:e[2],methodName:e[1]||o,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(t)||function(e){var t=s.exec(e);if(!t)return null;var n=t[3]&&-1<t[3].indexOf(" > eval"),e=u.exec(t[3]);n&&null!=e&&(t[3]=e[1],t[4]=e[2],t[5]=null);return{file:t[3],methodName:t[1]||o,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){e=f.exec(e);return e?{file:e[2],methodName:e[1]||o,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}(t)||function(e){e=l.exec(e);return e?{file:e[3],methodName:e[1]||o,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}(t);return t&&e.push(t),e},[])}var i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/;var c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var l=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var f=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function d(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r}function p(e,t){var n=d(e,t);return e.context&&t.context&&(n.context=d(e.context,t.context)),n}function h(e,t,n){void 0===n&&(n=void 0);for(var r=0,o=t.length;r<o;r++)t[r](n,e);return 1}function m(e){if("object"!=typeof e)return{};var t,n={};for(t in e)n[t]=e[t];return n}function g(e,c){void 0===c&&(c=8);var s=[];return function t(e,n){if(void 0===n&&(n=0),c<=n)return"[DEPTH]";if(/function|symbol/.test(typeof(r=e))||null===r||"object"==typeof r&&void 0===r.hasOwnProperty)return Object.prototype.toString.call(e);var r;if(function(e){if(e&&"object"==typeof e){for(var t=0;t<s.length;t++)if(s[t]===e)return 1;s.push(e)}}(e))return"[RECURSION]";if(Array.isArray(e))return e.map(function(e){return t(e,n+1)});if("object"!=typeof e)return e;var o,i={};for(o in e){var a=e[o];Object.prototype.hasOwnProperty.call(e,o)&&null!=o&&null!=a&&(i[o]=t(a,n+1))}return i}(e)}function y(o){function e(r){return function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"debug"===r&&!o.config.debug||(t.unshift("[Honeybadger]"),(e=o.config.logger)[r].apply(e,t))}}return{log:e("log"),info:e("info"),debug:e("debug"),warn:e("warn"),error:e("error")}}function b(e){return e?"[object Error]"===Object.prototype.toString.call(e)?d(e,{name:e.name,message:e.message,stack:e.stack}):"object"==typeof e?m(e):{message:String(e)}:{}}function _(e,t,n){if(e&&t&&n&&t in e){for(var r=e[t];r&&r.__hb_original;)r=r.__hb_original;e[t]=n(r),e[t].__hb_original=r}}var v={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"3.0.0-alpha.6"},e=(w.prototype.factory=function(e){throw new Error("Must implement __factory in subclass")},w.prototype.getVersion=function(){return v.version},w.prototype.configure=function(e){var t,n=this;for(t in void 0===e&&(e={}),e)this.config[t]=e[t];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach(function(e){return e.load(n)})),this},w.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},w.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},w.prototype.setContext=function(e){return"object"==typeof e&&(this.__context=d(this.__context,e)),this},w.prototype.resetContext=function(e){return this.__context="object"==typeof e?d({},e):{},this},w.prototype.notify=function(e,t,n){return void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.config.apiKey?this.config.disabled?(this.logger.warn("Deprecation warning: instead of `disabled: true`, use `reportData: false` to explicitly disable Honeybadger reporting. (Dropping notice: honeybadger.js is disabled)"),!1):this.__reportData()?(e=b(e),t&&"object"!=typeof t&&(t={name:String(t)}),t&&(e=p(e,t)),"object"==typeof n&&(e=p(e,n)),!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return;return 1}(e)&&(!!function(e,t){for(var n=0,r=t.length;n<r;n++)if(!1===(0,t[n])(e))return;return 1}(e=d(e,{name:e.name||"Error",context:d(this.__context,e.context),projectRoot:e.projectRoot||this.config.projectRoot,environment:e.environment||this.config.environment,component:e.component||this.config.component,action:e.action||this.config.action,revision:e.revision||this.config.revision}),this.__beforeNotifyHandlers)&&(r=e,n=this.config.ignorePatterns,(!Array.isArray(n)||!n.some(function(e){return e.test(r.message)}))&&(this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:e.message,name:e.name,stack:e.stack}}),e.__breadcrumbs=this.config.breadcrumbsEnabled?this.__breadcrumbs.slice():[],this.__send(e))))):(this.logger.debug("Dropping notice: honeybadger.js is in development mode"),!1):(this.logger.warn("Unable to send error report: no API key has been configured"),!1);var r},w.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){var n=m((t=t||{}).metadata),r=t.category||"custom",t=(new Date).toISOString();this.__breadcrumbs.push({category:r,message:e,metadata:n,timestamp:t});t=this.config.maxBreadcrumbs;return this.__breadcrumbs.length>t&&(this.__breadcrumbs=this.__breadcrumbs.slice(this.__breadcrumbs.length-t)),this}},w.prototype.__reportData=function(){return null!==this.config.reportData?this.config.reportData:!(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},w.prototype.__send=function(e){throw new Error("Must implement send in subclass")},w.prototype.__buildPayload=function(e){return{notifier:v,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:function(e){if("string"!=typeof e)return[];try{return t(e).map(function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}})}catch(e){return[]}}(e.stack),raw_backtrace:e.stack,fingerprint:e.fingerprint},request:{url:e.url,component:e.component,action:e.action,context:e.context,cgi_data:e.cgiData||{},params:e.params},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision}}},w);function w(e){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__context={},this.__breadcrumbs=[],this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=r({apiKey:null,endpoint:"https://api.honeybadger.io",environment:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,ignorePatterns:[],logger:console,developmentEnvironments:["dev","development","test"],disabled:!1,debug:!1,__plugins:[]},e),this.logger=y(this)}function E(n){if(!n||!n.tagName)return"";var r=n.tagName.toLowerCase();if("html"===r)return"";n.id&&(r+="#"+n.id);var e=n.getAttribute("class");e&&e.split(/\s+/).forEach(function(e){r+="."+e}),["alt","name","title","type"].forEach(function(e){var t=n.getAttribute(e);t&&(r+="["+e+'="'+t+'"]')});e=function(t){try{var e=t.parentNode.childNodes,n=[];return Array.prototype.forEach.call(e,function(e){e.tagName&&e.tagName===t.tagName&&n.push(e)}),n}catch(e){return[]}}(n);return 1<e.length&&(r+=":nth-child("+(Array.prototype.indexOf.call(e,n)+1)+")"),r}function x(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)}function j(e){return-1!==e.toString().indexOf("native")}function k(e){e=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:e[2],host:e[4],pathname:e[5]}}function N(e){var t=k(e),e=k(document.URL);return!t.host||!t.protocol||t.protocol===e.protocol&&t.host===e.host?t.pathname:t.protocol+"://"+t.host+t.pathname}var O,T,S,R,H,P,A,C,q,D=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}(),L=0;function B(){this.constructor=S}function M(e){void 0===e&&(e={});var t=T.call(this,r({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},e))||this;return t.__errorsSent=0,t.__lastWrapErr=void 0,t.__beforeNotifyHandlers=[function(e){return t.__exceedsMaxErrors()?(t.logger.debug("Dropping notice: max errors exceeded",e),!1):(e.url||(e.url=document.URL),!0)}],t}return new(n(S=M,R=T=e),S.prototype=null===R?Object.create(R):(B.prototype=R.prototype,new B),M.prototype.resetMaxErrors=function(){return this.__errorsSent=0},M.prototype.wrap=function(e){return this.__wrap(e,{catch:!0})},M.prototype.factory=function(e){return new M(e)},M.prototype.__buildPayload=function(e){var t={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};t.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(t.HTTP_REFERER=document.referrer),"string"==typeof e.cookies?t.HTTP_COOKIE=e.cookies:"object"==typeof e.cookies&&(t.HTTP_COOKIE=function(e){if("object"==typeof e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(";")}}(e.cookies));e=T.prototype.__buildPayload.call(this,e);return e.request.cgi_data=d(t,e.request.cgi_data),e},M.prototype.__send=function(t){var e=this;this.__incrementErrorsCount();var n,r,o=this.__buildPayload(t),i=Array.prototype.slice.call(this.__afterNotifyHandlers);t.afterNotify&&i.unshift(t.afterNotify);try{var a=new XMLHttpRequest;a.open("POST",(n=this.config,r="/v1/notices/js",n.endpoint.trim().replace(/\/$/,"")+"/"+(r=r.trim().replace(/(^\/|\/$)/g,""))),this.config.async),a.setRequestHeader("X-API-Key",this.config.apiKey),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Accept","text/json, application/json"),a.send(JSON.stringify(g(o,this.config.maxObjectDepth))),a.onload=function(){if(201!==a.status)return h(t,i,new Error("Bad HTTP response: "+a.status)),void e.logger.debug("Unable to send error report: "+a.status+": "+a.statusText,a,t);h(d(t,{id:JSON.parse(a.response).id}),i),e.logger.debug("Error report sent",t)}}catch(e){h(t,i,e),this.logger.error("Unable to send error report: error while initializing request",e,t)}return!0},M.prototype.__wrap=function(e,t){void 0===t&&(t={});var n,r,o=e;t=t||{};try{return"function"!=typeof o?o:(r=o,"function"!=typeof Object.isExtensible||Object.isExtensible(r)?(o.___hb||(n=this,o.___hb=function(){var e=n.config.onerror;if(!t.catch&&!D&&e)return o.apply(this,arguments);try{return o.apply(this,arguments)}catch(e){if(n.__lastWrapErr===e)throw e;throw n.__lastWrapErr=e,L+=1,clearTimeout(O),O=setTimeout(function(){L=0}),n.addBreadcrumb(t.component?t.component+": "+e.name:e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),n.notify(e),e}}),o.___hb.___hb=o.___hb,o.___hb):o)}catch(e){return o}},M.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},M.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},M)({__plugins:[(void 0===q&&(q=window),{load:function(a){void 0===a.config.onerror&&(a.config.onerror=!0),_(q,"onerror",function(i){return function(e,t,n,r,o){return function(e,t,n,r,o){if(a.logger.debug("window.onerror callback invoked",arguments),0<L)return a.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),--L;a.config.onerror&&(0===n&&/Script error\.?/.test(e)?a.logger.info("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments):((o=b(o)).name||(o.name="window.onerror"),o.message||(o.message=e),o.stack||(o.stack=[o.message,"\n at ? (",t||"unknown",":",n||0,":",r||0,")"].join("")),a.addBreadcrumb("window.onerror"!==o.name&&o.name?"window.onerror: "+o.name:"window.onerror",{category:"error",metadata:{name:o.name,message:o.message,stack:o.stack}}),a.notify(o)))}(e,t,n,r,o),"function"==typeof i&&i.apply(window,arguments)}})}}),(void 0===C&&(C=window),{load:function(n){void 0===n.config.onunhandledrejection&&(n.config.onunhandledrejection=!0),_(C,"onunhandledrejection",function(t){return function(e){!function(e){if(n.logger.debug("window.onunhandledrejection callback invoked",arguments),n.config.onunhandledrejection){var t=e.reason;if(t instanceof Error){e=t.message+"\n at ? (unknown:0)",e=t.stack||e,e={name:t.name,message:"UnhandledPromiseRejectionWarning: "+t,stack:e};return n.addBreadcrumb("window.onunhandledrejection: "+e.name,{category:"error",metadata:e}),n.notify(e)}t="string"==typeof t?t:JSON.stringify(t);n.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: "+t})}}(e),"function"==typeof t&&t.apply(this,arguments)}})}}),(void 0===A&&(A=window),{load:function(i){function e(o){return function(r){return function(e,t){if("function"!=typeof e)return r(e,t);var n=Array.prototype.slice.call(arguments,2);return e=i.__wrap(e,o),r(function(){e.apply(void 0,n)},t)}}}_(A,"setTimeout",e({component:"setTimeout"})),_(A,"setInterval",e({component:"setInterval"}))}}),(void 0===P&&(P=window),{load:function(a){["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"].forEach(function(e){var t=P[e]&&P[e].prototype;t&&Object.prototype.hasOwnProperty.call(t,"addEventListener")&&(_(t,"addEventListener",function(o){var i={component:e+".prototype.addEventListener"};return function(e,t,n,r){try{t&&null!=t.handleEvent&&(t.handleEvent=a.__wrap(t.handleEvent,i))}catch(e){a.logger.error(e)}return o.call(this,e,a.__wrap(t,i),n,r)}}),_(t,"removeEventListener",function(o){return function(e,t,n,r){return o.call(this,e,t,n,r),o.call(this,e,a.__wrap(t),n,r)}}))})}}),(void 0===H&&(H=window),{load:function(a){function e(e){return!0===a.config.breadcrumbsEnabled||(e?!0===a.config.breadcrumbsEnabled[e]:!1!==a.config.breadcrumbsEnabled)}function n(e,t){r=t,a.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:t}})}function t(t){return function(){var e=2<arguments.length?arguments[2]:void 0;return e&&n(r,String(e)),t.apply(this,arguments)}}var r;e("console")&&["debug","info","warn","error","log"].forEach(function(r){_(H.console,r,function(n){return function(){var e,t=Array.prototype.slice.call(arguments),e=(e=t,Array.isArray(e)?e.map(function(e){try{return String(e)}catch(e){return"[unknown]"}}).join(" "):""),t={category:"log",metadata:{level:r,arguments:g(t,3)}};a.addBreadcrumb(e,t),"function"==typeof n&&Function.prototype.apply.call(n,H.console,arguments)}})}),e("dom")&&H.addEventListener("click",function(e){var t,n,r;try{t=E(e.target),n=function e(t){var n=E(t);if(t.parentNode&&t.parentNode.tagName&&0<(t=e(t.parentNode)).length)return t+" > "+n;return n}(e.target),r=x(e.target)}catch(e){t="UI Click",r=n="[unknown]"}0!==t.length&&a.addBreadcrumb(t,{category:"ui.click",metadata:{selector:n,text:r,event:e}})},!0),e("network")&&(_(XMLHttpRequest.prototype,"open",function(r){return function(){var e=arguments[1],t="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],n=t+" "+N(e);this.__hb_xhr={type:"xhr",method:t,url:e,message:n},"function"==typeof r&&r.apply(this,arguments)}}),_(XMLHttpRequest.prototype,"send",function(e){return function(){var t=this;function n(){var e;4===t.readyState&&(e=void 0,t.__hb_xhr&&(t.__hb_xhr.status_code=t.status,e=t.__hb_xhr.message,delete t.__hb_xhr.message),a.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:t.__hb_xhr}))}"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?_(t,"onreadystatechange",function(e){return function(){n(),"function"==typeof e&&e.apply(this,arguments)}}):t.onreadystatechange=n,"function"==typeof e&&e.apply(t,arguments)}})),!e("network")||function(){if(window.fetch){if(j(window.fetch))return 1;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&j(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}}}()&&_(H,"fetch",function(i){return function(){var e,t=arguments[0],n="GET";"string"==typeof t?e=t:"Request"in H&&t instanceof Request?(e=t.url,t.method&&(n=t.method)):e=String(t),arguments[1]&&arguments[1].method&&(n=arguments[1].method),"string"==typeof n&&(n=n.toUpperCase());var r=n+" "+N(e),o={type:"fetch",method:n,url:e};return i.apply(this,arguments).then(function(e){return o.status_code=e.status,a.addBreadcrumb(r,{category:"request",metadata:o}),e}).catch(function(e){throw a.addBreadcrumb("fetch error",{category:"error",metadata:o}),e})}}),e("navigation")&&(r=H.location.href,_(H,"onpopstate",function(e){return function(){if(n(r,H.location.href),e)return e.apply(this,arguments)}}),_(H.history,"pushState",t),_(H.history,"replaceState",t))}})]})}); | ||
//# sourceMappingURL=honeybadger.min.js.map |
@@ -20,2 +20,3 @@ // Type definitions for honeybadger.js | ||
apiKey: string | undefined | ||
endpoint: string, | ||
developmentEnvironments: string[] | ||
@@ -22,0 +23,0 @@ environment: string | undefined |
@@ -6,2 +6,4 @@ 'use strict'; | ||
var https = _interopDefault(require('https')); | ||
var http = _interopDefault(require('http')); | ||
var url = require('url'); | ||
@@ -369,2 +371,7 @@ /*! ***************************************************************************** | ||
} | ||
function endpoint(config, path) { | ||
var endpoint = config.endpoint.trim().replace(/\/$/, ''); | ||
path = path.trim().replace(/(^\/|\/$)/g, ''); | ||
return endpoint + "/" + path; | ||
} | ||
@@ -374,3 +381,3 @@ var notifier = { | ||
url: 'https://github.com/honeybadger-io/honeybadger-js', | ||
version: '3.0.0-alpha.5' | ||
version: '3.0.0-alpha.6' | ||
}; | ||
@@ -385,3 +392,3 @@ var Client = /** @class */ (function () { | ||
this.__afterNotifyHandlers = []; | ||
this.config = __assign({ apiKey: null, environment: null, projectRoot: null, component: null, action: null, revision: null, reportData: null, breadcrumbsEnabled: true, maxBreadcrumbs: 40, maxObjectDepth: 8, ignorePatterns: [], logger: console, developmentEnvironments: ['dev', 'development', 'test'], disabled: false, debug: false, __plugins: [] }, opts); | ||
this.config = __assign({ apiKey: null, endpoint: 'https://api.honeybadger.io', environment: null, projectRoot: null, component: null, action: null, revision: null, reportData: null, breadcrumbsEnabled: true, maxBreadcrumbs: 40, maxObjectDepth: 8, ignorePatterns: [], logger: console, developmentEnvironments: ['dev', 'development', 'test'], disabled: false, debug: false, __plugins: [] }, opts); | ||
this.logger = logger(this); | ||
@@ -556,7 +563,6 @@ } | ||
var _this = this; | ||
var protocol = new url.URL(this.config.endpoint).protocol; | ||
var transport = (protocol === "http:" ? http : https); | ||
var data = JSON.stringify(sanitize(this.__buildPayload(notice), this.config.maxObjectDepth)); | ||
var options = { | ||
hostname: 'api.honeybadger.io', | ||
port: 443, | ||
path: '/v1/notices', | ||
method: 'POST', | ||
@@ -573,3 +579,3 @@ headers: { | ||
} | ||
var req = https.request(options, function (res) { | ||
var req = transport.request(endpoint(this.config, '/v1/notices'), options, function (res) { | ||
_this.logger.debug("statusCode: " + res.statusCode); | ||
@@ -576,0 +582,0 @@ var body = ''; |
@@ -20,2 +20,3 @@ // Type definitions for honeybadger.js | ||
apiKey: string | undefined | ||
endpoint: string, | ||
developmentEnvironments: string[] | ||
@@ -22,0 +23,0 @@ environment: string | undefined |
{ | ||
"name": "@honeybadger-io/js", | ||
"version": "3.0.0-alpha.5", | ||
"version": "3.0.0-alpha.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/honeybadger-io/honeybadger-js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
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
273017
2115
2