( os: OperatingSystem, platform: DownloadDropdownItem<Platform>, versionWithPrefix: string, kind: DownloadKind )
| 20 | * Creates a download artifact from platform data |
| 21 | */ |
| 22 | const createDownloadArtifact = ( |
| 23 | os: OperatingSystem, |
| 24 | platform: DownloadDropdownItem<Platform>, |
| 25 | versionWithPrefix: string, |
| 26 | kind: DownloadKind |
| 27 | ): DownloadArtifact => { |
| 28 | const url = getNodeDownloadUrl({ |
| 29 | versionWithPrefix, |
| 30 | os, |
| 31 | platform: platform.value, |
| 32 | kind, |
| 33 | }); |
| 34 | |
| 35 | return { |
| 36 | fileName: url.replace(`${DIST_URL}${versionWithPrefix}/`, ''), |
| 37 | kind, |
| 38 | os, |
| 39 | architecture: platform.label, |
| 40 | url, |
| 41 | version: versionWithPrefix, |
| 42 | }; |
| 43 | }; |
| 44 | |
| 45 | /** |
| 46 | * Filters platforms by compatibility and exclusions |
no test coverage detected