@atlaskit/react-ufo 5.3.0 → 5.4.0
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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/interaction-metrics-init/index.js +1 -28
- package/dist/cjs/set-terminal-error/index.js +2 -2
- package/dist/es2019/interaction-metrics-init/index.js +0 -27
- package/dist/es2019/set-terminal-error/index.js +2 -2
- package/dist/esm/interaction-metrics-init/index.js +1 -28
- package/dist/esm/set-terminal-error/index.js +2 -2
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/ufo-interaction-ignore
|
|
2
2
|
|
|
3
|
+
## 5.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d95ffd10bec80`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d95ffd10bec80) -
|
|
8
|
+
remove old FG used by Criterion for reading UFO payloads
|
|
9
|
+
|
|
3
10
|
## 5.3.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -50,13 +50,6 @@ function sinkExperimentalInteractionMetrics(instance, payloadPackage) {
|
|
|
50
50
|
var payloadPromise = payloadPackage.createExperimentalMetricsPayload(interactionId, interaction);
|
|
51
51
|
payloadPromise.then(function (payload) {
|
|
52
52
|
if (payload) {
|
|
53
|
-
if ((0, _platformFeatureFlags.fg)('enable_ufo_devtools_api_for_extra_events')) {
|
|
54
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and Criterion
|
|
55
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
56
|
-
if (typeof devToolObserver === 'function') {
|
|
57
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
53
|
instance.sendOperationalEvent(payload);
|
|
61
54
|
}
|
|
62
55
|
});
|
|
@@ -70,13 +63,6 @@ function sinkPostInteractionLog(instance, createPostInteractionLogPayload) {
|
|
|
70
63
|
(0, _scheduleIdleCallback.default)(function () {
|
|
71
64
|
var payload = createPostInteractionLogPayload(logOutput);
|
|
72
65
|
if (payload) {
|
|
73
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
74
|
-
if ((0, _platformFeatureFlags.fg)('enable_ufo_devtools_api_for_extra_events')) {
|
|
75
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
76
|
-
if (typeof devToolObserver === 'function') {
|
|
77
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
66
|
instance.sendOperationalEvent(payload);
|
|
81
67
|
}
|
|
82
68
|
});
|
|
@@ -87,12 +73,6 @@ function sinkTerminalErrors(instance, createTerminalErrorPayload) {
|
|
|
87
73
|
(0, _scheduleIdleCallback.default)(function () {
|
|
88
74
|
var payload = createTerminalErrorPayload(errorData, context);
|
|
89
75
|
if (payload) {
|
|
90
|
-
if ((0, _platformFeatureFlags.fg)('enable_ufo_devtools_api_for_extra_events')) {
|
|
91
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
92
|
-
if (typeof devToolObserver === 'function') {
|
|
93
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
76
|
instance.sendOperationalEvent(payload);
|
|
97
77
|
}
|
|
98
78
|
});
|
|
@@ -101,7 +81,7 @@ function sinkTerminalErrors(instance, createTerminalErrorPayload) {
|
|
|
101
81
|
function sinkInteractionExtraMetrics(instance, createInteractionExtraLogPayload) {
|
|
102
82
|
_interactionMetrics.interactionExtraMetrics.sinkHandler(function (interactionId, interaction, lastInteractionFinish, lastInteractionFinishVCResult) {
|
|
103
83
|
(0, _scheduleIdleCallback.default)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
104
|
-
var payload
|
|
84
|
+
var payload;
|
|
105
85
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
106
86
|
while (1) switch (_context.prev = _context.next) {
|
|
107
87
|
case 0:
|
|
@@ -110,13 +90,6 @@ function sinkInteractionExtraMetrics(instance, createInteractionExtraLogPayload)
|
|
|
110
90
|
case 2:
|
|
111
91
|
payload = _context.sent;
|
|
112
92
|
if (payload) {
|
|
113
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
114
|
-
if ((0, _platformFeatureFlags.fg)('enable_ufo_devtools_api_for_extra_events')) {
|
|
115
|
-
devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
116
|
-
if (typeof devToolObserver === 'function') {
|
|
117
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
93
|
instance.sendOperationalEvent(payload);
|
|
121
94
|
}
|
|
122
95
|
case 4:
|
|
@@ -19,7 +19,7 @@ function sinkTerminalErrorHandler(fn) {
|
|
|
19
19
|
sinkHandlerFn = fn;
|
|
20
20
|
}
|
|
21
21
|
function setTerminalError(error, additionalAttributes, labelStack) {
|
|
22
|
-
var _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
22
|
+
var _error$message, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
23
23
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
24
24
|
// Exclude client network errors from being reported to UFO
|
|
25
25
|
return;
|
|
@@ -28,7 +28,7 @@ function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
28
28
|
var currentTime = performance.now();
|
|
29
29
|
var errorData = _objectSpread({
|
|
30
30
|
errorType: error.name || 'Error',
|
|
31
|
-
errorMessage: error.message.slice(0, 100),
|
|
31
|
+
errorMessage: ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.slice(0, 100)) || 'Unknown error',
|
|
32
32
|
timestamp: currentTime
|
|
33
33
|
}, additionalAttributes);
|
|
34
34
|
|
|
@@ -38,13 +38,6 @@ function sinkExperimentalInteractionMetrics(instance, payloadPackage) {
|
|
|
38
38
|
const payloadPromise = payloadPackage.createExperimentalMetricsPayload(interactionId, interaction);
|
|
39
39
|
payloadPromise.then(payload => {
|
|
40
40
|
if (payload) {
|
|
41
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
42
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and Criterion
|
|
43
|
-
const devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
44
|
-
if (typeof devToolObserver === 'function') {
|
|
45
|
-
devToolObserver === null || devToolObserver === void 0 ? void 0 : devToolObserver(payload);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
41
|
instance.sendOperationalEvent(payload);
|
|
49
42
|
}
|
|
50
43
|
});
|
|
@@ -58,13 +51,6 @@ function sinkPostInteractionLog(instance, createPostInteractionLogPayload) {
|
|
|
58
51
|
scheduleIdleCallback(() => {
|
|
59
52
|
const payload = createPostInteractionLogPayload(logOutput);
|
|
60
53
|
if (payload) {
|
|
61
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
62
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
63
|
-
const devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
64
|
-
if (typeof devToolObserver === 'function') {
|
|
65
|
-
devToolObserver === null || devToolObserver === void 0 ? void 0 : devToolObserver(payload);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
54
|
instance.sendOperationalEvent(payload);
|
|
69
55
|
}
|
|
70
56
|
});
|
|
@@ -75,12 +61,6 @@ function sinkTerminalErrors(instance, createTerminalErrorPayload) {
|
|
|
75
61
|
scheduleIdleCallback(() => {
|
|
76
62
|
const payload = createTerminalErrorPayload(errorData, context);
|
|
77
63
|
if (payload) {
|
|
78
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
79
|
-
const devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
80
|
-
if (typeof devToolObserver === 'function') {
|
|
81
|
-
devToolObserver === null || devToolObserver === void 0 ? void 0 : devToolObserver(payload);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
64
|
instance.sendOperationalEvent(payload);
|
|
85
65
|
}
|
|
86
66
|
});
|
|
@@ -91,13 +71,6 @@ function sinkInteractionExtraMetrics(instance, createInteractionExtraLogPayload)
|
|
|
91
71
|
scheduleIdleCallback(async () => {
|
|
92
72
|
const payload = await createInteractionExtraLogPayload(interactionId, interaction, lastInteractionFinish, lastInteractionFinishVCResult);
|
|
93
73
|
if (payload) {
|
|
94
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
95
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
96
|
-
const devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
97
|
-
if (typeof devToolObserver === 'function') {
|
|
98
|
-
devToolObserver === null || devToolObserver === void 0 ? void 0 : devToolObserver(payload);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
74
|
instance.sendOperationalEvent(payload);
|
|
102
75
|
}
|
|
103
76
|
});
|
|
@@ -7,7 +7,7 @@ export function sinkTerminalErrorHandler(fn) {
|
|
|
7
7
|
sinkHandlerFn = fn;
|
|
8
8
|
}
|
|
9
9
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
10
|
-
var _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
10
|
+
var _error$message, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
11
11
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
12
12
|
// Exclude client network errors from being reported to UFO
|
|
13
13
|
return;
|
|
@@ -16,7 +16,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
16
16
|
const currentTime = performance.now();
|
|
17
17
|
const errorData = {
|
|
18
18
|
errorType: error.name || 'Error',
|
|
19
|
-
errorMessage: error.message.slice(0, 100),
|
|
19
|
+
errorMessage: ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.slice(0, 100)) || 'Unknown error',
|
|
20
20
|
timestamp: currentTime,
|
|
21
21
|
...additionalAttributes
|
|
22
22
|
};
|
|
@@ -41,13 +41,6 @@ function sinkExperimentalInteractionMetrics(instance, payloadPackage) {
|
|
|
41
41
|
var payloadPromise = payloadPackage.createExperimentalMetricsPayload(interactionId, interaction);
|
|
42
42
|
payloadPromise.then(function (payload) {
|
|
43
43
|
if (payload) {
|
|
44
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
45
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and Criterion
|
|
46
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
47
|
-
if (typeof devToolObserver === 'function') {
|
|
48
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
44
|
instance.sendOperationalEvent(payload);
|
|
52
45
|
}
|
|
53
46
|
});
|
|
@@ -61,13 +54,6 @@ function sinkPostInteractionLog(instance, createPostInteractionLogPayload) {
|
|
|
61
54
|
scheduleIdleCallback(function () {
|
|
62
55
|
var payload = createPostInteractionLogPayload(logOutput);
|
|
63
56
|
if (payload) {
|
|
64
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
65
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
66
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
67
|
-
if (typeof devToolObserver === 'function') {
|
|
68
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
57
|
instance.sendOperationalEvent(payload);
|
|
72
58
|
}
|
|
73
59
|
});
|
|
@@ -78,12 +64,6 @@ function sinkTerminalErrors(instance, createTerminalErrorPayload) {
|
|
|
78
64
|
scheduleIdleCallback(function () {
|
|
79
65
|
var payload = createTerminalErrorPayload(errorData, context);
|
|
80
66
|
if (payload) {
|
|
81
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
82
|
-
var devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
83
|
-
if (typeof devToolObserver === 'function') {
|
|
84
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
67
|
instance.sendOperationalEvent(payload);
|
|
88
68
|
}
|
|
89
69
|
});
|
|
@@ -92,7 +72,7 @@ function sinkTerminalErrors(instance, createTerminalErrorPayload) {
|
|
|
92
72
|
function sinkInteractionExtraMetrics(instance, createInteractionExtraLogPayload) {
|
|
93
73
|
interactionExtraMetrics.sinkHandler(function (interactionId, interaction, lastInteractionFinish, lastInteractionFinishVCResult) {
|
|
94
74
|
scheduleIdleCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
95
|
-
var payload
|
|
75
|
+
var payload;
|
|
96
76
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
97
77
|
while (1) switch (_context.prev = _context.next) {
|
|
98
78
|
case 0:
|
|
@@ -101,13 +81,6 @@ function sinkInteractionExtraMetrics(instance, createInteractionExtraLogPayload)
|
|
|
101
81
|
case 2:
|
|
102
82
|
payload = _context.sent;
|
|
103
83
|
if (payload) {
|
|
104
|
-
// NOTE: This API is used by the UFO DevTool Chrome Extension and also by Criterion
|
|
105
|
-
if (fg('enable_ufo_devtools_api_for_extra_events')) {
|
|
106
|
-
devToolObserver = globalThis.__ufo_devtool_onUfoPayload;
|
|
107
|
-
if (typeof devToolObserver === 'function') {
|
|
108
|
-
devToolObserver === null || devToolObserver === void 0 || devToolObserver(payload);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
84
|
instance.sendOperationalEvent(payload);
|
|
112
85
|
}
|
|
113
86
|
case 4:
|
|
@@ -10,7 +10,7 @@ export function sinkTerminalErrorHandler(fn) {
|
|
|
10
10
|
sinkHandlerFn = fn;
|
|
11
11
|
}
|
|
12
12
|
export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
13
|
-
var _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
13
|
+
var _error$message, _activeInteraction$uf, _activeInteraction$id, _activeInteraction$ty, _PreviousInteractionL, _PreviousInteractionL2, _PreviousInteractionL3, _UFORouteName$current;
|
|
14
14
|
if (additionalAttributes !== null && additionalAttributes !== void 0 && additionalAttributes.isClientNetworkError) {
|
|
15
15
|
// Exclude client network errors from being reported to UFO
|
|
16
16
|
return;
|
|
@@ -19,7 +19,7 @@ export function setTerminalError(error, additionalAttributes, labelStack) {
|
|
|
19
19
|
var currentTime = performance.now();
|
|
20
20
|
var errorData = _objectSpread({
|
|
21
21
|
errorType: error.name || 'Error',
|
|
22
|
-
errorMessage: error.message.slice(0, 100),
|
|
22
|
+
errorMessage: ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.slice(0, 100)) || 'Unknown error',
|
|
23
23
|
timestamp: currentTime
|
|
24
24
|
}, additionalAttributes);
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -95,9 +95,6 @@
|
|
|
95
95
|
"platform_ufo_detect_entrypoint_parent": {
|
|
96
96
|
"type": "boolean"
|
|
97
97
|
},
|
|
98
|
-
"enable_ufo_devtools_api_for_extra_events": {
|
|
99
|
-
"type": "boolean"
|
|
100
|
-
},
|
|
101
98
|
"ufo_payload_use_idle_callback": {
|
|
102
99
|
"type": "boolean"
|
|
103
100
|
},
|