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-6/

Update Source Selector

Configure automatic updates for a packaged desktop app by delegating to the updater dependency while supporting either the public update service or a static HTTPS feed.

Capabilities

Public update service configuration

  • Given a repository identifier in the form owner/repo and an optional HTTPS host, it initializes updates against the public service feed for the current platform/architecture and app version. @test
  • Rejects repository identifiers that do not include the / separator. @test
  • Rejects public service hosts that are not HTTPS URLs. @test

Static storage configuration

  • Given an HTTPS base URL for static storage, it initializes updates using that feed; on macOS it targets <baseUrl>/RELEASES.json with JSON server mode, while other platforms use the base URL unchanged. @test
  • Rejects static storage base URLs that are not HTTPS. @test

Updater delegation

  • For either source type, it invokes the dependency once with the derived source configuration and propagates any provided logger and update interval settings unchanged. @test

Implementation

@generates

API

export type UpdateSourceKind = 'public-service' | 'static-storage';

export interface PublicServiceOptions {
  repo: string;
  host?: string;
}

export interface StaticStorageOptions {
  baseUrl: string;
}

export interface UpdaterConfig {
  source: UpdateSourceKind;
  options: PublicServiceOptions | StaticStorageOptions;
  logger?: { log(message: string): void; info?(message: string): void; error?(message: string): void; warn?(message: string): void };
  updateInterval?: string;
}

export function configureAppUpdates(config: UpdaterConfig): void;

Dependencies { .dependencies }

update-electron-app { .dependency }

Provides runtime update initialization for desktop apps with configurable update sources.

Install with Tessl CLI

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

tile.json