@meterapp/vehicle-db 2.52.0 → 2.54.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.
- package/README.md +21 -7
- package/dist/data.js +1 -1
- package/dist/identity-data.js +1 -1
- package/dist/resolve.d.ts +3 -1
- package/dist/resolve.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, the European Union's new car and van registration register, the daily-updated Dutch vehicle register, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, Brazil's national vehicle register, an Indian manufacturer catalog, the Brazil-exclusive Hyundai HB20 family, recent U.S. model configurations from FuelEconomy.gov, and reviewed manufacturer body derivatives and Saudi model-year evidence into one small, zero-dependency API. It never makes runtime network requests.
|
|
8
8
|
|
|
9
|
-
The current snapshot spans **1990–2027** and includes **1,608 makes** and **42,
|
|
9
|
+
The current snapshot spans **1990–2027** and includes **1,608 makes** and **42,349 models** in **197,231 model years**, from **23 data sources**. Those are distinct vehicles by name, with case, accents and punctuation normalized while preserving the distinct 03+ badge, which is how the [Car Image API](https://carimage.dev/cars?ref=catalog) counts and lists them. The package's own records number more (1,620 makes from `getMakes()`), because sources spell some makes and models more than one way (`MOTO GUZZI` and `MOTO-GUZZI`) and a few makes have no model in these years; see [Snapshot stats](#snapshot-stats).
|
|
10
10
|
|
|
11
11
|
The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. The European source adds continental models from Dacia, Cupra, DS, Lynk & Co, Alpine, and the Chinese brands entering Europe such as BYD, MG, Omoda, Xpeng, and Nio, as sold in the EU rather than the UK or U.S. The Dutch register keeps that coverage current: vehicles first registered this year appear within days, so 2026 models such as the BYD Atto 2 and Renault 5 E-Tech are already listed. The Asia-Pacific sources add Japanese domestic and kei models, Chinese EVs, Indian and Korean vehicles, Southeast Asian makes such as Perodua and Proton, and additional motorcycles and commercial vehicles. The Brazilian register adds the cars and motorcycles that fill Brazil's roads but are rarely sold elsewhere, such as the Fiat Argo, Mobi and Toro, the Volkswagen Gol and Saveiro, the Renault Kwid, and the Honda Biz and Pop.
|
|
12
12
|
|
|
@@ -203,9 +203,23 @@ resolveVehicle("2012 Nissan Navara D22", au); // MATCHED
|
|
|
203
203
|
|
|
204
204
|
The Australian Ford Ranger (PX, its 2015 front, Next-Generation), Toyota HiLux (seventh to ninth generation and their fronts), Nissan Navara (D22, D40, D23 and its 2021 front, the 2026 truck) and Toyota LandCruiser 70 (2007, 2009, the 2016 single cab-chassis body, 2023) are dated this way from Ford, Toyota and Nissan Australia sources, as calendar years on sale (`catalog-year`), never converted to model years. A changeover year keeps every shape sold in it. At `catalog` depth the answer is the verified row, with the appearances in scope in `visualIdentityIds`. Years, markets and facelifts without a manufacturer source stay unresolved.
|
|
205
205
|
|
|
206
|
-
`visualCompatibility` in the graph now records pairs that must not share an appearance although their names suggest it (the Australian PX Ranger and the North American Ranger of 2019-2023, Navara D22 and D40, a generation and its successor in the changeover year). `evaluateVisualCompatibility()` reads them; they are directional and deny wins.
|
|
206
|
+
`visualCompatibility` in the graph now records pairs that must not share an appearance although their names suggest it (the Australian PX Ranger and the North American Ranger of 2019-2023, Navara D22 and D40, a generation and its successor in the changeover year). `evaluateVisualCompatibility()` reads them; they are directional and deny wins. The same is recorded for look-alikes of two makes or two cars under one name: the Toyota bZ4X and the Subaru Solterra as launched (jointly developed, different fronts) and the Mercedes-Benz GLC of 2022 against the electric GLC with EQ Technology.
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
**Twins.** The first `allow` rules name pairs that are one exterior shape sold under two names, so that one image can stand for both: the Opel and Vauxhall Corsa with the 2023 front (2024-2025), Astra as revealed in 2021 (2022-2025) and Mokka as launched in 2021 (2021-2024), Opel dated for Germany and Vauxhall for the United Kingdom, as calendar years on sale.
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
import { getVisualCompatibilityRules } from "@meterapp/vehicle-db/resolve";
|
|
212
|
+
import { evaluateVisualCompatibility } from "@meterapp/vehicle-db/identity";
|
|
213
|
+
const rules = getVisualCompatibilityRules(); // each with id, decision, rationale, evidenceIds and scope
|
|
214
|
+
evaluateVisualCompatibility(rules, "opel:corsa:2019:facelift-2023", "vauxhall:corsa:2019:facelift-2023", { year: 2024, market: "DE", yearBasis: "catalog-year" }); // "allow"
|
|
215
|
+
evaluateVisualCompatibility(rules, "vauxhall:corsa:2019:facelift-2023", "opel:corsa:2019:facelift-2023", { year: 2024, market: "GB", yearBasis: "catalog-year" }); // "allow": the other direction is its own rule
|
|
216
|
+
evaluateVisualCompatibility(rules, "opel:corsa:2019:facelift-2023", "vauxhall:corsa:2019:facelift-2023", { year: 2023, market: "DE", yearBasis: "catalog-year" }); // "unknown": outside the dated years
|
|
217
|
+
evaluateVisualCompatibility(rules, "toyota:bz4x:first:original", "subaru:solterra:first:original", { year: 2024, market: "US", yearBasis: "catalog-year" }); // "deny"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
An allow is recorded only when the manufacturer's own material shows the two as one car and the only visible difference is the brand emblem and lettering. It says so in its `rationale`: the shape is shared, the emblem is not, so an application that draws badges redraws or checks the views where the emblem shows. Steering side and number plates follow the market and are outside the rule. An allow is scoped by `years`, `markets` (the requesting side's) and `yearBasis`, is recorded once per direction, and is never chained: Opel Corsa → Vauxhall Corsa says nothing about a third car. Pairs whose fronts, lamps, grilles or bumpers differ get a deny or no rule; a pair without a rule is `unknown`, never allowed.
|
|
221
|
+
|
|
222
|
+
`@meterapp/vehicle-db/identity` exports the graph types and `evaluateVisualCompatibility`; `getVisualCompatibilityRules()` from `@meterapp/vehicle-db/resolve` returns the bundled rules. The latter evaluates direct, directional, scoped allow/deny rules: missing rules return `unknown`, an applicable deny wins, and approvals are never reversed or chained. It is a portable fact evaluator, not an asset database. Applications own reviewed asset bindings and final sharing policy. The bundled allow rules are facts about shapes, not approvals of any image.
|
|
209
223
|
|
|
210
224
|
Raw configuration and homologation evidence stays in build-time sidecars under `data/evidence/`, outside the npm bundle. See [the implementation plan](docs/catalog-update-plan.md) and [source investigation](docs/source-investigation.md).
|
|
211
225
|
|
|
@@ -374,11 +388,11 @@ New coverage in 2.18.0 adds 112 sourced year/model/type records and four makes (
|
|
|
374
388
|
| Sources | 23 |
|
|
375
389
|
| Vehicle types | 7 |
|
|
376
390
|
| Makes | 1,608 |
|
|
377
|
-
| Models | 42,
|
|
378
|
-
| Model years | 197,
|
|
391
|
+
| Models | 42,349 |
|
|
392
|
+
| Model years | 197,231 |
|
|
379
393
|
| Make records (`getMakes()`) | 1,620 |
|
|
380
|
-
| Model records (distinct `modelId`) | 46,
|
|
381
|
-
| Model-year records (`getModels()`) | 218,
|
|
394
|
+
| Model records (distinct `modelId`) | 46,859 |
|
|
395
|
+
| Model-year records (`getModels()`) | 218,728 |
|
|
382
396
|
| Bundled TypeScript data | 7.60 MB |
|
|
383
397
|
|
|
384
398
|
## Refreshing and rebuilding
|