in lib/progress.ts [66:104]
public report(report: ProgressReport): void {
switch (report.stage) {
case ProgressReportStage.ResolvedVersion:
this.version = report.version;
break;
case ProgressReportStage.ReplacingOldInsiders:
console.log(`Removing outdated Insiders at ${report.downloadedPath} and re-downloading.`);
console.log(`Old: ${report.oldHash} | ${report.oldDate.toISOString()}`);
console.log(`New: ${report.newHash} | ${report.newDate.toISOString()}`);
break;
case ProgressReportStage.FoundMatchingInstall:
console.log(`Found existing install in ${report.downloadedPath}. Skipping download`);
break;
case ProgressReportStage.NewInstallComplete:
console.log(`Downloaded VS Code ${this.version} into ${report.downloadedPath}`);
break;
case ProgressReportStage.ResolvingCDNLocation:
console.log(`Downloading VS Code ${this.version} from ${report.url}`)
break;
case ProgressReportStage.Downloading:
if (!this.showDownloadProgress && report.bytesSoFar === 0) {
console.log(`Downloading VS Code (${report.totalBytes}B)`);
} else if (!this.downloadReport) {
this.downloadReport = { timeout: setTimeout(() => this.reportDownload(), 100), report };
} else {
this.downloadReport.report = report;
}
break;
case ProgressReportStage.NewInstallComplete:
if (this.downloadReport) {
clearTimeout(this.downloadReport.timeout);
}
if (this.showDownloadProgress) {
console.log('');
}
console.log(`Downloaded VS Code into ${report.downloadedPath}`);
break;
}
}