From eaeab23c1a54dc77684641b6d1e8bb07fae59173 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Fri, 2 Feb 2024 20:13:57 -0600 Subject: [PATCH] feat!: Remove url resolver for NextflowRelease --- src/nextflow-release.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/nextflow-release.ts b/src/nextflow-release.ts index d62b3f4..4e83178 100644 --- a/src/nextflow-release.ts +++ b/src/nextflow-release.ts @@ -8,28 +8,3 @@ export type NextflowRelease = { downloadUrlAll: string published_at?: string } - -/** - * Gets the download URL of a Nextflow binary - * @param release A "release" data struct from OctoKit - * @param get_all Whether to return the url for the "all" variant of Nextflow - * @returns The URL of the Nextflow binary - */ -export function nextflow_bin_url(release: object, get_all: boolean): string { - const release_assets = release["assets"] - const all_asset = release_assets.filter((a: object) => { - return a["browser_download_url"].endsWith("-all") - })[0] - const regular_asset = release_assets.filter((a: object) => { - return a["name"] === "nextflow" - })[0] - - const dl_asset = get_all ? all_asset : regular_asset - if (dl_asset) { - return dl_asset.browser_download_url - } else { - // Old pre-release versions of Nextflow didn't have an "all" variant. To - // avoid downstream errors, substitute the regular url here. - return regular_asset.browser_download_url - } -}