Finish datasheet acquisition: more vendors, Mouser, browser download links.

Add Microchip/Murata/Silicon Labs URL tables, optional Mouser search, and suggested URLs on a miss so the wizard can open PDFs in the user's browser when the VPS is blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 19:42:50 +02:00
co-authored by Cursor
parent 7a255a9807
commit 2113e3975e
8 changed files with 384 additions and 31 deletions
+9 -1
View File
@@ -934,12 +934,19 @@ export async function resolveLcscPassive(
export class DatasheetFetchError extends Error {
url: string | null;
urls: string[];
source: string | null;
constructor(message: string, url: string | null, source: string | null = null) {
constructor(
message: string,
url: string | null,
source: string | null = null,
urls: string[] = [],
) {
super(message);
this.name = "DatasheetFetchError";
this.url = url;
this.source = source;
this.urls = urls.length ? urls : url ? [url] : [];
}
}
@@ -963,6 +970,7 @@ export async function fetchAutoDatasheet(
err.detail || "Failed to fetch datasheet",
err.url ?? null,
err.source ?? null,
Array.isArray(err.urls) ? err.urls.filter((u: unknown) => typeof u === "string") : [],
);
}
const url = res.headers.get("X-Datasheet-Url");