@mushi-mushi/web 1.32.1 → 1.32.2
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/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +11 -10
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -6197,6 +6197,15 @@ var DEFAULT_EXCLUDE_ROUTES = [
|
|
|
6197
6197
|
"/sso/*",
|
|
6198
6198
|
"/auth/*"
|
|
6199
6199
|
];
|
|
6200
|
+
var STACK_FRAME_URL = /(?:^\s*at\s+(?:.*?\()?|@)([a-z][a-z0-9+.-]*:\/\/[^\s()]*?)(?::\d+){1,2}\)?\s*$/i;
|
|
6201
|
+
function scriptUrlFromStack(stack) {
|
|
6202
|
+
if (typeof stack !== "string" || stack.length === 0) return void 0;
|
|
6203
|
+
for (const line of stack.split("\n")) {
|
|
6204
|
+
const match = STACK_FRAME_URL.exec(line);
|
|
6205
|
+
if (match) return match[1];
|
|
6206
|
+
}
|
|
6207
|
+
return void 0;
|
|
6208
|
+
}
|
|
6200
6209
|
function setupProactiveTriggers(callbacks, config = {}) {
|
|
6201
6210
|
const cleanups = [];
|
|
6202
6211
|
if (config.rageClick !== false) {
|
|
@@ -6351,6 +6360,7 @@ function setupProactiveTriggers(callbacks, config = {}) {
|
|
|
6351
6360
|
const message = event.reason instanceof Error ? event.reason.message : String(event.reason);
|
|
6352
6361
|
if (core.shouldDropCapturedError({
|
|
6353
6362
|
message,
|
|
6363
|
+
filename: event.reason instanceof Error ? scriptUrlFromStack(event.reason.stack) : void 0,
|
|
6354
6364
|
ignoreErrors: config.ignoreErrors,
|
|
6355
6365
|
denyUrls: config.denyUrls,
|
|
6356
6366
|
allowUrls: config.allowUrls
|
|
@@ -6466,7 +6476,7 @@ function createProactiveManager(config = {}) {
|
|
|
6466
6476
|
|
|
6467
6477
|
// src/version.ts
|
|
6468
6478
|
var MUSHI_SDK_PACKAGE = "@mushi-mushi/web";
|
|
6469
|
-
var MUSHI_SDK_VERSION = "1.32.
|
|
6479
|
+
var MUSHI_SDK_VERSION = "1.32.2" ;
|
|
6470
6480
|
function resolveReportAppVersion(config, environment) {
|
|
6471
6481
|
if (config.appVersion) return config.appVersion;
|
|
6472
6482
|
const vercelId = config.integrations?.vercel?.analyticsId;
|
|
@@ -7809,7 +7819,7 @@ function createInstance(config) {
|
|
|
7809
7819
|
},
|
|
7810
7820
|
async captureException(error, options) {
|
|
7811
7821
|
const normalised = core.normaliseThrown(error);
|
|
7812
|
-
const filename = typeof options?.metadata?.filename === "string" ? options.metadata.filename :
|
|
7822
|
+
const filename = typeof options?.metadata?.filename === "string" ? options.metadata.filename : scriptUrlFromStack(normalised.stack);
|
|
7813
7823
|
if (core.shouldDropCapturedError({
|
|
7814
7824
|
message: normalised.message,
|
|
7815
7825
|
filename,
|