Move download name construction to os installer function

This commit is contained in:
Sander Declerck 2026-01-19 14:53:33 +01:00
parent fd559cfc63
commit 079e4893b1
No known key found for this signature in database
2 changed files with 5 additions and 11 deletions

View file

@ -4,19 +4,12 @@ import fetch from "make-fetch-happen";
const ULTIMATE_VERSION = "v0.2.0";
/**
* @typedef {"windows"} Platform
* @typedef {"amd64" | "arm64"} Architecture
*/
/**
* Builds the download URL for the SafeChain Agent installer.
* @param {Platform} platform
* @param {Architecture} architecture
* @param {string} fileName
*/
export function getAgentDownloadUrl(platform, architecture) {
const extension = platform === "windows" ? "msi" : "pkg";
return `https://github.com/AikidoSec/safechain-internals/releases/download/${ULTIMATE_VERSION}/SafeChainAgent-${platform}-${architecture}.${extension}`;
export function getAgentDownloadUrl(fileName) {
return `https://github.com/AikidoSec/safechain-internals/releases/download/${ULTIMATE_VERSION}/${fileName}`;
}
/**