import { scanCopy , Task } from '../lib' ; import { getNodeDownloadInfo } from './nodejs' ; export const CreateArchivesSources = { description : 'Creating platform-specific archive source directories' , async run ( config , log , build ) { await Promise . all ( config . getTargetPlatforms ( ) . map ( async ( platform ) => { await scanCopy ( { source : build . resolvePath ( ) , destination : build . resolvePathForPlatform ( platform ) , } ) ; log . debug ( 'Generic build source copied into' , platform . getNodeArch ( ) , 'specific build directory' ) ; await scanCopy ( { source : getNodeDownloadInfo ( config , platform ) . extractDir , destination : build . resolvePathForPlatform ( platform , 'node' ) , } ) ; log . debug ( 'Node.js copied into' , platform . getNodeArch ( ) , 'specific build directory' ) ; } ) ) ; } , } ;