From ddc1dc2751a31f2a02548af14f28c1dee9e51df0 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Tue, 17 Mar 2026 02:18:24 +0000 Subject: [PATCH] debug(schematics): add project page download link logging Log all download-related links, schematic file references, and download path types found on the project page to diagnose 404s. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/schematics.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/schematics.js b/src/schematics.js index 24d42f8..8f4b706 100644 --- a/src/schematics.js +++ b/src/schematics.js @@ -123,6 +123,16 @@ export async function fetchSchematic(url) { throw new Error(`Failed to fetch project page: ${err.message}`); } + // Debug: log download-related links found on the project page + const dlLinks = html.match(/href="[^"]*download[^"]*"/gi) || []; + log(TAG, `Project page download links: ${dlLinks.length} — ${dlLinks.slice(0, 10).join(', ')}`); + // Also check for any schematic/schem references + const schemRefs = html.match(/\.(schematic|schem|litematic|nbt)/gi) || []; + log(TAG, `Schematic file references: ${schemRefs.length} — ${[...new Set(schemRefs)].join(', ')}`); + // Check for share type / download section + const shareMatch = html.match(/download\/([^/"]+)/g) || []; + log(TAG, `Download path types: ${[...new Set(shareMatch)].join(', ')}`); + // Extract metadata const titleMatch = html.match(/([^<]+)<\/title>/i); const name = titleMatch