import { ToolingLog } from '@kbn/dev-utils' ; import { downloadToString } from '../../lib/download' ; export async function getNodeShasums ( log , nodeVersion ) { const url = `https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v${ nodeVersion }/SHASUMS256.txt` ; log . debug ( 'Downloading shasum values for node version' , nodeVersion , 'from' , url ) ; const checksum = await downloadToString ( { log , url , expectStatus : 200 } ) ; return checksum . split ( '\n' ) . reduce ( ( acc , line ) => { const [ sha , platform ] = line . split ( '  ' ) ; return { ... acc , [ platform ] : sha , } ; } , { } ) ; }