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