@commercetools-frontend/sentry 20.10.4 → 20.12.1
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.
|
@@ -28,14 +28,12 @@ function _interopNamespace(e) {
|
|
|
28
28
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
29
29
|
Object.defineProperty(n, k, d.get ? d : {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () {
|
|
32
|
-
return e[k];
|
|
33
|
-
}
|
|
31
|
+
get: function () { return e[k]; }
|
|
34
32
|
});
|
|
35
33
|
}
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
|
-
n[
|
|
36
|
+
n["default"] = e;
|
|
39
37
|
return Object.freeze(n);
|
|
40
38
|
}
|
|
41
39
|
|
|
@@ -47,13 +45,13 @@ var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
|
|
|
47
45
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
48
46
|
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
49
47
|
|
|
50
|
-
// NOTE: This string will be replaced
|
|
51
|
-
var version =
|
|
48
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
49
|
+
var version = "20.12.1";
|
|
52
50
|
|
|
53
51
|
var makeErrorToCapture = function makeErrorToCapture(error) {
|
|
54
52
|
if (error instanceof Error) return error;
|
|
55
53
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
56
|
-
return new Error(_JSON$stringify__default[
|
|
54
|
+
return new Error(_JSON$stringify__default["default"](error.reason || 'Unhandled rejection without a reason'));
|
|
57
55
|
};
|
|
58
56
|
|
|
59
57
|
var sendErrorToSentry = function sendErrorToSentry(error) {
|
|
@@ -71,7 +69,7 @@ var replaceEventValues = function replaceEventValues(source, replacements) {
|
|
|
71
69
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
72
70
|
var _context;
|
|
73
71
|
|
|
74
|
-
var hasPropReplacement = _includesInstanceProperty__default[
|
|
72
|
+
var hasPropReplacement = _includesInstanceProperty__default["default"](_context = _Object$keys__default["default"](replacements)).call(_context, prop);
|
|
75
73
|
|
|
76
74
|
switch (_typeof(source[prop])) {
|
|
77
75
|
case 'string':
|
|
@@ -110,7 +108,7 @@ var boot = function boot() {
|
|
|
110
108
|
Sentry__namespace.init({
|
|
111
109
|
dsn: window.app.trackingSentry,
|
|
112
110
|
release: window.app.revision,
|
|
113
|
-
environment: _concatInstanceProperty__default[
|
|
111
|
+
environment: _concatInstanceProperty__default["default"](_context2 = "".concat(window.app.env, "-")).call(_context2, window.app.location),
|
|
114
112
|
// in order to reduce the noise in sentry we only track errors that come
|
|
115
113
|
// from our code and ignore errors that come from other services
|
|
116
114
|
// https://blog.sentry.io/2017/03/27/tips-for-reducing-javascript-error-noise.html
|
|
@@ -164,9 +162,9 @@ var reportErrorToSentry = function reportErrorToSentry(error, extraInfo, getIsEn
|
|
|
164
162
|
return undefined;
|
|
165
163
|
};
|
|
166
164
|
|
|
167
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
165
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
168
166
|
|
|
169
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
167
|
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
170
168
|
|
|
171
169
|
/**
|
|
172
170
|
* This component will let sentry know if any information about the user has
|
|
@@ -188,7 +186,7 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
188
186
|
args[_key] = arguments[_key];
|
|
189
187
|
}
|
|
190
188
|
|
|
191
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
189
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context = [this]).call(_context, args));
|
|
192
190
|
|
|
193
191
|
_this.syncUser = function () {
|
|
194
192
|
if (_this.props.user && window.app.trackingSentry) {
|
|
@@ -230,15 +228,15 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
230
228
|
|
|
231
229
|
SentryUserTracker.displayName = 'SentryUserTracker';
|
|
232
230
|
SentryUserTracker.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
233
|
-
user: _pt__default[
|
|
234
|
-
id: _pt__default[
|
|
235
|
-
email: _pt__default[
|
|
231
|
+
user: _pt__default["default"].shape({
|
|
232
|
+
id: _pt__default["default"].string.isRequired,
|
|
233
|
+
email: _pt__default["default"].string.isRequired
|
|
236
234
|
})
|
|
237
235
|
} : {};
|
|
238
236
|
|
|
239
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
237
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
240
238
|
|
|
241
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
239
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
242
240
|
|
|
243
241
|
var SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
244
242
|
_inherits(SentryUserLogoutTracker, _Component);
|
|
@@ -28,14 +28,12 @@ function _interopNamespace(e) {
|
|
|
28
28
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
29
29
|
Object.defineProperty(n, k, d.get ? d : {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () {
|
|
32
|
-
return e[k];
|
|
33
|
-
}
|
|
31
|
+
get: function () { return e[k]; }
|
|
34
32
|
});
|
|
35
33
|
}
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
|
-
n[
|
|
36
|
+
n["default"] = e;
|
|
39
37
|
return Object.freeze(n);
|
|
40
38
|
}
|
|
41
39
|
|
|
@@ -46,13 +44,13 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
46
44
|
var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
|
|
47
45
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
48
46
|
|
|
49
|
-
// NOTE: This string will be replaced
|
|
50
|
-
var version =
|
|
47
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
48
|
+
var version = "20.12.1";
|
|
51
49
|
|
|
52
50
|
var makeErrorToCapture = function makeErrorToCapture(error) {
|
|
53
51
|
if (error instanceof Error) return error;
|
|
54
52
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
55
|
-
return new Error(_JSON$stringify__default[
|
|
53
|
+
return new Error(_JSON$stringify__default["default"](error.reason || 'Unhandled rejection without a reason'));
|
|
56
54
|
};
|
|
57
55
|
|
|
58
56
|
var sendErrorToSentry = function sendErrorToSentry(error) {
|
|
@@ -70,7 +68,7 @@ var replaceEventValues = function replaceEventValues(source, replacements) {
|
|
|
70
68
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
71
69
|
var _context;
|
|
72
70
|
|
|
73
|
-
var hasPropReplacement = _includesInstanceProperty__default[
|
|
71
|
+
var hasPropReplacement = _includesInstanceProperty__default["default"](_context = _Object$keys__default["default"](replacements)).call(_context, prop);
|
|
74
72
|
|
|
75
73
|
switch (_typeof(source[prop])) {
|
|
76
74
|
case 'string':
|
|
@@ -109,7 +107,7 @@ var boot = function boot() {
|
|
|
109
107
|
Sentry__namespace.init({
|
|
110
108
|
dsn: window.app.trackingSentry,
|
|
111
109
|
release: window.app.revision,
|
|
112
|
-
environment: _concatInstanceProperty__default[
|
|
110
|
+
environment: _concatInstanceProperty__default["default"](_context2 = "".concat(window.app.env, "-")).call(_context2, window.app.location),
|
|
113
111
|
// in order to reduce the noise in sentry we only track errors that come
|
|
114
112
|
// from our code and ignore errors that come from other services
|
|
115
113
|
// https://blog.sentry.io/2017/03/27/tips-for-reducing-javascript-error-noise.html
|
|
@@ -163,9 +161,9 @@ var reportErrorToSentry = function reportErrorToSentry(error, extraInfo, getIsEn
|
|
|
163
161
|
return undefined;
|
|
164
162
|
};
|
|
165
163
|
|
|
166
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
164
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
167
165
|
|
|
168
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
166
|
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
169
167
|
|
|
170
168
|
/**
|
|
171
169
|
* This component will let sentry know if any information about the user has
|
|
@@ -187,7 +185,7 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
187
185
|
args[_key] = arguments[_key];
|
|
188
186
|
}
|
|
189
187
|
|
|
190
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
188
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context = [this]).call(_context, args));
|
|
191
189
|
|
|
192
190
|
_this.syncUser = function () {
|
|
193
191
|
if (_this.props.user && window.app.trackingSentry) {
|
|
@@ -230,9 +228,9 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
230
228
|
SentryUserTracker.displayName = 'SentryUserTracker';
|
|
231
229
|
SentryUserTracker.propTypes = {};
|
|
232
230
|
|
|
233
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
231
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
234
232
|
|
|
235
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
233
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
236
234
|
|
|
237
235
|
var SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
238
236
|
_inherits(SentryUserLogoutTracker, _Component);
|
|
@@ -13,8 +13,8 @@ import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
|
13
13
|
import _pt from 'prop-types';
|
|
14
14
|
import { PureComponent, Component } from 'react';
|
|
15
15
|
|
|
16
|
-
// NOTE: This string will be replaced
|
|
17
|
-
var version =
|
|
16
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
17
|
+
var version = "20.12.1";
|
|
18
18
|
|
|
19
19
|
var makeErrorToCapture = function makeErrorToCapture(error) {
|
|
20
20
|
if (error instanceof Error) return error;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
1
|
+
declare const _default: "__@APPLICATION_KIT_PACKAGE/VERSION_OF_RELEASE__";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/sentry",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.12.1",
|
|
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": {
|
|
@@ -11,28 +11,24 @@
|
|
|
11
11
|
"homepage": "https://docs.commercetools.com/custom-applications",
|
|
12
12
|
"keywords": ["javascript", "frontend", "react", "toolkit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
18
17
|
"main": "dist/commercetools-frontend-sentry.cjs.js",
|
|
19
18
|
"module": "dist/commercetools-frontend-sentry.esm.js",
|
|
20
19
|
"files": ["dist", "package.json", "LICENSE", "README.md"],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"prepare": "./../../scripts/version.js replace"
|
|
23
|
-
},
|
|
24
20
|
"dependencies": {
|
|
25
|
-
"@babel/runtime": "7.
|
|
26
|
-
"@babel/runtime-corejs3": "7.
|
|
27
|
-
"@commercetools-frontend/constants": "20.
|
|
28
|
-
"@sentry/browser": "6.
|
|
21
|
+
"@babel/runtime": "7.16.3",
|
|
22
|
+
"@babel/runtime-corejs3": "7.16.3",
|
|
23
|
+
"@commercetools-frontend/constants": "20.12.1",
|
|
24
|
+
"@sentry/browser": "6.16.0",
|
|
29
25
|
"@types/prop-types": "^15.7.3",
|
|
30
26
|
"@types/react": "^17.0.16",
|
|
31
27
|
"prop-types": "15.7.2"
|
|
32
28
|
},
|
|
33
29
|
"devDependencies": {
|
|
34
30
|
"react": "17.0.2",
|
|
35
|
-
"sentry-testkit": "3.3.
|
|
31
|
+
"sentry-testkit": "3.3.7",
|
|
36
32
|
"wait-for-expect": "3.0.2"
|
|
37
33
|
},
|
|
38
34
|
"peerDependencies": {
|