From 5931fb18be64c18364212ac94d835e7be759b0b7 Mon Sep 17 00:00:00 2001 From: Phillip Kelly Date: Mon, 13 Mar 2023 14:48:46 -0400 Subject: [PATCH 1/2] DIG-1879(Commissions-App): Upgrade Rollbar (browser) Version --- .../commissions-app/src/pages/_document.tsx | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/services-js/commissions-app/src/pages/_document.tsx b/services-js/commissions-app/src/pages/_document.tsx index 5f2c6f2f1..13ea919f5 100644 --- a/services-js/commissions-app/src/pages/_document.tsx +++ b/services-js/commissions-app/src/pages/_document.tsx @@ -79,18 +79,19 @@ export default class CommissionsDocument extends Document { type="text/javascript" dangerouslySetInnerHTML={{ __html: ` -var _rollbarConfig = { - accessToken: "${rollbarAccessToken}", - captureUncaught: true, - captureUnhandledRejections: true, - payload: { - environment: "${rollbarEnvironment}" - } -}; -// Rollbar Snippet -!function(r){function e(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var o={};return e.m=r,e.c=o,e.p="",e(0)}([function(r,e,o){"use strict";var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.5.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,e){this.options=r,this._rollbarOldOnError=null;var o=s++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}function a(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(e);return n(function(){e.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),e.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=e.autoInstrument;return e.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[o]=t,t})()}}function l(r){return n(function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=o(2),s=0,d=o(3),c=function(r,e){return new t(r,e)},p=function(r){return new d(c,r)};t.prototype.loadFull=function(r,e,o,t,a){var l=function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i )} From 84abd0743f7b650550ec775307158142ded766dd Mon Sep 17 00:00:00 2001 From: Phillip Kelly Date: Thu, 16 Mar 2023 15:09:09 -0400 Subject: [PATCH 2/2] DIG-1879(Public-Notices): Upgrade Rollbar (browser) Version --- .../public-notices/src/pages/_document.tsx | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/services-js/public-notices/src/pages/_document.tsx b/services-js/public-notices/src/pages/_document.tsx index 2c9d0b1c2..5583f92cf 100644 --- a/services-js/public-notices/src/pages/_document.tsx +++ b/services-js/public-notices/src/pages/_document.tsx @@ -66,25 +66,26 @@ export default class extends Document { type="text/javascript" dangerouslySetInnerHTML={{ __html: ` - var _rollbarConfig = { - accessToken: "${rollbarAccessToken}", - captureUncaught: true, - captureUnhandledRejections: true, - payload: { - environment: "${rollbarEnvironment}", - client: { - javascript: { - source_map_enabled: true, - code_version: "${buildId}", - guess_uncaught_frames: true + var _rollbarConfig = { + accessToken: "${rollbarAccessToken}", + captureUncaught: true, + captureUnhandledRejections: true, + payload: { + environment: "${rollbarEnvironment}", + client: { + javascript: { + source_map_enabled: true, + code_version: "${buildId}", + guess_uncaught_frames: true + } + } } - } - } - }; - // Rollbar Snippet - !function(r){function e(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var o={};return e.m=r,e.c=o,e.p="",e(0)}([function(r,e,o){"use strict";var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.5.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,e){this.options=r,this._rollbarOldOnError=null;var o=s++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}function a(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(e);return n(function(){e.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),e.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=e.autoInstrument;return e.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[o]=t,t})()}}function l(r){return n(function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=o(2),s=0,d=o(3),c=function(r,e){return new t(r,e)},p=d.bind(null,c);t.prototype.loadFull=function(r,e,o,t,a){var l=function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i )}