@mirai/core 0.4.218 → 0.4.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,9 +21,10 @@ const loadSentry = (dsn, release) => {
|
|
|
21
21
|
});
|
|
22
22
|
let launchEvent = true;
|
|
23
23
|
const {
|
|
24
|
-
breadcrumbs = []
|
|
24
|
+
breadcrumbs = [],
|
|
25
|
+
message = ''
|
|
25
26
|
} = event;
|
|
26
|
-
if (!
|
|
27
|
+
if (!message.startsWith('PCI')) {
|
|
27
28
|
for (let index = breadcrumbs.length - 1; index >= 0; index--) {
|
|
28
29
|
const breadcrumb = breadcrumbs[index];
|
|
29
30
|
if (!breadcrumb) continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadSentry.js","names":["Sentry","_interopRequireWildcard","require","_templateObject","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","value","loadSentry","dsn","release","init","allowUrls","beforeSend","event","hint","console","log","launchEvent","breadcrumbs","message","startsWith","index","length","breadcrumb","level","category","denyUrls","RegExp","String","window","location","origin","ignoreErrors","integrations","Replay","networkDetailAllowUrls","tracesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","exports"],"sources":["../../src/helpers/loadSentry.js"],"sourcesContent":["import * as Sentry from '@sentry/react';\n\nexport const loadSentry = (dsn, release) => {\n if (!dsn || !release) return;\n\n Sentry.init({\n allowUrls: [/https?:\\/\\/((static)\\.)?mirai\\.com/],\n beforeSend(event, hint) {\n // eslint-disable-next-line no-console\n console.log({ event, hint });\n\n let launchEvent = true;\n const { breadcrumbs = [] } = event;\n if (!
|
|
1
|
+
{"version":3,"file":"loadSentry.js","names":["Sentry","_interopRequireWildcard","require","_templateObject","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","value","loadSentry","dsn","release","init","allowUrls","beforeSend","event","hint","console","log","launchEvent","breadcrumbs","message","startsWith","index","length","breadcrumb","level","category","denyUrls","RegExp","String","window","location","origin","ignoreErrors","integrations","Replay","networkDetailAllowUrls","tracesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","exports"],"sources":["../../src/helpers/loadSentry.js"],"sourcesContent":["import * as Sentry from '@sentry/react';\n\nexport const loadSentry = (dsn, release) => {\n if (!dsn || !release) return;\n\n Sentry.init({\n allowUrls: [/https?:\\/\\/((static)\\.)?mirai\\.com/],\n beforeSend(event, hint) {\n // eslint-disable-next-line no-console\n console.log({ event, hint });\n\n let launchEvent = true;\n const { breadcrumbs = [], message = '' } = event;\n if (!message.startsWith('PCI')) {\n for (let index = breadcrumbs.length - 1; index >= 0; index--) {\n const breadcrumb = breadcrumbs[index];\n if (!breadcrumb) continue;\n\n if (breadcrumb.level !== 'error' || breadcrumb.category === 'xhr' || breadcrumb.category === 'fetch') {\n launchEvent = false;\n break;\n }\n }\n }\n\n // eslint-disable-next-line no-console\n console.log('launchEvent:', launchEvent);\n\n return launchEvent ? event : null;\n },\n denyUrls: [\n new RegExp(String.raw`\\s${window.location.origin}\\s`, 'g'),\n /elementor/g,\n /mirai-loader/g,\n /mirai-room-selection/g,\n /mirai-club-login/g,\n /amplify/g,\n /pushtech/,\n /wp-includes/g,\n /hijiffy/g,\n /hotelmonitor/g,\n /flickity/g,\n /bat.bing.com/g,\n /new.smartrental.com/g,\n /translate.goog/g,\n ],\n dsn,\n release,\n ignoreErrors: [\n /^ads_clickUnAd is not defined$/,\n /^TricentisShadowDomUnlocker is not defined$/,\n /^he fetching process for the media resource was aborted by the user agent at the user's request.$/,\n /^Non-Error promise rejection captured with value: null$/,\n /^scrollReadRandom is not defined$/,\n /^Cannot use 'in' operator to search for 'src' in null$/,\n ],\n\n integrations: [\n new Sentry.Replay({\n networkDetailAllowUrls: /mirai/g,\n }),\n ],\n tracesSampleRate: 0.1, // Capture 100% of the transactions, reduce in production!\n replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.\n replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.\n });\n\n return Sentry;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAwC,IAAAC,eAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,M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