@commercetools-frontend/sentry 27.5.2 → 27.5.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.
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
6
4
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
7
5
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -16,7 +14,7 @@ var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
|
16
14
|
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
17
15
|
var react = require('react');
|
|
18
16
|
|
|
19
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
17
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
18
|
|
|
21
19
|
function _interopNamespace(e) {
|
|
22
20
|
if (e && e.__esModule) return e;
|
|
@@ -32,7 +30,7 @@ function _interopNamespace(e) {
|
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
n
|
|
33
|
+
n.default = e;
|
|
36
34
|
return Object.freeze(n);
|
|
37
35
|
}
|
|
38
36
|
|
|
@@ -44,12 +42,12 @@ var history__default = /*#__PURE__*/_interopDefault(history);
|
|
|
44
42
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
45
43
|
|
|
46
44
|
// NOTE: This string will be replaced on build time with the package version.
|
|
47
|
-
var version = "27.5.
|
|
45
|
+
var version = "27.5.3";
|
|
48
46
|
|
|
49
47
|
const makeErrorToCapture = error => {
|
|
50
48
|
if (error instanceof Error) return error;
|
|
51
49
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
52
|
-
return new Error(_JSON$stringify__default
|
|
50
|
+
return new Error(_JSON$stringify__default.default(error.reason || 'Unhandled rejection without a reason'));
|
|
53
51
|
};
|
|
54
52
|
const sendErrorToSentry = error => {
|
|
55
53
|
if (typeof error === 'string') return Sentry__namespace.captureMessage(error);
|
|
@@ -63,7 +61,7 @@ const replaceEventValues = (source, replacements) => {
|
|
|
63
61
|
for (const prop in source) {
|
|
64
62
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
65
63
|
var _context;
|
|
66
|
-
const hasPropReplacement = _includesInstanceProperty__default
|
|
64
|
+
const hasPropReplacement = _includesInstanceProperty__default.default(_context = _Object$keys__default.default(replacements)).call(_context, prop);
|
|
67
65
|
switch (typeof source[prop]) {
|
|
68
66
|
case 'string':
|
|
69
67
|
if (hasPropReplacement) {
|
|
@@ -106,7 +104,7 @@ const boot = () => {
|
|
|
106
104
|
onunhandledrejection: false,
|
|
107
105
|
onerror: false
|
|
108
106
|
}), Sentry__namespace.reactRouterV5BrowserTracingIntegration({
|
|
109
|
-
history: history__default
|
|
107
|
+
history: history__default.default
|
|
110
108
|
})],
|
|
111
109
|
// Sending 5% of transactions. We can adjust that as we see a need to.
|
|
112
110
|
// Generally we need to find a balance between performance and data volume.
|
|
@@ -161,8 +159,8 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
|
161
159
|
return undefined;
|
|
162
160
|
};
|
|
163
161
|
|
|
164
|
-
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default
|
|
165
|
-
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default
|
|
162
|
+
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default.default(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
163
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default.default(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
166
164
|
/**
|
|
167
165
|
* This component will let sentry know if any information about the user has
|
|
168
166
|
* changed.
|
|
@@ -210,8 +208,8 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
210
208
|
}(react.PureComponent);
|
|
211
209
|
SentryUserTracker.displayName = 'SentryUserTracker';
|
|
212
210
|
|
|
213
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default
|
|
214
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default
|
|
211
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default.default(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
212
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default.default(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
215
213
|
let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
216
214
|
function SentryUserLogoutTracker() {
|
|
217
215
|
_classCallCheck(this, SentryUserLogoutTracker);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
6
4
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
7
5
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -16,7 +14,7 @@ var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
|
16
14
|
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
17
15
|
var react = require('react');
|
|
18
16
|
|
|
19
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
17
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
18
|
|
|
21
19
|
function _interopNamespace(e) {
|
|
22
20
|
if (e && e.__esModule) return e;
|
|
@@ -32,7 +30,7 @@ function _interopNamespace(e) {
|
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
|
-
n
|
|
33
|
+
n.default = e;
|
|
36
34
|
return Object.freeze(n);
|
|
37
35
|
}
|
|
38
36
|
|
|
@@ -44,12 +42,12 @@ var history__default = /*#__PURE__*/_interopDefault(history);
|
|
|
44
42
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
45
43
|
|
|
46
44
|
// NOTE: This string will be replaced on build time with the package version.
|
|
47
|
-
var version = "27.5.
|
|
45
|
+
var version = "27.5.3";
|
|
48
46
|
|
|
49
47
|
const makeErrorToCapture = error => {
|
|
50
48
|
if (error instanceof Error) return error;
|
|
51
49
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
52
|
-
return new Error(_JSON$stringify__default
|
|
50
|
+
return new Error(_JSON$stringify__default.default(error.reason || 'Unhandled rejection without a reason'));
|
|
53
51
|
};
|
|
54
52
|
const sendErrorToSentry = error => {
|
|
55
53
|
if (typeof error === 'string') return Sentry__namespace.captureMessage(error);
|
|
@@ -63,7 +61,7 @@ const replaceEventValues = (source, replacements) => {
|
|
|
63
61
|
for (const prop in source) {
|
|
64
62
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
65
63
|
var _context;
|
|
66
|
-
const hasPropReplacement = _includesInstanceProperty__default
|
|
64
|
+
const hasPropReplacement = _includesInstanceProperty__default.default(_context = _Object$keys__default.default(replacements)).call(_context, prop);
|
|
67
65
|
switch (typeof source[prop]) {
|
|
68
66
|
case 'string':
|
|
69
67
|
if (hasPropReplacement) {
|
|
@@ -106,7 +104,7 @@ const boot = () => {
|
|
|
106
104
|
onunhandledrejection: false,
|
|
107
105
|
onerror: false
|
|
108
106
|
}), Sentry__namespace.reactRouterV5BrowserTracingIntegration({
|
|
109
|
-
history: history__default
|
|
107
|
+
history: history__default.default
|
|
110
108
|
})],
|
|
111
109
|
// Sending 5% of transactions. We can adjust that as we see a need to.
|
|
112
110
|
// Generally we need to find a balance between performance and data volume.
|
|
@@ -161,8 +159,8 @@ const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
|
161
159
|
return undefined;
|
|
162
160
|
};
|
|
163
161
|
|
|
164
|
-
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default
|
|
165
|
-
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default
|
|
162
|
+
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default.default(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
163
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default.default(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
166
164
|
/**
|
|
167
165
|
* This component will let sentry know if any information about the user has
|
|
168
166
|
* changed.
|
|
@@ -210,8 +208,8 @@ let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
210
208
|
}(react.PureComponent);
|
|
211
209
|
SentryUserTracker.displayName = 'SentryUserTracker';
|
|
212
210
|
|
|
213
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default
|
|
214
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default
|
|
211
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default.default(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
212
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default.default(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
215
213
|
let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
216
214
|
function SentryUserLogoutTracker() {
|
|
217
215
|
_classCallCheck(this, SentryUserLogoutTracker);
|
|
@@ -13,7 +13,7 @@ import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
|
13
13
|
import { PureComponent, Component } from 'react';
|
|
14
14
|
|
|
15
15
|
// NOTE: This string will be replaced on build time with the package version.
|
|
16
|
-
var version = "27.5.
|
|
16
|
+
var version = "27.5.3";
|
|
17
17
|
|
|
18
18
|
const makeErrorToCapture = error => {
|
|
19
19
|
if (error instanceof Error) return error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/sentry",
|
|
3
|
-
"version": "27.5.
|
|
3
|
+
"version": "27.5.3",
|
|
4
4
|
"description": "Components to set up Sentry for a MC application",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/browser-history": "27.5.
|
|
34
|
-
"@commercetools-frontend/constants": "27.5.
|
|
33
|
+
"@commercetools-frontend/browser-history": "27.5.3",
|
|
34
|
+
"@commercetools-frontend/constants": "27.5.3",
|
|
35
35
|
"@sentry/browser": "8.55.0",
|
|
36
36
|
"@sentry/react": "8.55.0",
|
|
37
37
|
"@sentry/types": "8.55.0",
|