onroute-policy-engine 2.3.0 → 2.3.1

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.
@@ -404,21 +404,22 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
404
404
  axleConfiguration.slice(1).forEach((a, i) => {
405
405
  const tireSize = a.tireSize;
406
406
  const numberOfTires = a.numberOfTires;
407
+ const axleUnitNum = i + 2;
407
408
  let maxWeight = 0;
408
409
  if (!tireSize) {
409
410
  policyCheckResults.push({
410
411
  id: policyId,
411
412
  result: enum_1.PolicyCheckResultType.Fail,
412
- message: `Axle unit ${i + 1} tire size is invalid`,
413
- axleUnit: i + 1,
413
+ message: `Axle unit ${axleUnitNum} tire size is invalid`,
414
+ axleUnit: axleUnitNum,
414
415
  });
415
416
  }
416
417
  else if (!numberOfTires) {
417
418
  policyCheckResults.push({
418
419
  id: policyId,
419
420
  result: enum_1.PolicyCheckResultType.Fail,
420
- message: `Axle unit ${i + 1} number of wheels is invalid`,
421
- axleUnit: i + 1,
421
+ message: `Axle unit ${axleUnitNum} number of wheels is invalid`,
422
+ axleUnit: axleUnitNum,
422
423
  });
423
424
  }
424
425
  else {
@@ -435,8 +436,8 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
435
436
  policyCheckResults.push({
436
437
  id: policyId,
437
438
  result: enum_1.PolicyCheckResultType.Fail,
438
- message: `Axle unit ${i + 1} weight exceeds maximum of ${maxWeight}kg for ${numberOfTires} ${steerTireSize}mm tires`,
439
- axleUnit: 1,
439
+ message: `Axle unit ${axleUnitNum} weight exceeds maximum of ${maxWeight}kg for ${numberOfTires} ${tireSize}mm tires`,
440
+ axleUnit: axleUnitNum,
440
441
  });
441
442
  }
442
443
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v2.3.0";
1
+ export declare const version = "v2.3.1";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = 'v2.3.0';
5
+ exports.version = 'v2.3.1';
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "testEnvironment": "node"
93
93
  },
94
- "version": "v2.3.0"
94
+ "version": "v2.3.1"
95
95
  }