@meterapp/vehicle-db 2.54.0 → 2.56.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 +32 -4
- package/dist/data.js +1 -1
- package/dist/identity-data.js +1 -1
- package/dist/identity.d.ts +43 -0
- package/dist/identity.js +45 -0
- package/dist/packages.d.ts +9 -0
- package/dist/packages.js +20 -0
- package/dist/resolve.js +16 -7
- package/package.json +9 -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,349 models** in **197,
|
|
9
|
+
The current snapshot spans **1990–2027** and includes **1,608 makes** and **42,349 models** in **197,234 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
|
|
|
@@ -223,6 +223,34 @@ An allow is recorded only when the manufacturer's own material shows the two as
|
|
|
223
223
|
|
|
224
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).
|
|
225
225
|
|
|
226
|
+
## Appearance packages
|
|
227
|
+
|
|
228
|
+
An appearance package is a factory option that keeps a vehicle's body but changes what its outside looks like (Lexus F SPORT, BMW M Sport, Hyundai N Line). A picture of the base car is not a picture of the package. `@meterapp/vehicle-db/packages` lists the packages offered on a catalog vehicle, so a consumer can ask by the row it already holds:
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
import { getAppearancePackages } from "@meterapp/vehicle-db/packages";
|
|
232
|
+
|
|
233
|
+
getAppearancePackages({ makeId: 515, modelId: 2184, year: 2021, market: "US" }); // Lexus IS
|
|
234
|
+
// [{ slug: "f-sport", name: "F SPORT",
|
|
235
|
+
// specificationId: "lexus:is:third:sedan:fsport:us:2021",
|
|
236
|
+
// visualIdentityId: "lexus:is:third:sedan:fsport:us:2021:exterior",
|
|
237
|
+
// exteriorDifferences: ["grille", "front_bumper", "rear_bumper", "side_skirts", "spoiler", "wheels", "badges", "exhaust"],
|
|
238
|
+
// years: [2021, 2022, 2023, 2024], markets: ["US"], yearBasis: "model-year", evidenceIds: [...] }]
|
|
239
|
+
getAppearancePackages({ makeId: 515, modelId: 2184, year: 2021 }); // []: the package is scoped to the US
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
- `slug` is the maker's package name in lower-case kebab form (`appearancePackageSlug("F SPORT")` is `f-sport`). It is unique per catalog vehicle and year (two packages may share it only in disjoint markets) and stable once published.
|
|
243
|
+
- A market-scoped package is returned only when `market` is given and in its scope; with no market, only packages without a market scope are returned.
|
|
244
|
+
- `exteriorDifferences` are the parts the package's evidence shows differ from the base car, from a fixed list (`EXTERIOR_DIFFERENCES`): `grille`, `front_bumper`, `rear_bumper`, `side_skirts`, `wheels`, `badges`, `mirrors`, `spoiler`, `exhaust`, `lamps`, `trim_color`. A part the source does not show is not listed, and options such as a handling package are left out.
|
|
245
|
+
|
|
246
|
+
In the graph a package is a `specification` identity whose `specification.trim` is the package name, under the derivative (body) it is offered on, with `years`, `markets` and `yearBasis` from its evidence; a `visual` identity under it carries `exteriorDifferences`; and catalog links with `relation: "offered-on"` name the catalog rows it is offered on. Those rows still describe the base car, so `resolveVehicle` ignores offered-on links and never walks from a base car down to a package: `2022 Lexus LX 600` resolves exactly as before, and `2021 Lexus IS F Sport` stays `UNRESOLVED_TOKENS` instead of becoming the IS F. A performance model with its own bodywork (IS F, M3) or a body (Touring, a cab) is a catalog model, never a package.
|
|
247
|
+
|
|
248
|
+
| Package | Rows offered on | Years | Market | Exterior differences | Evidence |
|
|
249
|
+
| --- | --- | --- | --- | --- | --- |
|
|
250
|
+
| Lexus IS F SPORT | IS, IS 350, IS 350 AWD, IS350; IS 300, IS 300 AWD, IS300 (2024) | 2021–2024 (model year) | US | grille, front and rear bumper, side skirts, spoiler, wheels, badges, exhaust | Lexus USA newsroom, 2021–2024 releases |
|
|
251
|
+
| Lexus LX 600 F SPORT | LX, LX 600 | 2022 (model year) | US | grille, wheels | Lexus 2022 LX 600 press release |
|
|
252
|
+
| Lexus LX 600 F SPORT | LX, LX 600 | 2026 (catalog year) | VN | grille, wheels | Lexus Vietnam LX 600 F SPORT page |
|
|
253
|
+
|
|
226
254
|
## API
|
|
227
255
|
|
|
228
256
|
### `getDataSources(): DataSource[]`
|
|
@@ -389,10 +417,10 @@ New coverage in 2.18.0 adds 112 sourced year/model/type records and four makes (
|
|
|
389
417
|
| Vehicle types | 7 |
|
|
390
418
|
| Makes | 1,608 |
|
|
391
419
|
| Models | 42,349 |
|
|
392
|
-
| Model years | 197,
|
|
420
|
+
| Model years | 197,234 |
|
|
393
421
|
| Make records (`getMakes()`) | 1,620 |
|
|
394
|
-
| Model records (distinct `modelId`) | 46,
|
|
395
|
-
| Model-year records (`getModels()`) | 218,
|
|
422
|
+
| Model records (distinct `modelId`) | 46,860 |
|
|
423
|
+
| Model-year records (`getModels()`) | 218,731 |
|
|
396
424
|
| Bundled TypeScript data | 7.60 MB |
|
|
397
425
|
|
|
398
426
|
## Refreshing and rebuilding
|