@bigbinary/neeto-commons-frontend 4.13.162 → 4.13.164-beta1
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/.ready +1 -1
- package/dist/cjs/initializers/honeybadger/index.js +1 -1
- package/dist/cjs/initializers/honeybadger/index.js.map +1 -1
- package/dist/cjs/initializers/honeybadger/utils.js +17 -0
- package/dist/cjs/initializers/honeybadger/utils.js.map +1 -1
- package/dist/cjs/v2/initializers/honeybadger/index.js +1 -1
- package/dist/cjs/v2/initializers/honeybadger/index.js.map +1 -1
- package/dist/cjs/v2/initializers/honeybadger/utils.js +17 -0
- package/dist/cjs/v2/initializers/honeybadger/utils.js.map +1 -1
- package/dist/initializers/honeybadger/index.js +2 -2
- package/dist/initializers/honeybadger/index.js.map +1 -1
- package/dist/initializers/honeybadger/utils.js +17 -1
- package/dist/initializers/honeybadger/utils.js.map +1 -1
- package/dist/translations/ar.json +5 -0
- package/dist/translations/bg.json +5 -0
- package/dist/translations/ca.json +5 -0
- package/dist/translations/cs.json +5 -0
- package/dist/translations/da.json +5 -0
- package/dist/translations/de.json +5 -0
- package/dist/translations/es-MX.json +5 -0
- package/dist/translations/es.json +5 -0
- package/dist/translations/et.json +5 -0
- package/dist/translations/fi.json +5 -0
- package/dist/translations/fil.json +5 -0
- package/dist/translations/fr.json +5 -0
- package/dist/translations/he.json +5 -0
- package/dist/translations/hi.json +5 -0
- package/dist/translations/hr.json +5 -0
- package/dist/translations/hu.json +5 -0
- package/dist/translations/id.json +5 -0
- package/dist/translations/it.json +5 -0
- package/dist/translations/ja.json +5 -0
- package/dist/translations/ko.json +5 -0
- package/dist/translations/lv.json +5 -0
- package/dist/translations/nl.json +5 -0
- package/dist/translations/pl.json +5 -0
- package/dist/translations/pt-BR.json +5 -0
- package/dist/translations/pt.json +5 -0
- package/dist/translations/ro.json +5 -0
- package/dist/translations/ru.json +5 -0
- package/dist/translations/sk.json +5 -0
- package/dist/translations/sl.json +5 -0
- package/dist/translations/sv.json +5 -0
- package/dist/translations/th.json +5 -0
- package/dist/translations/tr.json +5 -0
- package/dist/translations/uk.json +5 -0
- package/dist/translations/vi.json +5 -0
- package/dist/translations/zh-CN.json +5 -0
- package/dist/translations/zh-TW.json +5 -0
- package/dist/v2/initializers/honeybadger/index.js +2 -2
- package/dist/v2/initializers/honeybadger/index.js.map +1 -1
- package/dist/v2/initializers/honeybadger/utils.js +17 -1
- package/dist/v2/initializers/honeybadger/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/ar.json +5 -0
- package/src/translations/bg.json +5 -0
- package/src/translations/ca.json +5 -0
- package/src/translations/cs.json +5 -0
- package/src/translations/da.json +5 -0
- package/src/translations/de.json +5 -0
- package/src/translations/es-MX.json +5 -0
- package/src/translations/es.json +5 -0
- package/src/translations/et.json +5 -0
- package/src/translations/fi.json +5 -0
- package/src/translations/fil.json +5 -0
- package/src/translations/fr.json +5 -0
- package/src/translations/he.json +5 -0
- package/src/translations/hi.json +5 -0
- package/src/translations/hr.json +5 -0
- package/src/translations/hu.json +5 -0
- package/src/translations/id.json +5 -0
- package/src/translations/it.json +5 -0
- package/src/translations/ja.json +5 -0
- package/src/translations/ko.json +5 -0
- package/src/translations/lv.json +5 -0
- package/src/translations/nl.json +5 -0
- package/src/translations/pl.json +5 -0
- package/src/translations/pt-BR.json +5 -0
- package/src/translations/pt.json +5 -0
- package/src/translations/ro.json +5 -0
- package/src/translations/ru.json +5 -0
- package/src/translations/sk.json +5 -0
- package/src/translations/sl.json +5 -0
- package/src/translations/sv.json +5 -0
- package/src/translations/th.json +5 -0
- package/src/translations/tr.json +5 -0
- package/src/translations/uk.json +5 -0
- package/src/translations/vi.json +5 -0
- package/src/translations/zh-CN.json +5 -0
- package/src/translations/zh-TW.json +5 -0
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-
|
|
1
|
+
Built at 2026-10-06T08:53:48.496Z
|
|
@@ -21,7 +21,7 @@ function initializeHoneybadger() {
|
|
|
21
21
|
react.Honeybadger.beforeNotify(function (notice) {
|
|
22
22
|
var _activeFilterErrors, _window$globalProps;
|
|
23
23
|
if (!notice) return false;
|
|
24
|
-
var isIgnorable = initializers_honeybadger_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || initializers_honeybadger_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || initializers_honeybadger_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || initializers_honeybadger_utils.isNeetoReplaySecurityError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
24
|
+
var isIgnorable = initializers_honeybadger_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || initializers_honeybadger_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || initializers_honeybadger_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || initializers_honeybadger_utils.isNeetoReplaySecurityError(notice) || initializers_honeybadger_utils.isAnonymousScriptError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
25
25
|
if (isIgnorable) return false;
|
|
26
26
|
var context = {
|
|
27
27
|
errorClass: notice.name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","setHoneybadgerErrorFilter","fn"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isAnonymousScriptError,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 isAnonymousScriptError(notice) ||\n activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","isAnonymousScriptError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","setHoneybadgerErrorFilter","fn"],"mappings":";;;;;;;;;;;;;AAcA,IAAIA,kBAAkB,GAAG,IAAI;AAC7B,IAAIC,sBAAsB,GAAG,KAAK;AAEnB,SAASC,qBAAqBA,GAAiB;AAAA,EAAA,IAAAC,oBAAA,EAAAC,oBAAA,EAAAC,oBAAA;AAAA,EAAA,IAAhBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAC1D,IAAI,CAACN,sBAAsB,EAAE;AAC3BA,IAAAA,sBAAsB,GAAG,IAAI;AAE7BS,IAAAA,iBAAW,CAACC,YAAY,CAAC,UAAAC,MAAM,EAAI;MAAA,IAAAC,mBAAA,EAAAC,mBAAA;AACjC,MAAA,IAAI,CAACF,MAAM,EAAE,OAAO,KAAK;MAEzB,IAAMG,WAAW,GACfC,yDAAsB,CAACC,IAAI,CAACL,MAAM,CAACM,OAAO,CAAC,IAC3CC,8DAA2B,CAACF,IAAI,CAACL,MAAM,CAACQ,IAAI,CAAC,IAC7CC,yDAAsB,CAACJ,IAAI,CAACL,MAAM,CAACU,KAAK,CAAC,IACzCC,yDAA0B,CAACX,MAAM,CAAC,IAClCY,qDAAsB,CAACZ,MAAM,CAAC,IAC9B,EAAAC,mBAAA,GAAAb,kBAAkB,MAAA,IAAA,IAAAa,mBAAA,KAAA,MAAA,GAAA,MAAA,GAAlBA,mBAAA,CAAqBD,MAAM,CAAC,MAAK,KAAK;MAExC,IAAIG,WAAW,EAAE,OAAO,KAAK;AAE7B,MAAA,IAAMU,OAAO,GAAG;QAAEC,UAAU,EAAEd,MAAM,CAACQ;OAAM;MAE3C,IAAMO,IAAI,IAAAb,mBAAA,GAAGc,MAAM,CAACC,WAA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,SAA5BA,yBAAyBA,CAAGC,EAAE,EAAI;AAC7CjD,EAAAA,kBAAkB,GAAGiD,EAAE;AACzB;;;;;"}
|
|
@@ -13,7 +13,24 @@ var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
|
|
|
13
13
|
return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
// Errors whose every backtrace frame is <anonymous> come from code evaluated
|
|
17
|
+
// without a source URL, such as scripts that extensions inject into the page
|
|
18
|
+
// via chrome.scripting.executeScript with world: "MAIN" (e.g. Clipto.AI).
|
|
19
|
+
// Application code always ships as script files, and code it evals is
|
|
20
|
+
// attributed to the calling bundle, so no frame from our code is <anonymous>.
|
|
21
|
+
// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>
|
|
22
|
+
// file but no line number, so requiring one still reports stacks made only
|
|
23
|
+
// of built-ins.
|
|
24
|
+
// https://github.com/neetozone/neeto-record-web/issues/5161
|
|
25
|
+
var isAnonymousScriptError = function isAnonymousScriptError(notice) {
|
|
26
|
+
var _notice$backtrace;
|
|
27
|
+
return ((_notice$backtrace = notice.backtrace) === null || _notice$backtrace === void 0 ? void 0 : _notice$backtrace.length) > 0 && notice.backtrace.every(function (frame) {
|
|
28
|
+
return frame.file === "<anonymous>" && Boolean(frame.number);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
16
32
|
exports.attachContext = attachContext;
|
|
17
33
|
exports.getSessionReplayUrl = getSessionReplayUrl;
|
|
34
|
+
exports.isAnonymousScriptError = isAnonymousScriptError;
|
|
18
35
|
exports.isNeetoReplaySecurityError = isNeetoReplaySecurityError;
|
|
19
36
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/initializers/honeybadger/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,GAAA,EAAA,CAAAM,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,KAAA,MAAA,GAAA,MAAA,GAAZA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/initializers/honeybadger/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\n// Errors whose every backtrace frame is <anonymous> come from code evaluated\n// without a source URL, such as scripts that extensions inject into the page\n// via chrome.scripting.executeScript with world: \"MAIN\" (e.g. Clipto.AI).\n// Application code always ships as script files, and code it evals is\n// attributed to the calling bundle, so no frame from our code is <anonymous>.\n// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>\n// file but no line number, so requiring one still reports stacks made only\n// of built-ins.\n// https://github.com/neetozone/neeto-record-web/issues/5161\nexport const isAnonymousScriptError = notice =>\n notice.backtrace?.length > 0 &&\n notice.backtrace.every(\n frame => frame.file === \"<anonymous>\" && Boolean(frame.number)\n );\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url","isNeetoReplaySecurityError","_notice$stack","name","stack","includes","isAnonymousScriptError","_notice$backtrace","backtrace","length","every","frame","file","Boolean","number"],"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,GAAA,EAAA,CAAAM,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,KAAA,MAAA,GAAA,MAAA,GAAZA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAGpB,MAAM,EAAA;AAAA,EAAA,IAAAqB,iBAAA;EAAA,OAC1C,CAAA,CAAAA,iBAAA,GAAArB,MAAM,CAACsB,SAAS,MAAA,IAAA,IAAAD,iBAAA,KAAA,MAAA,GAAA,MAAA,GAAhBA,iBAAA,CAAkBE,MAAM,IAAG,CAAC,IAC5BvB,MAAM,CAACsB,SAAS,CAACE,KAAK,CACpB,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAAK,CAACC,IAAI,KAAK,aAAa,IAAIC,OAAO,CAACF,KAAK,CAACG,MAAM,CAAC;AAAA,EAAA,CAChE,CAAC;AAAA;;;;;;;"}
|
|
@@ -21,7 +21,7 @@ function initializeHoneybadger() {
|
|
|
21
21
|
react.Honeybadger.beforeNotify(function (notice) {
|
|
22
22
|
var _activeFilterErrors, _window$globalProps;
|
|
23
23
|
if (!notice) return false;
|
|
24
|
-
var isIgnorable = v2_initializers_honeybadger_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || v2_initializers_honeybadger_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || v2_initializers_honeybadger_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || v2_initializers_honeybadger_utils.isNeetoReplaySecurityError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
24
|
+
var isIgnorable = v2_initializers_honeybadger_constants.IGNORABLE_ERRORS_REGEX.test(notice.message) || v2_initializers_honeybadger_constants.IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || v2_initializers_honeybadger_constants.IGNORABLE_STACKS_REGEX.test(notice.stack) || v2_initializers_honeybadger_utils.isNeetoReplaySecurityError(notice) || v2_initializers_honeybadger_utils.isAnonymousScriptError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
25
25
|
if (isIgnorable) return false;
|
|
26
26
|
var context = {
|
|
27
27
|
errorClass: notice.name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/v2/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","setHoneybadgerErrorFilter","fn"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/v2/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isAnonymousScriptError,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 isAnonymousScriptError(notice) ||\n activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","isAnonymousScriptError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","proj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ACzB;;;;;"}
|
|
@@ -13,7 +13,24 @@ var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
|
|
|
13
13
|
return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
// Errors whose every backtrace frame is <anonymous> come from code evaluated
|
|
17
|
+
// without a source URL, such as scripts that extensions inject into the page
|
|
18
|
+
// via chrome.scripting.executeScript with world: "MAIN" (e.g. Clipto.AI).
|
|
19
|
+
// Application code always ships as script files, and code it evals is
|
|
20
|
+
// attributed to the calling bundle, so no frame from our code is <anonymous>.
|
|
21
|
+
// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>
|
|
22
|
+
// file but no line number, so requiring one still reports stacks made only
|
|
23
|
+
// of built-ins.
|
|
24
|
+
// https://github.com/neetozone/neeto-record-web/issues/5161
|
|
25
|
+
var isAnonymousScriptError = function isAnonymousScriptError(notice) {
|
|
26
|
+
var _notice$backtrace;
|
|
27
|
+
return ((_notice$backtrace = notice.backtrace) === null || _notice$backtrace === void 0 ? void 0 : _notice$backtrace.length) > 0 && notice.backtrace.every(function (frame) {
|
|
28
|
+
return frame.file === "<anonymous>" && Boolean(frame.number);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
16
32
|
exports.attachContext = attachContext;
|
|
17
33
|
exports.getSessionReplayUrl = getSessionReplayUrl;
|
|
34
|
+
exports.isAnonymousScriptError = isAnonymousScriptError;
|
|
18
35
|
exports.isNeetoReplaySecurityError = isNeetoReplaySecurityError;
|
|
19
36
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../src/v2/initializers/honeybadger/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,GAAA,EAAA,CAAAM,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,KAAA,MAAA,GAAA,MAAA,GAAZA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../src/v2/initializers/honeybadger/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\n// Errors whose every backtrace frame is <anonymous> come from code evaluated\n// without a source URL, such as scripts that extensions inject into the page\n// via chrome.scripting.executeScript with world: \"MAIN\" (e.g. Clipto.AI).\n// Application code always ships as script files, and code it evals is\n// attributed to the calling bundle, so no frame from our code is <anonymous>.\n// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>\n// file but no line number, so requiring one still reports stacks made only\n// of built-ins.\n// https://github.com/neetozone/neeto-record-web/issues/5161\nexport const isAnonymousScriptError = notice =>\n notice.backtrace?.length > 0 &&\n notice.backtrace.every(\n frame => frame.file === \"<anonymous>\" && Boolean(frame.number)\n );\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url","isNeetoReplaySecurityError","_notice$stack","name","stack","includes","isAnonymousScriptError","_notice$backtrace","backtrace","length","every","frame","file","Boolean","number"],"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,GAAA,EAAA,CAAAM,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,KAAA,MAAA,GAAA,MAAA,GAAZA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAGpB,MAAM,EAAA;AAAA,EAAA,IAAAqB,iBAAA;EAAA,OAC1C,CAAA,CAAAA,iBAAA,GAAArB,MAAM,CAACsB,SAAS,MAAA,IAAA,IAAAD,iBAAA,KAAA,MAAA,GAAA,MAAA,GAAhBA,iBAAA,CAAkBE,MAAM,IAAG,CAAC,IAC5BvB,MAAM,CAACsB,SAAS,CAACE,KAAK,CACpB,UAAAC,KAAK,EAAA;IAAA,OAAIA,KAAK,CAACC,IAAI,KAAK,aAAa,IAAIC,OAAO,CAACF,KAAK,CAACG,MAAM,CAAC;AAAA,EAAA,CAChE,CAAC;AAAA;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../../defineProperty-Dcer7TUY.js';
|
|
2
2
|
import { Honeybadger } from '@honeybadger-io/react';
|
|
3
3
|
import { IGNORABLE_ERRORS_REGEX, IGNORABLE_ERROR_NAMES_REGEX, IGNORABLE_STACKS_REGEX } from './constants.js';
|
|
4
|
-
import { isNeetoReplaySecurityError, getSessionReplayUrl, attachContext } from './utils.js';
|
|
4
|
+
import { isNeetoReplaySecurityError, isAnonymousScriptError, getSessionReplayUrl, attachContext } from './utils.js';
|
|
5
5
|
import '../../toPropertyKey-BAXkSB3z.js';
|
|
6
6
|
import '../../typeof-D-UKOauR.js';
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ function initializeHoneybadger() {
|
|
|
17
17
|
Honeybadger.beforeNotify(function (notice) {
|
|
18
18
|
var _activeFilterErrors, _window$globalProps;
|
|
19
19
|
if (!notice) return false;
|
|
20
|
-
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || IGNORABLE_STACKS_REGEX.test(notice.stack) || isNeetoReplaySecurityError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
20
|
+
var isIgnorable = IGNORABLE_ERRORS_REGEX.test(notice.message) || IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) || IGNORABLE_STACKS_REGEX.test(notice.stack) || isNeetoReplaySecurityError(notice) || isAnonymousScriptError(notice) || ((_activeFilterErrors = activeFilterErrors) === null || _activeFilterErrors === void 0 ? void 0 : _activeFilterErrors(notice)) === false;
|
|
21
21
|
if (isIgnorable) return false;
|
|
22
22
|
var context = {
|
|
23
23
|
errorClass: notice.name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","setHoneybadgerErrorFilter","fn"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/initializers/honeybadger/index.js"],"sourcesContent":["import { Honeybadger } from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n IGNORABLE_STACKS_REGEX,\n} from \"./constants\";\nimport {\n attachContext,\n getSessionReplayUrl,\n isAnonymousScriptError,\n isNeetoReplaySecurityError,\n} from \"./utils\";\n\nlet activeFilterErrors = null;\nlet beforeNotifyRegistered = false;\n\nexport default function initializeHoneybadger(overrides = {}) {\n if (!beforeNotifyRegistered) {\n beforeNotifyRegistered = true;\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 isAnonymousScriptError(notice) ||\n activeFilterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n const user = window.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\n return Honeybadger.configure({\n apiKey: window.globalProps?.honeybadgerApiKey,\n environment: window.globalProps?.railsEnv,\n revision: window.globalProps?.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"\",\n enableUnhandledRejection: false,\n ...overrides,\n });\n}\n\nexport const setHoneybadgerErrorFilter = fn => {\n activeFilterErrors = fn;\n};\n"],"names":["activeFilterErrors","beforeNotifyRegistered","initializeHoneybadger","_window$globalProps2","_window$globalProps3","_window$globalProps4","overrides","arguments","length","undefined","Honeybadger","beforeNotify","notice","_activeFilterErrors","_window$globalProps","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","IGNORABLE_STACKS_REGEX","stack","isNeetoReplaySecurityError","isAnonymousScriptError","context","errorClass","user","window","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","configure","_objectSpread","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","setHoneybadgerErrorFilter","fn"],"mappings":";;;;;;;;;AAcA,IAAIA,kBAAkB,GAAG,IAAI;AAC7B,IAAIC,sBAAsB,GAAG,KAAK;AAEnB,SAASC,qBAAqBA,GAAiB;AAAA,EAAA,IAAAC,oBAAA,EAAAC,oBAAA,EAAAC,oBAAA;AAAA,EAAA,IAAhBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAC1D,IAAI,CAACN,sBAAsB,EAAE;AAC3BA,IAAAA,sBAAsB,GAAG,IAAI;AAE7BS,IAAAA,WAAW,CAACC,YAAY,CAAC,UAAAC,MAAM,EAAI;MAAA,IAAAC,mBAAA,EAAAC,mBAAA;AACjC,MAAA,IAAI,CAACF,MAAM,EAAE,OAAO,KAAK;MAEzB,IAAMG,WAAW,GACfC,sBAAsB,CAACC,IAAI,CAACL,MAAM,CAACM,OAAO,CAAC,IAC3CC,2BAA2B,CAACF,IAAI,CAACL,MAAM,CAACQ,IAAI,CAAC,IAC7CC,sBAAsB,CAACJ,IAAI,CAACL,MAAM,CAACU,KAAK,CAAC,IACzCC,0BAA0B,CAACX,MAAM,CAAC,IAClCY,sBAAsB,CAACZ,MAAM,CAAC,IAC9B,EAAAC,mBAAA,GAAAb,kBAAkB,MAAA,IAAA,IAAAa,mBAAA,KAAA,MAAA,GAAA,MAAA,GAAlBA,mBAAA,CAAqBD,MAAM,CAAC,MAAK,KAAK;MAExC,IAAIG,WAAW,EAAE,OAAO,KAAK;AAE7B,MAAA,IAAMU,OAAO,GAAG;QAAEC,U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ACfC,IAAAA,wBAAwB,EAAE;GAAK,EAC5BzC,SAAS,CACb,CAAC;AACJ;IAEa0C,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAGC,EAAE,EAAI;AAC7CjD,EAAAA,kBAAkB,GAAGiD,EAAE;AACzB;;;;"}
|
|
@@ -11,5 +11,21 @@ var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
|
|
|
11
11
|
return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// Errors whose every backtrace frame is <anonymous> come from code evaluated
|
|
15
|
+
// without a source URL, such as scripts that extensions inject into the page
|
|
16
|
+
// via chrome.scripting.executeScript with world: "MAIN" (e.g. Clipto.AI).
|
|
17
|
+
// Application code always ships as script files, and code it evals is
|
|
18
|
+
// attributed to the calling bundle, so no frame from our code is <anonymous>.
|
|
19
|
+
// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>
|
|
20
|
+
// file but no line number, so requiring one still reports stacks made only
|
|
21
|
+
// of built-ins.
|
|
22
|
+
// https://github.com/neetozone/neeto-record-web/issues/5161
|
|
23
|
+
var isAnonymousScriptError = function isAnonymousScriptError(notice) {
|
|
24
|
+
var _notice$backtrace;
|
|
25
|
+
return ((_notice$backtrace = notice.backtrace) === null || _notice$backtrace === void 0 ? void 0 : _notice$backtrace.length) > 0 && notice.backtrace.every(function (frame) {
|
|
26
|
+
return frame.file === "<anonymous>" && Boolean(frame.number);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { attachContext, getSessionReplayUrl, isAnonymousScriptError, isNeetoReplaySecurityError };
|
|
15
31
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/initializers/honeybadger/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,GAAA,EAAA,CAAAM,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,KAAA,MAAA,GAAA,MAAA,GAAZA,aAAA,CAAcG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/initializers/honeybadger/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\n// Errors whose every backtrace frame is <anonymous> come from code evaluated\n// without a source URL, such as scripts that extensions inject into the page\n// via chrome.scripting.executeScript with world: \"MAIN\" (e.g. Clipto.AI).\n// Application code always ships as script files, and code it evals is\n// attributed to the calling bundle, so no frame from our code is <anonymous>.\n// Built-in frames like `Array.forEach (<anonymous>)` also have an <anonymous>\n// file but no line number, so requiring one still reports stacks made only\n// of built-ins.\n// https://github.com/neetozone/neeto-record-web/issues/5161\nexport const isAnonymousScriptError = notice =>\n notice.backtrace?.length > 0 &&\n notice.backtrace.every(\n frame => frame.file === \"<anonymous>\" && Boolean(frame.number)\n );\n"],"names":["attachContext","notice","context","Object","assign","getSessionReplayUrl","storage","sessionStorage","getItem","currentTimestamp","Date","getTime","concat","JSON","parse","url","isNeetoReplaySecurityError","_notice$stack","name","stack","includes","isAnonymousScriptError","_notice$backtrace","backtrace","length","every","frame","file","Boolean","number"],"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,GA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