Canonical product URL (same URL the supplier fetches).
Supplier name, e.g. "Loudwolf".
MD5 hex digest used as the exclusion key.
const key = getProductExclusionKey(
"https://example.com/acetone",
"Loudwolf",
);
// → "a1b2c3..."
export function getProductExclusionKey(url: string, supplierName: string): string {
return md5(JSON.stringify({ url, params: {}, supplier: supplierName }));
}
Derive the stable exclusion key for a product. This mirrors the key shape used by
SupplierCache.getProductDataCacheKey(see SupplierBase.ts line 1337) so that exclusion checks performed inside the supplier's product detail path can be compared against entries written from the UI context menu without the two sides drifting.Uses
md5({ url, params: {}, supplier })— identical to the no-params branch ofgetProductDataCacheKey.