mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
18 lines
551 B
TypeScript
18 lines
551 B
TypeScript
import { getNormalizedArch } from './normalizeArch'
|
|
|
|
export function getNodeTarball (
|
|
nodeVersion: string,
|
|
nodeMirror: string,
|
|
processPlatform: string,
|
|
processArch: string
|
|
) {
|
|
const platform = processPlatform === 'win32' ? 'win' : processPlatform
|
|
const arch = getNormalizedArch(processPlatform, processArch, nodeVersion)
|
|
const extension = platform === 'win' ? 'zip' : 'tar.gz'
|
|
const pkgName = `node-v${nodeVersion}-${platform}-${arch}`
|
|
return {
|
|
pkgName,
|
|
tarball: `${nodeMirror}v${nodeVersion}/${pkgName}.${extension}`,
|
|
}
|
|
}
|