app-builder-lib 25.1.2 → 25.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/out/configuration.d.ts +109 -55
- package/out/configuration.js.map +1 -1
- package/out/core.d.ts +1 -1
- package/out/core.js.map +1 -1
- package/out/errorMessages.d.ts +1 -1
- package/out/errorMessages.js +1 -1
- package/out/errorMessages.js.map +1 -1
- package/out/index.d.ts +2 -2
- package/out/index.js.map +1 -1
- package/out/options/AppXOptions.d.ts +1 -1
- package/out/options/AppXOptions.js.map +1 -1
- package/out/options/FileAssociation.d.ts +1 -1
- package/out/options/FileAssociation.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +73 -16
- package/out/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/out/options/SnapOptions.d.ts +1 -1
- package/out/options/SnapOptions.js.map +1 -1
- package/out/options/linuxOptions.d.ts +5 -5
- package/out/options/linuxOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +4 -4
- package/out/options/macOptions.js.map +1 -1
- package/out/options/pkgOptions.d.ts +1 -1
- package/out/options/pkgOptions.js.map +1 -1
- package/out/options/winOptions.d.ts +15 -15
- package/out/options/winOptions.js.map +1 -1
- package/out/packager.d.ts +1 -1
- package/out/publish/BitbucketPublisher.js +1 -1
- package/out/publish/BitbucketPublisher.js.map +1 -1
- package/out/publish/KeygenPublisher.js +1 -1
- package/out/publish/KeygenPublisher.js.map +1 -1
- package/out/publish/PublishManager.js +1 -1
- package/out/publish/PublishManager.js.map +1 -1
- package/out/publish/s3/spacesPublisher.js +4 -4
- package/out/publish/s3/spacesPublisher.js.map +1 -1
- package/out/targets/AppxTarget.js +5 -2
- package/out/targets/AppxTarget.js.map +1 -1
- package/out/targets/FpmTarget.js +1 -1
- package/out/targets/FpmTarget.js.map +1 -1
- package/out/targets/LinuxTargetHelper.js +1 -1
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/MsiWrappedTarget.js.map +1 -1
- package/out/targets/nsis/NsisTarget.js +5 -4
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/nsisOptions.d.ts +9 -9
- package/out/targets/nsis/nsisOptions.js.map +1 -1
- package/out/util/appFileCopier.js +10 -11
- package/out/util/appFileCopier.js.map +1 -1
- package/out/util/config/config.js +2 -2
- package/out/util/config/config.js.map +1 -1
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/package.json +9 -9
- package/scheme.json +125 -110
- package/templates/nsis/README.md +2 -2
package/README.md
ADDED
package/out/configuration.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { NsisOptions, NsisWebOptions, PortableOptions } from "./targets/nsis/nsi
|
|
|
19
19
|
/**
|
|
20
20
|
* Configuration Options
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface CommonConfiguration {
|
|
23
23
|
/**
|
|
24
24
|
* The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as
|
|
25
25
|
* [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
|
|
@@ -27,7 +27,7 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
readonly appId?: string | null;
|
|
29
29
|
/**
|
|
30
|
-
* As [name](#
|
|
30
|
+
* As [name](#metadata), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name).
|
|
31
31
|
* If not specified inside of the `build` configuration, `productName` property defined at the top level of `package.json` is used. If not specified at the top level of `package.json`, [name property](https://docs.npmjs.com/files/package.json#name) is used.
|
|
32
32
|
*/
|
|
33
33
|
readonly productName?: string | null;
|
|
@@ -36,6 +36,9 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
36
36
|
* @default Copyright © year ${author}
|
|
37
37
|
*/
|
|
38
38
|
readonly copyright?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Directories for build resources
|
|
41
|
+
*/
|
|
39
42
|
readonly directories?: MetadataDirectories | null;
|
|
40
43
|
/**
|
|
41
44
|
* Options related to how build macOS targets.
|
|
@@ -95,11 +98,6 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
95
98
|
readonly freebsd?: LinuxTargetSpecificOptions | null;
|
|
96
99
|
readonly p5p?: LinuxTargetSpecificOptions | null;
|
|
97
100
|
readonly apk?: LinuxTargetSpecificOptions | null;
|
|
98
|
-
/**
|
|
99
|
-
* Whether to include *all* of the submodules node_modules directories
|
|
100
|
-
* @default false
|
|
101
|
-
*/
|
|
102
|
-
includeSubNodeModules?: boolean;
|
|
103
101
|
/**
|
|
104
102
|
* Whether to build the application native dependencies from source.
|
|
105
103
|
* @default false
|
|
@@ -140,6 +138,39 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
140
138
|
* Whether to download the alternate FFmpeg library from Electron's release assets and replace the default FFmpeg library prior to signing
|
|
141
139
|
*/
|
|
142
140
|
readonly downloadAlternateFFmpeg?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Inject properties to `package.json`.
|
|
143
|
+
*/
|
|
144
|
+
readonly extraMetadata?: any;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
readonly forceCodeSigning?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Whether to include PDB files.
|
|
152
|
+
* @default false
|
|
153
|
+
*/
|
|
154
|
+
readonly includePdb?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Whether to remove `scripts` field from `package.json` files.
|
|
157
|
+
*
|
|
158
|
+
* @default true
|
|
159
|
+
*/
|
|
160
|
+
readonly removePackageScripts?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Whether to remove `keywords` field from `package.json` files.
|
|
163
|
+
*
|
|
164
|
+
* @default true
|
|
165
|
+
*/
|
|
166
|
+
readonly removePackageKeywords?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export interface Configuration extends CommonConfiguration, PlatformSpecificBuildOptions, Hooks {
|
|
169
|
+
/**
|
|
170
|
+
* Whether to include *all* of the submodules node_modules directories
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
includeSubNodeModules?: boolean;
|
|
143
174
|
/**
|
|
144
175
|
* Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified.
|
|
145
176
|
*/
|
|
@@ -168,15 +199,6 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
168
199
|
* If `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to disable automatic detection.
|
|
169
200
|
*/
|
|
170
201
|
extends?: Array<string> | string | null;
|
|
171
|
-
/**
|
|
172
|
-
* Inject properties to `package.json`.
|
|
173
|
-
*/
|
|
174
|
-
readonly extraMetadata?: any;
|
|
175
|
-
/**
|
|
176
|
-
* Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).
|
|
177
|
-
* @default false
|
|
178
|
-
*/
|
|
179
|
-
readonly forceCodeSigning?: boolean;
|
|
180
202
|
/**
|
|
181
203
|
* *libui-based frameworks only* The version of NodeJS you are packaging for.
|
|
182
204
|
* You can set it to `current` to set the Node.js version that you use to run.
|
|
@@ -191,31 +213,99 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
191
213
|
*/
|
|
192
214
|
readonly framework?: string | null;
|
|
193
215
|
/**
|
|
194
|
-
*
|
|
216
|
+
* Whether to disable sanity check asar package (useful for custom electron forks that implement their own encrypted integrity validation)
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
readonly disableSanityCheckAsar?: boolean;
|
|
220
|
+
}
|
|
221
|
+
export type CustomElectronDistributable = (options: PrepareApplicationStageDirectoryOptions) => string;
|
|
222
|
+
export type Hook<T, V> = (contextOrPath: T) => Promise<V> | V;
|
|
223
|
+
export interface PackContext {
|
|
224
|
+
readonly outDir: string;
|
|
225
|
+
readonly appOutDir: string;
|
|
226
|
+
readonly packager: PlatformPackager<any>;
|
|
227
|
+
readonly electronPlatformName: string;
|
|
228
|
+
readonly arch: Arch;
|
|
229
|
+
readonly targets: Array<Target>;
|
|
230
|
+
}
|
|
231
|
+
export type AfterPackContext = PackContext;
|
|
232
|
+
export type BeforePackContext = PackContext;
|
|
233
|
+
export type AfterExtractContext = PackContext;
|
|
234
|
+
export interface Hooks {
|
|
235
|
+
/**
|
|
236
|
+
The function (or path to file or module id) to be run before pack.
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
(context: BeforePackContext): Promise<any> | any
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
!!! example "As function"
|
|
243
|
+
|
|
244
|
+
```js
|
|
245
|
+
beforePack: async (context) => {
|
|
246
|
+
// your code
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Because in a configuration file you cannot use JavaScript, can be specified as a path to file or module id. Function must be exported as default export.
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
"build": {
|
|
254
|
+
"beforePack": "./myBeforePackHook.js"
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
File `myBeforePackHook.js` in the project root directory:
|
|
259
|
+
|
|
260
|
+
!!! example "myBeforePackHook.js"
|
|
261
|
+
```js
|
|
262
|
+
exports.default = async function(context) {
|
|
263
|
+
// your custom code
|
|
264
|
+
}
|
|
265
|
+
```
|
|
195
266
|
*/
|
|
196
267
|
readonly beforePack?: Hook<BeforePackContext, any> | string | null;
|
|
197
268
|
/**
|
|
198
269
|
* The function (or path to file or module id) to be [run after the prebuilt Electron binary has been extracted to the output directory](#afterextract)
|
|
270
|
+
* Same setup as {@link beforePack}
|
|
199
271
|
*/
|
|
200
272
|
readonly afterExtract?: Hook<AfterExtractContext, any> | string | null;
|
|
201
273
|
/**
|
|
202
274
|
* The function (or path to file or module id) to be [run after pack](#afterpack) (but before pack into distributable format and sign).
|
|
275
|
+
* Same setup as {@link beforePack}
|
|
203
276
|
*/
|
|
204
277
|
readonly afterPack?: Hook<AfterPackContext, any> | string | null;
|
|
205
278
|
/**
|
|
206
279
|
* The function (or path to file or module id) to be [run after pack and sign](#aftersign) (but before pack into distributable format).
|
|
280
|
+
* Same setup as {@link beforePack}
|
|
207
281
|
*/
|
|
208
282
|
readonly afterSign?: Hook<AfterPackContext, any> | string | null;
|
|
209
283
|
/**
|
|
210
284
|
* The function (or path to file or module id) to be run on artifact build start.
|
|
285
|
+
* Same setup as {@link beforePack}
|
|
211
286
|
*/
|
|
212
287
|
readonly artifactBuildStarted?: Hook<ArtifactBuildStarted, any> | string | null;
|
|
213
288
|
/**
|
|
214
289
|
* The function (or path to file or module id) to be run on artifact build completed.
|
|
290
|
+
* Same setup as {@link beforePack}
|
|
215
291
|
*/
|
|
216
292
|
readonly artifactBuildCompleted?: Hook<ArtifactCreated, any> | string | null;
|
|
217
293
|
/**
|
|
218
|
-
* The function (or path to file or module id) to be
|
|
294
|
+
* The function (or path to file or module id) to be run after all artifacts are built.
|
|
295
|
+
|
|
296
|
+
```typescript
|
|
297
|
+
(buildResult: BuildResult): Promise<Array<string>> | Array<string>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Configuration in the same way as `afterPack` (see above).
|
|
301
|
+
|
|
302
|
+
!!! example "myAfterAllArtifactBuild.js"
|
|
303
|
+
```js
|
|
304
|
+
exports.default = function () {
|
|
305
|
+
// you can return additional files to publish
|
|
306
|
+
return ["/path/to/additional/result/file"]
|
|
307
|
+
}
|
|
308
|
+
```
|
|
219
309
|
*/
|
|
220
310
|
readonly afterAllArtifactBuild?: Hook<BuildResult, Array<string>> | string | null;
|
|
221
311
|
/**
|
|
@@ -236,40 +326,7 @@ export interface Configuration extends PlatformSpecificBuildOptions {
|
|
|
236
326
|
* If provided and `node_modules` are missing, it will not invoke production dependencies check.
|
|
237
327
|
*/
|
|
238
328
|
readonly beforeBuild?: Hook<BeforeBuildContext, boolean | void> | string | null;
|
|
239
|
-
/**
|
|
240
|
-
* Whether to include PDB files.
|
|
241
|
-
* @default false
|
|
242
|
-
*/
|
|
243
|
-
readonly includePdb?: boolean;
|
|
244
|
-
/**
|
|
245
|
-
* Whether to remove `scripts` field from `package.json` files.
|
|
246
|
-
*
|
|
247
|
-
* @default true
|
|
248
|
-
*/
|
|
249
|
-
readonly removePackageScripts?: boolean;
|
|
250
|
-
/**
|
|
251
|
-
* Whether to remove `keywords` field from `package.json` files.
|
|
252
|
-
*
|
|
253
|
-
* @default true
|
|
254
|
-
*/
|
|
255
|
-
readonly removePackageKeywords?: boolean;
|
|
256
|
-
/**
|
|
257
|
-
* Whether to disable sanity check asar package (useful for custom electron forks that implement their own encrypted integrity validation)
|
|
258
|
-
* @default false
|
|
259
|
-
*/
|
|
260
|
-
readonly disableSanityCheckAsar?: boolean;
|
|
261
329
|
}
|
|
262
|
-
interface PackContext {
|
|
263
|
-
readonly outDir: string;
|
|
264
|
-
readonly appOutDir: string;
|
|
265
|
-
readonly packager: PlatformPackager<any>;
|
|
266
|
-
readonly electronPlatformName: string;
|
|
267
|
-
readonly arch: Arch;
|
|
268
|
-
readonly targets: Array<Target>;
|
|
269
|
-
}
|
|
270
|
-
export type AfterPackContext = PackContext;
|
|
271
|
-
export type BeforePackContext = PackContext;
|
|
272
|
-
export type AfterExtractContext = PackContext;
|
|
273
330
|
export interface MetadataDirectories {
|
|
274
331
|
/**
|
|
275
332
|
* The path to build resources.
|
|
@@ -279,7 +336,7 @@ export interface MetadataDirectories {
|
|
|
279
336
|
*/
|
|
280
337
|
readonly buildResources?: string | null;
|
|
281
338
|
/**
|
|
282
|
-
* The output directory. [File macros](
|
|
339
|
+
* The output directory. [File macros](./file-patterns.md#file-macros) are supported.
|
|
283
340
|
* @default dist
|
|
284
341
|
*/
|
|
285
342
|
readonly output?: string | null;
|
|
@@ -288,6 +345,3 @@ export interface MetadataDirectories {
|
|
|
288
345
|
*/
|
|
289
346
|
readonly app?: string | null;
|
|
290
347
|
}
|
|
291
|
-
export type CustomElectronDistributable = (options: PrepareApplicationStageDirectoryOptions) => string;
|
|
292
|
-
export type Hook<T, V> = (contextOrPath: T) => Promise<V> | V;
|
|
293
|
-
export {};
|
package/out/configuration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":"","sourcesContent":["import { Arch } from \"builder-util\"\nimport { BeforeBuildContext, Target } from \"./core\"\nimport { ElectronBrandingOptions, ElectronDownloadOptions } from \"./electron/ElectronFramework\"\nimport { PrepareApplicationStageDirectoryOptions } from \"./Framework\"\nimport { AppXOptions } from \"./options/AppXOptions\"\nimport { AppImageOptions, DebOptions, FlatpakOptions, LinuxConfiguration, LinuxTargetSpecificOptions } from \"./options/linuxOptions\"\nimport { DmgOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions\"\nimport { MsiOptions } from \"./options/MsiOptions\"\nimport { MsiWrappedOptions } from \"./options/MsiWrappedOptions\"\nimport { PkgOptions } from \"./options/pkgOptions\"\nimport { PlatformSpecificBuildOptions } from \"./options/PlatformSpecificBuildOptions\"\nimport { SnapOptions } from \"./options/SnapOptions\"\nimport { SquirrelWindowsOptions } from \"./options/SquirrelWindowsOptions\"\nimport { WindowsConfiguration } from \"./options/winOptions\"\nimport { BuildResult } from \"./packager\"\nimport { ArtifactBuildStarted, ArtifactCreated } from \"./packagerApi\"\nimport { PlatformPackager } from \"./platformPackager\"\nimport { NsisOptions, NsisWebOptions, PortableOptions } from \"./targets/nsis/nsisOptions\"\n\n// duplicate appId here because it is important\n/**\n * Configuration Options\n */\nexport interface Configuration extends PlatformSpecificBuildOptions {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * As [name](#Metadata-name), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name).\n * If not specified inside of the `build` configuration, `productName` property defined at the top level of `package.json` is used. If not specified at the top level of `package.json`, [name property](https://docs.npmjs.com/files/package.json#name) is used.\n */\n readonly productName?: string | null\n\n /**\n * The human-readable copyright line for the app.\n * @default Copyright © year ${author}\n */\n readonly copyright?: string | null\n\n readonly directories?: MetadataDirectories | null\n\n /**\n * Options related to how build macOS targets.\n */\n readonly mac?: MacConfiguration | null\n /**\n * MAS (Mac Application Store) options.\n */\n readonly mas?: MasConfiguration | null\n /**\n * MAS (Mac Application Store) development options (`mas-dev` target).\n */\n readonly masDev?: MasConfiguration | null\n /**\n * macOS DMG options.\n */\n readonly dmg?: DmgOptions | null\n /**\n * macOS PKG options.\n */\n readonly pkg?: PkgOptions | null\n\n /**\n * Options related to how build Windows targets.\n */\n readonly win?: WindowsConfiguration | null\n readonly nsis?: NsisOptions | null\n readonly nsisWeb?: NsisWebOptions | null\n readonly portable?: PortableOptions | null\n readonly appx?: AppXOptions | null\n /** @private */\n readonly msi?: MsiOptions | null\n /** @private */\n readonly msiWrapped?: MsiWrappedOptions | null\n readonly squirrelWindows?: SquirrelWindowsOptions | null\n\n /**\n * Options related to how build Linux targets.\n */\n readonly linux?: LinuxConfiguration | null\n /**\n * Debian package options.\n */\n readonly deb?: DebOptions | null\n /**\n * Snap options.\n */\n readonly snap?: SnapOptions | null\n /**\n * AppImage options.\n */\n readonly appImage?: AppImageOptions | null\n /**\n * Flatpak options.\n */\n readonly flatpak?: FlatpakOptions | null\n readonly pacman?: LinuxTargetSpecificOptions | null\n readonly rpm?: LinuxTargetSpecificOptions | null\n readonly freebsd?: LinuxTargetSpecificOptions | null\n readonly p5p?: LinuxTargetSpecificOptions | null\n readonly apk?: LinuxTargetSpecificOptions | null\n\n /**\n * Whether to include *all* of the submodules node_modules directories\n * @default false\n */\n includeSubNodeModules?: boolean\n\n /**\n * Whether to build the application native dependencies from source.\n * @default false\n */\n buildDependenciesFromSource?: boolean\n /**\n * Whether to execute `node-gyp rebuild` before starting to package the app.\n *\n * Don't [use](https://github.com/electron-userland/electron-builder/issues/683#issuecomment-241214075) [npm](http://electron.atom.io/docs/tutorial/using-native-node-modules/#using-npm) (neither `.npmrc`) for configuring electron headers. Use `electron-builder node-gyp-rebuild` instead.\n * @default false\n */\n readonly nodeGypRebuild?: boolean\n /**\n * Additional command line arguments to use when installing app native deps.\n */\n readonly npmArgs?: Array<string> | string | null\n /**\n * Whether to [rebuild](https://docs.npmjs.com/cli/rebuild) native dependencies before starting to package the app.\n * @default true\n */\n readonly npmRebuild?: boolean\n /**\n * Use `legacy` app-builder binary for installing native dependencies, or `@electron/rebuild` in `sequential` or `parallel` compilation modes.\n * @default sequential\n */\n readonly nativeRebuilder?: \"legacy\" | \"sequential\" | \"parallel\" | null\n\n /**\n * The build number. Maps to the `--iteration` flag for builds using FPM on Linux.\n * If not defined, then it will fallback to `BUILD_NUMBER` or `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_BUILDNUMBER` or `CI_PIPELINE_IID` env.\n */\n readonly buildNumber?: string | null\n\n /**\n * The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`.\n * If `buildVersion` is not defined and `buildNumber` (or one of the `buildNumber` envs) is defined, it will be used as a build version (`version.buildNumber`).\n */\n readonly buildVersion?: string | null\n\n /**\n * Whether to download the alternate FFmpeg library from Electron's release assets and replace the default FFmpeg library prior to signing\n */\n readonly downloadAlternateFFmpeg?: boolean\n\n /**\n * Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified.\n */\n readonly electronCompile?: boolean\n\n /**\n * Returns the path to custom Electron build (e.g. `~/electron/out/R`). Zip files must follow the pattern `electron-v${version}-${platformName}-${arch}.zip`, otherwise it will be assumed to be an unpacked Electron app directory\n */\n readonly electronDist?: string | CustomElectronDistributable\n\n /**\n * The [electron-download](https://github.com/electron-userland/electron-download#usage) options.\n */\n readonly electronDownload?: ElectronDownloadOptions\n\n /**\n * The branding used by Electron's distributables. This is needed if a fork has modified Electron's BRANDING.json file.\n */\n readonly electronBranding?: ElectronBrandingOptions\n\n /**\n * The version of electron you are packaging for. Defaults to version of `electron`, `electron-prebuilt` or `electron-prebuilt-compile` dependency.\n */\n electronVersion?: string | null\n\n /**\n * The name of a built-in configuration preset (currently, only `react-cra` is supported) or any number of paths to config files (relative to project dir).\n *\n * The latter allows to mixin a config from multiple other configs, as if you `Object.assign` them, but properly combine `files` glob patterns.\n *\n * If `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to disable automatic detection.\n */\n extends?: Array<string> | string | null\n\n /**\n * Inject properties to `package.json`.\n */\n readonly extraMetadata?: any\n\n /**\n * Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * *libui-based frameworks only* The version of NodeJS you are packaging for.\n * You can set it to `current` to set the Node.js version that you use to run.\n */\n readonly nodeVersion?: string | null\n\n /**\n * *libui-based frameworks only* The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.\n */\n readonly launchUiVersion?: boolean | string | null\n\n /**\n * The framework name. One of `electron`, `proton`, `libui`. Defaults to `electron`.\n */\n readonly framework?: string | null\n\n /**\n * The function (or path to file or module id) to be [run before pack](#beforepack)\n */\n readonly beforePack?: Hook<BeforePackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after the prebuilt Electron binary has been extracted to the output directory](#afterextract)\n */\n readonly afterExtract?: Hook<AfterExtractContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after pack](#afterpack) (but before pack into distributable format and sign).\n */\n readonly afterPack?: Hook<AfterPackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after pack and sign](#aftersign) (but before pack into distributable format).\n */\n readonly afterSign?: Hook<AfterPackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be run on artifact build start.\n */\n readonly artifactBuildStarted?: Hook<ArtifactBuildStarted, any> | string | null\n /**\n * The function (or path to file or module id) to be run on artifact build completed.\n */\n readonly artifactBuildCompleted?: Hook<ArtifactCreated, any> | string | null\n /**\n * The function (or path to file or module id) to be [run after all artifacts are build](#afterAllArtifactBuild).\n */\n readonly afterAllArtifactBuild?: Hook<BuildResult, Array<string>> | string | null\n /**\n * MSI project created on disk - not packed into .msi package yet.\n */\n readonly msiProjectCreated?: Hook<string, any> | string | null\n /**\n * Appx manifest created on disk - not packed into .appx package yet.\n */\n readonly appxManifestCreated?: Hook<string, any> | string | null\n /**\n * The function (or path to file or module id) to be [run on each node module](#onnodemodulefile) file. Returning `true`/`false` will determine whether to force include or to use the default copier logic\n */\n readonly onNodeModuleFile?: Hook<string, void | boolean> | string | null\n /**\n * The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when `npmRebuild` is set to `true`. Resolving to `false` will skip dependencies install or rebuild.\n *\n * If provided and `node_modules` are missing, it will not invoke production dependencies check.\n */\n readonly beforeBuild?: Hook<BeforeBuildContext, boolean | void> | string | null\n\n /**\n * Whether to include PDB files.\n * @default false\n */\n readonly includePdb?: boolean\n\n /**\n * Whether to remove `scripts` field from `package.json` files.\n *\n * @default true\n */\n readonly removePackageScripts?: boolean\n\n /**\n * Whether to remove `keywords` field from `package.json` files.\n *\n * @default true\n */\n readonly removePackageKeywords?: boolean\n\n /**\n * Whether to disable sanity check asar package (useful for custom electron forks that implement their own encrypted integrity validation)\n * @default false\n */\n readonly disableSanityCheckAsar?: boolean\n}\n\ninterface PackContext {\n readonly outDir: string\n readonly appOutDir: string\n readonly packager: PlatformPackager<any>\n readonly electronPlatformName: string\n readonly arch: Arch\n readonly targets: Array<Target>\n}\nexport type AfterPackContext = PackContext\nexport type BeforePackContext = PackContext\nexport type AfterExtractContext = PackContext\n\nexport interface MetadataDirectories {\n /**\n * The path to build resources.\n *\n * Please note — build resources are not packed into the app. If you need to use some files, e.g. as tray icon, please include required files explicitly: `\"files\": [\"**\\/*\", \"build/icon.*\"]`\n * @default build\n */\n readonly buildResources?: string | null\n\n /**\n * The output directory. [File macros](/file-patterns#file-macros) are supported.\n * @default dist\n */\n readonly output?: string | null\n\n /**\n * The application directory (containing the application package.json), defaults to `app`, `www` or working directory.\n */\n readonly app?: string | null\n}\n\nexport type CustomElectronDistributable = (options: PrepareApplicationStageDirectoryOptions) => string\n\nexport type Hook<T, V> = (contextOrPath: T) => Promise<V> | V\n"]}
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":"","sourcesContent":["import { Arch } from \"builder-util\"\nimport { BeforeBuildContext, Target } from \"./core\"\nimport { ElectronBrandingOptions, ElectronDownloadOptions } from \"./electron/ElectronFramework\"\nimport { PrepareApplicationStageDirectoryOptions } from \"./Framework\"\nimport { AppXOptions } from \"./options/AppXOptions\"\nimport { AppImageOptions, DebOptions, FlatpakOptions, LinuxConfiguration, LinuxTargetSpecificOptions } from \"./options/linuxOptions\"\nimport { DmgOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions\"\nimport { MsiOptions } from \"./options/MsiOptions\"\nimport { MsiWrappedOptions } from \"./options/MsiWrappedOptions\"\nimport { PkgOptions } from \"./options/pkgOptions\"\nimport { PlatformSpecificBuildOptions } from \"./options/PlatformSpecificBuildOptions\"\nimport { SnapOptions } from \"./options/SnapOptions\"\nimport { SquirrelWindowsOptions } from \"./options/SquirrelWindowsOptions\"\nimport { WindowsConfiguration } from \"./options/winOptions\"\nimport { BuildResult } from \"./packager\"\nimport { ArtifactBuildStarted, ArtifactCreated } from \"./packagerApi\"\nimport { PlatformPackager } from \"./platformPackager\"\nimport { NsisOptions, NsisWebOptions, PortableOptions } from \"./targets/nsis/nsisOptions\"\n\n// duplicate appId here because it is important\n/**\n * Configuration Options\n */\nexport interface CommonConfiguration {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * As [name](#metadata), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name).\n * If not specified inside of the `build` configuration, `productName` property defined at the top level of `package.json` is used. If not specified at the top level of `package.json`, [name property](https://docs.npmjs.com/files/package.json#name) is used.\n */\n readonly productName?: string | null\n\n /**\n * The human-readable copyright line for the app.\n * @default Copyright © year ${author}\n */\n readonly copyright?: string | null\n\n /**\n * Directories for build resources\n */\n readonly directories?: MetadataDirectories | null\n\n /**\n * Options related to how build macOS targets.\n */\n readonly mac?: MacConfiguration | null\n /**\n * MAS (Mac Application Store) options.\n */\n readonly mas?: MasConfiguration | null\n /**\n * MAS (Mac Application Store) development options (`mas-dev` target).\n */\n readonly masDev?: MasConfiguration | null\n /**\n * macOS DMG options.\n */\n readonly dmg?: DmgOptions | null\n /**\n * macOS PKG options.\n */\n readonly pkg?: PkgOptions | null\n\n /**\n * Options related to how build Windows targets.\n */\n readonly win?: WindowsConfiguration | null\n readonly nsis?: NsisOptions | null\n readonly nsisWeb?: NsisWebOptions | null\n readonly portable?: PortableOptions | null\n readonly appx?: AppXOptions | null\n /** @private */\n readonly msi?: MsiOptions | null\n /** @private */\n readonly msiWrapped?: MsiWrappedOptions | null\n readonly squirrelWindows?: SquirrelWindowsOptions | null\n\n /**\n * Options related to how build Linux targets.\n */\n readonly linux?: LinuxConfiguration | null\n /**\n * Debian package options.\n */\n readonly deb?: DebOptions | null\n /**\n * Snap options.\n */\n readonly snap?: SnapOptions | null\n /**\n * AppImage options.\n */\n readonly appImage?: AppImageOptions | null\n /**\n * Flatpak options.\n */\n readonly flatpak?: FlatpakOptions | null\n readonly pacman?: LinuxTargetSpecificOptions | null\n readonly rpm?: LinuxTargetSpecificOptions | null\n readonly freebsd?: LinuxTargetSpecificOptions | null\n readonly p5p?: LinuxTargetSpecificOptions | null\n readonly apk?: LinuxTargetSpecificOptions | null\n\n /**\n * Whether to build the application native dependencies from source.\n * @default false\n */\n buildDependenciesFromSource?: boolean\n /**\n * Whether to execute `node-gyp rebuild` before starting to package the app.\n *\n * Don't [use](https://github.com/electron-userland/electron-builder/issues/683#issuecomment-241214075) [npm](http://electron.atom.io/docs/tutorial/using-native-node-modules/#using-npm) (neither `.npmrc`) for configuring electron headers. Use `electron-builder node-gyp-rebuild` instead.\n * @default false\n */\n readonly nodeGypRebuild?: boolean\n /**\n * Additional command line arguments to use when installing app native deps.\n */\n readonly npmArgs?: Array<string> | string | null\n /**\n * Whether to [rebuild](https://docs.npmjs.com/cli/rebuild) native dependencies before starting to package the app.\n * @default true\n */\n readonly npmRebuild?: boolean\n /**\n * Use `legacy` app-builder binary for installing native dependencies, or `@electron/rebuild` in `sequential` or `parallel` compilation modes.\n * @default sequential\n */\n readonly nativeRebuilder?: \"legacy\" | \"sequential\" | \"parallel\" | null\n\n /**\n * The build number. Maps to the `--iteration` flag for builds using FPM on Linux.\n * If not defined, then it will fallback to `BUILD_NUMBER` or `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_BUILDNUMBER` or `CI_PIPELINE_IID` env.\n */\n readonly buildNumber?: string | null\n\n /**\n * The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`.\n * If `buildVersion` is not defined and `buildNumber` (or one of the `buildNumber` envs) is defined, it will be used as a build version (`version.buildNumber`).\n */\n readonly buildVersion?: string | null\n\n /**\n * Whether to download the alternate FFmpeg library from Electron's release assets and replace the default FFmpeg library prior to signing\n */\n readonly downloadAlternateFFmpeg?: boolean\n\n /**\n * Inject properties to `package.json`.\n */\n readonly extraMetadata?: any\n\n /**\n * Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * Whether to include PDB files.\n * @default false\n */\n readonly includePdb?: boolean\n\n /**\n * Whether to remove `scripts` field from `package.json` files.\n *\n * @default true\n */\n readonly removePackageScripts?: boolean\n\n /**\n * Whether to remove `keywords` field from `package.json` files.\n *\n * @default true\n */\n readonly removePackageKeywords?: boolean\n}\nexport interface Configuration extends CommonConfiguration, PlatformSpecificBuildOptions, Hooks {\n /**\n * Whether to include *all* of the submodules node_modules directories\n * @default false\n */\n includeSubNodeModules?: boolean\n\n /**\n * Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified.\n */\n readonly electronCompile?: boolean\n\n /**\n * Returns the path to custom Electron build (e.g. `~/electron/out/R`). Zip files must follow the pattern `electron-v${version}-${platformName}-${arch}.zip`, otherwise it will be assumed to be an unpacked Electron app directory\n */\n readonly electronDist?: string | CustomElectronDistributable\n\n /**\n * The [electron-download](https://github.com/electron-userland/electron-download#usage) options.\n */\n readonly electronDownload?: ElectronDownloadOptions\n\n /**\n * The branding used by Electron's distributables. This is needed if a fork has modified Electron's BRANDING.json file.\n */\n readonly electronBranding?: ElectronBrandingOptions\n\n /**\n * The version of electron you are packaging for. Defaults to version of `electron`, `electron-prebuilt` or `electron-prebuilt-compile` dependency.\n */\n electronVersion?: string | null\n\n /**\n * The name of a built-in configuration preset (currently, only `react-cra` is supported) or any number of paths to config files (relative to project dir).\n *\n * The latter allows to mixin a config from multiple other configs, as if you `Object.assign` them, but properly combine `files` glob patterns.\n *\n * If `react-scripts` in the app dependencies, `react-cra` will be set automatically. Set to `null` to disable automatic detection.\n */\n extends?: Array<string> | string | null\n\n /**\n * *libui-based frameworks only* The version of NodeJS you are packaging for.\n * You can set it to `current` to set the Node.js version that you use to run.\n */\n readonly nodeVersion?: string | null\n\n /**\n * *libui-based frameworks only* The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.\n */\n readonly launchUiVersion?: boolean | string | null\n\n /**\n * The framework name. One of `electron`, `proton`, `libui`. Defaults to `electron`.\n */\n readonly framework?: string | null\n\n /**\n * Whether to disable sanity check asar package (useful for custom electron forks that implement their own encrypted integrity validation)\n * @default false\n */\n readonly disableSanityCheckAsar?: boolean\n}\n\nexport type CustomElectronDistributable = (options: PrepareApplicationStageDirectoryOptions) => string\n\nexport type Hook<T, V> = (contextOrPath: T) => Promise<V> | V\n\nexport interface PackContext {\n readonly outDir: string\n readonly appOutDir: string\n readonly packager: PlatformPackager<any>\n readonly electronPlatformName: string\n readonly arch: Arch\n readonly targets: Array<Target>\n}\nexport type AfterPackContext = PackContext\nexport type BeforePackContext = PackContext\nexport type AfterExtractContext = PackContext\n\nexport interface Hooks {\n /**\nThe function (or path to file or module id) to be run before pack.\n\n```typescript\n(context: BeforePackContext): Promise<any> | any\n```\n\n!!! example \"As function\"\n\n ```js\n beforePack: async (context) => {\n // your code\n }\n ```\n\nBecause in a configuration file you cannot use JavaScript, can be specified as a path to file or module id. Function must be exported as default export.\n\n```json\n\"build\": {\n \"beforePack\": \"./myBeforePackHook.js\"\n}\n```\n\nFile `myBeforePackHook.js` in the project root directory:\n\n!!! example \"myBeforePackHook.js\"\n ```js\n exports.default = async function(context) {\n // your custom code\n }\n ```\n */\n readonly beforePack?: Hook<BeforePackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after the prebuilt Electron binary has been extracted to the output directory](#afterextract)\n * Same setup as {@link beforePack}\n */\n readonly afterExtract?: Hook<AfterExtractContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after pack](#afterpack) (but before pack into distributable format and sign).\n * Same setup as {@link beforePack}\n */\n readonly afterPack?: Hook<AfterPackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be [run after pack and sign](#aftersign) (but before pack into distributable format).\n * Same setup as {@link beforePack}\n */\n readonly afterSign?: Hook<AfterPackContext, any> | string | null\n\n /**\n * The function (or path to file or module id) to be run on artifact build start.\n * Same setup as {@link beforePack}\n */\n readonly artifactBuildStarted?: Hook<ArtifactBuildStarted, any> | string | null\n /**\n * The function (or path to file or module id) to be run on artifact build completed.\n * Same setup as {@link beforePack}\n */\n readonly artifactBuildCompleted?: Hook<ArtifactCreated, any> | string | null\n /**\n * The function (or path to file or module id) to be run after all artifacts are built.\n\n```typescript\n(buildResult: BuildResult): Promise<Array<string>> | Array<string>\n```\n\nConfiguration in the same way as `afterPack` (see above).\n\n!!! example \"myAfterAllArtifactBuild.js\"\n ```js\n exports.default = function () {\n // you can return additional files to publish\n return [\"/path/to/additional/result/file\"]\n }\n ```\n */\n readonly afterAllArtifactBuild?: Hook<BuildResult, Array<string>> | string | null\n /**\n * MSI project created on disk - not packed into .msi package yet.\n */\n readonly msiProjectCreated?: Hook<string, any> | string | null\n /**\n * Appx manifest created on disk - not packed into .appx package yet.\n */\n readonly appxManifestCreated?: Hook<string, any> | string | null\n /**\n * The function (or path to file or module id) to be [run on each node module](#onnodemodulefile) file. Returning `true`/`false` will determine whether to force include or to use the default copier logic\n */\n readonly onNodeModuleFile?: Hook<string, void | boolean> | string | null\n /**\n * The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when `npmRebuild` is set to `true`. Resolving to `false` will skip dependencies install or rebuild.\n *\n * If provided and `node_modules` are missing, it will not invoke production dependencies check.\n */\n readonly beforeBuild?: Hook<BeforeBuildContext, boolean | void> | string | null\n}\n\nexport interface MetadataDirectories {\n /**\n * The path to build resources.\n *\n * Please note — build resources are not packed into the app. If you need to use some files, e.g. as tray icon, please include required files explicitly: `\"files\": [\"**\\/*\", \"build/icon.*\"]`\n * @default build\n */\n readonly buildResources?: string | null\n\n /**\n * The output directory. [File macros](./file-patterns.md#file-macros) are supported.\n * @default dist\n */\n readonly output?: string | null\n\n /**\n * The application directory (containing the application package.json), defaults to `app`, `www` or working directory.\n */\n readonly app?: string | null\n}\n"]}
|
package/out/core.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare abstract class Target {
|
|
|
37
37
|
}
|
|
38
38
|
export interface TargetSpecificOptions {
|
|
39
39
|
/**
|
|
40
|
-
The [artifact file name template](
|
|
40
|
+
The [artifact file name template](./configuration.md#artifact-file-name-template).
|
|
41
41
|
*/
|
|
42
42
|
readonly artifactName?: string | null;
|
|
43
43
|
publish?: Publish;
|
package/out/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAoB7D,MAAa,QAAQ;IAKnB,YACS,IAAY,EACZ,qBAA6B,EAC7B,QAAyB;QAFzB,SAAI,GAAJ,IAAI,CAAQ;QACZ,0BAAqB,GAArB,qBAAqB,CAAQ;QAC7B,aAAQ,GAAR,QAAQ,CAAiB;IAC/B,CAAC;IAEJ,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,YAAY,CAAC,IAAoC,EAAE,GAAG,KAAkB;QACtE,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YAC1D,OAAO,IAAI,GAAG,CAAC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,OAAO,QAAQ,CAAC,KAAK,CAAA;YAEvB;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;;AAlDH,4BAmDC;AAlDQ,YAAG,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;AAC1C,cAAK,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC/C,gBAAO,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;AAkD1D,MAAsB,MAAM;IAI1B,YACW,IAAY,EACZ,mBAA4B,IAAI;QADhC,SAAI,GAAJ,IAAI,CAAQ;QACZ,qBAAgB,GAAhB,gBAAgB,CAAgB;IACxC,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,SAAS;IACX,CAAC;IAID,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF;AAlBD,wBAkBC;AAWY,QAAA,cAAc,GAAG,SAAS,CAAA;AAC1B,QAAA,UAAU,GAAG,KAAK,CAAA","sourcesContent":["import { Arch, archFromString, ArchType } from \"builder-util\"\nimport { AllPublishOptions } from \"builder-util-runtime\"\n\n// https://github.com/YousefED/typescript-json-schema/issues/80\nexport type Publish = AllPublishOptions | Array<AllPublishOptions> | null\n\nexport type TargetConfigType = Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\nexport interface TargetConfiguration {\n /**\n * The target name. e.g. `snap`.\n */\n readonly target: string\n\n /**\n * The arch or list of archs.\n */\n readonly arch?: Array<ArchType> | ArchType\n}\n\nexport class Platform {\n static MAC = new Platform(\"mac\", \"mac\", \"darwin\")\n static LINUX = new Platform(\"linux\", \"linux\", \"linux\")\n static WINDOWS = new Platform(\"windows\", \"win\", \"win32\")\n\n constructor(\n public name: string,\n public buildConfigurationKey: string,\n public nodeName: NodeJS.Platform\n ) {}\n\n toString() {\n return this.name\n }\n\n createTarget(type?: string | Array<string> | null, ...archs: Array<Arch>): Map<Platform, Map<Arch, Array<string>>> {\n if (type == null && (archs == null || archs.length === 0)) {\n return new Map([[this, new Map()]])\n }\n\n const archToType = new Map()\n\n for (const arch of archs == null || archs.length === 0 ? [archFromString(process.arch)] : archs) {\n archToType.set(arch, type == null ? [] : Array.isArray(type) ? type : [type])\n }\n return new Map([[this, archToType]])\n }\n\n static current(): Platform {\n return Platform.fromString(process.platform)\n }\n\n static fromString(name: string): Platform {\n name = name.toLowerCase()\n switch (name) {\n case Platform.MAC.nodeName:\n case Platform.MAC.name:\n return Platform.MAC\n\n case Platform.WINDOWS.nodeName:\n case Platform.WINDOWS.name:\n case Platform.WINDOWS.buildConfigurationKey:\n return Platform.WINDOWS\n\n case Platform.LINUX.nodeName:\n return Platform.LINUX\n\n default:\n throw new Error(`Unknown platform: ${name}`)\n }\n }\n}\n\nexport abstract class Target {\n abstract readonly outDir: string\n abstract readonly options: TargetSpecificOptions | null | undefined\n\n protected constructor(\n readonly name: string,\n readonly isAsyncSupported: boolean = true\n ) {}\n\n async checkOptions(): Promise<any> {\n // ignore\n }\n\n abstract build(appOutDir: string, arch: Arch): Promise<any>\n\n finishBuild(): Promise<any> {\n return Promise.resolve()\n }\n}\n\nexport interface TargetSpecificOptions {\n /**\n The [artifact file name template](
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAoB7D,MAAa,QAAQ;IAKnB,YACS,IAAY,EACZ,qBAA6B,EAC7B,QAAyB;QAFzB,SAAI,GAAJ,IAAI,CAAQ;QACZ,0BAAqB,GAArB,qBAAqB,CAAQ;QAC7B,aAAQ,GAAR,QAAQ,CAAiB;IAC/B,CAAC;IAEJ,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,YAAY,CAAC,IAAoC,EAAE,GAAG,KAAkB;QACtE,IA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C3B,KAAK,QAAQ,CAAC,OAAO,CAAC,qBAAqB;gBACzC,OAAO,QAAQ,CAAC,OAAO,CAAA;YAEzB,KAAK,QAAQ,CAAC,KAAK,CAAC,QAAQ;gBAC1B,OAAO,QAAQ,CAAC,KAAK,CAAA;YAEvB;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;;AAlDH,4BAmDC;AAlDQ,YAAG,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;AAC1C,cAAK,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC/C,gBAAO,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;AAkD1D,MAAsB,MAAM;IAI1B,YACW,IAAY,EACZ,mBAA4B,IAAI;QADhC,SAAI,GAAJ,IAAI,CAAQ;QACZ,qBAAgB,GAAhB,gBAAgB,CAAgB;IACxC,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,SAAS;IACX,CAAC;IAID,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF;AAlBD,wBAkBC;AAWY,QAAA,cAAc,GAAG,SAAS,CAAA;AAC1B,QAAA,UAAU,GAAG,KAAK,CAAA","sourcesContent":["import { Arch, archFromString, ArchType } from \"builder-util\"\nimport { AllPublishOptions } from \"builder-util-runtime\"\n\n// https://github.com/YousefED/typescript-json-schema/issues/80\nexport type Publish = AllPublishOptions | Array<AllPublishOptions> | null\n\nexport type TargetConfigType = Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\nexport interface TargetConfiguration {\n /**\n * The target name. e.g. `snap`.\n */\n readonly target: string\n\n /**\n * The arch or list of archs.\n */\n readonly arch?: Array<ArchType> | ArchType\n}\n\nexport class Platform {\n static MAC = new Platform(\"mac\", \"mac\", \"darwin\")\n static LINUX = new Platform(\"linux\", \"linux\", \"linux\")\n static WINDOWS = new Platform(\"windows\", \"win\", \"win32\")\n\n constructor(\n public name: string,\n public buildConfigurationKey: string,\n public nodeName: NodeJS.Platform\n ) {}\n\n toString() {\n return this.name\n }\n\n createTarget(type?: string | Array<string> | null, ...archs: Array<Arch>): Map<Platform, Map<Arch, Array<string>>> {\n if (type == null && (archs == null || archs.length === 0)) {\n return new Map([[this, new Map()]])\n }\n\n const archToType = new Map()\n\n for (const arch of archs == null || archs.length === 0 ? [archFromString(process.arch)] : archs) {\n archToType.set(arch, type == null ? [] : Array.isArray(type) ? type : [type])\n }\n return new Map([[this, archToType]])\n }\n\n static current(): Platform {\n return Platform.fromString(process.platform)\n }\n\n static fromString(name: string): Platform {\n name = name.toLowerCase()\n switch (name) {\n case Platform.MAC.nodeName:\n case Platform.MAC.name:\n return Platform.MAC\n\n case Platform.WINDOWS.nodeName:\n case Platform.WINDOWS.name:\n case Platform.WINDOWS.buildConfigurationKey:\n return Platform.WINDOWS\n\n case Platform.LINUX.nodeName:\n return Platform.LINUX\n\n default:\n throw new Error(`Unknown platform: ${name}`)\n }\n }\n}\n\nexport abstract class Target {\n abstract readonly outDir: string\n abstract readonly options: TargetSpecificOptions | null | undefined\n\n protected constructor(\n readonly name: string,\n readonly isAsyncSupported: boolean = true\n ) {}\n\n async checkOptions(): Promise<any> {\n // ignore\n }\n\n abstract build(appOutDir: string, arch: Arch): Promise<any>\n\n finishBuild(): Promise<any> {\n return Promise.resolve()\n }\n}\n\nexport interface TargetSpecificOptions {\n /**\n The [artifact file name template](./configuration.md#artifact-file-name-template).\n */\n readonly artifactName?: string | null\n\n publish?: Publish\n}\n\nexport const DEFAULT_TARGET = \"default\"\nexport const DIR_TARGET = \"dir\"\n\nexport type CompressionLevel = \"store\" | \"normal\" | \"maximum\"\n\nexport interface BeforeBuildContext {\n readonly appDir: string\n readonly electronVersion: string\n readonly platform: Platform\n readonly arch: string\n}\n\nexport interface SourceRepositoryInfo {\n type?: string\n domain?: string\n user: string\n project: string\n}\n"]}
|
package/out/errorMessages.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const authorEmailIsMissed = "Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/
|
|
1
|
+
export declare const authorEmailIsMissed = "Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/linux).\n";
|
package/out/errorMessages.js
CHANGED
|
@@ -6,6 +6,6 @@ exports.authorEmailIsMissed = `Please specify author 'email' in the application
|
|
|
6
6
|
See https://docs.npmjs.com/files/package.json#people-fields-author-contributors
|
|
7
7
|
|
|
8
8
|
It is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.
|
|
9
|
-
(see https://www.electron.build/
|
|
9
|
+
(see https://www.electron.build/linux).
|
|
10
10
|
`;
|
|
11
11
|
//# sourceMappingURL=errorMessages.js.map
|
package/out/errorMessages.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessages.js","sourceRoot":"","sources":["../src/errorMessages.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;CAMlC,CAAA","sourcesContent":["export const authorEmailIsMissed = `Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/
|
|
1
|
+
{"version":3,"file":"errorMessages.js","sourceRoot":"","sources":["../src/errorMessages.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;CAMlC,CAAA","sourcesContent":["export const authorEmailIsMissed = `Please specify author 'email' in the application package.json\n\nSee https://docs.npmjs.com/files/package.json#people-fields-author-contributors\n\nIt is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options.\n(see https://www.electron.build/linux).\n`\n"]}
|
package/out/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export { Packager, BuildResult } from "./packager";
|
|
|
5
5
|
export { PackagerOptions, ArtifactCreated, ArtifactBuildStarted } from "./packagerApi";
|
|
6
6
|
export { TargetConfiguration, Platform, Target, DIR_TARGET, BeforeBuildContext, SourceRepositoryInfo, TargetSpecificOptions, TargetConfigType, DEFAULT_TARGET, CompressionLevel, } from "./core";
|
|
7
7
|
export { getArchSuffix, Arch, archFromString } from "builder-util";
|
|
8
|
-
export { Configuration, AfterPackContext, MetadataDirectories, BeforePackContext, AfterExtractContext, CustomElectronDistributable, Hook } from "./configuration";
|
|
8
|
+
export { CommonConfiguration, Configuration, AfterPackContext, MetadataDirectories, BeforePackContext, AfterExtractContext, CustomElectronDistributable, Hooks, Hook, PackContext, } from "./configuration";
|
|
9
9
|
export { ElectronBrandingOptions, ElectronDownloadOptions, ElectronPlatformName } from "./electron/ElectronFramework";
|
|
10
|
-
export { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo } from "./options/PlatformSpecificBuildOptions";
|
|
10
|
+
export { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo, FilesBuildOptions } from "./options/PlatformSpecificBuildOptions";
|
|
11
11
|
export { FileAssociation } from "./options/FileAssociation";
|
|
12
12
|
export { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow, NotarizeNotaryOptions } from "./options/macOptions";
|
|
13
13
|
export { PkgOptions, PkgBackgroundOptions, BackgroundAlignment, BackgroundScaling } from "./options/pkgOptions";
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts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I,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;oBACpD,kBAAG,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,EAAE,iDAAiD,CAAC,CAAA;oBAC5E,SAAQ;gBACV,CAAC;gBACD,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBAC3C,KAAK,MAAM,oBAAoB,IAAI,qBAAqB,EAAE,CAAC;oBACzD,cAAc,CAAC,cAAc,CAC3B,oBAAoB,EACpB;wBACE,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,IAAI;qBACX,EACD,QAAQ,CAAC,OAAO,CACjB,CAAA;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,WAAW,CAAC,aAAa,CAAA;IAClC,CAAC,CAAC,CAAA;IAEF,OAAO,IAAA,6BAAc,EAAC,OAAO,EAAE,eAAe,CAAC,EAAE;QAC/C,IAAI,OAAqB,CAAA;QACzB,IAAI,eAAe,EAAE,CAAC;YACpB,cAAc,CAAC,WAAW,EAAE,CAAA;YAC5B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,cAAc,CAAC,UAAU,EAAE,CAAA;QACvC,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { PublishOptions } from \"electron-publish/out/publisher\"\nimport { log, InvalidConfigurationError, executeFinally } from \"builder-util\"\nimport { asArray } from \"builder-util-runtime\"\nimport { Packager } from \"./packager\"\nimport { PackagerOptions } from \"./packagerApi\"\nimport { resolveFunction } from \"./util/resolve\"\nimport { PublishManager } from \"./publish/PublishManager\"\n\nexport { Packager, BuildResult } from \"./packager\"\nexport { PackagerOptions, ArtifactCreated, ArtifactBuildStarted } from \"./packagerApi\"\nexport {\n TargetConfiguration,\n Platform,\n Target,\n DIR_TARGET,\n BeforeBuildContext,\n SourceRepositoryInfo,\n TargetSpecificOptions,\n TargetConfigType,\n DEFAULT_TARGET,\n CompressionLevel,\n} from \"./core\"\nexport { getArchSuffix, Arch, archFromString } from \"builder-util\"\nexport {\n CommonConfiguration,\n Configuration,\n AfterPackContext,\n MetadataDirectories,\n BeforePackContext,\n AfterExtractContext,\n CustomElectronDistributable,\n Hooks,\n Hook,\n PackContext,\n} from \"./configuration\"\nexport { ElectronBrandingOptions, ElectronDownloadOptions, ElectronPlatformName } from \"./electron/ElectronFramework\"\nexport { PlatformSpecificBuildOptions, AsarOptions, FileSet, Protocol, ReleaseInfo, FilesBuildOptions } from \"./options/PlatformSpecificBuildOptions\"\nexport { FileAssociation } from \"./options/FileAssociation\"\nexport { MacConfiguration, DmgOptions, MasConfiguration, MacOsTargetName, DmgContent, DmgWindow, NotarizeNotaryOptions } from \"./options/macOptions\"\nexport { PkgOptions, PkgBackgroundOptions, BackgroundAlignment, BackgroundScaling } from \"./options/pkgOptions\"\nexport { WindowsConfiguration, WindowsAzureSigningConfiguration, WindowsSigntoolConfiguration } from \"./options/winOptions\"\nexport { AppXOptions } from \"./options/AppXOptions\"\nexport { MsiOptions } from \"./options/MsiOptions\"\nexport { MsiWrappedOptions } from \"./options/MsiWrappedOptions\"\nexport { CommonWindowsInstallerConfiguration } from \"./options/CommonWindowsInstallerConfiguration\"\nexport { NsisOptions, NsisWebOptions, PortableOptions, CommonNsisOptions, CustomNsisBinary } from \"./targets/nsis/nsisOptions\"\nexport { LinuxConfiguration, DebOptions, CommonLinuxOptions, LinuxTargetSpecificOptions, AppImageOptions, FlatpakOptions } from \"./options/linuxOptions\"\nexport { SnapOptions, PlugDescriptor, SlotDescriptor } from \"./options/SnapOptions\"\nexport { Metadata, AuthorMetadata, RepositoryInfo } from \"./options/metadata\"\nexport { AppInfo } from \"./appInfo\"\nexport { SquirrelWindowsOptions } from \"./options/SquirrelWindowsOptions\"\n\nexport { CustomMacSign, CustomMacSignOptions } from \"./macPackager\"\nexport { WindowsSignOptions } from \"./codeSign/windowsCodeSign\"\nexport {\n CustomWindowsSignTaskConfiguration,\n WindowsSignTaskConfiguration,\n CustomWindowsSign,\n FileCodeSigningInfo,\n CertificateFromStoreInfo,\n} from \"./codeSign/windowsSignToolManager\"\nexport { CancellationToken, ProgressInfo } from \"builder-util-runtime\"\nexport { PublishOptions, UploadTask } from \"electron-publish\"\nexport { PublishManager } from \"./publish/PublishManager\"\nexport { PlatformPackager } from \"./platformPackager\"\nexport { Framework, PrepareApplicationStageDirectoryOptions } from \"./Framework\"\nexport { buildForge, ForgeOptions } from \"./forge-maker\"\nexport { LinuxPackager } from \"./linuxPackager\"\nexport { WinPackager } from \"./winPackager\"\nexport { MacPackager } from \"./macPackager\"\n\nconst expectedOptions = new Set([\"publish\", \"targets\", \"mac\", \"win\", \"linux\", \"projectDir\", \"platformPackagerFactory\", \"config\", \"effectiveOptionComputed\", \"prepackaged\"])\n\nexport function checkBuildRequestOptions(options: PackagerOptions & PublishOptions) {\n for (const optionName of Object.keys(options)) {\n if (!expectedOptions.has(optionName) && (options as any)[optionName] !== undefined) {\n throw new InvalidConfigurationError(`Unknown option \"${optionName}\"`)\n }\n }\n}\n\nexport function build(options: PackagerOptions & PublishOptions, packager: Packager = new Packager(options)): Promise<Array<string>> {\n checkBuildRequestOptions(options)\n\n const publishManager = new PublishManager(packager, options)\n const sigIntHandler = () => {\n log.warn(\"cancelled by SIGINT\")\n packager.cancellationToken.cancel()\n publishManager.cancelTasks()\n }\n process.once(\"SIGINT\", sigIntHandler)\n\n const promise = packager.build().then(async buildResult => {\n const afterAllArtifactBuild = await resolveFunction(packager.appInfo.type, buildResult.configuration.afterAllArtifactBuild, \"afterAllArtifactBuild\")\n if (afterAllArtifactBuild != null) {\n const newArtifacts = asArray(await Promise.resolve(afterAllArtifactBuild(buildResult)))\n if (newArtifacts.length === 0 || !publishManager.isPublish) {\n return buildResult.artifactPaths\n }\n\n const publishConfigurations = await publishManager.getGlobalPublishConfigurations()\n if (publishConfigurations == null || publishConfigurations.length === 0) {\n return buildResult.artifactPaths\n }\n\n for (const newArtifact of newArtifacts) {\n if (buildResult.artifactPaths.includes(newArtifact)) {\n log.warn({ newArtifact }, \"skipping publish of artifact, already published\")\n continue\n }\n buildResult.artifactPaths.push(newArtifact)\n for (const publishConfiguration of publishConfigurations) {\n publishManager.scheduleUpload(\n publishConfiguration,\n {\n file: newArtifact,\n arch: null,\n },\n packager.appInfo\n )\n }\n }\n }\n return buildResult.artifactPaths\n })\n\n return executeFinally(promise, isErrorOccurred => {\n let promise: Promise<any>\n if (isErrorOccurred) {\n publishManager.cancelTasks()\n promise = Promise.resolve(null)\n } else {\n promise = publishManager.awaitTasks()\n }\n\n return promise.then(() => process.removeListener(\"SIGINT\", sigIntHandler))\n })\n}\n"]}
|
|
@@ -15,7 +15,7 @@ export interface AppXOptions extends TargetSpecificOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
readonly displayName?: string | null;
|
|
17
17
|
/**
|
|
18
|
-
* The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](
|
|
18
|
+
* The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](./configuration.md#metadata).
|
|
19
19
|
*/
|
|
20
20
|
readonly identityName?: string | null;
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppXOptions.js","sourceRoot":"","sources":["../../src/options/AppXOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\n\nexport interface AppXOptions extends TargetSpecificOptions {\n /**\n * The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.\n */\n readonly applicationId?: string\n\n /**\n * The background color of the app tile. See [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx).\n * @default #464646\n */\n readonly backgroundColor?: string | null\n\n /**\n * A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).\n * Defaults to the application product name.\n */\n readonly displayName?: string | null\n\n /**\n * The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](
|
|
1
|
+
{"version":3,"file":"AppXOptions.js","sourceRoot":"","sources":["../../src/options/AppXOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\n\nexport interface AppXOptions extends TargetSpecificOptions {\n /**\n * The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character.\n */\n readonly applicationId?: string\n\n /**\n * The background color of the app tile. See [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx).\n * @default #464646\n */\n readonly backgroundColor?: string | null\n\n /**\n * A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).\n * Defaults to the application product name.\n */\n readonly displayName?: string | null\n\n /**\n * The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](./configuration.md#metadata).\n */\n readonly identityName?: string | null\n\n /**\n * The Windows Store publisher. Not used if AppX is build for testing. See [AppX Package Code Signing](#appx-package-code-signing) below.\n */\n readonly publisher?: string | null\n\n /**\n * A friendly name for the publisher that can be displayed to users. Corresponds to [Properties.PublisherDisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211460.aspx).\n * Defaults to company name from the application metadata.\n */\n readonly publisherDisplayName?: string | null\n\n /**\n * The list of [supported languages](https://docs.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region#specify-the-supported-languages-in-the-apps-manifest) that will be listed in the Windows Store.\n * The first entry (index 0) will be the default language.\n * Defaults to en-US if omitted.\n */\n readonly languages?: Array<string> | string | null\n\n /**\n * Whether to add auto launch extension. Defaults to `true` if [electron-winstore-auto-launch](https://github.com/felixrieseberg/electron-winstore-auto-launch) in the dependencies.\n */\n readonly addAutoLaunchExtension?: boolean\n\n /**\n * Relative path to custom extensions xml to be included in an `appmanifest.xml`.\n */\n readonly customExtensionsPath?: string\n\n /**\n * Whether to overlay the app's name on top of tile images on the Start screen. Defaults to `false`. (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles) in the dependencies.\n * @default false\n */\n readonly showNameOnTiles?: boolean\n\n /**\n * @private\n * @default false\n */\n readonly electronUpdaterAware?: boolean\n\n /**\n * Whether to set build number. See https://github.com/electron-userland/electron-builder/issues/3875\n * @default false\n */\n readonly setBuildNumber?: boolean\n\n /**\n * Set the MinVersion field in the appx manifest.xml\n * @default arch === Arch.arm64 ? \"10.0.16299.0\" : \"10.0.14316.0\"\n */\n readonly minVersion?: string | null\n\n /**\n * Set the `MaxVersionTested` field in the appx manifest.xml\n * @default arch === Arch.arm64 ? \"10.0.16299.0\" : \"10.0.14316.0\"\n */\n readonly maxVersionTested?: string | null\n\n /** @private */\n readonly makeappxArgs?: Array<string> | null\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* macOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)), NSIS, and MSI only.
|
|
5
5
|
*
|
|
6
|
-
* On Windows (NSIS) works only if [nsis.perMachine](https://electron.build
|
|
6
|
+
* On Windows (NSIS) works only if [nsis.perMachine](https://electron.build./configuration.md#NsisOptions-perMachine) is set to `true`.
|
|
7
7
|
*/
|
|
8
8
|
export interface FileAssociation {
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileAssociation.js","sourceRoot":"","sources":["../../src/options/FileAssociation.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * File associations.\n *\n * macOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)), NSIS, and MSI only.\n *\n * On Windows (NSIS) works only if [nsis.perMachine](https://electron.build
|
|
1
|
+
{"version":3,"file":"FileAssociation.js","sourceRoot":"","sources":["../../src/options/FileAssociation.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * File associations.\n *\n * macOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)), NSIS, and MSI only.\n *\n * On Windows (NSIS) works only if [nsis.perMachine](https://electron.build./configuration.md#NsisOptions-perMachine) is set to `true`.\n */\nexport interface FileAssociation {\n /**\n * The extension (minus the leading period). e.g. `png`.\n */\n readonly ext: string | Array<string>\n\n /**\n * The name. e.g. `PNG`. Defaults to `ext`.\n */\n readonly name?: string | null\n\n /**\n * *windows-only.* The description.\n */\n readonly description?: string | null\n\n /**\n * *linux-only.* The mime-type.\n */\n readonly mimeType?: string | null\n\n /**\n * The path to icon (`.icns` for MacOS and `.ico` for Windows), relative to `build` (build resources directory). Defaults to `${firstExt}.icns`/`${firstExt}.ico` (if several extensions specified, first is used) or to application icon.\n *\n * Not supported on Linux, file issue if need (default icon will be `x-office-document`). Not supported on MSI.\n */\n readonly icon?: string | null\n\n /**\n * *macOS-only* The app’s role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.\n * @default Editor\n */\n readonly role?: string\n\n /**\n * *macOS-only* Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`.\n */\n readonly isPackage?: boolean\n\n /**\n * *macOS-only* The app’s rank with respect to the type. The value can be `Owner`, `Default`, `Alternate`, or `None`. Corresponds to `LSHandlerRank`.\n * @default Default\n */\n readonly rank?: string\n}\n"]}
|