incyclist-services 1.0.18 → 1.0.20
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.
|
@@ -128,8 +128,8 @@ class DeviceConfigurationService extends events_1.default {
|
|
|
128
128
|
}
|
|
129
129
|
initFromLegacy(settings = {}) {
|
|
130
130
|
var _a, _b, _c, _d, _e;
|
|
131
|
-
this.logEvent({ message: 'converting settings.json' });
|
|
132
131
|
const { gearSelection, connections, modeSettings = {} } = settings;
|
|
132
|
+
this.logEvent({ message: 'converting settings.json', gearSelection });
|
|
133
133
|
const { bikes = [], hrms = [] } = gearSelection || {};
|
|
134
134
|
this.settings = { interfaces: [], devices: [], capabilities: [] };
|
|
135
135
|
const { interfaces, devices, capabilities } = this.settings;
|
|
@@ -152,7 +152,7 @@ class DeviceConfigurationService extends events_1.default {
|
|
|
152
152
|
adapter = incyclist_devices_1.AdapterFactory.create(bike);
|
|
153
153
|
}
|
|
154
154
|
catch (err) {
|
|
155
|
-
this.
|
|
155
|
+
this.logEvent({ message: 'error', fn: 'initFromLegacy#bike', error: err.message, bike, stack: err.stack });
|
|
156
156
|
}
|
|
157
157
|
if (!adapter) {
|
|
158
158
|
return;
|
|
@@ -208,7 +208,7 @@ class DeviceConfigurationService extends events_1.default {
|
|
|
208
208
|
adapter = incyclist_devices_1.AdapterFactory.create(hrm);
|
|
209
209
|
}
|
|
210
210
|
catch (err) {
|
|
211
|
-
this.
|
|
211
|
+
this.logEvent({ message: 'error', fn: 'initFromLegacy#hrm', error: err.message, hrm, stack: err.stack });
|
|
212
212
|
}
|
|
213
213
|
if (!adapter) {
|
|
214
214
|
return;
|
|
@@ -436,7 +436,6 @@ class DeviceRideService extends events_1.default {
|
|
|
436
436
|
}
|
|
437
437
|
startRide(_props) {
|
|
438
438
|
const adapters = this.getAdapterList();
|
|
439
|
-
console.log('~~~ startRide', _props, adapters, adapters.map(ai => ai.adapter.listenerCount('data')));
|
|
440
439
|
adapters === null || adapters === void 0 ? void 0 : adapters.forEach(ai => {
|
|
441
440
|
ai.adapter.removeAllListeners('data');
|
|
442
441
|
ai.adapter.on('data', this.deviceDataHandler);
|
|
@@ -502,7 +501,6 @@ class DeviceRideService extends events_1.default {
|
|
|
502
501
|
break;
|
|
503
502
|
}
|
|
504
503
|
});
|
|
505
|
-
console.log('~~~ emitting data', this.data, this.listenerCount('data'));
|
|
506
504
|
this.emit('data', this.data);
|
|
507
505
|
}
|
|
508
506
|
sendUpdate(request) {
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incyclist-services",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"gd-eventlog": "^0.1.24"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@types/jest": "^29.5.
|
|
9
|
-
"@types/node": "^20.5.
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^6.4.
|
|
11
|
-
"@typescript-eslint/parser": "^6.4.
|
|
12
|
-
"eslint": "^8.
|
|
8
|
+
"@types/jest": "^29.5.4",
|
|
9
|
+
"@types/node": "^20.5.7",
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
11
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
12
|
+
"eslint": "^8.48.0",
|
|
13
13
|
"eslint-config-react-app": "^7.0.1",
|
|
14
|
-
"jest": "^29.6.
|
|
14
|
+
"jest": "^29.6.4",
|
|
15
15
|
"jsdoc": "^4.0.2",
|
|
16
16
|
"ts-jest": "^29.1.1",
|
|
17
17
|
"typedoc": "^0.24.8",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lib": "./src"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"incyclist-devices": "^2.0.
|
|
40
|
+
"incyclist-devices": "^2.0.18",
|
|
41
41
|
"uuid": "^9.0.0"
|
|
42
42
|
}
|
|
43
43
|
}
|