CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-update-electron-app

A drop-in module that adds autoUpdating capabilities to Electron apps

89

1.08x
Overview
Eval results
Files

task.mdevals/scenario-8/

Update Prompt Flow

Build a small update helper that listens for completed app update downloads and guides the user through applying the update. The helper should surface a restart-or-later choice once the download is finished, while allowing simple customization hooks.

Capabilities

Show restart-or-later choice after download

  • When an update download finishes, display a modal with restart and later actions; choosing restart applies the update immediately, choosing later leaves the app running. @test

Allow custom dialog copy

  • Optional dialog text overrides (title, detail, restart label, later label) are used in the modal when provided. @test

Support custom notifier callback

  • If a notifier callback is supplied, run it instead of the default modal and pass along release notes, name, date, and URL from the downloaded update. @test

Log prompt flow

  • Log the download-complete event and which user action (restart or later) was chosen. @test

Implementation

@generates

API

export interface UpdatePromptOptions {
  dialogText?: {
    title?: string;
    detail?: string;
    restartButtonText?: string;
    laterButtonText?: string;
  };
  notifier?: (info: {
    releaseNotes: string;
    releaseName: string;
    releaseDate: Date;
    updateURL: string;
  }) => void;
  logger?: { log(message: string): void };
}

export function initializeUpdatePrompt(options?: UpdatePromptOptions): void;

Dependencies { .dependencies }

update-electron-app { .dependency }

Handles update downloads and exposes notification hooks for restart-or-later prompts.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-update-electron-app

tile.json