tesla-inventory 3.4.73 → 3.4.74

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
@@ -2,7 +2,7 @@
2
2
  "name": "tesla-inventory",
3
3
  "description": "Retrieve real-time data from Tesla Inventory.",
4
4
  "homepage": "https://github.com/Kikobeats/tesla-inventory",
5
- "version": "3.4.73",
5
+ "version": "3.4.74",
6
6
  "main": "src/index.js",
7
7
  "exports": {
8
8
  ".": "./src/index.js",
package/src/index.js CHANGED
@@ -59,12 +59,14 @@ module.exports =
59
59
  let offset = 0
60
60
  let items = []
61
61
  let page
62
+ let pageIndex = -1
62
63
 
63
64
  do {
64
65
  page = await paginate(offset)
66
+ ++pageIndex
65
67
  items = uniqBy(items.concat(page.items), 'VIN')
66
68
  offset = items.length
67
- } while (page.items.length > 0)
69
+ } while ((pageIndex !== 0 || page.items.length >= ITEMS_PER_PAGE) && page.items.length > 0)
68
70
 
69
71
  debug.info({ inventory, ...opts, items: items.length, duration: duration() })
70
72
 
@@ -7,6 +7,7 @@
7
7
  "ICC00": 8100,
8
8
  "ICW00": 8100,
9
9
  "IN3BW": 4500,
10
+ "INB3W": 6000,
10
11
  "INBCW": 6000,
11
12
  "INBPC": 6000,
12
13
  "INPW0": 4500,
@@ -24,6 +25,7 @@
24
25
  "MT325": 92000,
25
26
  "MT328": 100000,
26
27
  "MT337": 69000,
28
+ "MTS05": 26000,
27
29
  "MTS13": 33000,
28
30
  "MTS14": 88000,
29
31
  "MTX04": 70000,
@@ -49,6 +51,7 @@
49
51
  "WS12": 16500,
50
52
  "WTSC": 8100,
51
53
  "WTSD": 8100,
54
+ "WTTC": 18100,
52
55
  "WTUT": 22200,
53
56
  "WX20": 20100,
54
57
  "WX21": 20100,
@@ -25,6 +25,7 @@
25
25
  "IPW0": 13000,
26
26
  "IPW1": 13000,
27
27
  "IPW2": 13000,
28
+ "IPW3": 13000,
28
29
  "IWC00": 28200,
29
30
  "IWW00": 28200,
30
31
  "MT10A": 88000,
@@ -49,6 +50,7 @@
49
50
  "MT340": 203990,
50
51
  "MT341": 190000,
51
52
  "MT351": 160000,
53
+ "MT352": 250000,
52
54
  "MT85A": 88000,
53
55
  "MT90A": 88000,
54
56
  "MTS03": 88000,