@cross-deck/web 1.10.2 → 1.10.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/react.mjs CHANGED
@@ -72,7 +72,7 @@ function typeMapForStatus(status) {
72
72
  }
73
73
 
74
74
  // src/_version.ts
75
- var SDK_VERSION = "1.10.2";
75
+ var SDK_VERSION = "1.10.3";
76
76
  var SDK_NAME = "@cross-deck/web";
77
77
 
78
78
  // src/http.ts
@@ -3811,7 +3811,18 @@ function isInAppFrame(filename) {
3811
3811
  if (/\/crossdeck\.umd\.min\.js$/.test(filename)) return false;
3812
3812
  return true;
3813
3813
  }
3814
+ var BROWSER_INJECTED_GLOBAL = /(__firefox__|__gCrWeb|zaloJSV2)/;
3815
+ function injectedGlobalName(message) {
3816
+ const m = BROWSER_INJECTED_GLOBAL.exec(message ?? "");
3817
+ return m ? m[1] : null;
3818
+ }
3819
+ function demoteVendorInjectedFrames(frames, message) {
3820
+ if (!injectedGlobalName(message)) return frames;
3821
+ return frames.map((f) => f.in_app ? { ...f, in_app: false } : f);
3822
+ }
3814
3823
  function fingerprintError(message, frames, location2) {
3824
+ const injected = injectedGlobalName(message);
3825
+ if (injected) return djb2Hex(`injected-global:${injected}`);
3815
3826
  const inAppFrames = frames.filter((f) => f.in_app).slice(0, 3);
3816
3827
  const parts = [
3817
3828
  (message || "").slice(0, 200),
@@ -4168,7 +4179,7 @@ var ErrorTracker = class {
4168
4179
  const payload = coerceErrorPayload(err);
4169
4180
  const message = (payload.message || event.message || "Unknown error").slice(0, 1024);
4170
4181
  const stack = err instanceof Error ? err.stack ?? null : null;
4171
- const frames = parseStack(stack);
4182
+ const frames = demoteVendorInjectedFrames(parseStack(stack), message);
4172
4183
  const errorType = payload.errorType ?? null;
4173
4184
  const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
4174
4185
  return {
@@ -4200,7 +4211,7 @@ var ErrorTracker = class {
4200
4211
  const payload = coerceErrorPayload(err);
4201
4212
  const message = (payload.message || "Unknown error").slice(0, 1024);
4202
4213
  const stack = err instanceof Error ? err.stack ?? null : null;
4203
- const frames = parseStack(stack);
4214
+ const frames = demoteVendorInjectedFrames(parseStack(stack), message);
4204
4215
  const errorType = payload.errorType ?? null;
4205
4216
  const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
4206
4217
  return {