Both Node.js and Java generators were emitting URLs that 404'd when
selected against the official dist servers.
Node.js: emitted v<major>.x placeholders (e.g. v24.x). nodejs.org's
dist server requires exact version paths (e.g. v24.19.0); the v<x>.x
form is not a redirect — it's a real 404. All 5 supported majors
(18, 20, 22, 24, 26) were broken.
Java: URL was hardcoded to download.java.net's openjdk-21.0.2 GA
build. That path only works for 21; 8, 11, 17 all 404. download.java.net
embeds a build hash in the URL that I don't have a way to look up
for arbitrary patch versions.
Fix:
Node.js: add a LATEST_KNOWN dict mapping each major to its real
current exact version (refreshed 2026-08):
18 -> 18.20.8, 20 -> 20.20.2, 22 -> 22.23.2,
24 -> 24.19.0, 26 -> 26.6.0
Also add a 'download_url' text field with the precise default URL,
so users can override with any mirror (Tuna, npmmirror, etc.) or
a specific patch version without waiting for code to update.
Java: switch to Tuna's Adoptium mirror, whose path format is simple
and predictable:
https://mirrors.tuna.tsinghua.edu.cn/Adoptium/<major>/jdk/x64/linux/OpenJDK<major>U-jdk_x64_linux_hotspot_<exact>.tar.gz
This works for 8/11/17/21 with the LATEST_TUNA mapping. Also add a
'download_url' text field for overrides.
Both also derive the tarball's inner directory name from the URL (via
regex) so the --strip-components=1 trick keeps working even when the
user picks a custom URL.
Verified all 9 generated URLs return 200 (HEAD):
Node v18/20/22/24/26: all 200
Java v8/11/17/21: all 200 (Tuna mirror)
All 50 generators still pass bash -n.