]*class="[^"]*f4[^"]*"[^>]*>([\s\S]*?)<\/p>/);
const description = descMatch?.[1]?.replace(/<[^>]+>/g, "").trim() || null;
const websiteMatch = html.match(/]*rel="noopener noreferrer nofollow"[^>]*href="([^"]+)"/);
const starsMatch = html.match(/id="repo-stars-counter-star"[^>]*>([^<]+)/);
const watchersMatch = html.match(/(\d+)<\/strong>\s*watching/);
const forksMatch = html.match(/id="repo-network-counter"[^>]*>([^<]+)/);
let numReleases: number | undefined;
const releaseCountMatch = html.match(
/]*href="[^"]*\/releases"[^>]*>[\s\S]*?]*title="(\d+)"[^>]*(?:class="[^"]*Counter|data-view-component="true")[^>]*>/,
);
if (releaseCountMatch) {
numReleases = parseInt(releaseCountMatch[1], 10);
}
return {
description,
website: websiteMatch?.[1] || null,
stars: starsMatch?.[1]?.trim() || null,
watchers: watchersMatch?.[1] || null,
forks: forksMatch?.[1]?.trim() || null,
numReleases,
};
}
function extractOverviewHtml(payload: RawPayload): Record]*class="[^"]*d-inline[^"]*"[^>]*>([^<]*)<\/h1>/);
const title = h1Match?.[1]?.trim() || tag;
// Extract tag name from tree link
const tagLinkMatch = html.match(/]*href="[^"]*\/tree\/([^"]+)"[^>]*>/);
const tagName = tagLinkMatch?.[1] || tag;
// Extract published date
const dateMatch = html.match(/