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

Packaged Update Gate

Ensure automatic update wiring only proceeds for packaged builds on supported platforms, deferring setup until the host application is ready. Supported platforms are limited to darwin and win32.

Capabilities

Skip un-packaged builds

  • When the host reports it is not packaged, update initialization is skipped, the dependency's updater is never invoked, and the function resolves with started: false and reason "not-packaged". @test

Skip unsupported platforms

  • On unsupported platforms such as linux, update initialization is skipped, the dependency's updater is never invoked, and the function resolves with started: false and reason "unsupported-platform". @test

Defer to readiness before starting

  • On supported, packaged environments, waits for the host readiness promise before invoking the dependency's updater exactly once, then resolves with started: true and no reason. @test

Implementation

@generates

API

export interface UpdateGuardResult {
  started: boolean;
  reason?: "not-packaged" | "unsupported-platform";
}

export interface AppLike {
  isPackaged: boolean;
  whenReady(): Promise<void>;
}

export interface LoggerLike {
  log(...args: unknown[]): void;
}

export function runPackagedUpdateGuard(
  app: AppLike,
  platform: NodeJS.Platform,
  logger?: LoggerLike
): Promise<UpdateGuardResult>;

Dependencies { .dependencies }

update-electron-app { .dependency }

Auto-update orchestration for Electron apps.

Install with Tessl CLI

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

tile.json