@mirai/core 0.4.56 → 0.4.58

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.
@@ -26,7 +26,7 @@ const loadSentry = (dsn, release) => {
26
26
  for (let index = breadcrumbs.length - 1; index >= 0; index--) {
27
27
  const breadcrumb = breadcrumbs[index];
28
28
  if (!breadcrumb) continue;
29
- if (breadcrumb.level !== 'error' || breadcrumb.category !== 'xhr' && breadcrumb.category !== 'fetch') {
29
+ if (breadcrumb.level !== 'error' || breadcrumb.category === 'xhr' || breadcrumb.category === 'fetch') {
30
30
  launchEvent = false;
31
31
  break;
32
32
  }
@@ -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","index","length","breadcrumb","level","category","denyUrls","RegExp","String","window","location","origin","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\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 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 ],\n dsn,\n // ignoreErrors: [\n // 'Non-Error exception captured',\n // 'Non-Error promise rejection captured',\n // 'Event `Event` (type=error) captured as promise rejection',\n // ],\n release,\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,wBAA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K,EAAE,EAAE;QAC5D,MAAME,UAAU,GAAGH,WAAW,CAACC,KAAK,CAAC;QACrC,IAAI,CAACE,UAAU,EAAE;QAEjB,IAAIA,UAAU,CAACC,KAAK,KAAK,OAAO,IAAKD,UAAU,CAACE,QAAQ,KAAK,KAAK,IAAIF,UAAU,CAACE,QAAQ,KAAK,OAAQ,EAAE;UACtGN,WAAW,GAAG,KAAK;UACnB;QACF;MACF;MAEA,OAAOA,WAAW,GAAGJ,KAAK,GAAG,IAAI;IACnC,CAAC;IACDW,QAAQ,EAAE,CACR,IAAIC,MAAM,CAACC,MAAM,CAACxB,GAAG,CAAAxB,eAAA,KAAAA,eAAA,GAAAsB,sBAAA,+BAAK2B,MAAM,CAACC,QAAQ,CAACC,MAAM,GAAM,GAAG,CAAC,EAC1D,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,eAAe,EACf,WAAW,CACZ;IACDrB,GAAG;IACH;IACA;IACA;IACA;IACA;IACAC,OAAO;IACPqB,YAAY,EAAE,CACZ,IAAIvD,MAAM,CAACwD,MAAM,CAAC;MAChBC,sBAAsB,EAAE;IAC1B,CAAC,CAAC,CACH;IACDC,gBAAgB,EAAE,GAAG;IAAE;IACvBC,wBAAwB,EAAE,GAAG;IAAE;IAC/BC,wBAAwB,EAAE,GAAG,CAAE;EACjC,CAAC,CAAC;EAEF,OAAO5D,MAAM;AACf,CAAC;AAAC6D,OAAA,CAAA7B,UAAA,GAAAA,UAAA"}
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","index","length","breadcrumb","level","category","denyUrls","RegExp","String","window","location","origin","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\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 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 ],\n dsn,\n // ignoreErrors: [\n // 'Non-Error exception captured',\n // 'Non-Error promise rejection captured',\n // 'Event `Event` (type=error) captured as promise rejection',\n // ],\n release,\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,CA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AM,CAACwD,MAAM,CAAC;MAChBC,sBAAsB,EAAE;IAC1B,CAAC,CAAC,CACH;IACDC,gBAAgB,EAAE,GAAG;IAAE;IACvBC,wBAAwB,EAAE,GAAG;IAAE;IAC/BC,wBAAwB,EAAE,GAAG,CAAE;EACjC,CAAC,CAAC;EAEF,OAAO5D,MAAM;AACf,CAAC;AAAC6D,OAAA,CAAA7B,UAAA,GAAAA,UAAA"}
@@ -16,4 +16,13 @@ if (!Object.fromEntries) {
16
16
  return obj;
17
17
  };
18
18
  }
19
+ if (!Array.prototype.flat) {
20
+ Array.prototype.flat = function () {
21
+ let depth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
22
+ const flatten = (arr, depth) => {
23
+ return depth > 0 ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val, depth - 1) : val), []) : arr.slice();
24
+ };
25
+ return flatten(this, depth);
26
+ };
27
+ }
19
28
  //# sourceMappingURL=polyfills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polyfills.js","names":["Object","fromEntries","iterable","TypeError","obj","pair","key","value"],"sources":["../../src/helpers/polyfills.js"],"sourcesContent":["if (!Object.fromEntries) {\n Object.fromEntries = function (iterable) {\n if (iterable == null) {\n throw new TypeError('Object.fromEntries() requires a single iterable argument');\n }\n const obj = {};\n for (const pair of iterable) {\n if (Object(pair) !== pair) {\n throw new TypeError('Iterator value ' + pair + ' is not an entry object');\n }\n const [key, value] = pair;\n obj[key] = value;\n }\n return obj;\n };\n}\n"],"mappings":";;AAAA,IAAI,CAACA,MAAM,CAACC,WAAW,EAAE;EACvBD,MAAM,CAACC,WAAW,GAAG,UAAUC,QAAQ,EAAE;IACvC,IAAIA,QAAQ,IAAI,IAAI,EAAE;MACpB,MAAM,IAAIC,SAAS,CAAC,0DAA0D,CAAC;IACjF;IACA,MAAMC,GAAG,GAAG,CAAC,CAAC;IACd,KAAK,MAAMC,IAAI,IAAIH,QAAQ,EAAE;MAC3B,IAAIF,MAAM,CAACK,IAAI,CAAC,KAAKA,IAAI,EAAE;QACzB,MAAM,IAAIF,SAAS,CAAC,iBAAiB,GAAGE,IAAI,GAAG,yBAAyB,CAAC;MAC3E;MACA,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAGF,IAAI;MACzBD,GAAG,CAACE,GAAG,CAAC,GAAGC,KAAK;IAClB;IACA,OAAOH,GAAG;EACZ,CAAC;AACH"}
1
+ {"version":3,"file":"polyfills.js","names":["Object","fromEntries","iterable","TypeError","obj","pair","key","value","Array","prototype","flat","depth","arguments","length","undefined","flatten","arr","reduce","acc","val","concat","isArray","slice"],"sources":["../../src/helpers/polyfills.js"],"sourcesContent":["if (!Object.fromEntries) {\n Object.fromEntries = function (iterable) {\n if (iterable == null) {\n throw new TypeError('Object.fromEntries() requires a single iterable argument');\n }\n const obj = {};\n for (const pair of iterable) {\n if (Object(pair) !== pair) {\n throw new TypeError('Iterator value ' + pair + ' is not an entry object');\n }\n const [key, value] = pair;\n obj[key] = value;\n }\n return obj;\n };\n}\n\nif (!Array.prototype.flat) {\n Array.prototype.flat = function (depth = 1) {\n const flatten = (arr, depth) => {\n return depth > 0\n ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val, depth - 1) : val), [])\n : arr.slice();\n };\n\n return flatten(this, depth);\n };\n}\n"],"mappings":";;AAAA,IAAI,CAACA,MAAM,CAACC,WAAW,EAAE;EACvBD,MAAM,CAACC,WAAW,GAAG,UAAUC,QAAQ,EAAE;IACvC,IAAIA,QAAQ,IAAI,IAAI,EAAE;MACpB,MAAM,IAAIC,SAAS,CAAC,0DAA0D,CAAC;IACjF;IACA,MAAMC,GAAG,GAAG,CAAC,CAAC;IACd,KAAK,MAAMC,IAAI,IAAIH,QAAQ,EAAE;MAC3B,IAAIF,MAAM,CAACK,IAAI,CAAC,KAAKA,IAAI,EAAE;QACzB,MAAM,IAAIF,SAAS,CAAC,iBAAiB,GAAGE,IAAI,GAAG,yBAAyB,CAAC;MAC3E;MACA,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAGF,IAAI;MACzBD,GAAG,CAACE,GAAG,CAAC,GAAGC,KAAK;IAClB;IACA,OAAOH,GAAG;EACZ,CAAC;AACH;AAEA,IAAI,CAACI,KAAK,CAACC,SAAS,CAACC,IAAI,EAAE;EACzBF,KAAK,CAACC,SAAS,CAACC,IAAI,GAAG,YAAqB;IAAA,IAAXC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;IACxC,MAAMG,OAAO,GAAGA,CAACC,GAAG,EAAEL,KAAK,KAAK;MAC9B,OAAOA,KAAK,GAAG,CAAC,GACZK,GAAG,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAKD,GAAG,CAACE,MAAM,CAACZ,KAAK,CAACa,OAAO,CAACF,GAAG,CAAC,GAAGJ,OAAO,CAACI,GAAG,EAAER,KAAK,GAAG,CAAC,CAAC,GAAGQ,GAAG,CAAC,EAAE,EAAE,CAAC,GAC5FH,GAAG,CAACM,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,OAAOP,OAAO,CAAC,IAAI,EAAEJ,KAAK,CAAC;EAC7B,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.4.56",
3
+ "version": "0.4.58",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",