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

Update Feed Configurator

A helper that configures an auto-update client by building the correct feed URL and request headers for the host application.

Capabilities

Public update feed from metadata

  • Without an explicit repository override, derive the repository from the host app's metadata and set a feed URL that combines the update service host (defaulting to https://update.electronjs.org), owner/repo, platform, architecture, and the app's current version. @test

Static storage feed selection

  • When given a secure static base URL, configure a feed that uses that URL as-is on non-macOS platforms and appends /RELEASES.json with a JSON server type on macOS. @test

Package-derived User-Agent

  • When establishing the feed, attach a User-Agent header formatted as <package-name>/<package-version> (<platform>: <arch>) using the host app's package metadata. @test

Implementation

@generates

API

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

export interface StaticFeedOptions {
  baseUrl: string;
}

export type UpdateFeedOptions =
  | { mode: 'public'; public?: PublicFeedOptions }
  | { mode: 'static'; static: StaticFeedOptions };

/**
 * Configures the auto-update feed for the host application.
 */
export function configureUpdateFeed(options: UpdateFeedOptions): void;

Dependencies { .dependencies }

update-electron-app { .dependency }

Configures application updates against public or static feeds, including feed URL construction and request headers.

Install with Tessl CLI

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

tile.json