@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/error-codes.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -104,7 +104,7 @@ function typeMapForStatus(status) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// src/_version.ts
|
|
107
|
-
var SDK_VERSION = "1.10.
|
|
107
|
+
var SDK_VERSION = "1.10.3";
|
|
108
108
|
var SDK_NAME = "@cross-deck/web";
|
|
109
109
|
|
|
110
110
|
// src/http.ts
|
|
@@ -3843,7 +3843,18 @@ function isInAppFrame(filename) {
|
|
|
3843
3843
|
if (/\/crossdeck\.umd\.min\.js$/.test(filename)) return false;
|
|
3844
3844
|
return true;
|
|
3845
3845
|
}
|
|
3846
|
+
var BROWSER_INJECTED_GLOBAL = /(__firefox__|__gCrWeb|zaloJSV2)/;
|
|
3847
|
+
function injectedGlobalName(message) {
|
|
3848
|
+
const m = BROWSER_INJECTED_GLOBAL.exec(message ?? "");
|
|
3849
|
+
return m ? m[1] : null;
|
|
3850
|
+
}
|
|
3851
|
+
function demoteVendorInjectedFrames(frames, message) {
|
|
3852
|
+
if (!injectedGlobalName(message)) return frames;
|
|
3853
|
+
return frames.map((f) => f.in_app ? { ...f, in_app: false } : f);
|
|
3854
|
+
}
|
|
3846
3855
|
function fingerprintError(message, frames, location2) {
|
|
3856
|
+
const injected = injectedGlobalName(message);
|
|
3857
|
+
if (injected) return djb2Hex(`injected-global:${injected}`);
|
|
3847
3858
|
const inAppFrames = frames.filter((f) => f.in_app).slice(0, 3);
|
|
3848
3859
|
const parts = [
|
|
3849
3860
|
(message || "").slice(0, 200),
|
|
@@ -4200,7 +4211,7 @@ var ErrorTracker = class {
|
|
|
4200
4211
|
const payload = coerceErrorPayload(err);
|
|
4201
4212
|
const message = (payload.message || event.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 {
|
|
@@ -4232,7 +4243,7 @@ var ErrorTracker = class {
|
|
|
4232
4243
|
const payload = coerceErrorPayload(err);
|
|
4233
4244
|
const message = (payload.message || "Unknown error").slice(0, 1024);
|
|
4234
4245
|
const stack = err instanceof Error ? err.stack ?? null : null;
|
|
4235
|
-
const frames = parseStack(stack);
|
|
4246
|
+
const frames = demoteVendorInjectedFrames(parseStack(stack), message);
|
|
4236
4247
|
const errorType = payload.errorType ?? null;
|
|
4237
4248
|
const context = payload.extras ? { ...this.opts.getContext(), __error_extras: payload.extras } : this.opts.getContext();
|
|
4238
4249
|
return {
|