incyclist-services 1.4.20 → 1.4.22
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.
|
@@ -32,7 +32,7 @@ export declare class RoutesDbLoader extends DBLoader<RouteInfoDBEntry> {
|
|
|
32
32
|
protected loadDescriptions(): Promise<Array<RouteInfoDBEntry>>;
|
|
33
33
|
protected removeDuplicates(routes: Array<RouteInfoDBEntry>): any[];
|
|
34
34
|
protected verifyImportDate(routes: Array<RouteInfoDBEntry>): void;
|
|
35
|
-
protected loadDetailRecord(target: Route | RouteInfo): Promise<RouteApiDetail>;
|
|
35
|
+
protected loadDetailRecord(target: Route | RouteInfo, log?: boolean): Promise<RouteApiDetail>;
|
|
36
36
|
private validateDetails;
|
|
37
37
|
private validateDescription;
|
|
38
38
|
protected loadDetails(route: Route, alreadyAdded?: boolean): Promise<void>;
|
|
@@ -105,7 +105,7 @@ let RoutesDbLoader = (() => {
|
|
|
105
105
|
this.writeDetails(route);
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
|
-
const details = yield this.loadDetailRecord(route);
|
|
108
|
+
const details = yield this.loadDetailRecord(route, false);
|
|
109
109
|
if (!details || enforcedWriteDetails)
|
|
110
110
|
this.writeDetails(route);
|
|
111
111
|
}
|
|
@@ -233,8 +233,8 @@ let RoutesDbLoader = (() => {
|
|
|
233
233
|
this.write();
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
loadDetailRecord(
|
|
237
|
-
return __awaiter(this,
|
|
236
|
+
loadDetailRecord(target_1) {
|
|
237
|
+
return __awaiter(this, arguments, void 0, function* (target, log = true) {
|
|
238
238
|
const description = (target.description || target);
|
|
239
239
|
const repo = (description === null || description === void 0 ? void 0 : description.hasVideo) ? this.getVideosRepo() : this.getRoutesRepo();
|
|
240
240
|
const loadFromRepo = (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, logErrors = true) {
|
|
@@ -252,8 +252,7 @@ let RoutesDbLoader = (() => {
|
|
|
252
252
|
return res;
|
|
253
253
|
}
|
|
254
254
|
catch (err) {
|
|
255
|
-
|
|
256
|
-
this.logger.logEvent({ message: 'could not load route details', id, title: description === null || description === void 0 ? void 0 : description.title, reason: err.message, stack: err.stack });
|
|
255
|
+
this.logger.logEvent({ message: 'could not load route details', id, title: description === null || description === void 0 ? void 0 : description.title, reason: err.message, stack: err.stack });
|
|
257
256
|
return null;
|
|
258
257
|
}
|
|
259
258
|
});
|
|
@@ -262,7 +261,7 @@ let RoutesDbLoader = (() => {
|
|
|
262
261
|
details = yield loadFromRepo(description.legacyId, false);
|
|
263
262
|
}
|
|
264
263
|
if (!details) {
|
|
265
|
-
details = yield loadFromRepo(description.id);
|
|
264
|
+
details = yield loadFromRepo(description.id, log);
|
|
266
265
|
}
|
|
267
266
|
if (!details) {
|
|
268
267
|
return;
|
|
@@ -168,11 +168,11 @@ let RouteListService = (() => {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
close() {
|
|
171
|
-
var _a;
|
|
171
|
+
var _a, _b;
|
|
172
172
|
try {
|
|
173
173
|
this.logEvent({ message: 'close route list' });
|
|
174
174
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.emit('stopped');
|
|
175
|
-
this.observer.reset();
|
|
175
|
+
(_b = this.observer) === null || _b === void 0 ? void 0 : _b.reset();
|
|
176
176
|
this.resetCards();
|
|
177
177
|
}
|
|
178
178
|
catch (err) {
|
|
@@ -719,8 +719,7 @@ let RouteListService = (() => {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
})
|
|
722
|
-
.catch(
|
|
723
|
-
this.logEvent({ message: 'could not load route details', reason: err.message });
|
|
722
|
+
.catch(() => {
|
|
724
723
|
});
|
|
725
724
|
};
|
|
726
725
|
cards.forEach(card => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incyclist-services",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.22",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"gd-eventlog": "^0.1.26"
|
|
6
6
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"axios": "^1.7.7",
|
|
45
|
-
"incyclist-devices": "^2.3.
|
|
45
|
+
"incyclist-devices": "^2.3.14",
|
|
46
46
|
"promise.any": "^2.0.6",
|
|
47
47
|
"semver": "^7.6.3",
|
|
48
48
|
"tcx-builder": "^1.1.1",
|