@djust-b2b/djust-front-sdk 1.21.11 → 1.21.12
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,8 @@ 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/node"));
|
|
39
|
+
const profiling_node_1 = require("@sentry/profiling-node");
|
|
39
40
|
require("isomorphic-fetch");
|
|
40
41
|
const SDK_VERSION = require("../../package.json").version || "unknown";
|
|
41
42
|
let clientConfig = {
|
|
@@ -56,21 +57,8 @@ const initialize = (initConfig) => {
|
|
|
56
57
|
"https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
|
|
57
58
|
environment: `${clientConfig.clientName}-${clientConfig.env}`,
|
|
58
59
|
release: `${SDK_VERSION || "unknown"}`,
|
|
59
|
-
integrations: [
|
|
60
|
-
Sentry.browserTracingIntegration(),
|
|
61
|
-
Sentry.replayIntegration(),
|
|
62
|
-
Sentry.httpClientIntegration(),
|
|
63
|
-
Sentry.browserApiErrorsIntegration({
|
|
64
|
-
setTimeout: true,
|
|
65
|
-
setInterval: true,
|
|
66
|
-
requestAnimationFrame: true,
|
|
67
|
-
XMLHttpRequest: true,
|
|
68
|
-
eventTarget: true,
|
|
69
|
-
}),
|
|
70
|
-
],
|
|
60
|
+
integrations: [(0, profiling_node_1.nodeProfilingIntegration)()],
|
|
71
61
|
tracesSampleRate: 1.0,
|
|
72
|
-
replaysSessionSampleRate: 0.1,
|
|
73
|
-
replaysOnErrorSampleRate: 1.0,
|
|
74
62
|
profilesSampleRate: 1.0,
|
|
75
63
|
sendDefaultPii: true,
|
|
76
64
|
});
|
|
@@ -222,7 +210,7 @@ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
|
|
|
222
210
|
}
|
|
223
211
|
catch (error) {
|
|
224
212
|
Sentry.captureException(error, { tags: { env: clientConfig.env } });
|
|
225
|
-
throw new Error(
|
|
213
|
+
throw new Error(`${error || "Unknown error occurred"}`);
|
|
226
214
|
}
|
|
227
215
|
};
|
|
228
216
|
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.12",
|
|
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",
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@sentry/browser": "^9.2.0",
|
|
54
|
+
"@sentry/node": "^9.2.0",
|
|
55
|
+
"@sentry/profiling-node": "^9.2.0",
|
|
54
56
|
"isomorphic-fetch": "^3.0.0",
|
|
55
57
|
"query-string": "^7.1.1"
|
|
56
58
|
},
|