@bigbinary/neeto-commons-frontend 4.13.48 → 4.13.49
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.
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/utils.js +5 -0
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +2 -2
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/utils.js +5 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
26
26
|
react.Honeybadger.beforeNotify(function (notice) {
|
|
27
27
|
var _globalProps$user;
|
|
28
28
|
if (!notice) return false;
|
|
29
|
-
var isIgnorable = reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
29
|
+
var isIgnorable = reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || reactUtils_HoneybadgerErrorBoundary_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || reactUtils_HoneybadgerErrorBoundary_utils.isNeetoReplaySecurityError(notice) || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
30
30
|
if (isIgnorable) return false;
|
|
31
31
|
var context = {
|
|
32
32
|
errorClass: notice.name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport {
|
|
1
|
+
{"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n config,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n IGNORABLE_STACKS_REGEX.test(notice.stack) ||\n isNeetoReplaySecurityError(notice) ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n if (notice.name === \"ChunkLoadError\") {\n context.IGNORABLE_ERROR_NAMES_REGEX = IGNORABLE_ERROR_NAMES_REGEX;\n context.isChunkLoadError = IGNORABLE_ERROR_NAMES_REGEX.test(notice.name);\n }\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n ...config,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"names":["HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","config","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","context","errorClass","isChunkLoadError","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","_jsx","ErrorBoundary"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAKxB;AAAA,EAAA,IAJJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,mBAAA,GAAAF,IAAA,CACRG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG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C,6DAAmB,EAAE;AAC3C,IAAA,IAAID,aAAa,EAAEN,OAAO,CAACM,aAAa,GAAGA,aAAa;AAExDE,IAAAA,uDAAa,CAACnB,MAAM,EAAEW,OAAO,CAAC;AAE9B,IAAA,OAAO,IAAI;AACb,GAAC,CAAC;AAEF,EAAA,IAAMS,WAAW,GAAGtB,iBAAW,CAACuB,SAAS,CAAAC,aAAA,CAAA;IACvCC,MAAM,EAAER,WAAW,CAACS,iBAAiB;IACrCC,WAAW,EAAEV,WAAW,CAACW,QAAQ;IACjCC,QAAQ,EAAEZ,WAAW,CAACa,mBAAmB;AACzCC,IAAAA,uBAAuB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC;AAChDC,IAAAA,cAAc,EAAE,IAAI;AACpBC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,kBAAkB,EAAE,IAAI;AACxBC,IAAAA,WAAW,EAAE,eAAe;AAC5BC,IAAAA,wBAAwB,EAAE;GACvBrC,EAAAA,MAAM,CACV,CAAC;EAEF,oBACEsC,cAAA,CAACC,8BAAa,EAAA;AAAO5C,IAAAA,cAAc,EAAdA,cAAc;AAAE4B,IAAAA,WAAW,EAAXA,WAAW;AAAA9B,IAAAA,QAAA,EAC7CA;AAAQ,GACI,CAAC;AAEpB;;;;"}
|
|
@@ -8,7 +8,12 @@ var getSessionReplayUrl = function getSessionReplayUrl() {
|
|
|
8
8
|
var currentTimestamp = new Date().getTime();
|
|
9
9
|
return storage ? "".concat(JSON.parse(storage).url, "?goto=").concat(currentTimestamp) : "";
|
|
10
10
|
};
|
|
11
|
+
var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
|
|
12
|
+
var _notice$stack;
|
|
13
|
+
return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
|
|
14
|
+
};
|
|
11
15
|
|
|
12
16
|
exports.attachContext = attachContext;
|
|
13
17
|
exports.getSessionReplayUrl = getSessionReplayUrl;
|
|
18
|
+
exports.isNeetoReplaySecurityError = isNeetoReplaySecurityError;
|
|
14
19
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/utils.js"],"sourcesContent":["export const attachContext = (notice, context) => {\n if (notice.context) Object.assign(notice.context, context);\n else notice.context = context;\n};\n\nexport const getSessionReplayUrl = () => {\n const storage = sessionStorage.getItem(\"neeto-replay-widget--session\");\n const currentTimestamp = new Date().getTime();\n\n return storage ? `${JSON.parse(storage).url}?goto=${currentTimestamp}` : \"\";\n};\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url"],"mappings":";;AAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAAM,EAAEC,OAAO,EAAK;EAChD,IAAID,MAAM,CAACC,OAAO,EAAEC,MAAM,CAACC,MAAM,CAACH,MAAM,CAACC,OAAO,EAAEA,OAAO,CAAC,CAAC,KACtDD,MAAM,CAACC,OAAO,GAAGA,OAAO;AAC/B;IAEaG,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAS;AACvC,EAAA,IAAMC,OAAO,GAAGC,cAAc,CAACC,OAAO,CAAC,8BAA8B,CAAC;EACtE,IAAMC,gBAAgB,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;AAE7C,EAAA,OAAOL,OAAO,GAAAM,EAAAA,CAAAA,MAAA,CAAMC,IAAI,CAACC,KAAK,CAACR,OAAO,CAAC,CAACS,GAAG,EAAA,QAAA,CAAA,CAAAH,MAAA,CAASH,gBAAgB,IAAK,EAAE;AAC7E
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/utils.js"],"sourcesContent":["export const attachContext = (notice, context) => {\n if (notice.context) Object.assign(notice.context, context);\n else notice.context = context;\n};\n\nexport const getSessionReplayUrl = () => {\n const storage = sessionStorage.getItem(\"neeto-replay-widget--session\");\n const currentTimestamp = new Date().getTime();\n\n return storage ? `${JSON.parse(storage).url}?goto=${currentTimestamp}` : \"\";\n};\n\nexport const isNeetoReplaySecurityError = notice =>\n notice.name === \"SecurityError\" &&\n notice.stack?.includes(\"neeto-replay-widget\");\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url","isNeetoReplaySecurityError","_notice$stack","name","stack","includes"],"mappings":";;AAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAAM,EAAEC,OAAO,EAAK;EAChD,IAAID,MAAM,CAACC,OAAO,EAAEC,MAAM,CAACC,MAAM,CAACH,MAAM,CAACC,OAAO,EAAEA,OAAO,CAAC,CAAC,KACtDD,MAAM,CAACC,OAAO,GAAGA,OAAO;AAC/B;IAEaG,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAS;AACvC,EAAA,IAAMC,OAAO,GAAGC,cAAc,CAACC,OAAO,CAAC,8BAA8B,CAAC;EACtE,IAAMC,gBAAgB,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;AAE7C,EAAA,OAAOL,OAAO,GAAAM,EAAAA,CAAAA,MAAA,CAAMC,IAAI,CAACC,KAAK,CAACR,OAAO,CAAC,CAACS,GAAG,EAAA,QAAA,CAAA,CAAAH,MAAA,CAASH,gBAAgB,IAAK,EAAE;AAC7E;IAEaO,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAGf,MAAM,EAAA;AAAA,EAAA,IAAAgB,aAAA;AAAA,EAAA,OAC9ChB,MAAM,CAACiB,IAAI,KAAK,eAAe,KAAA,CAAAD,aAAA,GAC/BhB,MAAM,CAACkB,KAAK,MAAA,IAAA,IAAAF,aAAA,KAAZA,MAAAA,GAAAA,MAAAA,GAAAA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { _ as _defineProperty } from '../../defineProperty-CrCYjjU3.js';
|
|
|
2
2
|
import { Honeybadger, HoneybadgerErrorBoundary as HoneybadgerErrorBoundary$1 } from '@honeybadger-io/react';
|
|
3
3
|
import { IGNORABLE_ERRORS_REGEX, IGNORABLE_ERROR_NAMES_REGEX, IGNORABLE_STACKS_REGEX } from './constants.js';
|
|
4
4
|
import FallbackComponent from './FallbackComponent.js';
|
|
5
|
-
import { getSessionReplayUrl, attachContext } from './utils.js';
|
|
5
|
+
import { isNeetoReplaySecurityError, getSessionReplayUrl, attachContext } from './utils.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import '../../typeof-D-UKOauR.js';
|
|
8
8
|
import 'react';
|
|
@@ -24,7 +24,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
24
24
|
Honeybadger.beforeNotify(function (notice) {
|
|
25
25
|
var _globalProps$user;
|
|
26
26
|
if (!notice) return false;
|
|
27
|
-
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || IGNORABLE_STACKS_REGEX.test(notice.stack) || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
27
|
+
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || IGNORABLE_STACKS_REGEX.test(notice.stack) || isNeetoReplaySecurityError(notice) || (filterErrors === null || filterErrors === void 0 ? void 0 : filterErrors(notice)) === false;
|
|
28
28
|
if (isIgnorable) return false;
|
|
29
29
|
var context = {
|
|
30
30
|
errorClass: notice.name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport {
|
|
1
|
+
{"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n config,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n IGNORABLE_STACKS_REGEX.test(notice.stack) ||\n isNeetoReplaySecurityError(notice) ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n if (notice.name === \"ChunkLoadError\") {\n context.IGNORABLE_ERROR_NAMES_REGEX = IGNORABLE_ERROR_NAMES_REGEX;\n context.isChunkLoadError = IGNORABLE_ERROR_NAMES_REGEX.test(notice.name);\n }\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n ...config,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"names":["HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","config","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","context","errorClass","isChunkLoadError","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","_jsx","ErrorBoundary"],"mappings":";;;;;;;;;;;;;;;;AAkBA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAKxB;AAAA,EAAA,IAJJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,mBAAA,GAAAF,IAAA,CACRG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAGE,MAAAA,GAAAA,iBAAiB,GAAAF,mBAAA;IAAAG,iBAAA,GAAAL,IAAA,CAClCM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGE,MAAAA,GAAAA,SAAS,GAAAF,iBAAA;IACxBG,MAAM,GAAAR,IAAA,CAANQ,MAAM;AAENC,EAAAA,WAAW,CAACC,YAAY,CAAC,UAAAC,MAAM,EAAI;AAAA,IAAA,IAAAC,iBAAA;AACjC,IAAA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C,WAAW,EAAEV,WAAW,CAACW,QAAQ;IACjCC,QAAQ,EAAEZ,WAAW,CAACa,mBAAmB;AACzCC,IAAAA,uBAAuB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC;AAChDC,IAAAA,cAAc,EAAE,IAAI;AACpBC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,kBAAkB,EAAE,IAAI;AACxBC,IAAAA,WAAW,EAAE,eAAe;AAC5BC,IAAAA,wBAAwB,EAAE;GACvBrC,EAAAA,MAAM,CACV,CAAC;EAEF,oBACEsC,GAAA,CAACC,0BAAa,EAAA;AAAO5C,IAAAA,cAAc,EAAdA,cAAc;AAAE4B,IAAAA,WAAW,EAAXA,WAAW;AAAA9B,IAAAA,QAAA,EAC7CA;AAAQ,GACI,CAAC;AAEpB;;;;"}
|
|
@@ -6,6 +6,10 @@ var getSessionReplayUrl = function getSessionReplayUrl() {
|
|
|
6
6
|
var currentTimestamp = new Date().getTime();
|
|
7
7
|
return storage ? "".concat(JSON.parse(storage).url, "?goto=").concat(currentTimestamp) : "";
|
|
8
8
|
};
|
|
9
|
+
var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
|
|
10
|
+
var _notice$stack;
|
|
11
|
+
return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
|
|
12
|
+
};
|
|
9
13
|
|
|
10
|
-
export { attachContext, getSessionReplayUrl };
|
|
14
|
+
export { attachContext, getSessionReplayUrl, isNeetoReplaySecurityError };
|
|
11
15
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/utils.js"],"sourcesContent":["export const attachContext = (notice, context) => {\n if (notice.context) Object.assign(notice.context, context);\n else notice.context = context;\n};\n\nexport const getSessionReplayUrl = () => {\n const storage = sessionStorage.getItem(\"neeto-replay-widget--session\");\n const currentTimestamp = new Date().getTime();\n\n return storage ? `${JSON.parse(storage).url}?goto=${currentTimestamp}` : \"\";\n};\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url"],"mappings":"AAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAAM,EAAEC,OAAO,EAAK;EAChD,IAAID,MAAM,CAACC,OAAO,EAAEC,MAAM,CAACC,MAAM,CAACH,MAAM,CAACC,OAAO,EAAEA,OAAO,CAAC,CAAC,KACtDD,MAAM,CAACC,OAAO,GAAGA,OAAO;AAC/B;IAEaG,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAS;AACvC,EAAA,IAAMC,OAAO,GAAGC,cAAc,CAACC,OAAO,CAAC,8BAA8B,CAAC;EACtE,IAAMC,gBAAgB,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;AAE7C,EAAA,OAAOL,OAAO,GAAAM,EAAAA,CAAAA,MAAA,CAAMC,IAAI,CAACC,KAAK,CAACR,OAAO,CAAC,CAACS,GAAG,EAAA,QAAA,CAAA,CAAAH,MAAA,CAASH,gBAAgB,IAAK,EAAE;AAC7E;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/utils.js"],"sourcesContent":["export const attachContext = (notice, context) => {\n if (notice.context) Object.assign(notice.context, context);\n else notice.context = context;\n};\n\nexport const getSessionReplayUrl = () => {\n const storage = sessionStorage.getItem(\"neeto-replay-widget--session\");\n const currentTimestamp = new Date().getTime();\n\n return storage ? `${JSON.parse(storage).url}?goto=${currentTimestamp}` : \"\";\n};\n\nexport const isNeetoReplaySecurityError = notice =>\n notice.name === \"SecurityError\" &&\n notice.stack?.includes(\"neeto-replay-widget\");\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url","isNeetoReplaySecurityError","_notice$stack","name","stack","includes"],"mappings":"AAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAAM,EAAEC,OAAO,EAAK;EAChD,IAAID,MAAM,CAACC,OAAO,EAAEC,MAAM,CAACC,MAAM,CAACH,MAAM,CAACC,OAAO,EAAEA,OAAO,CAAC,CAAC,KACtDD,MAAM,CAACC,OAAO,GAAGA,OAAO;AAC/B;IAEaG,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAS;AACvC,EAAA,IAAMC,OAAO,GAAGC,cAAc,CAACC,OAAO,CAAC,8BAA8B,CAAC;EACtE,IAAMC,gBAAgB,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE;AAE7C,EAAA,OAAOL,OAAO,GAAAM,EAAAA,CAAAA,MAAA,CAAMC,IAAI,CAACC,KAAK,CAACR,OAAO,CAAC,CAACS,GAAG,EAAA,QAAA,CAAA,CAAAH,MAAA,CAASH,gBAAgB,IAAK,EAAE;AAC7E;IAEaO,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAGf,MAAM,EAAA;AAAA,EAAA,IAAAgB,aAAA;AAAA,EAAA,OAC9ChB,MAAM,CAACiB,IAAI,KAAK,eAAe,KAAA,CAAAD,aAAA,GAC/BhB,MAAM,CAACkB,KAAK,MAAA,IAAA,IAAAF,aAAA,KAAZA,MAAAA,GAAAA,MAAAA,GAAAA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.49",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|