@sailfish-ai/recorder 1.11.5 → 1.11.6
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/chunks/{chunkSerializer-RWnu-UfC.js → chunkSerializer-D7_uK-dD.js} +1 -1
- package/dist/chunks/chunkSerializer-D7_uK-dD.js.br +0 -0
- package/dist/chunks/chunkSerializer-D7_uK-dD.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-C8qtomKe.js → chunkSerializer-DkWXHnW4.js} +1 -1
- package/dist/chunks/chunkSerializer-DkWXHnW4.js.br +0 -0
- package/dist/chunks/chunkSerializer-DkWXHnW4.js.gz +0 -0
- package/dist/chunks/{index-DiGs9it7.js → index-CftVmmO9.js} +30 -15
- package/dist/chunks/index-CftVmmO9.js.br +0 -0
- package/dist/chunks/index-CftVmmO9.js.gz +0 -0
- package/dist/chunks/{index-CIK1iDN9.js → index-QXHuV98g.js} +107 -92
- package/dist/chunks/index-QXHuV98g.js.br +0 -0
- package/dist/chunks/index-QXHuV98g.js.gz +0 -0
- package/dist/errorInterceptor.js +42 -4
- package/dist/errorInterceptor.js.br +0 -0
- package/dist/errorInterceptor.js.gz +0 -0
- package/dist/recorder.cjs +1 -1
- package/dist/recorder.cjs.br +0 -0
- package/dist/recorder.cjs.gz +0 -0
- package/dist/recorder.js +22 -22
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +29 -14
- package/dist/recorder.umd.cjs.br +0 -0
- package/dist/recorder.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/chunks/chunkSerializer-C8qtomKe.js.br +0 -0
- package/dist/chunks/chunkSerializer-C8qtomKe.js.gz +0 -0
- package/dist/chunks/chunkSerializer-RWnu-UfC.js.br +0 -0
- package/dist/chunks/chunkSerializer-RWnu-UfC.js.gz +0 -0
- package/dist/chunks/index-CIK1iDN9.js.br +0 -0
- package/dist/chunks/index-CIK1iDN9.js.gz +0 -0
- package/dist/chunks/index-DiGs9it7.js.br +0 -0
- package/dist/chunks/index-DiGs9it7.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const e = require("./index-
|
|
3
|
+
const e = require("./index-CftVmmO9.js");
|
|
4
4
|
exports.chunkedSnapshot = async function chunkedSnapshot(t, n, o = {}) {
|
|
5
5
|
const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
|
|
6
6
|
let u = 100001, l = 0, N = performance.now();
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as e } from "./index-QXHuV98g.js";
|
|
2
2
|
async function chunkedSnapshot(t, n, o = {}) {
|
|
3
3
|
const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
|
|
4
4
|
let u = 100001, l = 0, N = performance.now();
|
|
Binary file
|
|
Binary file
|
|
@@ -394,7 +394,7 @@ function initializeWebSocket(t2, n2, i2, o2, r2 = false) {
|
|
|
394
394
|
const t3 = new URL(e2);
|
|
395
395
|
return `${t3.hostname}${t3.port ? `:${t3.port}` : ""}`;
|
|
396
396
|
})(t2);
|
|
397
|
-
let a2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${s2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.11.
|
|
397
|
+
let a2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${s2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.11.6`;
|
|
398
398
|
if (o2 && (a2 += `&envValue=${encodeURIComponent(o2)}`), w = r2 ? (function tryCreateWsWorker() {
|
|
399
399
|
if ("undefined" == typeof Worker) return null;
|
|
400
400
|
try {
|
|
@@ -489,10 +489,25 @@ async function getConsumerFor(e2, t2) {
|
|
|
489
489
|
}
|
|
490
490
|
return null;
|
|
491
491
|
}
|
|
492
|
-
async function captureError(e2, t2 = false) {
|
|
493
|
-
let
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
async function captureError(e2, t2 = false, n2) {
|
|
493
|
+
let i2, o2;
|
|
494
|
+
const r2 = [];
|
|
495
|
+
e2 instanceof Error ? (i2 = e2.message || e2.name, o2 = e2.stack || "No stack trace", r2.push(`${e2.name}: ${i2}`)) : "string" == typeof e2 ? (i2 = e2, o2 = "No stack trace available", r2.push(t2 ? `Uncaught (in promise) ${e2}` : e2)) : (i2 = (function describeNonError(e3) {
|
|
496
|
+
if (null === e3) return "null";
|
|
497
|
+
if (void 0 === e3) return "undefined";
|
|
498
|
+
if ("string" == typeof e3) return e3;
|
|
499
|
+
if ("number" == typeof e3 || "boolean" == typeof e3 || "bigint" == typeof e3) return String(e3);
|
|
500
|
+
if (e3 instanceof Event) {
|
|
501
|
+
const t3 = e3.target, n3 = (t3 == null ? void 0 : t3.tagName) ? `<${t3.tagName.toLowerCase()}>` : "";
|
|
502
|
+
return `[${e3.type} Event${n3 ? ` on ${n3}` : ""}${e3.isTrusted ? " trusted" : ""}]`;
|
|
503
|
+
}
|
|
504
|
+
try {
|
|
505
|
+
return JSON.stringify(e3);
|
|
506
|
+
} catch {
|
|
507
|
+
return Object.prototype.toString.call(e3);
|
|
508
|
+
}
|
|
509
|
+
})(e2), o2 = "No stack trace available", r2.push(t2 ? `Uncaught (in promise) ${i2}` : i2)), (n2 == null ? void 0 : n2.filename) && r2.push(`at ${n2.filename}:${n2.lineno ?? 0}:${n2.colno ?? 0}`);
|
|
510
|
+
const s2 = await (async function resolveStackTrace(e3) {
|
|
496
511
|
if (!e3) return ["No stack trace available"];
|
|
497
512
|
const t3 = Array.isArray(e3) ? e3 : e3.split("\n"), n3 = [];
|
|
498
513
|
for (const e4 of t3) {
|
|
@@ -501,27 +516,27 @@ async function captureError(e2, t2 = false) {
|
|
|
501
516
|
n3.push(e4);
|
|
502
517
|
continue;
|
|
503
518
|
}
|
|
504
|
-
const [, i3, o3, r3, s3] = t4, a3 = parseInt(r3, 10),
|
|
505
|
-
if (!Number.isFinite(a3) || !Number.isFinite(
|
|
519
|
+
const [, i3, o3, r3, s3] = t4, a3 = parseInt(r3, 10), l3 = Math.max(0, parseInt(s3, 10) - 1);
|
|
520
|
+
if (!Number.isFinite(a3) || !Number.isFinite(l3)) {
|
|
506
521
|
n3.push(e4 + " [Invalid line/column]");
|
|
507
522
|
continue;
|
|
508
523
|
}
|
|
509
|
-
const
|
|
510
|
-
if (!
|
|
524
|
+
const c3 = await getConsumerFor(i3, o3);
|
|
525
|
+
if (!c3) {
|
|
511
526
|
n3.push(`${e4} [No source map found for ${o3}]`);
|
|
512
527
|
continue;
|
|
513
528
|
}
|
|
514
529
|
const { SourceMapConsumer: d2 } = await getSourceMapModule();
|
|
515
|
-
let u2 =
|
|
516
|
-
if (!u2.source || null == u2.line) for (let e5 = 1; e5 <= 20 && (u2 =
|
|
530
|
+
let u2 = c3.originalPositionFor({ line: a3, column: l3, bias: d2.GREATEST_LOWER_BOUND });
|
|
531
|
+
if (!u2.source || null == u2.line) for (let e5 = 1; e5 <= 20 && (u2 = c3.originalPositionFor({ line: a3, column: Math.max(0, l3 - e5), bias: d2.GREATEST_LOWER_BOUND }), !u2.source || null == u2.line); e5++) ;
|
|
517
532
|
if (u2.source && null != u2.line) {
|
|
518
533
|
const e5 = u2.name || "anonymous";
|
|
519
534
|
n3.push(`${u2.source}:${u2.line}:${u2.column ?? 0} (${e5})`);
|
|
520
535
|
} else n3.push(`${e4} [No mapping found in ${o3}]`);
|
|
521
536
|
}
|
|
522
537
|
return n3;
|
|
523
|
-
})(
|
|
524
|
-
sendMessage({ type: "event", event: { type: 6, timestamp:
|
|
538
|
+
})(o2), a2 = s2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom")), l2 = a2.length > 0 ? a2 : s2, c2 = Date.now();
|
|
539
|
+
sendMessage({ type: "event", event: { type: 6, timestamp: c2, data: { payload: { message: i2, stack: o2, trace: l2, filteredStack: a2, payload: r2, userAgent: navigator.userAgent, url: window.location.href, timestamp: c2, level: "error" } } } });
|
|
525
540
|
}
|
|
526
541
|
const K = readDebugFlag();
|
|
527
542
|
const G = readDebugFlag();
|
|
@@ -731,7 +746,7 @@ async function initializeRecording(e2, n2, i2, o2, r2, s2 = true, a2 = false, l2
|
|
|
731
746
|
}
|
|
732
747
|
const { record: n4 } = await import("@sailfish-rrweb/rrweb-record-only");
|
|
733
748
|
if (Q = n4, await yieldToMain(), l2) {
|
|
734
|
-
const { chunkedSnapshot: i3 } = await Promise.resolve().then(() => require("./chunkSerializer-
|
|
749
|
+
const { chunkedSnapshot: i3 } = await Promise.resolve().then(() => require("./chunkSerializer-D7_uK-dD.js")), o3 = n4.mirror;
|
|
735
750
|
let r3 = true;
|
|
736
751
|
const s3 = [];
|
|
737
752
|
n4({ emit(e3) {
|
|
@@ -2355,7 +2370,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2355
2370
|
};
|
|
2356
2371
|
})(o2, C2, i2), E2.xhrPatched = true), E2.fetchPatched || (setupFetchInterceptor(o2, C2, i2), E2.fetchPatched = true), await yieldToMain(), E2.domEventsInit || (initializeDomContentEvents(T2), E2.domEventsInit = true), await yieldToMain(), E2.consoleInit || (initializeConsolePlugin(Le, T2), E2.consoleInit = true), await yieldToMain(), E2.errorInit || (!(function initializeErrorInterceptor() {
|
|
2357
2372
|
window.addEventListener("error", (e3) => {
|
|
2358
|
-
captureError(e3.error
|
|
2373
|
+
captureError(e3.error ?? e3.message, false, { filename: e3.filename, lineno: e3.lineno, colno: e3.colno });
|
|
2359
2374
|
}), window.addEventListener("unhandledrejection", (e3) => {
|
|
2360
2375
|
captureError(e3.reason, true);
|
|
2361
2376
|
});
|
|
Binary file
|
|
Binary file
|
|
@@ -151,13 +151,13 @@ function buildBatches(e2, t2, n2) {
|
|
|
151
151
|
function eventSize(e2) {
|
|
152
152
|
return JSON.stringify(e2).length;
|
|
153
153
|
}
|
|
154
|
-
let
|
|
154
|
+
let v = Date.now;
|
|
155
155
|
function withAppUrlMetadata(e2) {
|
|
156
156
|
var _a;
|
|
157
157
|
return { ...e2 ?? {}, appUrl: (e2 == null ? void 0 : e2.appUrl) ?? ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.href) };
|
|
158
158
|
}
|
|
159
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
160
|
-
const
|
|
159
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (v = () => (/* @__PURE__ */ new Date()).getTime());
|
|
160
|
+
const w = readDebugFlag(), S = "per_session";
|
|
161
161
|
let k = null, x = null, I = false, T = null, E = null, C = "", $ = "", F = false;
|
|
162
162
|
const L = [];
|
|
163
163
|
function onNavigationChange(e2) {
|
|
@@ -233,21 +233,21 @@ function saveGlobalFuncSpanState(e2, t2) {
|
|
|
233
233
|
try {
|
|
234
234
|
if ("undefined" == typeof localStorage) return;
|
|
235
235
|
const n2 = { enabled: e2, expirationTimestampMs: t2, savedAt: Date.now() };
|
|
236
|
-
localStorage.setItem(B, JSON.stringify(n2)),
|
|
236
|
+
localStorage.setItem(B, JSON.stringify(n2)), w && console.log("[Sailfish] Saved funcSpan state to localStorage:", n2);
|
|
237
237
|
} catch (e3) {
|
|
238
|
-
|
|
238
|
+
w && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e3);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
function clearGlobalFuncSpanState() {
|
|
242
242
|
try {
|
|
243
243
|
if ("undefined" == typeof localStorage) return;
|
|
244
|
-
localStorage.removeItem(B),
|
|
244
|
+
localStorage.removeItem(B), w && console.log("[Sailfish] Cleared funcSpan state from localStorage");
|
|
245
245
|
} catch (e2) {
|
|
246
|
-
|
|
246
|
+
w && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e2);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function clearStaleFuncSpanState() {
|
|
250
|
-
R = false, _ = null, P = false, clearGlobalFuncSpanState(),
|
|
250
|
+
R = false, _ = null, P = false, clearGlobalFuncSpanState(), w && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
|
|
251
251
|
}
|
|
252
252
|
let j = false;
|
|
253
253
|
function restoreFuncSpanState() {
|
|
@@ -259,14 +259,14 @@ function restoreFuncSpanState() {
|
|
|
259
259
|
const e3 = localStorage.getItem(B);
|
|
260
260
|
if (!e3) return null;
|
|
261
261
|
const t2 = JSON.parse(e3);
|
|
262
|
-
return
|
|
262
|
+
return w && console.log("[Sailfish] Loaded funcSpan state from localStorage:", t2), t2;
|
|
263
263
|
} catch (e3) {
|
|
264
|
-
return
|
|
264
|
+
return w && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e3), null;
|
|
265
265
|
}
|
|
266
266
|
})();
|
|
267
|
-
if (e2 && e2.enabled) if (R = true, _ = e2.expirationTimestampMs, P = false,
|
|
268
|
-
Date.now() >= _ ? (R = false, _ = null, clearGlobalFuncSpanState(),
|
|
269
|
-
} else
|
|
267
|
+
if (e2 && e2.enabled) if (R = true, _ = e2.expirationTimestampMs, P = false, w && console.log("[Sailfish] Restored global function span tracking from localStorage:", { enabled: true, expirationTime: _ }), null !== _) {
|
|
268
|
+
Date.now() >= _ ? (R = false, _ = null, clearGlobalFuncSpanState(), w && console.log("[Sailfish] Persisted tracking already expired, cleared state")) : w && console.log("[Sailfish] Function span tracking is active and valid (temporary until WebSocket confirms)");
|
|
269
|
+
} else w && console.log("[Sailfish] Function span tracking is active (no expiration, temporary until WebSocket confirms)");
|
|
270
270
|
}
|
|
271
271
|
function isWebSocketOpen(e2) {
|
|
272
272
|
return (e2 == null ? void 0 : e2.readyState) === WebSocket.OPEN;
|
|
@@ -327,7 +327,7 @@ function sendEvent(e2) {
|
|
|
327
327
|
e2.app_url || (e2.app_url = getCachedHref()), !I && isWebSocketOpen(x) && wsSendPayload({ type: "event", event: e2, mapUuid: window.sfMapUuid }) || queueEventForIDB(e2);
|
|
328
328
|
}
|
|
329
329
|
function handleWsOpen() {
|
|
330
|
-
|
|
330
|
+
w && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (R ? "ENABLED" : "DISABLED"))), (async () => {
|
|
331
331
|
try {
|
|
332
332
|
I = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
333
333
|
} finally {
|
|
@@ -339,29 +339,29 @@ function handleWsOpen() {
|
|
|
339
339
|
})();
|
|
340
340
|
}
|
|
341
341
|
function handleWsClose() {
|
|
342
|
-
null != E && (clearInterval(E), E = null),
|
|
342
|
+
null != E && (clearInterval(E), E = null), w && console.log("[Sailfish] WebSocket closed");
|
|
343
343
|
}
|
|
344
344
|
function handleWsMessage(e2) {
|
|
345
345
|
try {
|
|
346
346
|
const t2 = JSON.parse(e2);
|
|
347
|
-
if ("funcSpanTrackingControl" === t2.type) if (
|
|
347
|
+
if ("funcSpanTrackingControl" === t2.type) if (w && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: t2.enabled, timeoutSeconds: t2.timeoutSeconds, expirationTimestampMs: t2.expirationTimestampMs }), null !== D && (window.clearTimeout(D), D = null), R = t2.enabled, P = false, w && console.log("[Sailfish] Function span tracking " + (t2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), t2.enabled) {
|
|
348
348
|
if (t2.expirationTimestampMs) {
|
|
349
349
|
_ = t2.expirationTimestampMs;
|
|
350
350
|
const e3 = Date.now(), n2 = _ - e3;
|
|
351
|
-
|
|
352
|
-
P || (R = false, _ = null, clearGlobalFuncSpanState(),
|
|
353
|
-
}, n2)) : (R = false, _ = null, clearGlobalFuncSpanState(),
|
|
351
|
+
w && console.log(`[Sailfish] Server expiration timestamp: ${_}, ms until expiration: ${n2}`), n2 > 0 ? (saveGlobalFuncSpanState(true, _), D = window.setTimeout(() => {
|
|
352
|
+
P || (R = false, _ = null, clearGlobalFuncSpanState(), w && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), w && console.log("[Sailfish] Notified backend that function span tracking expired"));
|
|
353
|
+
}, n2)) : (R = false, _ = null, clearGlobalFuncSpanState(), w && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
354
354
|
} else {
|
|
355
355
|
const e3 = t2.timeoutSeconds || 3600;
|
|
356
356
|
e3 > 0 && (_ = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, _), D = window.setTimeout(() => {
|
|
357
|
-
P || (R = false, _ = null, clearGlobalFuncSpanState(),
|
|
357
|
+
P || (R = false, _ = null, clearGlobalFuncSpanState(), w && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), w && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
|
|
358
358
|
}, 1e3 * e3));
|
|
359
359
|
}
|
|
360
360
|
try {
|
|
361
361
|
const e3 = getOrSetSessionId();
|
|
362
|
-
wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" }),
|
|
362
|
+
wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" }), w && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
363
363
|
} catch (e3) {
|
|
364
|
-
|
|
364
|
+
w && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
365
365
|
}
|
|
366
366
|
} else _ = null, clearGlobalFuncSpanState();
|
|
367
367
|
} catch (e3) {
|
|
@@ -373,7 +373,7 @@ function initializeWebSocket(t2, n2, i2, o2, a2 = false) {
|
|
|
373
373
|
const t3 = new URL(e2);
|
|
374
374
|
return `${t3.hostname}${t3.port ? `:${t3.port}` : ""}`;
|
|
375
375
|
})(t2);
|
|
376
|
-
let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${s2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.11.
|
|
376
|
+
let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${s2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.11.6`;
|
|
377
377
|
if (o2 && (r2 += `&envValue=${encodeURIComponent(o2)}`), k = a2 ? (function tryCreateWsWorker() {
|
|
378
378
|
if ("undefined" == typeof Worker) return null;
|
|
379
379
|
try {
|
|
@@ -390,10 +390,10 @@ function initializeWebSocket(t2, n2, i2, o2, a2 = false) {
|
|
|
390
390
|
const n3 = e3.data;
|
|
391
391
|
"open" === n3.type ? (t3.readyState = WebSocket.OPEN, handleWsOpen()) : "close" === n3.type ? (t3.readyState = WebSocket.CLOSED, handleWsClose()) : "message" === n3.type && handleWsMessage(n3.data);
|
|
392
392
|
}, k.onerror = () => {
|
|
393
|
-
|
|
394
|
-
}, k.postMessage({ type: "init", wsUrl: r2 }),
|
|
393
|
+
w && console.warn("[Sailfish] WebSocket worker error");
|
|
394
|
+
}, k.postMessage({ type: "init", wsUrl: r2 }), w && console.log("[Sailfish] WebSocket running in Web Worker (off main thread)"), t3;
|
|
395
395
|
}
|
|
396
|
-
|
|
396
|
+
w && console.log("[Sailfish] WebSocket running on main thread (Worker unavailable)");
|
|
397
397
|
const l2 = new e(r2, [], { connectionTimeout: 3e4 }), c2 = { get readyState() {
|
|
398
398
|
return l2.readyState;
|
|
399
399
|
}, close: () => {
|
|
@@ -405,26 +405,26 @@ function sendMessage(e2) {
|
|
|
405
405
|
"sessionId" in e2 || (e2.sessionId = getOrSetSessionId()), e2.app_url || (e2.app_url = getCachedHref()), I || !isWebSocketOpen(x) ? saveNotifyMessageToIDB(JSON.stringify(e2)) : wsSendPayload(e2) || saveNotifyMessageToIDB(JSON.stringify(e2));
|
|
406
406
|
}
|
|
407
407
|
function enableFunctionSpanTracking() {
|
|
408
|
-
if (
|
|
408
|
+
if (w && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), R = true, P = true, _ = null, null !== D && (window.clearTimeout(D), D = null), isWebSocketOpen(x)) {
|
|
409
409
|
wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: S });
|
|
410
|
-
} else
|
|
410
|
+
} else w && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
411
411
|
}
|
|
412
412
|
function disableFunctionSpanTracking() {
|
|
413
|
-
if (
|
|
413
|
+
if (w && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(x)) {
|
|
414
414
|
wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: S });
|
|
415
415
|
} else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
416
|
-
P && (R = false, P = false, _ = null,
|
|
416
|
+
P && (R = false, P = false, _ = null, w && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== D && (window.clearTimeout(D), D = null);
|
|
417
417
|
}
|
|
418
418
|
function isFunctionSpanTrackingEnabled() {
|
|
419
419
|
return R;
|
|
420
420
|
}
|
|
421
421
|
function initializeFunctionSpanTrackingFromApi(e2) {
|
|
422
|
-
e2 && !R ? (R = true, P = false, _ = null,
|
|
422
|
+
e2 && !R ? (R = true, P = false, _ = null, w && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e2 && R && (R = false, P = false, _ = null, w && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
|
|
423
423
|
}
|
|
424
424
|
function getFuncSpanHeader() {
|
|
425
425
|
if (!R) return null;
|
|
426
426
|
if (null !== _) {
|
|
427
|
-
if (Date.now() >= _) return R = false, _ = null, clearGlobalFuncSpanState(),
|
|
427
|
+
if (Date.now() >= _) return R = false, _ = null, clearGlobalFuncSpanState(), w && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
428
428
|
}
|
|
429
429
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
|
|
430
430
|
}
|
|
@@ -442,7 +442,7 @@ function addOrUpdateMetadata(e2) {
|
|
|
442
442
|
z && JSON.stringify(z) === JSON.stringify(e2) || (z = e2, sendMessage(t2));
|
|
443
443
|
}
|
|
444
444
|
function trackingEvent(e2) {
|
|
445
|
-
sendMessage({ type: "trackingEvent", trackingData: e2, timestamp:
|
|
445
|
+
sendMessage({ type: "trackingEvent", trackingData: e2, timestamp: v() });
|
|
446
446
|
}
|
|
447
447
|
let N = null;
|
|
448
448
|
const H = ["https://api.ipify.org?format=json", "https://api.ip.sb/jsonip", "https://api4.my-ip.io/ip.json"];
|
|
@@ -452,7 +452,7 @@ function fetchAndSendIp(e2) {
|
|
|
452
452
|
const t2 = new AbortController(), n2 = setTimeout(() => t2.abort(), 5e3), i2 = await fetch(e3, { signal: t2.signal });
|
|
453
453
|
if (clearTimeout(n2), !i2.ok) continue;
|
|
454
454
|
const o2 = await i2.json(), a2 = o2.ip || o2.origin || null;
|
|
455
|
-
if (a2 && "string" == typeof a2 && a2.length <= 45) return void sendMessage({ type: "visitorIp", ip: a2, timestamp:
|
|
455
|
+
if (a2 && "string" == typeof a2 && a2.length <= 45) return void sendMessage({ type: "visitorIp", ip: a2, timestamp: v() });
|
|
456
456
|
} catch {
|
|
457
457
|
}
|
|
458
458
|
N = null;
|
|
@@ -479,10 +479,25 @@ async function getConsumerFor(e2, t2) {
|
|
|
479
479
|
}
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
async function captureError(e2, t2 = false) {
|
|
483
|
-
let
|
|
484
|
-
|
|
485
|
-
|
|
482
|
+
async function captureError(e2, t2 = false, n2) {
|
|
483
|
+
let i2, o2;
|
|
484
|
+
const a2 = [];
|
|
485
|
+
e2 instanceof Error ? (i2 = e2.message || e2.name, o2 = e2.stack || "No stack trace", a2.push(`${e2.name}: ${i2}`)) : "string" == typeof e2 ? (i2 = e2, o2 = "No stack trace available", a2.push(t2 ? `Uncaught (in promise) ${e2}` : e2)) : (i2 = (function describeNonError(e3) {
|
|
486
|
+
if (null === e3) return "null";
|
|
487
|
+
if (void 0 === e3) return "undefined";
|
|
488
|
+
if ("string" == typeof e3) return e3;
|
|
489
|
+
if ("number" == typeof e3 || "boolean" == typeof e3 || "bigint" == typeof e3) return String(e3);
|
|
490
|
+
if (e3 instanceof Event) {
|
|
491
|
+
const t3 = e3.target, n3 = (t3 == null ? void 0 : t3.tagName) ? `<${t3.tagName.toLowerCase()}>` : "";
|
|
492
|
+
return `[${e3.type} Event${n3 ? ` on ${n3}` : ""}${e3.isTrusted ? " trusted" : ""}]`;
|
|
493
|
+
}
|
|
494
|
+
try {
|
|
495
|
+
return JSON.stringify(e3);
|
|
496
|
+
} catch {
|
|
497
|
+
return Object.prototype.toString.call(e3);
|
|
498
|
+
}
|
|
499
|
+
})(e2), o2 = "No stack trace available", a2.push(t2 ? `Uncaught (in promise) ${i2}` : i2)), (n2 == null ? void 0 : n2.filename) && a2.push(`at ${n2.filename}:${n2.lineno ?? 0}:${n2.colno ?? 0}`);
|
|
500
|
+
const s2 = await (async function resolveStackTrace(e3) {
|
|
486
501
|
if (!e3) return ["No stack trace available"];
|
|
487
502
|
const t3 = Array.isArray(e3) ? e3 : e3.split("\n"), n3 = [];
|
|
488
503
|
for (const e4 of t3) {
|
|
@@ -491,27 +506,27 @@ async function captureError(e2, t2 = false) {
|
|
|
491
506
|
n3.push(e4);
|
|
492
507
|
continue;
|
|
493
508
|
}
|
|
494
|
-
const [, i3, o3, a3, s3] = t4, r3 = parseInt(a3, 10),
|
|
495
|
-
if (!Number.isFinite(r3) || !Number.isFinite(
|
|
509
|
+
const [, i3, o3, a3, s3] = t4, r3 = parseInt(a3, 10), l3 = Math.max(0, parseInt(s3, 10) - 1);
|
|
510
|
+
if (!Number.isFinite(r3) || !Number.isFinite(l3)) {
|
|
496
511
|
n3.push(e4 + " [Invalid line/column]");
|
|
497
512
|
continue;
|
|
498
513
|
}
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
514
|
+
const c3 = await getConsumerFor(i3, o3);
|
|
515
|
+
if (!c3) {
|
|
501
516
|
n3.push(`${e4} [No source map found for ${o3}]`);
|
|
502
517
|
continue;
|
|
503
518
|
}
|
|
504
519
|
const { SourceMapConsumer: d2 } = await getSourceMapModule();
|
|
505
|
-
let u2 =
|
|
506
|
-
if (!u2.source || null == u2.line) for (let e5 = 1; e5 <= 20 && (u2 =
|
|
520
|
+
let u2 = c3.originalPositionFor({ line: r3, column: l3, bias: d2.GREATEST_LOWER_BOUND });
|
|
521
|
+
if (!u2.source || null == u2.line) for (let e5 = 1; e5 <= 20 && (u2 = c3.originalPositionFor({ line: r3, column: Math.max(0, l3 - e5), bias: d2.GREATEST_LOWER_BOUND }), !u2.source || null == u2.line); e5++) ;
|
|
507
522
|
if (u2.source && null != u2.line) {
|
|
508
523
|
const e5 = u2.name || "anonymous";
|
|
509
524
|
n3.push(`${u2.source}:${u2.line}:${u2.column ?? 0} (${e5})`);
|
|
510
525
|
} else n3.push(`${e4} [No mapping found in ${o3}]`);
|
|
511
526
|
}
|
|
512
527
|
return n3;
|
|
513
|
-
})(
|
|
514
|
-
sendMessage({ type: "event", event: { type: 6, timestamp:
|
|
528
|
+
})(o2), r2 = s2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom")), l2 = r2.length > 0 ? r2 : s2, c2 = Date.now();
|
|
529
|
+
sendMessage({ type: "event", event: { type: 6, timestamp: c2, data: { payload: { message: i2, stack: o2, trace: l2, filteredStack: r2, payload: a2, userAgent: navigator.userAgent, url: window.location.href, timestamp: c2, level: "error" } } } });
|
|
515
530
|
}
|
|
516
531
|
const V = readDebugFlag();
|
|
517
532
|
const G = readDebugFlag();
|
|
@@ -721,7 +736,7 @@ async function initializeRecording(e2, n2, i2, o2, a2, s2 = true, r2 = false, l2
|
|
|
721
736
|
}
|
|
722
737
|
const { record: n4 } = await import("@sailfish-rrweb/rrweb-record-only");
|
|
723
738
|
if (J = n4, await yieldToMain(), l2) {
|
|
724
|
-
const { chunkedSnapshot: i3 } = await import("./chunkSerializer-
|
|
739
|
+
const { chunkedSnapshot: i3 } = await import("./chunkSerializer-DkWXHnW4.js"), o3 = n4.mirror;
|
|
725
740
|
let a3 = true;
|
|
726
741
|
const s3 = [];
|
|
727
742
|
n4({ emit(e3) {
|
|
@@ -1079,7 +1094,7 @@ function renderCustomMultiSelect(e2, t2, n2, i2, o2 = false) {
|
|
|
1079
1094
|
}
|
|
1080
1095
|
const ye = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, be = { shortcuts: { ...ye }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1081
1096
|
}, integrationData: null, showEngTicketFieldsDefault: false };
|
|
1082
|
-
let
|
|
1097
|
+
let ve = null, we = false;
|
|
1083
1098
|
function setupCustomMultiSelectListeners(e2, t2) {
|
|
1084
1099
|
const n2 = document.getElementById(`${e2}-container`), i2 = document.getElementById(`${e2}-dropdown`);
|
|
1085
1100
|
if (!n2 || !i2) return;
|
|
@@ -1328,10 +1343,10 @@ function getSessionIdSafely() {
|
|
|
1328
1343
|
return be.resolveSessionId();
|
|
1329
1344
|
}
|
|
1330
1345
|
function openReportIssueModal(e2) {
|
|
1331
|
-
he ? stopRecording() : (
|
|
1346
|
+
he ? stopRecording() : (we = (e2 == null ? void 0 : e2.showEngTicketFields) ?? be.showEngTicketFieldsDefault, injectModalHTML(), ve && document.body.appendChild(ve));
|
|
1332
1347
|
}
|
|
1333
1348
|
function closeModal() {
|
|
1334
|
-
be.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (
|
|
1349
|
+
be.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (ve == null ? void 0 : ve.parentNode) && ve.parentNode.removeChild(ve), ve = null, he || (function resetState() {
|
|
1335
1350
|
pe = getInitialState(), fe = null, ge = null;
|
|
1336
1351
|
})(), me && (clearInterval(me), setTimerInterval(null));
|
|
1337
1352
|
}
|
|
@@ -1392,9 +1407,9 @@ function activateModalIsolation(e2) {
|
|
|
1392
1407
|
};
|
|
1393
1408
|
}
|
|
1394
1409
|
function injectModalHTML(e2 = "lookback") {
|
|
1395
|
-
|
|
1410
|
+
ve && (ve.remove(), ve = null), ve = document.createElement("div"), ve.id = "sf-report-issue-modal";
|
|
1396
1411
|
const t2 = "startnow" === e2;
|
|
1397
|
-
|
|
1412
|
+
ve.innerHTML = `
|
|
1398
1413
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1399
1414
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1400
1415
|
background:#fff; border-radius:12px;
|
|
@@ -1520,7 +1535,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1520
1535
|
Create an Issue
|
|
1521
1536
|
</label>
|
|
1522
1537
|
|
|
1523
|
-
<label id="sf-create-eng-ticket-label" style="display:${be.integrationData &&
|
|
1538
|
+
<label id="sf-create-eng-ticket-label" style="display:${be.integrationData && we ? "flex" : "none"}; align-items:center; gap:8px; font-size:14px; font-weight:500; cursor:pointer;">
|
|
1524
1539
|
<input type="checkbox" id="sf-create-eng-ticket-checkbox" ${pe.createEngTicket ? "checked" : ""}
|
|
1525
1540
|
style="width:16px; height:16px; accent-color:#295DBF; cursor:pointer;">
|
|
1526
1541
|
Create an Eng Ticket
|
|
@@ -1585,8 +1600,8 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1585
1600
|
</div>
|
|
1586
1601
|
</div>
|
|
1587
1602
|
</div>
|
|
1588
|
-
`, pe.mode = e2, document.body.appendChild(
|
|
1589
|
-
const e3 =
|
|
1603
|
+
`, pe.mode = e2, document.body.appendChild(ve), (function bindListeners() {
|
|
1604
|
+
const e3 = ve == null ? void 0 : ve.querySelectorAll(".sf-issue-tab"), t3 = document.getElementById("sf-start-recording-btn"), n2 = document.getElementById("sf-modal-close-btn"), i2 = document.getElementById("sf-issue-submit-btn"), o2 = document.getElementById("sf-lookback-minutes");
|
|
1590
1605
|
e3 == null ? void 0 : e3.forEach((e4) => {
|
|
1591
1606
|
e4.addEventListener("click", (e5) => {
|
|
1592
1607
|
const t4 = e5.currentTarget.dataset.mode;
|
|
@@ -1596,7 +1611,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1596
1611
|
o2 && o2.addEventListener("change", () => {
|
|
1597
1612
|
"lookback" === pe.mode && (i2.disabled = false, i2.style.opacity = "1", i2.style.cursor = "pointer");
|
|
1598
1613
|
});
|
|
1599
|
-
const a2 =
|
|
1614
|
+
const a2 = ve == null ? void 0 : ve.querySelectorAll(".sf-collapsible-header");
|
|
1600
1615
|
a2 == null ? void 0 : a2.forEach((e4) => {
|
|
1601
1616
|
e4.addEventListener("click", (e5) => {
|
|
1602
1617
|
const t4 = e5.currentTarget, n3 = t4.dataset.target, i3 = document.getElementById(n3), o3 = t4.querySelector(".sf-chevron");
|
|
@@ -1686,7 +1701,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1686
1701
|
}, 1e3);
|
|
1687
1702
|
})();
|
|
1688
1703
|
});
|
|
1689
|
-
|
|
1704
|
+
ve == null ? void 0 : ve.addEventListener("click", (e4) => {
|
|
1690
1705
|
var _a;
|
|
1691
1706
|
if (e4.target.closest("#sf-issue-submit-btn")) {
|
|
1692
1707
|
const e5 = ((_a = document.getElementById("sf-issue-description")) == null ? void 0 : _a.value) || "", t4 = pe.mode;
|
|
@@ -1740,7 +1755,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1740
1755
|
})(`${n3}`, `${i3}`, e5, "startnow" === t4 ? "RECORDED" : "LOOKBACK");
|
|
1741
1756
|
}
|
|
1742
1757
|
});
|
|
1743
|
-
})(), be.deactivateIsolation = activateModalIsolation(
|
|
1758
|
+
})(), be.deactivateIsolation = activateModalIsolation(ve), be.integrationData && pe.createEngTicket ? initializeEngTicketForm() : be.integrationData || (pe.createEngTicket = false), be.apiKey && be.backendApi && refreshIntegrationData(be.apiKey, be.backendApi).then((e3) => {
|
|
1744
1759
|
if (!e3 || !document.getElementById("sf-report-issue-modal")) return;
|
|
1745
1760
|
be.integrationData = e3;
|
|
1746
1761
|
const t3 = document.getElementById("sf-eng-ticket-fields-container");
|
|
@@ -1748,7 +1763,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1748
1763
|
const e4 = generateEngTicketFieldsHTML();
|
|
1749
1764
|
e4 && (t3.innerHTML = e4, initializeEngTicketForm(), bindEngTicketListeners(), updateFormWithIntegrationData(pe), renderDynamicFields(pe.engTicketProject, pe.engTicketIssueType));
|
|
1750
1765
|
}
|
|
1751
|
-
if (
|
|
1766
|
+
if (we) {
|
|
1752
1767
|
const e4 = document.getElementById("sf-create-eng-ticket-label");
|
|
1753
1768
|
e4 && (e4.style.display = "flex");
|
|
1754
1769
|
}
|
|
@@ -1769,7 +1784,7 @@ function initializeEngTicketForm() {
|
|
|
1769
1784
|
}
|
|
1770
1785
|
function setActiveTab(e2) {
|
|
1771
1786
|
pe.mode = e2;
|
|
1772
|
-
const t2 =
|
|
1787
|
+
const t2 = ve == null ? void 0 : ve.querySelector("#sf-tab-lookback"), n2 = ve == null ? void 0 : ve.querySelector("#sf-tab-startnow");
|
|
1773
1788
|
"lookback" === e2 ? (t2.style.background = "white", t2.style.color = "#0F172A", n2.style.background = "transparent", n2.style.color = "#64748B") : (n2.style.background = "white", n2.style.color = "#0F172A", t2.style.background = "transparent", t2.style.color = "#64748B");
|
|
1774
1789
|
}
|
|
1775
1790
|
function updateModeSpecificUI(e2) {
|
|
@@ -2140,8 +2155,8 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2140
2155
|
delete h2[n];
|
|
2141
2156
|
const b2 = getFuncSpanHeader();
|
|
2142
2157
|
b2 && delete h2[b2.name];
|
|
2143
|
-
const
|
|
2144
|
-
h2[n] =
|
|
2158
|
+
const v2 = `${c3}/${p2.page_visit_uuid}/${u3}`;
|
|
2159
|
+
h2[n] = v2, b2 && (h2[b2.name] = b2.value);
|
|
2145
2160
|
maskAuthorizationHeader(h2);
|
|
2146
2161
|
try {
|
|
2147
2162
|
let b3 = await (async function injectHeader(e5, t3, i5, o5, a4, s4, r3) {
|
|
@@ -2156,7 +2171,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2156
2171
|
const c4 = { ...o5 }, d4 = new Headers(o5.headers || {});
|
|
2157
2172
|
return d4.set(n, `${a4}/${s4}/${r3}`), l3 && (d4.set(l3.name, l3.value), ke && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof i5 ? i5 : i5.href, header: l3.name })), c4.headers = d4, await e5.call(t3, i5, c4);
|
|
2158
2173
|
}
|
|
2159
|
-
})(e4, i4, a3, s3, c3, p2.page_visit_uuid, u3),
|
|
2174
|
+
})(e4, i4, a3, s3, c3, p2.page_visit_uuid, u3), v3 = false;
|
|
2160
2175
|
Ee.includes(b3.status) && (ke && console.log("Perform retry as status was fail:", b3), delete h2[n], b3 = await (async function retryWithoutPropagateHeaders(e5, t3, i5, o5) {
|
|
2161
2176
|
try {
|
|
2162
2177
|
let o6 = i5[0], a4 = i5[1] || {};
|
|
@@ -2175,8 +2190,8 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2175
2190
|
} catch (e6) {
|
|
2176
2191
|
throw ke && console.log(`Retry without ${n} for ${o5} also failed:`, e6), e6;
|
|
2177
2192
|
}
|
|
2178
|
-
})(e4, i4, o4, d3),
|
|
2179
|
-
const
|
|
2193
|
+
})(e4, i4, o4, d3), v3 = true);
|
|
2194
|
+
const w2 = Date.now(), S2 = b3.status, k2 = b3.ok, x2 = k2 ? "" : `Request Error: ${b3.statusText}`;
|
|
2180
2195
|
let I2 = null;
|
|
2181
2196
|
try {
|
|
2182
2197
|
I2 = {}, b3.headers.forEach((e5, t3) => {
|
|
@@ -2185,7 +2200,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2185
2200
|
} catch (e5) {
|
|
2186
2201
|
ke && console.warn("[Sailfish] Failed to capture response headers:", e5), I2 = null;
|
|
2187
2202
|
}
|
|
2188
|
-
const T2 = { type: 27, timestamp:
|
|
2203
|
+
const T2 = { type: 27, timestamp: w2, sessionId: c3, data: { request_id: u3, session_id: c3, timestamp_start: g2, timestamp_end: w2, response_code: S2, success: k2, error: x2, method: f2, url: d3, retry_without_trace_id: v3, request_headers: h2, request_body: m2, response_headers: I2, response_body: null }, ...p2 }, sendEventWithBody = (e5) => {
|
|
2189
2204
|
T2.data.response_body = e5, y2 ? y2.text().then((e6) => {
|
|
2190
2205
|
T2.data.request_body = e6, sendEvent(T2);
|
|
2191
2206
|
}, () => {
|
|
@@ -2273,7 +2288,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2273
2288
|
})(e3, i3, o3, d2, u2, a2, c2);
|
|
2274
2289
|
} });
|
|
2275
2290
|
}
|
|
2276
|
-
async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: i2 = ["*"], domainsToNotPropagateHeaderTo: o2 = [], serviceVersion: a2, serviceIdentifier: s2, gitSha: r2, serviceAdditionalMetadata: l2, enableIpTracking: c2, captureStreamingResponseBody: d2 = true, captureResponseBodyMaxMb: u2 = 10, captureStreamPrefixKb: p2 = 64, captureStreamTimeoutMs: f2 = 1e4, enableFiberTracking: m2 = false, deferRecording: h2, deferRecordingStart: y2, chunkSnapshot: b2, useWsWorker:
|
|
2291
|
+
async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: i2 = ["*"], domainsToNotPropagateHeaderTo: o2 = [], serviceVersion: a2, serviceIdentifier: s2, gitSha: r2, serviceAdditionalMetadata: l2, enableIpTracking: c2, captureStreamingResponseBody: d2 = true, captureResponseBodyMaxMb: u2 = 10, captureStreamPrefixKb: p2 = 64, captureStreamTimeoutMs: f2 = 1e4, enableFiberTracking: m2 = false, deferRecording: h2, deferRecordingStart: y2, chunkSnapshot: b2, useWsWorker: v2 = true, capturePerformanceMetrics: w2 = true, maskTextClass: S2, library: k2, headlessRecording: x2 = false }) {
|
|
2277
2292
|
var _a, _b;
|
|
2278
2293
|
if (!x2 && (function isHeadlessOrLighthouse() {
|
|
2279
2294
|
try {
|
|
@@ -2356,11 +2371,11 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2356
2371
|
};
|
|
2357
2372
|
})(o2, C2, i2), E2.xhrPatched = true), E2.fetchPatched || (setupFetchInterceptor(o2, C2, i2), E2.fetchPatched = true), await yieldToMain(), E2.domEventsInit || (initializeDomContentEvents(T2), E2.domEventsInit = true), await yieldToMain(), E2.consoleInit || (initializeConsolePlugin(Ae, T2), E2.consoleInit = true), await yieldToMain(), E2.errorInit || (!(function initializeErrorInterceptor() {
|
|
2358
2373
|
window.addEventListener("error", (e3) => {
|
|
2359
|
-
captureError(e3.error
|
|
2374
|
+
captureError(e3.error ?? e3.message, false, { filename: e3.filename, lineno: e3.lineno, colno: e3.colno });
|
|
2360
2375
|
}), window.addEventListener("unhandledrejection", (e3) => {
|
|
2361
2376
|
captureError(e3.reason, true);
|
|
2362
2377
|
});
|
|
2363
|
-
})(), E2.errorInit = true), await yieldToMain(), !E2.perfInit &&
|
|
2378
|
+
})(), E2.errorInit = true), await yieldToMain(), !E2.perfInit && w2 && (initializePerformancePlugin(T2), E2.perfInit = true), await yieldToMain(), _ensureModuleSideEffects(), (function storeCredentialsAndConnection({ apiKey: e3, backendApi: t3 }) {
|
|
2364
2379
|
g && (sessionStorage.setItem("sailfishApiKey", e3), sessionStorage.setItem("sailfishBackendApi", t3));
|
|
2365
2380
|
})({ apiKey: e2, backendApi: t2 }), !isFunctionSpanTrackingEnabled() || E2.ws && 1 === E2.ws.readyState || fetchFunctionSpanTrackingEnabled(e2, t2).then((e3) => {
|
|
2366
2381
|
var _a2;
|
|
@@ -2413,7 +2428,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2413
2428
|
if ((_b = h3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
2414
2429
|
const n3 = (l2 == null ? void 0 : l2.env) || (l2 == null ? void 0 : l2.environment);
|
|
2415
2430
|
await yieldToMain();
|
|
2416
|
-
const i4 = await initializeRecording(y3, t2, e2, T2, n3, I2,
|
|
2431
|
+
const i4 = await initializeRecording(y3, t2, e2, T2, n3, I2, v2, b2 ?? false);
|
|
2417
2432
|
E2.ws = i4, E2.initialized = true, trackDomainChangesOnce(), E2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e3 = "", t3 = "") {
|
|
2418
2433
|
window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e3, serviceVersion: t3 } });
|
|
2419
2434
|
})(s2, a2), E2.sentMapUuidOnce = true);
|
|
@@ -2445,28 +2460,28 @@ const initRecorder = async (e2) => {
|
|
|
2445
2460
|
})), t2.initPromise);
|
|
2446
2461
|
};
|
|
2447
2462
|
export {
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2463
|
+
initializeFunctionSpanTrackingFromApi as A,
|
|
2464
|
+
initializePerformancePlugin as B,
|
|
2465
|
+
initializeRecording as C,
|
|
2451
2466
|
Me as D,
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2467
|
+
initializeWebSocket as E,
|
|
2468
|
+
invalidateUrlCache as F,
|
|
2469
|
+
isFunctionSpanTrackingEnabled as G,
|
|
2470
|
+
matchUrlWithWildcard as H,
|
|
2471
|
+
v as I,
|
|
2472
|
+
onNavigationChange as J,
|
|
2473
|
+
openReportIssueModal as K,
|
|
2474
|
+
restoreFuncSpanState as L,
|
|
2475
|
+
sendDomainsToNotPropagateHeaderTo as M,
|
|
2476
|
+
sendEvent as N,
|
|
2477
|
+
sendGraphQLRequest as O,
|
|
2478
|
+
sendMessage as P,
|
|
2479
|
+
startRecording as Q,
|
|
2480
|
+
startRecordingSession as R,
|
|
2466
2481
|
$e as S,
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2482
|
+
trackingEvent as T,
|
|
2483
|
+
withAppUrlMetadata as U,
|
|
2484
|
+
yieldToMain as V,
|
|
2470
2485
|
Ae as a,
|
|
2471
2486
|
addOrUpdateMetadata as b,
|
|
2472
2487
|
buildBatches as c,
|
|
@@ -2491,6 +2506,6 @@ export {
|
|
|
2491
2506
|
getUrlAndStoredUuids as v,
|
|
2492
2507
|
identify as w,
|
|
2493
2508
|
initRecorder as x,
|
|
2494
|
-
|
|
2495
|
-
|
|
2509
|
+
initializeConsolePlugin as y,
|
|
2510
|
+
initializeDomContentEvents as z
|
|
2496
2511
|
};
|
|
Binary file
|
|
Binary file
|
package/dist/errorInterceptor.js
CHANGED
|
@@ -93,23 +93,56 @@ export async function resolveStackTrace(stackTrace) {
|
|
|
93
93
|
}
|
|
94
94
|
return out;
|
|
95
95
|
}
|
|
96
|
+
function describeNonError(value) {
|
|
97
|
+
if (value === null)
|
|
98
|
+
return "null";
|
|
99
|
+
if (value === undefined)
|
|
100
|
+
return "undefined";
|
|
101
|
+
if (typeof value === "string")
|
|
102
|
+
return value;
|
|
103
|
+
if (typeof value === "number" ||
|
|
104
|
+
typeof value === "boolean" ||
|
|
105
|
+
typeof value === "bigint") {
|
|
106
|
+
return String(value);
|
|
107
|
+
}
|
|
108
|
+
if (value instanceof Event) {
|
|
109
|
+
const target = value.target;
|
|
110
|
+
const tag = target?.tagName ? `<${target.tagName.toLowerCase()}>` : "";
|
|
111
|
+
return `[${value.type} Event${tag ? ` on ${tag}` : ""}${value.isTrusted ? " trusted" : ""}]`;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
return JSON.stringify(value);
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
return Object.prototype.toString.call(value);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
96
120
|
/**
|
|
97
121
|
* Captures full error details and resolves the stack trace.
|
|
98
122
|
*/
|
|
99
|
-
async function captureError(error, isPromiseRejection = false) {
|
|
123
|
+
async function captureError(error, isPromiseRejection = false, location) {
|
|
100
124
|
let errorMessage;
|
|
101
125
|
let stack;
|
|
126
|
+
const payload = [];
|
|
102
127
|
if (error instanceof Error) {
|
|
103
|
-
errorMessage = error.message;
|
|
128
|
+
errorMessage = error.message || error.name;
|
|
104
129
|
stack = error.stack || "No stack trace";
|
|
130
|
+
payload.push(`${error.name}: ${errorMessage}`);
|
|
105
131
|
}
|
|
106
132
|
else if (typeof error === "string") {
|
|
107
133
|
errorMessage = error;
|
|
108
134
|
stack = "No stack trace available";
|
|
135
|
+
payload.push(isPromiseRejection ? `Uncaught (in promise) ${error}` : error);
|
|
109
136
|
}
|
|
110
137
|
else {
|
|
111
|
-
errorMessage =
|
|
138
|
+
errorMessage = describeNonError(error);
|
|
112
139
|
stack = "No stack trace available";
|
|
140
|
+
payload.push(isPromiseRejection
|
|
141
|
+
? `Uncaught (in promise) ${errorMessage}`
|
|
142
|
+
: errorMessage);
|
|
143
|
+
}
|
|
144
|
+
if (location?.filename) {
|
|
145
|
+
payload.push(`at ${location.filename}:${location.lineno ?? 0}:${location.colno ?? 0}`);
|
|
113
146
|
}
|
|
114
147
|
const mappedStack = await resolveStackTrace(stack);
|
|
115
148
|
const filteredStack = mappedStack.filter((line) => !line.includes("chunk-") && !line.includes("react-dom"));
|
|
@@ -120,6 +153,7 @@ async function captureError(error, isPromiseRejection = false) {
|
|
|
120
153
|
stack,
|
|
121
154
|
trace,
|
|
122
155
|
filteredStack,
|
|
156
|
+
payload,
|
|
123
157
|
userAgent: navigator.userAgent,
|
|
124
158
|
url: window.location.href,
|
|
125
159
|
timestamp,
|
|
@@ -142,7 +176,11 @@ async function captureError(error, isPromiseRejection = false) {
|
|
|
142
176
|
*/
|
|
143
177
|
export function initializeErrorInterceptor() {
|
|
144
178
|
window.addEventListener("error", (event) => {
|
|
145
|
-
captureError(event.error
|
|
179
|
+
captureError(event.error ?? event.message, false, {
|
|
180
|
+
filename: event.filename,
|
|
181
|
+
lineno: event.lineno,
|
|
182
|
+
colno: event.colno,
|
|
183
|
+
});
|
|
146
184
|
});
|
|
147
185
|
window.addEventListener("unhandledrejection", (event) => {
|
|
148
186
|
captureError(event.reason, true);
|
|
Binary file
|
|
Binary file
|
package/dist/recorder.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const e = require("./chunks/index-
|
|
3
|
+
const e = require("./chunks/index-CftVmmO9.js");
|
|
4
4
|
exports.DEFAULT_CAPTURE_SETTINGS = e.DEFAULT_CAPTURE_SETTINGS, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = e.DEFAULT_CONSOLE_RECORDING_SETTINGS, exports.STORAGE_VERSION = e.STORAGE_VERSION, exports.addOrUpdateMetadata = e.addOrUpdateMetadata, exports.buildBatches = e.buildBatches, exports.clearStaleFuncSpanState = e.clearStaleFuncSpanState, exports.createSkipHeadersPropagationChecker = e.createSkipHeadersPropagationChecker, exports.createTriageAndIssueFromRecorder = e.createTriageAndIssueFromRecorder, exports.createTriageFromRecorder = e.createTriageFromRecorder, exports.disableFunctionSpanTracking = e.disableFunctionSpanTracking, exports.enableFunctionSpanTracking = e.enableFunctionSpanTracking, exports.ensureHrefCache = e.ensureHrefCache, exports.eventSize = e.eventSize, exports.fetchAndSendIp = e.fetchAndSendIp, exports.fetchCaptureSettings = e.fetchCaptureSettings, exports.fetchEngineeringTicketPlatformIntegrations = e.fetchEngineeringTicketPlatformIntegrations, exports.fetchFunctionSpanTrackingEnabled = e.fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = e.flushBufferedEvents, exports.getCachedHref = e.getCachedHref, exports.getCachedHrefNoQuery = e.getCachedHrefNoQuery, exports.getFuncSpanHeader = e.getFuncSpanHeader, exports.getIdentifiedUser = e.getIdentifiedUser, exports.getOrSetSessionId = e.getOrSetSessionId, exports.getUrlAndStoredUuids = e.getUrlAndStoredUuids, exports.identify = e.identify, exports.initRecorder = e.initRecorder, exports.initializeConsolePlugin = e.initializeConsolePlugin, exports.initializeDomContentEvents = e.initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = e.initializeFunctionSpanTrackingFromApi, exports.initializePerformancePlugin = e.initializePerformancePlugin, exports.initializeRecording = e.initializeRecording, exports.initializeWebSocket = e.initializeWebSocket, exports.invalidateUrlCache = e.invalidateUrlCache, exports.isFunctionSpanTrackingEnabled = e.isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = e.matchUrlWithWildcard, Object.defineProperty(exports, "nowTimestamp", { enumerable: true, get: () => e.nowTimestamp }), exports.onNavigationChange = e.onNavigationChange, exports.openReportIssueModal = e.openReportIssueModal, exports.restoreFuncSpanState = e.restoreFuncSpanState, exports.sendDomainsToNotPropagateHeaderTo = e.sendDomainsToNotPropagateHeaderTo, exports.sendEvent = e.sendEvent, exports.sendGraphQLRequest = e.sendGraphQLRequest, exports.sendMessage = e.sendMessage, exports.startRecording = e.startRecording, exports.startRecordingSession = e.startRecordingSession, exports.trackingEvent = e.trackingEvent, exports.withAppUrlMetadata = e.withAppUrlMetadata;
|
package/dist/recorder.cjs.br
CHANGED
|
Binary file
|
package/dist/recorder.cjs.gz
CHANGED
|
Binary file
|
package/dist/recorder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U
|
|
1
|
+
import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U } from "./chunks/index-QXHuV98g.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEFAULT_CAPTURE_SETTINGS,
|
|
4
4
|
a as DEFAULT_CONSOLE_RECORDING_SETTINGS,
|
|
@@ -26,25 +26,25 @@ export {
|
|
|
26
26
|
v as getUrlAndStoredUuids,
|
|
27
27
|
w as identify,
|
|
28
28
|
x as initRecorder,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
y as initializeConsolePlugin,
|
|
30
|
+
z as initializeDomContentEvents,
|
|
31
|
+
A as initializeFunctionSpanTrackingFromApi,
|
|
32
|
+
B as initializePerformancePlugin,
|
|
33
|
+
C as initializeRecording,
|
|
34
|
+
E as initializeWebSocket,
|
|
35
|
+
F as invalidateUrlCache,
|
|
36
|
+
G as isFunctionSpanTrackingEnabled,
|
|
37
|
+
H as matchUrlWithWildcard,
|
|
38
|
+
I as nowTimestamp,
|
|
39
|
+
J as onNavigationChange,
|
|
40
|
+
K as openReportIssueModal,
|
|
41
|
+
L as restoreFuncSpanState,
|
|
42
|
+
M as sendDomainsToNotPropagateHeaderTo,
|
|
43
|
+
N as sendEvent,
|
|
44
|
+
O as sendGraphQLRequest,
|
|
45
|
+
P as sendMessage,
|
|
46
|
+
Q as startRecording,
|
|
47
|
+
R as startRecordingSession,
|
|
48
|
+
T as trackingEvent,
|
|
49
|
+
U as withAppUrlMetadata
|
|
50
50
|
};
|
package/dist/recorder.js.br
CHANGED
|
Binary file
|
package/dist/recorder.js.gz
CHANGED
|
Binary file
|
package/dist/recorder.umd.cjs
CHANGED
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
const w3 = new URL(e3);
|
|
597
597
|
return `${w3.hostname}${w3.port ? `:${w3.port}` : ""}`;
|
|
598
598
|
})(e2);
|
|
599
|
-
let _2 = `${"https:" === new URL(e2).protocol ? "wss" : "ws"}://${M2}/ws/notify/?apiKey=${w2}&sessionId=${C2}&sender=JS%2FTS&version=1.11.
|
|
599
|
+
let _2 = `${"https:" === new URL(e2).protocol ? "wss" : "ws"}://${M2}/ws/notify/?apiKey=${w2}&sessionId=${C2}&sender=JS%2FTS&version=1.11.6`;
|
|
600
600
|
if (x2 && (_2 += `&envValue=${encodeURIComponent(x2)}`), le = I2 ? (function tryCreateWsWorker() {
|
|
601
601
|
if ("undefined" == typeof Worker) return null;
|
|
602
602
|
try {
|
|
@@ -691,10 +691,25 @@
|
|
|
691
691
|
}
|
|
692
692
|
return null;
|
|
693
693
|
}
|
|
694
|
-
async function captureError(e2, w2 = false) {
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
|
|
694
|
+
async function captureError(e2, w2 = false, C2) {
|
|
695
|
+
let x2, I2;
|
|
696
|
+
const M2 = [];
|
|
697
|
+
e2 instanceof Error ? (x2 = e2.message || e2.name, I2 = e2.stack || "No stack trace", M2.push(`${e2.name}: ${x2}`)) : "string" == typeof e2 ? (x2 = e2, I2 = "No stack trace available", M2.push(w2 ? `Uncaught (in promise) ${e2}` : e2)) : (x2 = (function describeNonError(e3) {
|
|
698
|
+
if (null === e3) return "null";
|
|
699
|
+
if (void 0 === e3) return "undefined";
|
|
700
|
+
if ("string" == typeof e3) return e3;
|
|
701
|
+
if ("number" == typeof e3 || "boolean" == typeof e3 || "bigint" == typeof e3) return String(e3);
|
|
702
|
+
if (e3 instanceof Event) {
|
|
703
|
+
const w3 = e3.target, C3 = (w3 == null ? void 0 : w3.tagName) ? `<${w3.tagName.toLowerCase()}>` : "";
|
|
704
|
+
return `[${e3.type} Event${C3 ? ` on ${C3}` : ""}${e3.isTrusted ? " trusted" : ""}]`;
|
|
705
|
+
}
|
|
706
|
+
try {
|
|
707
|
+
return JSON.stringify(e3);
|
|
708
|
+
} catch {
|
|
709
|
+
return Object.prototype.toString.call(e3);
|
|
710
|
+
}
|
|
711
|
+
})(e2), I2 = "No stack trace available", M2.push(w2 ? `Uncaught (in promise) ${x2}` : x2)), (C2 == null ? void 0 : C2.filename) && M2.push(`at ${C2.filename}:${C2.lineno ?? 0}:${C2.colno ?? 0}`);
|
|
712
|
+
const _2 = await (async function resolveStackTrace(e3) {
|
|
698
713
|
if (!e3) return ["No stack trace available"];
|
|
699
714
|
const w3 = Array.isArray(e3) ? e3 : e3.split("\n"), C3 = [];
|
|
700
715
|
for (const e4 of w3) {
|
|
@@ -703,27 +718,27 @@
|
|
|
703
718
|
C3.push(e4);
|
|
704
719
|
continue;
|
|
705
720
|
}
|
|
706
|
-
const [, x3, I3, M3, _3] = w4, U3 = parseInt(M3, 10),
|
|
707
|
-
if (!Number.isFinite(U3) || !Number.isFinite(
|
|
721
|
+
const [, x3, I3, M3, _3] = w4, U3 = parseInt(M3, 10), j3 = Math.max(0, parseInt(_3, 10) - 1);
|
|
722
|
+
if (!Number.isFinite(U3) || !Number.isFinite(j3)) {
|
|
708
723
|
C3.push(e4 + " [Invalid line/column]");
|
|
709
724
|
continue;
|
|
710
725
|
}
|
|
711
|
-
const
|
|
712
|
-
if (!
|
|
726
|
+
const z3 = await getConsumerFor(x3, I3);
|
|
727
|
+
if (!z3) {
|
|
713
728
|
C3.push(`${e4} [No source map found for ${I3}]`);
|
|
714
729
|
continue;
|
|
715
730
|
}
|
|
716
731
|
const { SourceMapConsumer: W2 } = await getSourceMapModule();
|
|
717
|
-
let H2 =
|
|
718
|
-
if (!H2.source || null == H2.line) for (let e5 = 1; e5 <= 20 && (H2 =
|
|
732
|
+
let H2 = z3.originalPositionFor({ line: U3, column: j3, bias: W2.GREATEST_LOWER_BOUND });
|
|
733
|
+
if (!H2.source || null == H2.line) for (let e5 = 1; e5 <= 20 && (H2 = z3.originalPositionFor({ line: U3, column: Math.max(0, j3 - e5), bias: W2.GREATEST_LOWER_BOUND }), !H2.source || null == H2.line); e5++) ;
|
|
719
734
|
if (H2.source && null != H2.line) {
|
|
720
735
|
const e5 = H2.name || "anonymous";
|
|
721
736
|
C3.push(`${H2.source}:${H2.line}:${H2.column ?? 0} (${e5})`);
|
|
722
737
|
} else C3.push(`${e4} [No mapping found in ${I3}]`);
|
|
723
738
|
}
|
|
724
739
|
return C3;
|
|
725
|
-
})(
|
|
726
|
-
sendMessage({ type: "event", event: { type: 6, timestamp:
|
|
740
|
+
})(I2), U2 = _2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom")), j2 = U2.length > 0 ? U2 : _2, z2 = Date.now();
|
|
741
|
+
sendMessage({ type: "event", event: { type: 6, timestamp: z2, data: { payload: { message: x2, stack: I2, trace: j2, filteredStack: U2, payload: M2, userAgent: navigator.userAgent, url: window.location.href, timestamp: z2, level: "error" } } } });
|
|
727
742
|
}
|
|
728
743
|
const Ge = readDebugFlag();
|
|
729
744
|
const Ve = readDebugFlag();
|
|
@@ -2561,7 +2576,7 @@
|
|
|
2561
2576
|
};
|
|
2562
2577
|
})(I2, de2, x2), ce2.xhrPatched = true), ce2.fetchPatched || (setupFetchInterceptor(I2, de2, x2), ce2.fetchPatched = true), await yieldToMain(), ce2.domEventsInit || (initializeDomContentEvents(le2), ce2.domEventsInit = true), await yieldToMain(), ce2.consoleInit || (initializeConsolePlugin(Gt, le2), ce2.consoleInit = true), await yieldToMain(), ce2.errorInit || (!(function initializeErrorInterceptor() {
|
|
2563
2578
|
window.addEventListener("error", (e3) => {
|
|
2564
|
-
captureError(e3.error
|
|
2579
|
+
captureError(e3.error ?? e3.message, false, { filename: e3.filename, lineno: e3.lineno, colno: e3.colno });
|
|
2565
2580
|
}), window.addEventListener("unhandledrejection", (e3) => {
|
|
2566
2581
|
captureError(e3.reason, true);
|
|
2567
2582
|
});
|
package/dist/recorder.umd.cjs.br
CHANGED
|
Binary file
|
package/dist/recorder.umd.cjs.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|