fleetmap-reports 2.0.239 → 2.0.241

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "2.0.239",
3
+ "version": "2.0.241",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ describe('zones', function () {
9
9
  userData.tripsBetweenZones = true
10
10
  const result = await report.zoneReport(
11
11
  new Date(Date.UTC(2023, 6, 24, 0, 0, 0, 0)),
12
- new Date(Date.UTC(2023, 6, 25, 23, 59, 59, 0)),
12
+ new Date(Date.UTC(2023, 7, 25, 23, 59, 59, 0)),
13
13
  userData)
14
14
  console.log(await report.zoneReportToPDF(userData, result[0]))
15
15
  }, 4000000)
@@ -105,7 +105,7 @@ async function createZoneReport (from, to, userData, traccar) {
105
105
  const reportRangeDays = (new Date(to).getTime() - new Date(from).getTime()) / (1000 * 60 * 60 * 24)
106
106
  const sliced = automaticReports.sliceArray(devices, sliceSize)
107
107
 
108
- const url = 'https://api.pinme.io/pinmeapi/process-report/zone-report-processing'
108
+ const url = 'https://rntba7aqifqx3iywrenb7pq6km0liwsr.lambda-url.us-east-1.on.aws/pinmeapi/process-report/zone-report-processing'
109
109
 
110
110
  const limit = simpleLimit(25)
111
111
  const promises = sliced.map((slice, i) => limit(async () => {
@@ -477,7 +477,7 @@ function analyseAlerts (alerts, deviceRoute, userData, from, to, device) {
477
477
  anyLastExit: a.anyLastExit,
478
478
  geofenceName: geofence.name,
479
479
  geofenceId: geofence.id,
480
- stopped: routeIn.filter(p => !p.attributes.ignition).length > 0,
480
+ stopped: routeIn.filter(p => !p.attributes?.ignition).length > 0,
481
481
  driverName: inData.position.driverName
482
482
  })
483
483
  zoneInData = zoneInData.filter(z => z.geofenceId !== a.geofenceId)