tesla-inventory 3.2.36 → 3.3.0-0

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.
Files changed (3) hide show
  1. package/LICENSE.md +0 -0
  2. package/package.json +17 -22
  3. package/src/index.js +4 -4
package/LICENSE.md CHANGED
File without changes
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.2.36",
5
+ "version": "3.3.0-0",
6
6
  "main": "src/index.js",
7
7
  "exports": {
8
8
  ".": "./src/index.js",
@@ -95,21 +95,6 @@
95
95
  "files": [
96
96
  "src"
97
97
  ],
98
- "scripts": {
99
- "clean": "rm -rf node_modules",
100
- "contributors": "(npx git-authors-cli && npx finepack --sort-ignore-object-at ava && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
101
- "lint": "standard-markdown README.md && standard",
102
- "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
103
- "prerelease": "npm run update:check && npm run contributors",
104
- "pretest": "npm run lint",
105
- "release": "standard-version -a",
106
- "release:github": "conventional-github-releaser -p angular",
107
- "release:tags": "git push --follow-tags origin HEAD:master",
108
- "test": "c8 ava",
109
- "update": "ncu -u",
110
- "update:check": "ncu -- --error-level 2",
111
- "update:dependencies": "ncu -u"
112
- },
113
98
  "license": "MIT",
114
99
  "ava": {
115
100
  "files": [
@@ -135,13 +120,23 @@
135
120
  "finepack --sort-ignore-object-at ava"
136
121
  ]
137
122
  },
138
- "pnpm": {
139
- "overrides": {
140
- "markdown-tables-to-json>@ts-stack/markdown": "1.4.0"
141
- }
142
- },
143
123
  "simple-git-hooks": {
144
124
  "commit-msg": "npx commitlint --edit",
145
125
  "pre-commit": "npx nano-staged"
126
+ },
127
+ "scripts": {
128
+ "clean": "rm -rf node_modules",
129
+ "contributors": "(npx git-authors-cli && npx finepack --sort-ignore-object-at ava && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
130
+ "lint": "standard-markdown README.md && standard",
131
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
132
+ "prerelease": "npm run update:check && npm run contributors",
133
+ "pretest": "npm run lint",
134
+ "release": "standard-version -a",
135
+ "release:github": "conventional-github-releaser -p angular",
136
+ "release:tags": "git push --follow-tags origin HEAD:master",
137
+ "test": "c8 ava",
138
+ "update": "ncu -u",
139
+ "update:check": "ncu -- --error-level 2",
140
+ "update:dependencies": "ncu -u"
146
141
  }
147
- }
142
+ }
package/src/index.js CHANGED
@@ -37,13 +37,13 @@ module.exports =
37
37
  query,
38
38
  count: ITEMS_PER_PAGE,
39
39
  offset,
40
- outsideOffset: 0,
41
- outsideSearch: false
40
+ outsideOffset: offset,
41
+ outsideSearch: true
42
42
  })
43
43
  }).toString()}`
44
44
  ).toString()
45
45
 
46
- debug({ url, ...query })
46
+ debug({ url, offset, ...query })
47
47
 
48
48
  const result = await pRetry(
49
49
  () =>
@@ -69,7 +69,7 @@ module.exports =
69
69
  items = uniqBy(items.concat(page.items), 'VIN')
70
70
  offset = items.length
71
71
  debug.info({ ...opts, items: items.length, duration: duration() })
72
- } while (page.items.length >= ITEMS_PER_PAGE)
72
+ } while (page.items.length > 0)
73
73
 
74
74
  return items.filter(item => item.Model === opts.model)
75
75
  }