Abstract Class: Provider<T>
Extended by
Type Parameters
T
T extends UpdateInfo
Constructors
Constructor
protectednew Provider<T>(runtimeOptions):Provider<T>
Parameters
runtimeOptions
Returns
Provider<T>
Properties
executor
protectedreadonlyexecutor:ElectronHttpExecutor
Accessors
feedBaseUrl
Get Signature
get feedBaseUrl():
URL|null|undefined
Base URL of the update feed: the credential-bearing request headers (the ones stripped on a cross-origin redirect) are only sent to
download URLs on its origin. null sends the request headers to every download URL.
The default, undefined, means not declared: a download with credential headers (from requestHeaders / addAuthHeader) then fails
with ERR_UPDATER_FEED_BASE_URL_NOT_DECLARED, so a custom provider used with credentials must override this getter.
Returns
URL | null | undefined
fileExtraDownloadHeaders
Get Signature
get fileExtraDownloadHeaders():
OutgoingHttpHeaders|null
Returns
OutgoingHttpHeaders | null
isUseMultipleRangeRequest
Get Signature
get isUseMultipleRangeRequest():
boolean
Returns
boolean
Methods
createRequestOptions()
protectedcreateRequestOptions(url,headers?):RequestOptions
Parameters
url
URL
headers?
OutgoingHttpHeaders | null
Returns
RequestOptions
getBlockMapFiles()
getBlockMapFiles(
baseUrl,oldVersion,newVersion,oldBlockMapFileBaseUrl?):URL[] |Promise<URL[]>
Parameters
baseUrl
URL
oldVersion
string
newVersion
string
oldBlockMapFileBaseUrl?
string | null
Returns
URL[] | Promise<URL[]>
getCustomChannelName()
protectedgetCustomChannelName(channel):string
Parameters
channel
string
Returns
string
getDefaultChannelName()
protectedgetDefaultChannelName():string
Returns
string
getLatestVersion()
abstractgetLatestVersion():Promise<T>
Returns
Promise<T>
httpRequest()
protectedhttpRequest(url,headers?,cancellationToken?):Promise<string|null>
Method to perform API request only to resolve update info, but not to download update.
Parameters
url
URL
headers?
OutgoingHttpHeaders | null
cancellationToken?
Returns
Promise<string | null>
resolveFiles()
abstractresolveFiles(updateInfo):ResolvedUpdateFileInfo[]
Parameters
updateInfo
T
Returns
setRequestHeaders()
setRequestHeaders(
value):void
Parameters
value
OutgoingHttpHeaders | null
Returns
void