fleetmap-reports 2.0.220 → 2.0.221

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.220",
3
+ "version": "2.0.221",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ const traccarConfig = {
9
9
  }
10
10
  }
11
11
  const axios = require('axios').create({ ...traccarConfig.baseOptions, baseURL: traccarConfig.basePath })
12
-
12
+ process.env.TRACCAR_API_REPORTS = 'https://ltqgfyvcklxzaonv7h4rlmghai0rszop.lambda-url.us-east-1.on.aws/api'
13
13
  const getReports = async (email, password) => {
14
14
  try {
15
15
  email = email || process.env.email
package/src/util/route.js CHANGED
@@ -71,4 +71,4 @@ function filterPosition (p) {
71
71
  exports.getIdleEvents = getIdleEvents
72
72
  exports.filterPositions = filterPositions
73
73
  exports.filterPosition = filterPosition
74
- exports.cleanPositon = cleanPosition
74
+ exports.cleanPosition = cleanPosition
@@ -73,7 +73,7 @@ async function getItems (traccar, u, _chunk, counter, devicesPerRequest, ignoreP
73
73
  totalDevices, currentDeviceCount, routeOnly, filter) {
74
74
  try {
75
75
  const x = routeOnly && !isClientSide()
76
- ? await streamJson(traccar, u.replace('allinone', 'route'), filter)
76
+ ? await streamJson(traccar, u.replace('allinone', 'route').replace('type=route', ''), filter)
77
77
  : await traccar.axios.get(u, {
78
78
  withCredentials: true
79
79
  }).then(r => {
@@ -1,6 +1,5 @@
1
1
  const { chain } = require('stream-chain')
2
2
  const { parser } = require('stream-json')
3
- const { pick } = require('stream-json/filters/Pick')
4
3
  const { streamArray } = require('stream-json/streamers/StreamArray')
5
4
  const { Readable } = require('stream')
6
5
  const { cleanPosition, filterPosition } = require('./route')