declare module "electron-auto-updater/out/api" {
///
import { VersionInfo } from "electron-builder-http/out/publishOptions"
import { EventEmitter } from "events"
import { ProgressInfo } from "electron-builder-http/out/ProgressCallbackTransform"
export interface FileInfo {
name: string
url: string
sha2?: string
}
export interface Provider {
getLatestVersion(): Promise
getUpdateFile(versionInfo: T): Promise
}
export function getDefaultChannelName(): string
export function getCurrentPlatform(): any
export function getChannelFilename(channel: string): string
export interface UpdateCheckResult {
readonly versionInfo: VersionInfo
readonly fileInfo?: FileInfo
readonly downloadPromise?: Promise | null
}
export const DOWNLOAD_PROGRESS = "download-progress"
export class UpdaterSignal {
private emitter
constructor(emitter: EventEmitter)
progress(handler: (info: ProgressInfo) => void): void
updateDownloaded(handler: (info: VersionInfo) => void): void
}
}
declare module "electron-auto-updater/out/BintrayProvider" {
import { Provider, FileInfo } from "electron-auto-updater/out/api"
import { BintrayOptions, VersionInfo } from "electron-builder-http/out/publishOptions"
export class BintrayProvider implements Provider {
private client
constructor(configuration: BintrayOptions)
getLatestVersion(): Promise
getUpdateFile(versionInfo: VersionInfo): Promise
}
}
declare module "electron-auto-updater/out/GenericProvider" {
import { Provider, FileInfo } from "electron-auto-updater/out/api"
import { GenericServerOptions, UpdateInfo } from "electron-builder-http/out/publishOptions"
export class GenericProvider implements Provider {
private readonly configuration
private readonly baseUrl
private readonly channel
constructor(configuration: GenericServerOptions)
getLatestVersion(): Promise
getUpdateFile(versionInfo: UpdateInfo): Promise
}
export function validateUpdateInfo(info: UpdateInfo): void
}
declare module "electron-auto-updater/out/GitHubProvider" {
import { Provider, FileInfo } from "electron-auto-updater/out/api"
import { VersionInfo, GithubOptions, UpdateInfo } from "electron-builder-http/out/publishOptions"
export class GitHubProvider implements Provider {
private readonly options
constructor(options: GithubOptions)
getLatestVersion(): Promise
private getBasePath()
getUpdateFile(versionInfo: UpdateInfo): Promise
}
}
declare module "electron-auto-updater/out/electronHttpExecutor" {
///
import { HttpExecutor, DownloadOptions } from "electron-builder-http"
export class ElectronHttpExecutor extends HttpExecutor {
download(url: string, destination: string, options?: DownloadOptions | null): Promise
private addTimeOutHandler(request, callback)
private doDownload(url, destination, redirectCount, options, callback)
doApiRequest(options: Electron.RequestOptions, token: string | null, requestProcessor: (request: Electron.ClientRequest, reject: (error: Error) => void) => void, redirectCount?: number): Promise
}
}
declare module "electron-auto-updater/out/AppUpdater" {
///
import { EventEmitter } from "events"
import { UpdateCheckResult, FileInfo, UpdaterSignal } from "electron-auto-updater/out/api"
import { BintrayOptions, PublishConfiguration, GithubOptions, GenericServerOptions, VersionInfo } from "electron-builder-http/out/publishOptions"
export interface Logger {
info(message?: any): void
warn(message?: any): void
error(message?: any): void
}
export abstract class AppUpdater extends EventEmitter {
/**
* Automatically download an update when it is found.
*/
autoDownload: boolean
protected updateAvailable: boolean
private clientPromise
private readonly untilAppReady
private checkForUpdatesPromise
protected readonly app: any
protected versionInfo: VersionInfo | null
private fileInfo
readonly signals: UpdaterSignal
/**
* The logger. You can pass [electron-log](https://github.com/megahertz/electron-log), [winston](https://github.com/winstonjs/winston) or another logger with the following interface: `{ info(), warn(), error() }`.
* Set it to `null` if you would like to disable a logging feature.
*/
logger: Logger | null
constructor(options: PublishConfiguration | BintrayOptions | GithubOptions | null | undefined)
getFeedURL(): string | null | undefined
setFeedURL(value: PublishConfiguration | BintrayOptions | GithubOptions | GenericServerOptions): void
checkForUpdates(): Promise
private _checkForUpdates()
private doCheckForUpdates()
protected onUpdateAvailable(versionInfo: VersionInfo, fileInfo: FileInfo): void
/**
* Start downloading update manually. You can use this method if `autoDownload` option is set to `false`.
* @returns {Promise} Path to downloaded file.
*/
downloadUpdate(): Promise
protected abstract doDownloadUpdate(versionInfo: VersionInfo, fileInfo: FileInfo): Promise
abstract quitAndInstall(): void
}
}
declare module "electron-auto-updater/out/MacUpdater" {
import { AppUpdater } from "electron-auto-updater/out/AppUpdater"
import { BintrayOptions, PublishConfiguration, GithubOptions, VersionInfo } from "electron-builder-http/out/publishOptions"
import BluebirdPromise from "bluebird-lst-c"
import { FileInfo } from "electron-auto-updater/out/api"
export class MacUpdater extends AppUpdater {
private readonly nativeUpdater
constructor(options?: PublishConfiguration | BintrayOptions | GithubOptions)
protected onUpdateAvailable(versionInfo: VersionInfo, fileInfo: FileInfo): void
protected doDownloadUpdate(versionInfo: VersionInfo, fileInfo: FileInfo): BluebirdPromise
quitAndInstall(): void
}
}
declare module "electron-auto-updater" {
import { AppUpdater } from "electron-auto-updater/out/AppUpdater"
export const autoUpdater: AppUpdater
}
declare module "electron-auto-updater/out/NsisUpdater" {
import { FileInfo } from "electron-auto-updater/out/api"
import { BintrayOptions, PublishConfiguration, GithubOptions, VersionInfo } from "electron-builder-http/out/publishOptions"
import { AppUpdater } from "electron-auto-updater/out/AppUpdater"
export class NsisUpdater extends AppUpdater {
private setupPath
private quitAndInstallCalled
private quitHandlerAdded
constructor(options?: PublishConfiguration | BintrayOptions | GithubOptions)
/**
* Start downloading update manually. You can use this method if `autoDownload` option is set to `false`.
* @returns {Promise} Path to downloaded file.
*/
protected doDownloadUpdate(versionInfo: VersionInfo, fileInfo: FileInfo): Promise
private addQuitHandler()
quitAndInstall(): void
private install(isSilent)
}
}