@meterapp/vehicle-db 2.51.0 → 2.52.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 +19 -1
- package/dist/data.d.ts +5 -0
- package/dist/data.js +1 -1
- package/dist/identity-data.js +1 -1
- package/dist/resolve.d.ts +5 -0
- package/dist/resolve.js +62 -12
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -187,6 +187,24 @@ Queries use an optional leading year, followed by make and full model phrase. Re
|
|
|
187
187
|
|
|
188
188
|
The graph uses **make → line → generation → derivative → specification**, with visual identities for bodies and appearance revisions. BMW Coupe, Convertible and Gran Coupe remain distinct; the 2014 generation and 2024/2025 appearance revisions do not share images implicitly. Aliases such as Prado and the reviewed Macan misspelling resolve only the line, not a generation or render. The maker's name `GLC with EQ Technology` resolves the electric X540 line for model year 2026 (European register row) or 2027 (US), never the combustion X254 GLC. A facelift that changes every body of a generation is a visual identity directly under that generation: the Audi A4, A4 Avant, A5 (with its Avant, Sportback, Coupe and Cabriolet), Q3, Q3 Sportback, Q5 and Q5 Sportback, the Skoda Kodiaq, the Renault Clio and the Peugeot 208, 2008, 308, 3008 and 5008 carry manufacturer-dated generations and facelifts scoped as `catalog-year` in the markets of the linked registers, so `2026 Audi Q3` resolves to the third generation at generation depth, a changeover year that sold two generations stays `AMBIGUOUS`, and a year before the dated generations stays `GENERATION_UNRESOLVED`. The same layer dates the electric models of a Car Image API customer list (Tesla, Hyundai, Kia, Genesis, BMW, Mercedes-Benz, Porsche, Polestar, Volvo, Rivian, Lucid and others), with facelifts such as the 2016 and 2021 Model S fronts, Model Y Juniper and the 2025 IONIQ 5; each line links the rows of its most common vehicle type.
|
|
189
189
|
|
|
190
|
+
**Markets.** A flat catalog row carries no market of its own, so a request with `market` used to answer `SCOPE_UNVERIFIED` for every row outside the graph. Two kinds of evidence now verify a row for a market:
|
|
191
|
+
|
|
192
|
+
- **Reviewed rows.** The rows of `manufacturer-reviewed` and `manufacturer-reviewed-catalog` ship the market they were reviewed for (a 4 KB mask in the bundle; the URLs and notes stay in `data/evidence/`). `resolveVehicle("2012 Nissan Navara D40", { market: "AU" })` is `MATCHED`; the same row with `market: "US"` stays `SCOPE_UNVERIFIED`.
|
|
193
|
+
- **Market-scoped appearances.** Where a market sold a different shape under a name other markets share, the graph holds `generation` and `visual` identities scoped by `markets`, `years` and `yearBasis` and linked to the catalog rows they describe. Their line carries no name, so they never capture the name: without `market`, `2019 Ford Ranger` resolves exactly as before. With a market, a row answers through the identities linked to it whose whole scope fits the request.
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
const au = { market: "AU", yearBasis: "catalog-year", depth: "visual" } as const;
|
|
197
|
+
resolveVehicle("2019 Ford Ranger", au); // MATCHED ford:ranger:px:facelift-2015
|
|
198
|
+
resolveVehicle("2022 Ford Ranger", au); // AMBIGUOUS: the PX and the Next-Generation Ranger were both sold
|
|
199
|
+
resolveVehicle("2021 Ford Ranger", { market: "US", depth: "visual" }); // MATCHED ford:ranger:north-america-2019:original
|
|
200
|
+
resolveVehicle("2012 Nissan Navara", au); // AMBIGUOUS: D22 and D40 were sold side by side
|
|
201
|
+
resolveVehicle("2012 Nissan Navara D22", au); // MATCHED nissan:navara:d22:documented
|
|
202
|
+
```
|
|
203
|
+
|
|
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
|
+
|
|
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.
|
|
207
|
+
|
|
190
208
|
`@meterapp/vehicle-db/identity` exports the graph types and `evaluateVisualCompatibility`. 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. No asset-sharing approvals are bundled in this release.
|
|
191
209
|
|
|
192
210
|
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).
|
|
@@ -325,7 +343,7 @@ New sources in 2.13.0:
|
|
|
325
343
|
|
|
326
344
|
## Dated manufacturer catalogs
|
|
327
345
|
|
|
328
|
-
The reviewed manufacturer sources now include focused US, Indian and Vietnamese additions. `manufacturer-reviewed` carries explicit model-year evidence; `manufacturer-reviewed-catalog` uses **catalog years**: a model was marketed during a specific year documented by a dated sales offer, sales bulletin or manufacturer catalog. These calendar years are not model years or years of manufacture. `getDataSources().yearBasis` identifies these reviewed sources; the per-row
|
|
346
|
+
The reviewed manufacturer sources now include focused US, Indian and Vietnamese additions. `manufacturer-reviewed` carries explicit model-year evidence; `manufacturer-reviewed-catalog` uses **catalog years**: a model was marketed during a specific year documented by a dated sales offer, sales bulletin or manufacturer catalog. These calendar years are not model years or years of manufacture. `getDataSources().yearBasis` identifies these reviewed sources; the per-row rationale remains in `data/evidence/manufacturer-reviewed.json`, and the market of each reviewed row also ships in the bundle so that `resolveVehicle(query, { market })` can match it.
|
|
329
347
|
|
|
330
348
|
For scoped resolution of a dated catalog record, pass `yearBasis: "catalog-year"` and its evidenced market. Catalog presence does not establish a generation, facelift, derivative or render; requesting visual depth remains unresolved without reviewed appearance evidence. Lynk & Co 03 and 03+ stay distinct, as do Defender OCTA, Range Rover Sport SV and Cayenne Electric from their base models. The regional additions cover only individually evidenced years; 07, generic Song and unverified editions remain pending in [the source plan](docs/mail-coverage-source-plan.md).
|
|
331
349
|
|
package/dist/data.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ interface CompactData {
|
|
|
25
25
|
}[];
|
|
26
26
|
modelNames: string[];
|
|
27
27
|
models: [number, number, number, number, number, number][];
|
|
28
|
+
/** Markets of reviewed manufacturer rows: rows holds (index into models, index into sets) pairs. */
|
|
29
|
+
reviewedMarkets: {
|
|
30
|
+
sets: string[][];
|
|
31
|
+
rows: number[];
|
|
32
|
+
};
|
|
28
33
|
}
|
|
29
34
|
declare const data: CompactData;
|
|
30
35
|
export default data;
|