A drop-in module that adds autoUpdating capabilities to Electron apps
89
Build a small module that bootstraps the update helper from Dependencies and routes all of its lifecycle messages through a pluggable logger while keeping a readable record.
log function is passed into the update helper and receives each lifecycle message it emits (feedURL, requestHeaders, checking-for-update, update-available; downloading..., update-not-available, download completion, and errors), prefixed with a custom label. @testconsole to satisfy the update helper while still prefixing and recording lifecycle messages. @test@generates
export interface LifecycleLogger {
log: (...args: unknown[]) => void;
}
export interface UpdateLoggingOptions {
logger?: LifecycleLogger;
label?: string;
interval?: string;
}
export interface LogEntry {
label: string;
message: string;
args: unknown[];
}
export function startUpdateLogging(options?: UpdateLoggingOptions): void;
export function getLifecycleLog(): LogEntry[];
export function clearLifecycleLog(): void;Provides update lifecycle events and accepts a pluggable logger.
Install with Tessl CLI
npx tessl i tessl/npm-update-electron-appdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10