@djust-b2b/djust-front-sdk 1.21.12 → 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,8 +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/node"));
39
- const profiling_node_1 = require("@sentry/profiling-node");
38
+ const Sentry = __importStar(require("@sentry/browser"));
40
39
  require("isomorphic-fetch");
41
40
  const SDK_VERSION = require("../../package.json").version || "unknown";
42
41
  let clientConfig = {
@@ -57,8 +56,28 @@ const initialize = (initConfig) => {
57
56
  "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
58
57
  environment: `${clientConfig.clientName}-${clientConfig.env}`,
59
58
  release: `${SDK_VERSION || "unknown"}`,
60
- integrations: [(0, profiling_node_1.nodeProfilingIntegration)()],
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
+ ],
61
78
  tracesSampleRate: 1.0,
79
+ replaysSessionSampleRate: 0.1,
80
+ replaysOnErrorSampleRate: 1.0,
62
81
  profilesSampleRate: 1.0,
63
82
  sendDefaultPii: true,
64
83
  });
@@ -210,7 +229,7 @@ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
210
229
  }
211
230
  catch (error) {
212
231
  Sentry.captureException(error, { tags: { env: clientConfig.env } });
213
- throw new Error(`${error || "Unknown error occurred"}`);
232
+ throw new Error(`[Djust SDK] ${error || "Unknown error occurred"}`);
214
233
  }
215
234
  };
216
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.12",
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",
@@ -51,8 +51,6 @@
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",
56
54
  "isomorphic-fetch": "^3.0.0",
57
55
  "query-string": "^7.1.1"
58
56
  },