@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/index.d.mts CHANGED
@@ -969,7 +969,7 @@ declare class MemoryStorage implements KeyValueStorage {
969
969
  *
970
970
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
971
971
  */
972
- declare const SDK_VERSION = "1.10.2";
972
+ declare const SDK_VERSION = "1.10.3";
973
973
  declare const SDK_NAME = "@cross-deck/web";
974
974
 
975
975
  /**
package/dist/index.d.ts CHANGED
@@ -969,7 +969,7 @@ declare class MemoryStorage implements KeyValueStorage {
969
969
  *
970
970
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
971
971
  */
972
- declare const SDK_VERSION = "1.10.2";
972
+ declare const SDK_VERSION = "1.10.3";
973
973
  declare const SDK_NAME = "@cross-deck/web";
974
974
 
975
975
  /**
package/dist/index.mjs CHANGED
@@ -69,7 +69,7 @@ function typeMapForStatus(status) {
69
69
  }
70
70
 
71
71
  // src/_version.ts
72
- var SDK_VERSION = "1.10.2";
72
+ var SDK_VERSION = "1.10.3";
73
73
  var SDK_NAME = "@cross-deck/web";
74
74
 
75
75
  // src/http.ts
@@ -3808,7 +3808,18 @@ function isInAppFrame(filename) {
3808
3808
  if (/\/crossdeck\.umd\.min\.js$/.test(filename)) return false;
3809
3809
  return true;
3810
3810
  }
3811
+ var BROWSER_INJECTED_GLOBAL = /(__firefox__|__gCrWeb|zaloJSV2)/;
3812
+ function injectedGlobalName(message) {
3813
+ const m = BROWSER_INJECTED_GLOBAL.exec(message ?? "");
3814
+ return m ? m[1] : null;
3815
+ }
3816
+ function demoteVendorInjectedFrames(frames, message) {
3817
+ if (!injectedGlobalName(message)) return frames;
3818
+ return frames.map((f) => f.in_app ? { ...f, in_app: false } : f);
3819
+ }
3811
3820
  function fingerprintError(message, frames, location2) {
3821
+ const injected = injectedGlobalName(message);
3822
+ if (injected) return djb2Hex(`injected-global:${injected}`);
3812
3823
  const inAppFrames = frames.filter((f) => f.in_app).slice(0, 3);
3813
3824
  const parts = [
3814
3825
  (message || "").slice(0, 200),
@@ -4165,7 +4176,7 @@ var ErrorTracker = class {
4165
4176
  const payload = coerceErrorPayload(err);
4166
4177
  const message = (payload.message || event.message || "Unknown error").slice(0, 1024);
4167
4178
  const stack = err instanceof Error ? err.stack ?? null : null;
4168
- const frames = parseStack(stack);
4179
+ const frames = demoteVendorInjectedFrames(parseStack(stack), message);
4169
4180
  const errorType = payload.errorType ?? null;
4170
4181
  const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
4171
4182
  return {
@@ -4197,7 +4208,7 @@ var ErrorTracker = class {
4197
4208
  const payload = coerceErrorPayload(err);
4198
4209
  const message = (payload.message || "Unknown error").slice(0, 1024);
4199
4210
  const stack = err instanceof Error ? err.stack ?? null : null;
4200
- const frames = parseStack(stack);
4211
+ const frames = demoteVendorInjectedFrames(parseStack(stack), message);
4201
4212
  const errorType = payload.errorType ?? null;
4202
4213
  const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
4203
4214
  return {