MCPcopy Create free account
hub / github.com/Noumena-Network/code / findGithubAsset

Function findGithubAsset

src/utils/nativeInstaller/download.ts:60–71  ·  view source on GitHub ↗
(
  release: GithubRelease,
  assetName: string,
)

Source from the content-addressed store, hash-verified

58}
59
60function findGithubAsset(
61 release: GithubRelease,
62 assetName: string,
63): GithubReleaseAsset {
64 const asset = release.assets?.find(candidate => candidate.name === assetName)
65 if (!asset?.browser_download_url) {
66 throw new Error(
67 `GitHub release ${release.tag_name ?? 'unknown'} is missing asset ${assetName}`,
68 )
69 }
70 return asset
71}
72
73async function getGithubReleaseByTag(version: string): Promise<GithubRelease> {
74 const tag = normalizeVersionTag(version)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected