UNPKG

1.64 kBTypeScriptView Raw
1/// <reference types="node" />
2import { EventEmitter } from 'events';
3import { BuildType, IRebuilder, RebuildMode } from './types';
4import { ModuleType } from './module-walker';
5export interface RebuildOptions {
6 buildPath: string;
7 electronVersion: string;
8 arch?: string;
9 extraModules?: string[];
10 onlyModules?: string[] | null;
11 force?: boolean;
12 headerURL?: string;
13 types?: ModuleType[];
14 mode?: RebuildMode;
15 debug?: boolean;
16 useCache?: boolean;
17 useElectronClang?: boolean;
18 cachePath?: string;
19 prebuildTagPrefix?: string;
20 projectRootPath?: string;
21 forceABI?: number;
22 disablePreGypCopy?: boolean;
23}
24export interface RebuilderOptions extends RebuildOptions {
25 lifecycle: EventEmitter;
26}
27export declare class Rebuilder implements IRebuilder {
28 private ABIVersion;
29 private moduleWalker;
30 nodeGypPath: string;
31 rebuilds: (() => Promise<void>)[];
32 lifecycle: EventEmitter;
33 buildPath: string;
34 electronVersion: string;
35 platform: string;
36 arch: string;
37 force: boolean;
38 headerURL: string;
39 mode: RebuildMode;
40 debug: boolean;
41 useCache: boolean;
42 cachePath: string;
43 prebuildTagPrefix: string;
44 msvsVersion?: string;
45 useElectronClang: boolean;
46 disablePreGypCopy: boolean;
47 constructor(options: RebuilderOptions);
48 get ABI(): string;
49 get buildType(): BuildType;
50 rebuild(): Promise<void>;
51 rebuildModuleAt(modulePath: string): Promise<void>;
52}
53export declare type RebuildResult = Promise<void> & {
54 lifecycle: EventEmitter;
55};
56export declare function rebuild(options: RebuildOptions): RebuildResult;
57
\No newline at end of file