1 | declare module "electron-builder-core" {
|
2 | import { Publish } from "electron-builder-http/out/publishOptions"
|
3 | export enum Arch {
|
4 | ia32 = 0,
|
5 | x64 = 1,
|
6 | armv7l = 2,
|
7 | }
|
8 | export type ArchType = "x64" | "ia32" | "armv7l"
|
9 |
|
10 | export function getArchSuffix(arch: Arch): string
|
11 | export type TargetConfigType = Array<string | TargetConfig> | string | TargetConfig | null
|
12 |
|
13 | export interface TargetConfig {
|
14 | |
15 |
|
16 |
|
17 | readonly target: string
|
18 | |
19 |
|
20 |
|
21 | readonly arch?: Array<"x64" | "ia32" | "armv7l"> | string
|
22 | }
|
23 |
|
24 | export function toLinuxArchString(arch: Arch): "armv7l" | "i386" | "amd64"
|
25 |
|
26 | export function archFromString(name: string): Arch
|
27 |
|
28 | export class Platform {
|
29 | name: string
|
30 | buildConfigurationKey: string
|
31 | nodeName: string
|
32 | static MAC: Platform
|
33 | static LINUX: Platform
|
34 | static WINDOWS: Platform
|
35 | static OSX: Platform
|
36 | constructor(name: string, buildConfigurationKey: string, nodeName: string)
|
37 | toString(): string
|
38 | createTarget(type?: string | Array<string> | null, ...archs: Array<Arch>): Map<Platform, Map<Arch, Array<string>>>
|
39 | static current(): Platform
|
40 | static fromString(name: string): Platform
|
41 | }
|
42 |
|
43 | export abstract class Target {
|
44 | readonly name: string
|
45 | readonly isAsyncSupported: boolean
|
46 | readonly abstract outDir: string
|
47 | readonly abstract options: TargetSpecificOptions | null | undefined
|
48 | constructor(name: string, isAsyncSupported?: boolean)
|
49 | abstract build(appOutDir: string, arch: Arch): Promise<any>
|
50 | finishBuild(): Promise<any>
|
51 | }
|
52 |
|
53 | export interface TargetSpecificOptions {
|
54 | |
55 |
|
56 |
|
57 | readonly artifactName?: string | null
|
58 | readonly forceCodeSigning?: boolean
|
59 | readonly publish?: Publish
|
60 | }
|
61 |
|
62 | export interface PlatformSpecificBuildOptions extends TargetSpecificOptions {
|
63 | readonly files?: Array<string> | string | null
|
64 | readonly extraFiles?: Array<FilePattern | string> | FilePattern | string | null
|
65 | readonly extraResources?: Array<FilePattern | string> | FilePattern | string | null
|
66 | readonly asarUnpack?: Array<string> | string | null
|
67 | readonly asar?: AsarOptions | boolean | null
|
68 | readonly target?: Array<string | TargetConfig> | string | TargetConfig | null
|
69 | readonly icon?: string | null
|
70 | readonly fileAssociations?: Array<FileAssociation> | FileAssociation
|
71 | }
|
72 | export const DEFAULT_TARGET = "default"
|
73 | export const DIR_TARGET = "dir"
|
74 |
|
75 | export interface AuthorMetadata {
|
76 | readonly name: string
|
77 | readonly email?: string
|
78 | }
|
79 | export type CompressionLevel = "store" | "normal" | "maximum"
|
80 |
|
81 | export interface RepositoryInfo {
|
82 | readonly url: string
|
83 | }
|
84 |
|
85 | export interface FilePattern {
|
86 | from?: string
|
87 | to?: string
|
88 | filter?: Array<string> | string
|
89 | }
|
90 |
|
91 | export interface AsarOptions {
|
92 | smartUnpack?: boolean
|
93 | ordering?: string | null
|
94 | extraMetadata?: any | null
|
95 | }
|
96 |
|
97 | export interface BeforeBuildContext {
|
98 | readonly appDir: string
|
99 | readonly electronVersion: string
|
100 | readonly platform: Platform
|
101 | readonly arch: string
|
102 | }
|
103 |
|
104 | |
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | export interface FileAssociation {
|
112 | |
113 |
|
114 |
|
115 | readonly ext: string | Array<string>
|
116 | |
117 |
|
118 |
|
119 | readonly name?: string | null
|
120 | |
121 |
|
122 |
|
123 | readonly description?: string | null
|
124 | |
125 |
|
126 |
|
127 | readonly icon?: string | null
|
128 | |
129 |
|
130 |
|
131 |
|
132 | readonly role?: string
|
133 | |
134 |
|
135 |
|
136 | readonly isPackage?: boolean
|
137 | }
|
138 |
|
139 | |
140 |
|
141 |
|
142 |
|
143 |
|
144 | export interface Protocol {
|
145 | |
146 |
|
147 |
|
148 | readonly name: string
|
149 | |
150 |
|
151 |
|
152 |
|
153 | readonly role?: "Editor" | "Viewer" | "Shell" | "None"
|
154 | |
155 |
|
156 |
|
157 | readonly schemes: Array<string>
|
158 | }
|
159 |
|
160 | |
161 |
|
162 |
|
163 | export interface MetadataDirectories {
|
164 | |
165 |
|
166 |
|
167 |
|
168 | readonly buildResources?: string | null
|
169 | |
170 |
|
171 |
|
172 |
|
173 | readonly output?: string | null
|
174 | |
175 |
|
176 |
|
177 | readonly app?: string | null
|
178 | }
|
179 |
|
180 | export interface SourceRepositoryInfo {
|
181 | type: string
|
182 | domain: string
|
183 | user: string
|
184 | project: string
|
185 | }
|
186 | }
|
187 |
|