@djust-b2b/djust-front-sdk 1.21.13 → 1.21.14
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.
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.enhancedFetch = exports.updateConfiguration = exports.initialize = void 0;
|
|
37
37
|
const qs = __importStar(require("query-string"));
|
|
38
|
-
const Sentry = __importStar(require("@sentry/
|
|
38
|
+
const Sentry = __importStar(require("@sentry/browser"));
|
|
39
39
|
require("isomorphic-fetch");
|
|
40
40
|
const SDK_VERSION = require("../../package.json").version || "unknown";
|
|
41
41
|
let clientConfig = {
|
|
@@ -56,8 +56,28 @@ const initialize = (initConfig) => {
|
|
|
56
56
|
"https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
|
|
57
57
|
environment: `${clientConfig.clientName}-${clientConfig.env}`,
|
|
58
58
|
release: `${SDK_VERSION || "unknown"}`,
|
|
59
|
-
integrations: [
|
|
59
|
+
integrations: [
|
|
60
|
+
Sentry.browserTracingIntegration(),
|
|
61
|
+
Sentry.replayIntegration(),
|
|
62
|
+
Sentry.httpClientIntegration(),
|
|
63
|
+
Sentry.breadcrumbsIntegration({
|
|
64
|
+
console: true,
|
|
65
|
+
dom: true,
|
|
66
|
+
fetch: true,
|
|
67
|
+
history: true,
|
|
68
|
+
xhr: true,
|
|
69
|
+
}),
|
|
70
|
+
Sentry.browserApiErrorsIntegration({
|
|
71
|
+
setTimeout: true,
|
|
72
|
+
setInterval: true,
|
|
73
|
+
requestAnimationFrame: true,
|
|
74
|
+
XMLHttpRequest: true,
|
|
75
|
+
eventTarget: true,
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
60
78
|
tracesSampleRate: 1.0,
|
|
79
|
+
replaysSessionSampleRate: 0.1,
|
|
80
|
+
replaysOnErrorSampleRate: 1.0,
|
|
61
81
|
profilesSampleRate: 1.0,
|
|
62
82
|
sendDefaultPii: true,
|
|
63
83
|
});
|
|
@@ -209,7 +229,7 @@ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
|
|
|
209
229
|
}
|
|
210
230
|
catch (error) {
|
|
211
231
|
Sentry.captureException(error, { tags: { env: clientConfig.env } });
|
|
212
|
-
throw new Error(
|
|
232
|
+
throw new Error(`[Djust SDK] ${error || "Unknown error occurred"}`);
|
|
213
233
|
}
|
|
214
234
|
};
|
|
215
235
|
exports.enhancedFetch = enhancedFetch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djust-b2b/djust-front-sdk",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.14",
|
|
4
4
|
"description": "DJUST Front SDK is a versatile JavaScript Software Development Kit (SDK) ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"lib/**/**.d.ts"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@sentry/
|
|
53
|
+
"@sentry/browser": "^9.2.0",
|
|
54
54
|
"isomorphic-fetch": "^3.0.0",
|
|
55
55
|
"query-string": "^7.1.1"
|
|
56
56
|
},
|