@flumens/utils 0.3.2 → 0.3.3
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/sentry.d.ts +1 -10
- package/dist/sentry.js +1 -1
- package/package.json +1 -1
package/dist/sentry.d.ts
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare function beforeBreadcrumb(crumb: any, hint: any): any;
|
|
3
|
-
export declare const options: {
|
|
4
|
-
maxBreadcrumbs: number;
|
|
5
|
-
ignoreErrors: string[];
|
|
6
|
-
beforeSend: (event: ErrorEvent) => ErrorEvent | null;
|
|
7
|
-
beforeBreadcrumb: typeof beforeBreadcrumb;
|
|
8
|
-
integrations: any[];
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
1
|
+
export declare const options: any;
|
package/dist/sentry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.options=void 0;const e=require("@sentry/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.options=void 0;const e=require("tslib").__importStar(require("@sentry/browser"));function t(e){return e.replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,"UUID")}const r=["timeout","network error","load failed","request aborted"],a=["re-login is required","incorrect password","refresh token is invalid"],o=["Unable to preventDefault inside passive event listener invocation.","AbortError: Fetch is aborted","Attempted to load an infinite number of tiles","No images picked","User cancelled photos app","No image picked","User denied access to camera","User denied access to photos","Failed to fetch"];exports.options={maxBreadcrumbs:400,ignoreErrors:o,beforeSend:(e,t)=>{var i,s,n,d;const l=(null===(s=null===(i=null==t?void 0:t.originalException)||void 0===i?void 0:i.message)||void 0===s?void 0:s.toLowerCase())||"";if("[object Object]"===e.message){const{message:t}=(null===(d=null===(n=e.extra)||void 0===n?void 0:n.arguments)||void 0===d?void 0:d[0])||{};if(!t||o.includes(t))return null;e.message=t}return r.find((e=>l.includes(e)))&&(e.tags||(e.tags={}),e.tags.type="network"),a.find((e=>l.includes(e)))&&(e.tags||(e.tags={}),e.tags.type="authentication"),e},beforeBreadcrumb:function(e,r){if("navigation"===e.category)return e.data={to:t(e.data.to),from:t(e.data.from)},e;if(e.category.startsWith("ui")){const{innerText:t,dataset:a}=r.event.target;t&&t.length<15&&(e.message=`[${t}] ${e.message}`),a.label&&(e.message=`[${a.label}] ${e.message}`)}if(["xhr","fetch"].includes(e.category)){if(e.data.url.startsWith("data:"))return null;"GET"===e.data.method&&e.data.url.match(/jpeg$/i)&&(e.data.url=e.data.url.replace(/files\/\d+\.jpeg/i,"files/FILENAME.jpeg"))}return e},integrations:[e.captureConsoleIntegration({levels:["error"]}),e.dedupeIntegration()]};
|