This commit is contained in:
Owen
2026-05-21 17:30:06 -07:00
parent 4530aac4f3
commit 3539b9ddb4
2 changed files with 12 additions and 13 deletions

View File

@@ -522,13 +522,13 @@ const sendToClientLocal = async (
const messageString = JSON.stringify(messageWithVersion);
if (options.compress) {
logger.debug(
`Message size before compression: ${messageString.length} bytes`
);
// logger.debug(
// `Message size before compression: ${messageString.length} bytes`
// );
const compressed = zlib.gzipSync(Buffer.from(messageString, "utf8"));
logger.debug(
`Message size after compression: ${compressed.length} bytes`
);
// logger.debug(
// `Message size after compression: ${compressed.length} bytes`
// );
clients.forEach((client) => {
if (client.readyState === WebSocket.OPEN) {
client.send(compressed);

View File

@@ -58,7 +58,11 @@ async function getLatestReleaseInfo(): Promise<ReleaseInfo | null> {
// Drop drafts, pre-releases, and anything with "rc" in the tag name.
releases = releases.filter(
(r: any) => !r.draft && !r.prerelease && !r.tag_name.includes("rc")
(r: any) =>
!r.draft &&
!r.prerelease &&
!r.tag_name.includes("rc") &&
!r.tag_name.includes("v")
);
// Sort descending by semver to find the true latest stable release.
@@ -262,17 +266,12 @@ export async function getNewtVersion(
const latestVersion = releaseInfo.version;
// Normalise the tag (ensure leading 'v') for the download URL.
const tagForUrl = latestVersion.startsWith("v")
? latestVersion
: `v${latestVersion}`;
// Binary name follows the get-newt.sh convention: newt_<platform>[.exe]
const binaryName = platform.includes("windows")
? `newt_${platform}.exe`
: `newt_${platform}`;
const downloadUrl = `https://github.com/fosrl/newt/releases/download/${tagForUrl}/${binaryName}`;
const downloadUrl = `https://github.com/fosrl/newt/releases/download/${latestVersion}/${binaryName}`;
// Look up the SHA256 digest for this specific binary from the GitHub
// release asset metadata (the `digest` field, format "sha256:<hex>").