@@ -29,6 +29,7 @@ const { compileBuildTask } = require('./gulpfile.compile');
29
29
const { compileExtensionsBuildTask, compileExtensionMediaBuildTask } = require ( './gulpfile.extensions' ) ;
30
30
const { vscodeWebEntryPoints, vscodeWebResourceIncludes, createVSCodeWebFileContentMapper } = require ( './gulpfile.vscode.web' ) ;
31
31
const cp = require ( 'child_process' ) ;
32
+ const log = require ( 'fancy-log' ) ;
32
33
33
34
const REPO_ROOT = path . dirname ( __dirname ) ;
34
35
const commit = getVersion ( REPO_ROOT ) ;
@@ -163,25 +164,27 @@ function nodejs(platform, arch) {
163
164
164
165
if ( platform === 'win32' ) {
165
166
if ( product . nodejsRepository ) {
167
+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from ${ product . nodejsRepository } ...` ) ;
166
168
return assetFromGithub ( product . nodejsRepository , nodeVersion , name => name === `win-${ arch } -node.exe` )
167
169
. pipe ( rename ( 'node.exe' ) ) ;
168
170
}
169
-
170
- return remote ( `/dist/v${ nodeVersion } /win-${ arch } /node.exe` , { base : 'https://nodejs.org' } )
171
+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from https://nodejs.org` ) ;
172
+ return remote ( `/dist/v${ nodeVersion } /win-${ arch } /node.exe` , { base : 'https://nodejs.org' , verbose : true } )
171
173
. pipe ( rename ( 'node.exe' ) ) ;
172
174
}
173
175
174
176
if ( arch === 'alpine' || platform === 'alpine' ) {
175
177
const imageName = arch === 'arm64' ? 'arm64v8/node' : 'node' ;
178
+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from docker image ${ imageName } ` ) ;
176
179
const contents = cp . execSync ( `docker run --rm ${ imageName } :${ nodeVersion } -alpine /bin/sh -c 'cat \`which node\`'` , { maxBuffer : 100 * 1024 * 1024 , encoding : 'buffer' } ) ;
177
180
return es . readArray ( [ new File ( { path : 'node' , contents, stat : { mode : parseInt ( '755' , 8 ) } } ) ] ) ;
178
181
}
179
182
180
183
if ( arch === 'armhf' ) {
181
184
arch = 'armv7l' ;
182
185
}
183
-
184
- return remote ( `/dist/v${ nodeVersion } /node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , { base : 'https://nodejs.org' } )
186
+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from https://nodejs.org` ) ;
187
+ return remote ( `/dist/v${ nodeVersion } /node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , { base : 'https://nodejs.org' , verbose : true } )
185
188
. pipe ( flatmap ( stream => stream . pipe ( gunzip ( ) ) . pipe ( untar ( ) ) ) )
186
189
. pipe ( filter ( '**/node' ) )
187
190
. pipe ( util . setExecutableBit ( '**' ) )
0 commit comments