UNPKG

2.1 kBTypeScriptView Raw
1import { Arch, ArchType } from "builder-util";
2import { AllPublishOptions } from "builder-util-runtime";
3export type Publish = AllPublishOptions | Array<AllPublishOptions> | null;
4export type TargetConfigType = Array<string | TargetConfiguration> | string | TargetConfiguration | null;
5export interface TargetConfiguration {
6 /**
7 * The target name. e.g. `snap`.
8 */
9 readonly target: string;
10 /**
11 * The arch or list of archs.
12 */
13 readonly arch?: Array<ArchType> | ArchType;
14}
15export declare class Platform {
16 name: string;
17 buildConfigurationKey: string;
18 nodeName: NodeJS.Platform;
19 static MAC: Platform;
20 static LINUX: Platform;
21 static WINDOWS: Platform;
22 constructor(name: string, buildConfigurationKey: string, nodeName: NodeJS.Platform);
23 toString(): string;
24 createTarget(type?: string | Array<string> | null, ...archs: Array<Arch>): Map<Platform, Map<Arch, Array<string>>>;
25 static current(): Platform;
26 static fromString(name: string): Platform;
27}
28export declare abstract class Target {
29 readonly name: string;
30 readonly isAsyncSupported: boolean;
31 abstract readonly outDir: string;
32 abstract readonly options: TargetSpecificOptions | null | undefined;
33 protected constructor(name: string, isAsyncSupported?: boolean);
34 checkOptions(): Promise<any>;
35 abstract build(appOutDir: string, arch: Arch): Promise<any>;
36 finishBuild(): Promise<any>;
37}
38export interface TargetSpecificOptions {
39 /**
40 The [artifact file name template](/configuration/configuration#artifact-file-name-template).
41 */
42 readonly artifactName?: string | null;
43 publish?: Publish;
44}
45export declare const DEFAULT_TARGET = "default";
46export declare const DIR_TARGET = "dir";
47export type CompressionLevel = "store" | "normal" | "maximum";
48export interface BeforeBuildContext {
49 readonly appDir: string;
50 readonly electronVersion: string;
51 readonly platform: Platform;
52 readonly arch: string;
53}
54export interface SourceRepositoryInfo {
55 type?: string;
56 domain?: string;
57 user: string;
58 project: string;
59}