import { type Executed, type RunOptions } from "./exec.js"; /** * The GitHub releases of this repo. CLI and desktop releases share it and CLI * ones carry no assets, so a build is found by name, not through `latest`. */ export declare class Releases { private readonly context; constructor(context: { fetch: typeof fetch; env: NodeJS.ProcessEnv; }); find(assetName: string): Promise; /** Streams to `dest`: the builds run to hundreds of megabytes. */ download(asset: ReleaseAsset, dest: string, onProgress?: (received: number) => void): Promise; private apiHeaders; } /** * Puts one desktop build in place. An install is staged beside its target and * renamed over it at the end, so a failure leaves whatever was there before. */ export declare abstract class AppInstaller { protected readonly context: InstallContext; static for(platform: string, arch: string, context: InstallContext): AppInstaller; constructor(context: InstallContext); /** The release asset this OS installs from. */ abstract readonly asset: string; /** Where an install may already be, the path a user launches. */ protected abstract locations(): string[]; /** Unpacks the downloaded file to `staged`, on the same disk as the target. */ protected abstract stage(file: string, staged: string, workDir: string): Promise; /** Wires the placed app into the OS and says how to start it. */ protected abstract integrate(target: string): Promise; installed(): string | undefined; protected target(): string; protected launchPath(target: string): string; install(file: string, workDir: string): Promise; protected must(command: string, args: string[]): Promise; } /** `testeiya install-app`: the desktop build for this OS, unless one is already there. */ export declare function runInstallApp(options: InstallAppOptions, overrides?: Partial): Promise; export interface InstallContext { home: string; env: NodeJS.ProcessEnv; run: (command: string, args: string[], options?: RunOptions) => Promise; } export interface InstallAppDeps extends InstallContext { platform: string; arch: string; fetch: typeof fetch; out: (text: string) => void; err: (text: string) => void; } export interface InstallAppOptions { force?: boolean; json?: boolean; } export interface ReleaseAsset { version: string; name: string; size: number; digest?: string; url: string; } export interface InstallResult { path: string; launch: string; }