UNPKG

1.29 kBTypeScriptView Raw
1export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;
2export declare function withTempDirectory<T>(fn: (directory: string) => Promise<T>): Promise<T>;
3export declare function normalizeVersion(version: string): string;
4/**
5 * Runs the `uname` command and returns the trimmed output.
6 */
7export declare function uname(): string;
8/**
9 * Generates an architecture name that would be used in an Electron or Node.js
10 * download file name.
11 */
12export declare function getNodeArch(arch: string): string;
13/**
14 * Generates an architecture name that would be used in an Electron or Node.js
15 * download file name, from the `process` module information.
16 */
17export declare function getHostArch(): string;
18export declare function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void;
19export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
20/**
21 * Find the value of a environment variable which may or may not have the
22 * prefix, in a case-insensitive manner.
23 */
24export declare function getEnv(prefix?: string): (name: string) => string | undefined;
25export declare function setEnv(key: string, value: string | undefined): void;