refactor(emex): rewrite EMEX integration, add category fallback

Replace browser-based Puppeteer scraper with standalone scraper wrapper.
Add EMEX as fallback source for categories when PL24 is unavailable.
Update vehicle decoding to use new synchronous EMEX API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sase Dev
2026-02-12 19:48:03 +00:00
parent 8b106cbb1f
commit a8eb8f4bdc
20 changed files with 1494 additions and 1209 deletions

View File

@@ -259,6 +259,7 @@ export const categories = pgTable(
(table) => [
index("categories_vehicle_id_idx").on(table.vehicleId),
index("categories_parent_id_idx").on(table.parentId),
uniqueIndex("categories_vehicle_name_source_idx").on(table.vehicleId, table.name, table.source),
],
);

View File

@@ -28,6 +28,7 @@ const BRANDS_DATA = [
{ name: "Jaguar", slug: "jaguar" },
{ name: "Mini", slug: "mini" },
{ name: "Dacia", slug: "dacia" },
{ name: "Subaru", slug: "subaru" },
];
const PLANS_DATA = [