electron-updater
Advanced tools
Comparing version 6.3.1 to 6.3.2
@@ -126,2 +126,3 @@ import { AllPublishOptions, CancellationToken, PublishConfiguration, UpdateInfo, DownloadOptions, ProgressInfo } from "builder-util-runtime"; | ||
private checkForUpdatesPromise; | ||
private downloadPromise; | ||
protected readonly app: AppAdapter; | ||
@@ -128,0 +129,0 @@ protected updateInfoAndProvider: UpdateInfoAndProvider | null; |
@@ -155,2 +155,3 @@ "use strict"; | ||
this.checkForUpdatesPromise = null; | ||
this.downloadPromise = null; | ||
this.updateInfoAndProvider = null; | ||
@@ -395,2 +396,6 @@ /** | ||
} | ||
if (this.downloadPromise != null) { | ||
this._logger.info("Downloading update (already in progress)"); | ||
return this.downloadPromise; | ||
} | ||
this._logger.info(`Downloading update from ${(0, builder_util_runtime_1.asArray)(updateInfoAndProvider.info.files) | ||
@@ -411,16 +416,16 @@ .map(it => it.url) | ||
}; | ||
try { | ||
return this.doDownloadUpdate({ | ||
updateInfoAndProvider, | ||
requestHeaders: this.computeRequestHeaders(updateInfoAndProvider.provider), | ||
cancellationToken, | ||
disableWebInstaller: this.disableWebInstaller, | ||
disableDifferentialDownload: this.disableDifferentialDownload, | ||
}).catch((e) => { | ||
throw errorHandler(e); | ||
}); | ||
} | ||
catch (e) { | ||
return Promise.reject(errorHandler(e)); | ||
} | ||
this.downloadPromise = this.doDownloadUpdate({ | ||
updateInfoAndProvider, | ||
requestHeaders: this.computeRequestHeaders(updateInfoAndProvider.provider), | ||
cancellationToken, | ||
disableWebInstaller: this.disableWebInstaller, | ||
disableDifferentialDownload: this.disableDifferentialDownload, | ||
}) | ||
.catch((e) => { | ||
throw errorHandler(e); | ||
}) | ||
.finally(() => { | ||
this.downloadPromise = null; | ||
}); | ||
return this.downloadPromise; | ||
} | ||
@@ -427,0 +432,0 @@ dispatchError(e) { |
{ | ||
"name": "electron-updater", | ||
"version": "6.3.1", | ||
"version": "6.3.2", | ||
"description": "Cross platform updater for electron applications", | ||
@@ -5,0 +5,0 @@ "main": "out/main.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
461931
4130