handbrake-ts
Version:
Handbrake with TypeScript and support for electron
38 lines • 1.33 kB
TypeScript
import { BehaviorSubject } from "rxjs";
import { Config } from "./Config";
export declare type Platform = 'darwin' | 'linux' | 'win32';
declare type InstallatorStatus = "idle" | 'instaling' | 'downloading' | 'extractiong' | 'failure' | 'installed' | 'uninstalling' | 'uinstalled';
interface InstallatorState {
status: InstallatorStatus;
error?: string;
}
export declare class Installator {
readonly stateChange: BehaviorSubject<InstallatorState>;
private baseDownloadLink;
private veresion;
private config;
constructor(config: Config);
get state(): InstallatorState;
private updateState;
isInstalled(dist?: Platform): Promise<boolean>;
install(dist?: Platform): Promise<unknown>;
uninstall(dist?: Platform): Promise<unknown>;
private installWin;
private uninstalllWin;
private installMac;
private uninstallMac;
private installLinux;
private uninstallLinux;
private isInstaledLinux;
private isInstaledWindows;
private isInstaledMac;
private getDownloadLink;
private downloadFile;
private removeFile;
private removeDir;
private runCommandSudo;
runCommand(command: string): Promise<unknown>;
wait(time: number): Promise<unknown>;
}
export {};
//# sourceMappingURL=Installator.d.ts.map