@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/CHANGELOG.md +14 -0
- package/dist/crossdeck.umd.min.js +2 -2
- package/dist/crossdeck.umd.min.js.map +1 -1
- package/dist/error-codes.json +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +14 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +14 -3
- package/dist/react.mjs.map +1 -1
- package/dist/vue.cjs +14 -3
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.mjs +14 -3
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.cjs
CHANGED
|
@@ -98,7 +98,7 @@ function typeMapForStatus(status) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// src/_version.ts
|
|
101
|
-
var SDK_VERSION = "1.10.
|
|
101
|
+
var SDK_VERSION = "1.10.3";
|
|
102
102
|
var SDK_NAME = "@cross-deck/web";
|
|
103
103
|
|
|
104
104
|
// src/http.ts
|
|
@@ -3837,7 +3837,18 @@ function isInAppFrame(filename) {
|
|
|
3837
3837
|
if (/\/crossdeck\.umd\.min\.js$/.test(filename)) return false;
|
|
3838
3838
|
return true;
|
|
3839
3839
|
}
|
|
3840
|
+
var BROWSER_INJECTED_GLOBAL = /(__firefox__|__gCrWeb|zaloJSV2)/;
|
|
3841
|
+
function injectedGlobalName(message) {
|
|
3842
|
+
const m = BROWSER_INJECTED_GLOBAL.exec(message ?? "");
|
|
3843
|
+
return m ? m[1] : null;
|
|
3844
|
+
}
|
|
3845
|
+
function demoteVendorInjectedFrames(frames, message) {
|
|
3846
|
+
if (!injectedGlobalName(message)) return frames;
|
|
3847
|
+
return frames.map((f) => f.in_app ? { ...f, in_app: false } : f);
|
|
3848
|
+
}
|
|
3840
3849
|
function fingerprintError(message, frames, location2) {
|
|
3850
|
+
const injected = injectedGlobalName(message);
|
|
3851
|
+
if (injected) return djb2Hex(`injected-global:${injected}`);
|
|
3841
3852
|
const inAppFrames = frames.filter((f) => f.in_app).slice(0, 3);
|
|
3842
3853
|
const parts = [
|
|
3843
3854
|
(message || "").slice(0, 200),
|
|
@@ -4194,7 +4205,7 @@ var ErrorTracker = class {
|
|
|
4194
4205
|
const payload = coerceErrorPayload(err);
|
|
4195
4206
|
const message = (payload.message || event.message || "Unknown error").slice(0, 1024);
|
|
4196
4207
|
const stack = err instanceof Error ? err.stack ?? null : null;
|
|
4197
|
-
const frames = parseStack(stack);
|
|
4208
|
+
const frames = demoteVendorInjectedFrames(parseStack(stack), message);
|
|
4198
4209
|
const errorType = payload.errorType ?? null;
|
|
4199
4210
|
const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
|
|
4200
4211
|
return {
|
|
@@ -4226,7 +4237,7 @@ var ErrorTracker = class {
|
|
|
4226
4237
|
const payload = coerceErrorPayload(err);
|
|
4227
4238
|
const message = (payload.message || "Unknown error").slice(0, 1024);
|
|
4228
4239
|
const stack = err instanceof Error ? err.stack ?? null : null;
|
|
4229
|
-
const frames = parseStack(stack);
|
|
4240
|
+
const frames = demoteVendorInjectedFrames(parseStack(stack), message);
|
|
4230
4241
|
const errorType = payload.errorType ?? null;
|
|
4231
4242
|
const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
|
|
4232
4243
|
return {
|