incyclist-services 1.7.128 → 1.7.129

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.
@@ -363,9 +363,13 @@ let RouteCard = (() => {
363
363
  videoMissing = this.isVideoMissing();
364
364
  }
365
365
  }
366
+ const details = this.getRouteData();
367
+ const detailsAvailable = (0, valid_1.valid)(details);
366
368
  if (descr?.hasVideo && !descr.videoUrl) {
367
- const details = this.getRouteData();
368
- if (details.video?.url) {
369
+ if (!detailsAvailable) {
370
+ canStart = false;
371
+ }
372
+ else if (details.video?.url) {
369
373
  canStart = false;
370
374
  videoChecking = true;
371
375
  videoMissing = this.isVideoMissing();
@@ -408,7 +412,7 @@ let RouteCard = (() => {
408
412
  const totalElevation = { value: C(this.route.description.elevation, 'elevation', { digits: 0 }), unit: uEl };
409
413
  const xScale = { value: C(1, 'distance'), unit: uDist };
410
414
  const yScale = { value: C(1, 'elevation'), unit: uEl };
411
- return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing,
415
+ return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing, detailsAvailable,
412
416
  xScale, yScale,
413
417
  updateStartPos: this.updateStartPos.bind(this),
414
418
  updateMarkers: this.updateMarkers.bind(this)
@@ -360,9 +360,13 @@ let RouteCard = (() => {
360
360
  videoMissing = this.isVideoMissing();
361
361
  }
362
362
  }
363
+ const details = this.getRouteData();
364
+ const detailsAvailable = valid(details);
363
365
  if (descr?.hasVideo && !descr.videoUrl) {
364
- const details = this.getRouteData();
365
- if (details.video?.url) {
366
+ if (!detailsAvailable) {
367
+ canStart = false;
368
+ }
369
+ else if (details.video?.url) {
366
370
  canStart = false;
367
371
  videoChecking = true;
368
372
  videoMissing = this.isVideoMissing();
@@ -405,7 +409,7 @@ let RouteCard = (() => {
405
409
  const totalElevation = { value: C(this.route.description.elevation, 'elevation', { digits: 0 }), unit: uEl };
406
410
  const xScale = { value: C(1, 'distance'), unit: uDist };
407
411
  const yScale = { value: C(1, 'elevation'), unit: uEl };
408
- return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing,
412
+ return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing, detailsAvailable,
409
413
  xScale, yScale,
410
414
  updateStartPos: this.updateStartPos.bind(this),
411
415
  updateMarkers: this.updateMarkers.bind(this)
@@ -80,6 +80,7 @@ export type RouteCardProps = {
80
80
  canStart?: boolean;
81
81
  videoMissing?: Promise<boolean>;
82
82
  videoChecking?: boolean;
83
+ detailsAvailable?: boolean;
83
84
  totalDistance: {
84
85
  value: number;
85
86
  unit: Unit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-services",
3
- "version": "1.7.128",
3
+ "version": "1.7.129",
4
4
  "peerDependencies": {
5
5
  "gd-eventlog": "^0.1.27"
6
6
  },
@@ -11,7 +11,7 @@
11
11
  "promise.any": "^2.0.6",
12
12
  "semver": "^7.7.4",
13
13
  "tcx-builder": "^1.1.1",
14
- "uuid": "^14.0.0",
14
+ "uuid": "^14.0.2",
15
15
  "xml2js": "^0.6.2"
16
16
  },
17
17
  "devDependencies": {
@@ -19,21 +19,21 @@
19
19
  "@serialport/binding-mock": "^10.2.2",
20
20
  "@serialport/bindings-interface": "^1.2.2",
21
21
  "@types/jest": "^30.0.0",
22
- "@types/node": "^26.1.2",
22
+ "@types/node": "^26.2.0",
23
23
  "@typescript-eslint/eslint-plugin": "^8.65.0",
24
24
  "@typescript-eslint/parser": "^8.67.0",
25
25
  "dotenv": "^17.4.2",
26
- "eslint": "^10.2.1",
26
+ "eslint": "^10.9.1",
27
27
  "formdata-node": "^6.0.3",
28
28
  "globals": "^17.9.0",
29
- "jest": "^30.3.0",
29
+ "jest": "^30.5.0",
30
30
  "jsdoc": "^4.0.5",
31
31
  "ts-jest": "^29.4.9",
32
32
  "typedoc": "^0.28.20",
33
33
  "typedoc-plugin-markdown": "^4.12.0",
34
34
  "typedoc-plugin-no-inherit": "^1.6.1",
35
35
  "typescript": "^5.9.3",
36
- "typescript-eslint": "^8.66.0"
36
+ "typescript-eslint": "^8.67.0"
37
37
  },
38
38
  "scripts": {
39
39
  "lint": "eslint . --quiet",
@@ -41,6 +41,7 @@
41
41
  "build": "npm run build:esm && npm run build:cjs",
42
42
  "build:esm": "tsc -p tsconfig.esm.json",
43
43
  "build:cjs": "tsc -p tsconfig.cjs.json",
44
+ "typecheck": "tsc --noEmit",
44
45
  "test:all": "npx jest",
45
46
  "test:e2e": "npx jest --coverage -c jest.e2e-config.cjs --coverageDirectory coverage.e2e",
46
47
  "test:unit": "npx jest --coverage -c jest.unit-config.cjs ",