@robotical/webapp-types 3.20.0 → 3.21.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/dist-types/package.json +151 -0
- package/dist-types/src/application/ApplicationManager/ApplicationManager.js +32 -25
- package/dist-types/src/application/RAFTs/Marty/CalibrationManager.js +3 -2
- package/dist-types/src/application/RAFTs/Marty/Marty.js +2 -1
- package/dist-types/src/application/RAFTs/Marty/MartyAddonsManager.js +5 -4
- package/dist-types/src/application/RAFTs/Marty/notifications-manager/RICNotificationsManager.js +6 -5
- package/dist-types/src/application/RAFTs/RaftWifiManager.js +7 -6
- package/dist-types/src/components/modals/LEDLightsOrQRVerificationModal/index.js +4 -1
- package/dist-types/src/i18n.js +4 -1
- package/dist-types/src/services/logger/Logger.js +3 -0
- package/dist-types/src/services/observability/Observability.d.ts +5 -0
- package/dist-types/src/services/observability/Observability.js +190 -0
- package/dist-types/src/services/observability/sanitizeTelemetry.d.ts +7 -0
- package/dist-types/src/services/observability/sanitizeTelemetry.js +136 -0
- package/dist-types/src/utils/feedback/submitFeedback.js +18 -22
- package/dist-types/src/utils/warranty-service/warranty-service-utils.js +9 -8
- package/dist-types/src/wrapper-app/WrapperAppManager.js +21 -20
- package/dist-types/src/wrapper-app/connectors/ConnectorFactory.js +2 -1
- package/dist-types/src/wrapper-app/utils/localStorageUtils.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "marty-web-app",
|
|
3
|
+
"version": "3.21.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
7
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
8
|
+
"@robdobsn/raftjs": "^2.1.8",
|
|
9
|
+
"@robotical/appv2-analytics-gatherer": "^1.2.17",
|
|
10
|
+
"@robotical/appv2-analytics-types": "^1.2.17",
|
|
11
|
+
"@robotical/appv2-warranty-service-lib": "^1.2.19",
|
|
12
|
+
"@robotical/codewheel": "^0.1.10",
|
|
13
|
+
"@robotical/cog-shooter-game": "^0.1.27",
|
|
14
|
+
"@robotical/jumping-game": "^0.1.29",
|
|
15
|
+
"@robotical/martyblocks": "^4.0.63",
|
|
16
|
+
"@robotical/martyblocksjr": "^4.2.10",
|
|
17
|
+
"@robotical/maze": "^0.1.21",
|
|
18
|
+
"@robotical/rc-sequencer": "^1.1.15",
|
|
19
|
+
"@robotical/ricjs-robotical-addons": "^1.2.8",
|
|
20
|
+
"@robotical/robofly-game": "^0.1.25",
|
|
21
|
+
"@robotical/roboticaljs": "^1.1.27",
|
|
22
|
+
"@robotical/sensors-dashboard": "^2.1.0",
|
|
23
|
+
"@robotical/skiing-game": "^0.1.24",
|
|
24
|
+
"@robotical/space-shooter-game": "^0.1.15",
|
|
25
|
+
"@sentry/react": "^8.55.2",
|
|
26
|
+
"@yudiel/react-qr-scanner": "2.5.1",
|
|
27
|
+
"aws-sdk": "^2.1394.0",
|
|
28
|
+
"bowser": "^2.11.0",
|
|
29
|
+
"core-js": "^3.6.5",
|
|
30
|
+
"gaa": "^0.0.0",
|
|
31
|
+
"http-server": "^14.1.0",
|
|
32
|
+
"i18next": "^22.4.14",
|
|
33
|
+
"local-devices": "^3.2.0",
|
|
34
|
+
"react": "^18.2.0",
|
|
35
|
+
"react-device-detect": "^2.2.3",
|
|
36
|
+
"react-dom": "^18.2.0",
|
|
37
|
+
"react-i18next": "^12.3.1",
|
|
38
|
+
"react-icons": "^4.8.0",
|
|
39
|
+
"react-rnd": "^10.4.1",
|
|
40
|
+
"react-router-dom": "^6.2.2",
|
|
41
|
+
"react-scripts": "^5.0.1",
|
|
42
|
+
"react-toastify": "^9.0.8",
|
|
43
|
+
"react-tooltip": "^4.2.21",
|
|
44
|
+
"semver": "^7.3.7",
|
|
45
|
+
"styled-components": "^5.3.3",
|
|
46
|
+
"typescript": "^4.6.2",
|
|
47
|
+
"web-vitals": "^2.1.4"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"copy-space-shooter-assets": "node copy-space-shooter-assets.js",
|
|
51
|
+
"copy-mb": "shx rm -rf ./public/MartyBlocks && shx mkdir -p ./public/MartyBlocks && shx cp -r ./node_modules/@robotical/martyblocks/dist/. ./public/MartyBlocks/",
|
|
52
|
+
"copy-mbjr": "shx rm -rf ./public/MartyBlocksJR && shx mkdir -p ./public/MartyBlocksJR && shx cp -r ./node_modules/@robotical/martyblocksjr/editions/free/src/. ./public/MartyBlocksJR/",
|
|
53
|
+
"clean-mb": "shx rm -r ./node_modules/@robotical/martyblocks",
|
|
54
|
+
"clean-mbjr": "shx rm -r ./node_modules/@robotical/martyblocksjr",
|
|
55
|
+
"transpile-public-legacy": "node scripts/transpile-public-legacy.js",
|
|
56
|
+
"prepare": "npm run copy-mb && npm run copy-mbjr && npm run copy-space-shooter-assets && NODE_OPTIONS=\"--max-old-space-size=8192\" npm run transpile-public-legacy",
|
|
57
|
+
"start": "react-scripts start",
|
|
58
|
+
"start-pwa": "http-server build -c-1 -p 3001 --directory build",
|
|
59
|
+
"build": "react-scripts build",
|
|
60
|
+
"build:prod": "GENERATE_SOURCEMAP=false react-scripts build && tsc --project tsconfig.prod.json",
|
|
61
|
+
"build:sentry": "GENERATE_SOURCEMAP=true react-scripts build && tsc --project tsconfig.prod.json",
|
|
62
|
+
"sentry:upload-sourcemaps": "sentry-cli sourcemaps inject build/static/js && sentry-cli sourcemaps upload --release \"marty-web-app@$npm_package_version\" --validate --strict --wait build/static/js",
|
|
63
|
+
"sentry:remove-sourcemaps": "find build/static/js -type f -name '*.map' -delete",
|
|
64
|
+
"build:types": "tsc --project tsconfig.types.json",
|
|
65
|
+
"test": "react-scripts test",
|
|
66
|
+
"eject": "react-scripts eject",
|
|
67
|
+
"test:e2e-legacy": "npm run prepare && node tests/e2e/legacy-bundles.e2e.js",
|
|
68
|
+
"test:e2e-martyblocks-connection": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js",
|
|
69
|
+
"test:e2e-martyblocks-connect": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=connect",
|
|
70
|
+
"test:e2e-martyblocks-load-autosave": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=load-autosave",
|
|
71
|
+
"test:e2e-martyblocks-decline-autosave": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=decline-autosave",
|
|
72
|
+
"test:e2e-martyblocks-local-save-load": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=local-save-load",
|
|
73
|
+
"test:e2e-martyblocks-cloud-save-load": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=cloud-save-load",
|
|
74
|
+
"test:e2e-martyblocks-portable-save-load": "npm run transpile-public-legacy && node tests/e2e/martyblocks-connection.e2e.js --scenario=portable-save-load",
|
|
75
|
+
"test:e2e-martyblocks-machine-learning": "npm run transpile-public-legacy && node tests/e2e/martyblocks-machine-learning.e2e.js",
|
|
76
|
+
"test:e2e-martyblocks-save-load": "npm run transpile-public-legacy && node tests/e2e/martyblocks-save-load.e2e.js",
|
|
77
|
+
"test:e2e-martyblocks-tutorials": "npm run transpile-public-legacy && node tests/e2e/martyblocks-tutorials.e2e.js",
|
|
78
|
+
"test:e2e-martyblocks-real-device-tools": "npm run transpile-public-legacy && node tests/e2e/martyblocks-real-device-tools.e2e.js",
|
|
79
|
+
"test:e2e-cog-connectivity-real-device": "node tests/e2e/cog-connectivity-real-device.e2e.js",
|
|
80
|
+
"test:e2e-martyblocks-audio-streaming": "npm run transpile-public-legacy && COG_E2E_SCENARIOS=marty-blocks-audio-streaming node tests/e2e/cog-connectivity-real-device.e2e.js",
|
|
81
|
+
"test:e2e-martyblocks-sensor-dashboard": "npm run transpile-public-legacy && node tests/e2e/martyblocks-sensor-dashboard.e2e.js",
|
|
82
|
+
"test:e2e-sensor-dashboard": "node tests/e2e/sensor-dashboard.e2e.js",
|
|
83
|
+
"test:e2e-accessibility": "node tests/e2e/accessibility-aa-audit.e2e.js",
|
|
84
|
+
"test:accessibility-review": "node tests/e2e/accessibility-review.e2e.js",
|
|
85
|
+
"test:accessibility-review:blocksjr": "npm run prepare && node tests/e2e/accessibility-review.e2e.js --batch=blocksjr",
|
|
86
|
+
"test:visual-review": "npm run prepare && node tests/e2e/visual-review.e2e.js",
|
|
87
|
+
"test:visual-review:non-bt-1-5": "node tests/e2e/visual-review.e2e.js --batch=non-bt-1-5",
|
|
88
|
+
"test:visual-review:non-bt-5-10": "npm run prepare && node tests/e2e/visual-review.e2e.js --batch=non-bt-5-10",
|
|
89
|
+
"test:visual-review:connection-flow": "npm run prepare && node tests/e2e/visual-review.e2e.js --batch=connection-flow",
|
|
90
|
+
"test:visual-review:connection-flow:devices:auto": "node tests/e2e/visual-review.e2e.js --batch=connection-flow --devices --devices-only --auto-connect --no-auto-verify",
|
|
91
|
+
"test:visual-review:blocksjr-sequence": "npm run prepare && node tests/e2e/visual-review.e2e.js --batch=blocksjr-sequence",
|
|
92
|
+
"test:visual-review:blocksjr-click-through": "node tests/e2e/visual-review.e2e.js --batch=blocksjr-click-through",
|
|
93
|
+
"test:visual-review:blocksjr-sequence:devices:auto": "npm run prepare && node tests/e2e/visual-review.e2e.js --batch=blocksjr-sequence --devices --devices-only --auto-connect --auto-verify",
|
|
94
|
+
"test:visual-review:blocks-sequence": "node tests/e2e/visual-review.e2e.js --batch=blocks-sequence",
|
|
95
|
+
"test:visual-review:blocks-sequence:devices:auto": "node tests/e2e/visual-review.e2e.js --batch=blocks-sequence --devices --devices-only --auto-connect --auto-verify",
|
|
96
|
+
"test:visual-review:blocks-all-screens": "node tests/e2e/visual-review.e2e.js --batch=blocks-all-screens",
|
|
97
|
+
"test:visual-review:blocks-all-screens:devices:auto": "node tests/e2e/visual-review.e2e.js --batch=blocks-all-screens --devices --devices-only --auto-connect --auto-verify",
|
|
98
|
+
"test:visual-review:bt-1-2:auto": "node tests/e2e/visual-review.e2e.js --batch=bt-1-2 --devices --devices-only --auto-connect --auto-verify",
|
|
99
|
+
"test:visual-review:bt-3-cog-games:auto": "node tests/e2e/visual-review.e2e.js --batch=bt-3-cog-games --devices --devices-only --auto-connect --auto-verify",
|
|
100
|
+
"test:visual-review:bt-4-marty-settings:auto": "node tests/e2e/visual-review.e2e.js --batch=bt-4-marty-settings --devices --devices-only --auto-connect --auto-verify",
|
|
101
|
+
"test:visual-review:devices": "npm run prepare && node tests/e2e/visual-review.e2e.js --devices",
|
|
102
|
+
"test:visual-review:devices:auto": "npm run prepare && node tests/e2e/visual-review.e2e.js --devices --auto-connect --auto-verify",
|
|
103
|
+
"test:visual-review:bluetooth:auto": "node tests/e2e/visual-review.e2e.js --devices-only --auto-connect --auto-verify",
|
|
104
|
+
"lint:a11y:wave1": "node scripts/accessibility/lint-a11y.mjs",
|
|
105
|
+
"lint:a11y": "node scripts/accessibility/lint-a11y-global.mjs",
|
|
106
|
+
"a11y:contrast": "node scripts/accessibility/contrast-check.mjs",
|
|
107
|
+
"a11y:structure": "node scripts/accessibility/non-semantic-check.mjs",
|
|
108
|
+
"a11y:ci": "npm run lint:a11y && npm run a11y:contrast && npm run a11y:structure"
|
|
109
|
+
},
|
|
110
|
+
"eslintConfig": {
|
|
111
|
+
"extends": [
|
|
112
|
+
"react-app",
|
|
113
|
+
"react-app/jest"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"browserslist": {
|
|
117
|
+
"production": [
|
|
118
|
+
">0.2%",
|
|
119
|
+
"not dead",
|
|
120
|
+
"not op_mini all"
|
|
121
|
+
],
|
|
122
|
+
"development": [
|
|
123
|
+
"last 1 chrome version",
|
|
124
|
+
"last 1 firefox version",
|
|
125
|
+
"last 1 safari version"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"devDependencies": {
|
|
129
|
+
"@babel/cli": "^7.25.7",
|
|
130
|
+
"@babel/core": "^7.25.7",
|
|
131
|
+
"@babel/preset-env": "^7.25.7",
|
|
132
|
+
"@sentry/cli": "2.58.6",
|
|
133
|
+
"@types/jest": "^27.4.1",
|
|
134
|
+
"@types/node": "^16.18.3",
|
|
135
|
+
"@types/react": "^18.0.25",
|
|
136
|
+
"@types/react-dom": "^18.0.9",
|
|
137
|
+
"@types/semver": "^7.3.9",
|
|
138
|
+
"@types/styled-components": "^5.1.24",
|
|
139
|
+
"@types/web-bluetooth": "^0.0.14",
|
|
140
|
+
"axe-core": "^4.11.2",
|
|
141
|
+
"csv-parse": "^5.6.0",
|
|
142
|
+
"fs-extra": "^11.3.0",
|
|
143
|
+
"puppeteer": "^24.42.0",
|
|
144
|
+
"react-native": "file:./stubs/react-native",
|
|
145
|
+
"react-native-ble-plx": "file:./stubs/react-native-ble-plx",
|
|
146
|
+
"shx": "^0.3.4"
|
|
147
|
+
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"react-refresh": "0.14.2"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -58,6 +58,7 @@ import { AppSentMessage } from "../../types/communication-between-apps/wrapper-c
|
|
|
58
58
|
import VerificationModalPhoneApp from "../../components/modals/VerificationModalPhoneApp";
|
|
59
59
|
import { RaftConnEvent, } from "@robdobsn/raftjs";
|
|
60
60
|
import Logger from "../../services/logger/Logger";
|
|
61
|
+
import { getSafeErrorMetadata } from "../../services/observability/sanitizeTelemetry";
|
|
61
62
|
import isPhoneApp from "../../utils/phone-app-communication/is-phone-app";
|
|
62
63
|
import DisconnectConfirmationModal from "../../components/modals/DisconnectConfirmation";
|
|
63
64
|
import Toaster from "../../utils/Toaster";
|
|
@@ -82,7 +83,7 @@ var UNSUPPORTED_WEB_BLUETOOTH_BROWSER_MESSAGE = "This browser can't connect to M
|
|
|
82
83
|
var publishMissedConnectionEvent = function (raftId) {
|
|
83
84
|
window.wrapperCommunicator
|
|
84
85
|
.sendMessageAndWait(AppSentMessage.GET_MISSED_CONN_EVENT, { raftId: raftId })
|
|
85
|
-
.catch(function (error) { return Logger.warn(SHOW_LOGS, TAG, "Failed to get missed connection event
|
|
86
|
+
.catch(function (error) { return Logger.warn(SHOW_LOGS, TAG, "Failed to get missed connection event", { raftId: raftId }, getSafeErrorMetadata(error)); });
|
|
86
87
|
};
|
|
87
88
|
var canUseWebBluetooth = function () {
|
|
88
89
|
var bluetooth = navigator.bluetooth;
|
|
@@ -210,7 +211,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
210
211
|
return [3 /*break*/, 4];
|
|
211
212
|
case 3:
|
|
212
213
|
error_1 = _e.sent();
|
|
213
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to determine phone app version for Wi-Fi
|
|
214
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to determine phone app version for Wi-Fi", getSafeErrorMetadata(error_1));
|
|
214
215
|
return [3 /*break*/, 4];
|
|
215
216
|
case 4:
|
|
216
217
|
if (isPhoneWrapperWifiSupported((_a = this.deviceInfo) === null || _a === void 0 ? void 0 : _a.appVersion)) {
|
|
@@ -258,7 +259,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
258
259
|
return [2 /*return*/, true];
|
|
259
260
|
}
|
|
260
261
|
else {
|
|
261
|
-
Logger.error(SHOW_LOGS, TAG, "Failed to update the name
|
|
262
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to update the RAFT name", { raftId: raftId });
|
|
262
263
|
this.toaster.error("Failed to update the name of the device");
|
|
263
264
|
}
|
|
264
265
|
_a.label = 2;
|
|
@@ -284,7 +285,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
284
285
|
case 2: return [2 /*return*/, (_a.sent()) || ""];
|
|
285
286
|
case 3:
|
|
286
287
|
error_2 = _a.sent();
|
|
287
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to read RAFT name
|
|
288
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to read the RAFT name", { raftId: raft.id }, getSafeErrorMetadata(error_2));
|
|
288
289
|
return [2 /*return*/, ""];
|
|
289
290
|
case 4: return [2 /*return*/];
|
|
290
291
|
}
|
|
@@ -349,7 +350,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
349
350
|
return [3 /*break*/, 5];
|
|
350
351
|
case 4:
|
|
351
352
|
error_3 = _a.sent();
|
|
352
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to publish QR verified event
|
|
353
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to publish the QR verified event", { raftId: raft.id }, getSafeErrorMetadata(error_3));
|
|
353
354
|
this.publishLocalVerifiedConnection(raft);
|
|
354
355
|
return [3 /*break*/, 5];
|
|
355
356
|
case 5: return [2 /*return*/];
|
|
@@ -368,7 +369,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
368
369
|
if ((raft === null || raft === void 0 ? void 0 : raft.type) === RaftTypeE.COG) {
|
|
369
370
|
return raft.wifiManager;
|
|
370
371
|
}
|
|
371
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
372
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not support Wi-Fi provisioning", { raftId: raftId });
|
|
372
373
|
return undefined;
|
|
373
374
|
};
|
|
374
375
|
ApplicationManager.prototype.pauseWifiConnection = function (raftId, pause) {
|
|
@@ -421,7 +422,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
421
422
|
if ((raft === null || raft === void 0 ? void 0 : raft.type) === RaftTypeE.MARTY) {
|
|
422
423
|
return raft.wifiManager;
|
|
423
424
|
}
|
|
424
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
425
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT is not a Marty", { raftId: raftId });
|
|
425
426
|
return undefined;
|
|
426
427
|
};
|
|
427
428
|
ApplicationManager.prototype.pauseWifiConnectionMarty = function (raftId, pause) {
|
|
@@ -480,7 +481,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
480
481
|
if (this.connectedRafts[martyId]) {
|
|
481
482
|
return [2 /*return*/, this.connectedRafts[martyId].calibrationManager.calibrate(cmd, joints)];
|
|
482
483
|
}
|
|
483
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
484
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
484
485
|
return [2 /*return*/];
|
|
485
486
|
});
|
|
486
487
|
});
|
|
@@ -491,7 +492,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
491
492
|
if (this.connectedRafts[raftId]) {
|
|
492
493
|
return [2 /*return*/, window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.MARTY_CALIBRATE_COLOUR_SENSOR, { raftId: raftId, stage: stage })];
|
|
493
494
|
}
|
|
494
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
495
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: raftId });
|
|
495
496
|
return [2 /*return*/];
|
|
496
497
|
});
|
|
497
498
|
});
|
|
@@ -502,7 +503,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
502
503
|
if (this.connectedRafts[raftId]) {
|
|
503
504
|
return [2 /*return*/, window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.MARTY_RESET_COLOUR_SENSOR_OFFSETS, { raftId: raftId })];
|
|
504
505
|
}
|
|
505
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
506
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: raftId });
|
|
506
507
|
return [2 /*return*/];
|
|
507
508
|
});
|
|
508
509
|
});
|
|
@@ -532,7 +533,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
532
533
|
if (this.connectedRafts[martyId]) {
|
|
533
534
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.getConnectedColourSensors()];
|
|
534
535
|
}
|
|
535
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
536
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
536
537
|
return [2 /*return*/];
|
|
537
538
|
});
|
|
538
539
|
});
|
|
@@ -543,7 +544,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
543
544
|
if (this.connectedRafts[martyId]) {
|
|
544
545
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.getHWElemList("RSAddOn")];
|
|
545
546
|
}
|
|
546
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
547
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
547
548
|
return [2 /*return*/];
|
|
548
549
|
});
|
|
549
550
|
});
|
|
@@ -554,7 +555,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
554
555
|
if (this.connectedRafts[martyId]) {
|
|
555
556
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.getAddOnConfigs()];
|
|
556
557
|
}
|
|
557
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
558
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
558
559
|
return [2 /*return*/];
|
|
559
560
|
});
|
|
560
561
|
});
|
|
@@ -565,7 +566,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
565
566
|
if (this.connectedRafts[martyId]) {
|
|
566
567
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.identifyAddOn(addOnSN)];
|
|
567
568
|
}
|
|
568
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
569
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
569
570
|
return [2 /*return*/];
|
|
570
571
|
});
|
|
571
572
|
});
|
|
@@ -576,7 +577,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
576
577
|
if (this.connectedRafts[martyId]) {
|
|
577
578
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.setAddOnConfig(addOnSN, config)];
|
|
578
579
|
}
|
|
579
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
580
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
580
581
|
return [2 /*return*/];
|
|
581
582
|
});
|
|
582
583
|
});
|
|
@@ -587,7 +588,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
587
588
|
if (this.connectedRafts[martyId]) {
|
|
588
589
|
return [2 /*return*/, this.connectedRafts[martyId].addonsManager.deleteAddOn(addOnSN)];
|
|
589
590
|
}
|
|
590
|
-
Logger.warn(SHOW_LOGS, TAG, "RAFT
|
|
591
|
+
Logger.warn(SHOW_LOGS, TAG, "RAFT does not exist or is not a Marty", { raftId: martyId });
|
|
591
592
|
return [2 /*return*/];
|
|
592
593
|
});
|
|
593
594
|
});
|
|
@@ -878,7 +879,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
878
879
|
case 7: return [3 /*break*/, 9];
|
|
879
880
|
case 8:
|
|
880
881
|
e_1 = _a.sent();
|
|
881
|
-
Logger.error(SHOW_LOGS, TAG, "Failed to start discovery
|
|
882
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to start discovery", getSafeErrorMetadata(e_1));
|
|
882
883
|
return [3 /*break*/, 9];
|
|
883
884
|
case 9: return [3 /*break*/, 18];
|
|
884
885
|
case 10:
|
|
@@ -907,7 +908,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
907
908
|
case 15: return [3 /*break*/, 17];
|
|
908
909
|
case 16:
|
|
909
910
|
e_2 = _a.sent();
|
|
910
|
-
Logger.error(SHOW_LOGS, TAG, "Failed to connect to new robot
|
|
911
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to connect to new robot", getSafeErrorMetadata(e_2));
|
|
911
912
|
if (isWifiConnection) {
|
|
912
913
|
this.toaster.error(i18n.t("connection.wifi_connect_failed", {
|
|
913
914
|
defaultValue: "Couldn't connect over Wi-Fi. Check the address, local-network permission, and that the device is online.",
|
|
@@ -958,7 +959,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
958
959
|
return [3 /*break*/, 6];
|
|
959
960
|
case 5:
|
|
960
961
|
e_3 = _a.sent();
|
|
961
|
-
Logger.error(SHOW_LOGS, TAG, "Failed to disconnect from robot
|
|
962
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to disconnect from robot", getSafeErrorMetadata(e_3));
|
|
962
963
|
return [3 /*break*/, 6];
|
|
963
964
|
case 6: return [2 /*return*/];
|
|
964
965
|
}
|
|
@@ -981,7 +982,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
981
982
|
raftId = (_a = selectResults.data) === null || _a === void 0 ? void 0 : _a.raftId;
|
|
982
983
|
raftType = (_b = selectResults.data) === null || _b === void 0 ? void 0 : _b.raftType;
|
|
983
984
|
if (!raftId || !raftType) {
|
|
984
|
-
throw new Error("RAFT ID or RAFT
|
|
985
|
+
throw new Error("RAFT ID or RAFT type is missing");
|
|
985
986
|
}
|
|
986
987
|
raft = void 0;
|
|
987
988
|
switch (raftType) {
|
|
@@ -1019,7 +1020,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
1019
1020
|
modalState.setModal(createElement(InUnpluggedModalContent), i18n.t("calibration_screen.colour_calibration.unplugged_modal_title"));
|
|
1020
1021
|
}
|
|
1021
1022
|
else {
|
|
1022
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to select RAFT
|
|
1023
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to select RAFT", { raftId: ricToConnectTo._id });
|
|
1023
1024
|
}
|
|
1024
1025
|
_e.label = 5;
|
|
1025
1026
|
case 5: return [2 /*return*/, null];
|
|
@@ -1436,7 +1437,10 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
1436
1437
|
*/
|
|
1437
1438
|
ApplicationManager.prototype.saveFileOnDevice = function (fileName, base64) {
|
|
1438
1439
|
if (!fileName || !base64) {
|
|
1439
|
-
return Logger.error(SHOW_LOGS, TAG, "fileName or base64 is missing
|
|
1440
|
+
return Logger.error(SHOW_LOGS, TAG, "fileName or base64 is missing", {
|
|
1441
|
+
hasFileName: Boolean(fileName),
|
|
1442
|
+
hasBase64: Boolean(base64),
|
|
1443
|
+
});
|
|
1440
1444
|
}
|
|
1441
1445
|
return window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.SAVE_FILE_ON_DEVICE, { fileName: fileName, base64: base64 });
|
|
1442
1446
|
};
|
|
@@ -1445,7 +1449,10 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
1445
1449
|
*/
|
|
1446
1450
|
ApplicationManager.prototype.saveFileOnDeviceLocalStorage = function (dirname, fileName, base64) {
|
|
1447
1451
|
if (!fileName || !base64) {
|
|
1448
|
-
return Logger.error(SHOW_LOGS, TAG, "fileName or base64 is missing
|
|
1452
|
+
return Logger.error(SHOW_LOGS, TAG, "fileName or base64 is missing", {
|
|
1453
|
+
hasFileName: Boolean(fileName),
|
|
1454
|
+
hasBase64: Boolean(base64),
|
|
1455
|
+
});
|
|
1449
1456
|
}
|
|
1450
1457
|
return window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.SAVE_FILE_ON_DEVICE_LOCAL_STORAGE, { dirname: dirname, fileName: fileName, base64: base64 });
|
|
1451
1458
|
};
|
|
@@ -1454,7 +1461,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
1454
1461
|
*/
|
|
1455
1462
|
ApplicationManager.prototype.loadFileFromDeviceLocalStorage = function (dirname, fileName) {
|
|
1456
1463
|
if (!fileName) {
|
|
1457
|
-
return Logger.error(SHOW_LOGS, TAG, "fileName is missing
|
|
1464
|
+
return Logger.error(SHOW_LOGS, TAG, "fileName is missing");
|
|
1458
1465
|
}
|
|
1459
1466
|
return window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.LOAD_FILE_FROM_DEVICE_LOCAL_STORAGE, { dirname: dirname, fileName: fileName });
|
|
1460
1467
|
};
|
|
@@ -1463,7 +1470,7 @@ var ApplicationManager = /** @class */ (function () {
|
|
|
1463
1470
|
*/
|
|
1464
1471
|
ApplicationManager.prototype.deleteFileFromDeviceLocalStorage = function (dirname, fileName) {
|
|
1465
1472
|
if (!fileName) {
|
|
1466
|
-
return Logger.error(SHOW_LOGS, TAG, "fileName is missing
|
|
1473
|
+
return Logger.error(SHOW_LOGS, TAG, "fileName is missing");
|
|
1467
1474
|
}
|
|
1468
1475
|
return window.wrapperCommunicator.sendMessageAndWait(AppSentMessage.DELETE_FILE_FROM_DEVICE_LOCAL_STORAGE, { dirname: dirname, fileName: fileName });
|
|
1469
1476
|
};
|
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { RaftOKFail } from "@robdobsn/raftjs";
|
|
38
38
|
import Logger from "../../../services/logger/Logger";
|
|
39
|
+
import { getSafeErrorMetadata } from "../../../services/observability/sanitizeTelemetry";
|
|
39
40
|
var SHOW_LOGS = true;
|
|
40
41
|
var TAG = "CalibrationManager";
|
|
41
42
|
var CalibrationManager = /** @class */ (function () {
|
|
@@ -109,7 +110,7 @@ var CalibrationManager = /** @class */ (function () {
|
|
|
109
110
|
return [3 /*break*/, 8];
|
|
110
111
|
case 7:
|
|
111
112
|
error_1 = _e.sent();
|
|
112
|
-
Logger.error(SHOW_LOGS, TAG, "
|
|
113
|
+
Logger.error(SHOW_LOGS, TAG, "Joint calibration failed", { joint: jnt }, error_1 instanceof Error ? error_1 : getSafeErrorMetadata(error_1));
|
|
113
114
|
return [3 /*break*/, 8];
|
|
114
115
|
case 8:
|
|
115
116
|
_i++;
|
|
@@ -141,7 +142,7 @@ var CalibrationManager = /** @class */ (function () {
|
|
|
141
142
|
return [3 /*break*/, 15];
|
|
142
143
|
case 14:
|
|
143
144
|
error_2 = _e.sent();
|
|
144
|
-
Logger.error(SHOW_LOGS, TAG, "enable
|
|
145
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to enable joint", { joint: jnt }, error_2 instanceof Error ? error_2 : getSafeErrorMetadata(error_2));
|
|
145
146
|
return [3 /*break*/, 15];
|
|
146
147
|
case 15:
|
|
147
148
|
_d++;
|
|
@@ -57,6 +57,7 @@ import { MartyWifiManager } from "./MartyWifiManager";
|
|
|
57
57
|
import MartyAddonsManager from "./MartyAddonsManager";
|
|
58
58
|
import CalibrationManager from "./CalibrationManager";
|
|
59
59
|
import Logger from "../../../services/logger/Logger";
|
|
60
|
+
import { getSafeErrorMetadata } from "../../../services/observability/sanitizeTelemetry";
|
|
60
61
|
import { AppSentMessage } from "../../../types/communication-between-apps/wrapper-communication";
|
|
61
62
|
import { RICNotificationsManager } from "./notifications-manager/RICNotificationsManager";
|
|
62
63
|
import PublishedDataAnalyser from "./PublishedDataAnalyser";
|
|
@@ -189,7 +190,7 @@ var Marty = /** @class */ (function (_super) {
|
|
|
189
190
|
return [2 /*return*/, !!response];
|
|
190
191
|
case 2:
|
|
191
192
|
error_1 = _a.sent();
|
|
192
|
-
Logger.error(SHOW_LOGS, TAG, "Error
|
|
193
|
+
Logger.error(SHOW_LOGS, TAG, "Atomic read operation failed", error_1 instanceof Error ? error_1 : getSafeErrorMetadata(error_1));
|
|
193
194
|
return [2 /*return*/, false];
|
|
194
195
|
case 3: return [2 /*return*/];
|
|
195
196
|
}
|
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { RICConfiguredAddOns, RICHWElemList_Str } from "@robotical/roboticaljs";
|
|
38
38
|
import Logger from "../../../services/logger/Logger";
|
|
39
|
+
import { getSafeErrorMetadata } from "../../../services/observability/sanitizeTelemetry";
|
|
39
40
|
import { RIC_WHOAMI_TYPE_CODE_ADDON_COLOUR } from "@robotical/ricjs-robotical-addons/dist/RICRoboticalAddOns";
|
|
40
41
|
var SHOW_LOGS = true;
|
|
41
42
|
var TAG = "MartyAddonsManager";
|
|
@@ -137,7 +138,7 @@ var MartyAddonsManager = /** @class */ (function () {
|
|
|
137
138
|
return [2 /*return*/, addOnList];
|
|
138
139
|
case 2:
|
|
139
140
|
error_2 = _a.sent();
|
|
140
|
-
Logger.error(SHOW_LOGS, TAG, "
|
|
141
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to get add-on configurations", error_2 instanceof Error ? error_2 : getSafeErrorMetadata(error_2));
|
|
141
142
|
return [2 /*return*/, new RICConfiguredAddOns()];
|
|
142
143
|
case 3: return [2 /*return*/];
|
|
143
144
|
}
|
|
@@ -157,7 +158,7 @@ var MartyAddonsManager = /** @class */ (function () {
|
|
|
157
158
|
return [2 /*return*/, true];
|
|
158
159
|
case 2:
|
|
159
160
|
error_3 = _a.sent();
|
|
160
|
-
Logger.warn(SHOW_LOGS, TAG, "
|
|
161
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to identify add-on", getSafeErrorMetadata(error_3));
|
|
161
162
|
return [3 /*break*/, 3];
|
|
162
163
|
case 3: return [2 /*return*/, false];
|
|
163
164
|
}
|
|
@@ -177,7 +178,7 @@ var MartyAddonsManager = /** @class */ (function () {
|
|
|
177
178
|
return [2 /*return*/, true];
|
|
178
179
|
case 2:
|
|
179
180
|
error_4 = _a.sent();
|
|
180
|
-
Logger.warn(SHOW_LOGS, TAG, "
|
|
181
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to set add-on configuration", getSafeErrorMetadata(error_4));
|
|
181
182
|
return [3 /*break*/, 3];
|
|
182
183
|
case 3: return [2 /*return*/, false];
|
|
183
184
|
}
|
|
@@ -197,7 +198,7 @@ var MartyAddonsManager = /** @class */ (function () {
|
|
|
197
198
|
return [2 /*return*/, true];
|
|
198
199
|
case 2:
|
|
199
200
|
error_5 = _a.sent();
|
|
200
|
-
Logger.warn(SHOW_LOGS, TAG, "
|
|
201
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to delete add-on", getSafeErrorMetadata(error_5));
|
|
201
202
|
return [3 /*break*/, 3];
|
|
202
203
|
case 3: return [2 /*return*/, false];
|
|
203
204
|
}
|
package/dist-types/src/application/RAFTs/Marty/notifications-manager/RICNotificationsManager.js
CHANGED
|
@@ -43,6 +43,7 @@ import { ReportedWarningsState } from "./ReportedWarningsState";
|
|
|
43
43
|
import { createTicket, isSerialNumberRegistered } from "../../../../utils/warranty-service/warranty-service-utils";
|
|
44
44
|
import { RICHWElemList_Str } from "@robotical/roboticaljs";
|
|
45
45
|
import Logger from "../../../../services/logger/Logger";
|
|
46
|
+
import { getSafeErrorMetadata } from "../../../../services/observability/sanitizeTelemetry";
|
|
46
47
|
var SHOW_LOGS = true;
|
|
47
48
|
var TAG = "RICNotificationsManager";
|
|
48
49
|
var USER_WARNING_MESSAGE = {
|
|
@@ -216,7 +217,7 @@ var RICNotificationsManager = /** @class */ (function () {
|
|
|
216
217
|
case 6: return [3 /*break*/, 10];
|
|
217
218
|
case 7:
|
|
218
219
|
err_1 = _a.sent();
|
|
219
|
-
Logger.error(SHOW_LOGS, TAG, "Error
|
|
220
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to get hardware status; retrying", err_1 instanceof Error ? err_1 : getSafeErrorMetadata(err_1));
|
|
220
221
|
if (!(i < maxRetries - 1)) return [3 /*break*/, 9];
|
|
221
222
|
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, delayMs); })];
|
|
222
223
|
case 8:
|
|
@@ -273,7 +274,7 @@ var RICNotificationsManager = /** @class */ (function () {
|
|
|
273
274
|
return [3 /*break*/, 4];
|
|
274
275
|
case 3:
|
|
275
276
|
err_2 = _a.sent();
|
|
276
|
-
Logger.error(SHOW_LOGS, TAG, "
|
|
277
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to get hardware version status", err_2 instanceof Error ? err_2 : getSafeErrorMetadata(err_2));
|
|
277
278
|
return [2 /*return*/, "Couldn't get versions info"];
|
|
278
279
|
case 4: return [2 /*return*/];
|
|
279
280
|
}
|
|
@@ -377,7 +378,7 @@ var RICNotificationsManager = /** @class */ (function () {
|
|
|
377
378
|
return [3 /*break*/, 8];
|
|
378
379
|
case 7:
|
|
379
380
|
err_3 = _d.sent();
|
|
380
|
-
Logger.error(SHOW_LOGS, TAG, err_3);
|
|
381
|
+
Logger.error(SHOW_LOGS, TAG, "Failed to process servo fault report", err_3 instanceof Error ? err_3 : getSafeErrorMetadata(err_3));
|
|
381
382
|
return [3 /*break*/, 8];
|
|
382
383
|
case 8:
|
|
383
384
|
_i++;
|
|
@@ -440,7 +441,7 @@ var RICNotificationsManager = /** @class */ (function () {
|
|
|
440
441
|
return [2 /*return*/];
|
|
441
442
|
}
|
|
442
443
|
});
|
|
443
|
-
}); }).catch(function (err) { return Logger.error(SHOW_LOGS, TAG, err); });
|
|
444
|
+
}); }).catch(function (err) { return Logger.error(SHOW_LOGS, TAG, "Failed to process element communications report", err instanceof Error ? err : getSafeErrorMetadata(err)); });
|
|
444
445
|
};
|
|
445
446
|
RICNotificationsManager.prototype.handleBusFailDet = function (report) {
|
|
446
447
|
var _this = this;
|
|
@@ -491,7 +492,7 @@ var RICNotificationsManager = /** @class */ (function () {
|
|
|
491
492
|
return [2 /*return*/];
|
|
492
493
|
}
|
|
493
494
|
});
|
|
494
|
-
}); }).catch(function (err) { return Logger.error(SHOW_LOGS, TAG, err); });
|
|
495
|
+
}); }).catch(function (err) { return Logger.error(SHOW_LOGS, TAG, "Failed to process bus communications report", err instanceof Error ? err : getSafeErrorMetadata(err)); });
|
|
495
496
|
};
|
|
496
497
|
return RICNotificationsManager;
|
|
497
498
|
}());
|
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { RaftWifiConnState, RaftWifiConnStatus, } from "@robdobsn/raftjs";
|
|
38
38
|
import Logger from "../../services/logger/Logger";
|
|
39
|
+
import { getSafeErrorMetadata } from "../../services/observability/sanitizeTelemetry";
|
|
39
40
|
var SHOW_LOGS = true;
|
|
40
41
|
var TAG = "RaftWifiManager";
|
|
41
42
|
var flagIsSet = function (value) {
|
|
@@ -92,13 +93,13 @@ var RaftWifiManager = /** @class */ (function () {
|
|
|
92
93
|
case 2:
|
|
93
94
|
response = _a.sent();
|
|
94
95
|
if (!responseSucceeded(response)) {
|
|
95
|
-
Logger.warn(SHOW_LOGS, TAG, "NetMan rejected Wi-Fi credentials
|
|
96
|
+
Logger.warn(SHOW_LOGS, TAG, "NetMan rejected Wi-Fi credentials", { ssid: ssid });
|
|
96
97
|
return [2 /*return*/, false];
|
|
97
98
|
}
|
|
98
99
|
return [3 /*break*/, 4];
|
|
99
100
|
case 3:
|
|
100
101
|
error_1 = _a.sent();
|
|
101
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to send Wi-Fi credentials
|
|
102
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to send Wi-Fi credentials", getSafeErrorMetadata(error_1));
|
|
102
103
|
return [2 /*return*/, false];
|
|
103
104
|
case 4:
|
|
104
105
|
timeoutCount = 0;
|
|
@@ -150,7 +151,7 @@ var RaftWifiManager = /** @class */ (function () {
|
|
|
150
151
|
return [2 /*return*/, true];
|
|
151
152
|
case 5:
|
|
152
153
|
error_2 = _a.sent();
|
|
153
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to clear Wi-Fi credentials
|
|
154
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to clear Wi-Fi credentials", getSafeErrorMetadata(error_2));
|
|
154
155
|
return [2 /*return*/, false];
|
|
155
156
|
case 6: return [2 /*return*/];
|
|
156
157
|
}
|
|
@@ -221,7 +222,7 @@ var RaftWifiManager = /** @class */ (function () {
|
|
|
221
222
|
this._wifiConnStatus.isPaused === pause];
|
|
222
223
|
case 4:
|
|
223
224
|
error_4 = _a.sent();
|
|
224
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to
|
|
225
|
+
Logger.warn(SHOW_LOGS, TAG, pause ? "Failed to pause Wi-Fi" : "Failed to resume Wi-Fi", getSafeErrorMetadata(error_4));
|
|
225
226
|
return [2 /*return*/, false];
|
|
226
227
|
case 5: return [2 /*return*/];
|
|
227
228
|
}
|
|
@@ -241,7 +242,7 @@ var RaftWifiManager = /** @class */ (function () {
|
|
|
241
242
|
return [2 /*return*/, response];
|
|
242
243
|
case 2:
|
|
243
244
|
error_5 = _a.sent();
|
|
244
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to get Wi-Fi scan results
|
|
245
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to get Wi-Fi scan results", getSafeErrorMetadata(error_5));
|
|
245
246
|
return [2 /*return*/, false];
|
|
246
247
|
case 3: return [2 /*return*/];
|
|
247
248
|
}
|
|
@@ -261,7 +262,7 @@ var RaftWifiManager = /** @class */ (function () {
|
|
|
261
262
|
return [2 /*return*/, responseSucceeded(response)];
|
|
262
263
|
case 2:
|
|
263
264
|
error_6 = _a.sent();
|
|
264
|
-
Logger.warn(SHOW_LOGS, TAG, "Failed to start Wi-Fi scan
|
|
265
|
+
Logger.warn(SHOW_LOGS, TAG, "Failed to start Wi-Fi scan", getSafeErrorMetadata(error_6));
|
|
265
266
|
return [2 /*return*/, false];
|
|
266
267
|
case 3: return [2 /*return*/];
|
|
267
268
|
}
|
|
@@ -58,6 +58,9 @@ import { centerText } from '@yudiel/react-qr-scanner';
|
|
|
58
58
|
import { ConnManager } from "@robotical/roboticaljs";
|
|
59
59
|
import { useTranslation } from "react-i18next";
|
|
60
60
|
import SwitchableCameraScanner from "../../disposables/SwitchableCameraScanner";
|
|
61
|
+
import Logger from "../../../services/logger/Logger";
|
|
62
|
+
var SHOW_LOGS = true;
|
|
63
|
+
var TAG = "LEDLightsOrQRVerificationModal";
|
|
61
64
|
export default function LEDLightsOrQRVerificationModal(_a) {
|
|
62
65
|
var _this = this;
|
|
63
66
|
var targetRaftType = _a.targetRaftType, _b = _a.allowSwitchToMarty, allowSwitchToMarty = _b === void 0 ? false : _b;
|
|
@@ -139,7 +142,7 @@ function QRContent(_a) {
|
|
|
139
142
|
});
|
|
140
143
|
}); };
|
|
141
144
|
var isWebapp = ((_b = window.applicationManager.deviceInfo) === null || _b === void 0 ? void 0 : _b.manufacturer) === "Webapp";
|
|
142
|
-
return (_jsx("div", __assign({ className: styles.QRcontainer }, { children: _jsx("div", __assign({ className: styles.QRscannerContainer }, { children: _jsx(SwitchableCameraScanner, { styles: { container: { transform: isWebapp ? 'scaleX(-1)' : 'none' } }, onError: function (err) { return
|
|
145
|
+
return (_jsx("div", __assign({ className: styles.QRcontainer }, { children: _jsx("div", __assign({ className: styles.QRscannerContainer }, { children: _jsx(SwitchableCameraScanner, { styles: { container: { transform: isWebapp ? 'scaleX(-1)' : 'none' } }, onError: function (err) { return Logger.error(SHOW_LOGS, TAG, err); }, formats: [
|
|
143
146
|
"qr_code",
|
|
144
147
|
"micro_qr_code",
|
|
145
148
|
"rm_qr_code",
|
package/dist-types/src/i18n.js
CHANGED
|
@@ -9,6 +9,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
};
|
|
10
10
|
import i18n from 'i18next';
|
|
11
11
|
import { initReactI18next } from 'react-i18next';
|
|
12
|
+
import Logger from './services/logger/Logger';
|
|
13
|
+
var SHOW_LOGS = true;
|
|
14
|
+
var TAG = "i18n";
|
|
12
15
|
var resources = {
|
|
13
16
|
"en": {
|
|
14
17
|
"translation": {
|
|
@@ -5795,7 +5798,7 @@ var warnMissingTranslation = function (reportedLanguages, namespace, key, _fallb
|
|
|
5795
5798
|
return;
|
|
5796
5799
|
}
|
|
5797
5800
|
warnedMissingKeys.add(cacheKey);
|
|
5798
|
-
|
|
5801
|
+
Logger.warn(SHOW_LOGS, TAG, "Missing translation for \"".concat(namespace, ":").concat(key, "\" (languages: ").concat(languageLabel, ")"));
|
|
5799
5802
|
};
|
|
5800
5803
|
var warnOnMissingTranslations = true;
|
|
5801
5804
|
i18n
|