app-builder-lib 26.10.0 → 26.11.0
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/out/ProtonFramework.d.ts +1 -1
- package/out/ProtonFramework.js +2 -2
- package/out/ProtonFramework.js.map +1 -1
- package/out/configuration.d.ts +95 -65
- package/out/configuration.js.map +1 -1
- package/out/core.d.ts +2 -2
- package/out/core.js.map +1 -1
- package/out/electron/ElectronFramework.js +6 -3
- package/out/electron/ElectronFramework.js.map +1 -1
- package/out/frameworks/LibUiFramework.d.ts +3 -2
- package/out/frameworks/LibUiFramework.js +5 -2
- package/out/frameworks/LibUiFramework.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js.map +1 -1
- package/out/macPackager.js +12 -0
- package/out/macPackager.js.map +1 -1
- package/out/node-module-collector/moduleManager.d.ts +7 -1
- package/out/node-module-collector/moduleManager.js +9 -2
- package/out/node-module-collector/moduleManager.js.map +1 -1
- package/out/node-module-collector/nodeModulesCollector.js +3 -2
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +13 -0
- package/out/node-module-collector/pnpmNodeModulesCollector.js +54 -12
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/options/AppXOptions.d.ts +1 -1
- package/out/options/AppXOptions.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +31 -11
- 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 +38 -12
- package/out/options/linuxOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +10 -7
- package/out/options/macOptions.js.map +1 -1
- package/out/options/metadata.d.ts +1 -2
- package/out/options/metadata.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 -5
- package/out/options/winOptions.js.map +1 -1
- package/out/packager.js +2 -3
- package/out/packager.js.map +1 -1
- package/out/platformPackager.js +1 -1
- package/out/platformPackager.js.map +1 -1
- package/out/targets/FpmTarget.js +3 -2
- package/out/targets/FpmTarget.js.map +1 -1
- package/out/targets/LinuxTargetHelper.d.ts +4 -4
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/appimage/AppImageTarget.d.ts +1 -0
- package/out/targets/appimage/AppImageTarget.js +30 -10
- package/out/targets/appimage/AppImageTarget.js.map +1 -1
- package/out/targets/appimage/appImageUtil.d.ts +10 -2
- package/out/targets/appimage/appImageUtil.js +2 -5
- package/out/targets/appimage/appImageUtil.js.map +1 -1
- package/out/targets/archive.js +20 -6
- package/out/targets/archive.js.map +1 -1
- package/out/targets/nsis/NsisTarget.js +11 -11
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/nsisOptions.d.ts +20 -16
- package/out/targets/nsis/nsisOptions.js.map +1 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +1 -0
- package/out/targets/nsis/nsisScriptGenerator.js +14 -1
- package/out/targets/nsis/nsisScriptGenerator.js.map +1 -1
- package/out/targets/nsis/nsisUtil.js +2 -1
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/util/appBuilder.js +1 -1
- package/out/util/appBuilder.js.map +1 -1
- package/out/util/cacheState.d.ts +28 -0
- package/out/util/cacheState.js +143 -0
- package/out/util/cacheState.js.map +1 -0
- package/out/util/electronGet.d.ts +1 -1
- package/out/util/electronGet.js +81 -23
- package/out/util/electronGet.js.map +1 -1
- package/out/util/macroExpander.js +3 -0
- package/out/util/macroExpander.js.map +1 -1
- package/out/util/resEdit.d.ts +10 -0
- package/out/util/resEdit.js +48 -0
- package/out/util/resEdit.js.map +1 -0
- package/out/util/resolve.js +11 -1
- package/out/util/resolve.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/out/vm/ParallelsVm.d.ts +16 -0
- package/out/vm/ParallelsVm.js +0 -1
- package/out/vm/ParallelsVm.js.map +1 -1
- package/out/winPackager.js +44 -42
- package/out/winPackager.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +611 -133
package/out/ProtonFramework.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { LibUiFramework } from "./frameworks/LibUiFramework";
|
|
|
4
4
|
export declare class ProtonFramework extends LibUiFramework {
|
|
5
5
|
readonly name = "proton";
|
|
6
6
|
readonly defaultAppIdPrefix = "com.proton-native.";
|
|
7
|
-
constructor(version: string,
|
|
7
|
+
constructor(version: string, macOsProductName: string, isUseLaunchUi: boolean);
|
|
8
8
|
getDefaultIcon(platform: Platform): string;
|
|
9
9
|
createTransformer(): FileTransformer | null;
|
|
10
10
|
}
|
package/out/ProtonFramework.js
CHANGED
|
@@ -8,8 +8,8 @@ const fileTransformer_1 = require("./fileTransformer");
|
|
|
8
8
|
const LibUiFramework_1 = require("./frameworks/LibUiFramework");
|
|
9
9
|
const pathManager_1 = require("./util/pathManager");
|
|
10
10
|
class ProtonFramework extends LibUiFramework_1.LibUiFramework {
|
|
11
|
-
constructor(version,
|
|
12
|
-
super(version,
|
|
11
|
+
constructor(version, macOsProductName, isUseLaunchUi) {
|
|
12
|
+
super(version, macOsProductName, isUseLaunchUi);
|
|
13
13
|
this.name = "proton";
|
|
14
14
|
// noinspection JSUnusedGlobalSymbols
|
|
15
15
|
this.defaultAppIdPrefix = "com.proton-native.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtonFramework.js","sourceRoot":"","sources":["../src/ProtonFramework.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AACnD,+DAAwD;AACxD,iCAAiC;AACjC,uDAAwD;AACxD,gEAA4D;AAC5D,oDAAoD;AAEpD,MAAa,eAAgB,SAAQ,+BAAc;IAMjD,YAAY,OAAe,EAAE,gBAAwB,EAAE,aAAsB;QAC3E,KAAK,CAAC,OAAO,EAAE,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A0C,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACtF,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACzF,OAAO,CAAC,uCAAuC,CAAC,CAAC,OAAO;QAExD,UAAU;QACV,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACxE,OAAO,CAAC,sCAAsC,CAAC,CAAC,OAAO;QACvD,OAAO,CAAC,8CAA8C,CAAC,CAAC,OAAO;QAC/D,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO;QAC3D,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO;QAE3D,UAAU;QACV,OAAO,CAAC,qCAAqC,CAAC,CAAC,OAAO;QACtD,OAAO,CAAC,kCAAkC,CAAC,CAAC,OAAO;QACnD,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC9E,OAAO,CAAC,qCAAqC,CAAC,CAAC,OAAO;KACvD,CAAA;IACD,YAAY,CAAC,OAAO,GAAG,KAAK,CAAA;IAC5B,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { FileTransformer, log } from \"builder-util\"\nimport { safeStringifyJson } from \"builder-util-runtime\"\nimport { Platform } from \"./core\"\nimport { NODE_MODULES_PATTERN } from \"./fileTransformer\"\nimport { LibUiFramework } from \"./frameworks/LibUiFramework\"\nimport { getTemplatePath } from \"./util/pathManager\"\n\nexport class ProtonFramework extends LibUiFramework {\n readonly name = \"proton\"\n\n // noinspection JSUnusedGlobalSymbols\n readonly defaultAppIdPrefix = \"com.proton-native.\"\n\n constructor(version: string,
|
|
1
|
+
{"version":3,"file":"ProtonFramework.js","sourceRoot":"","sources":["../src/ProtonFramework.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AACn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AC,CAAC,OAAO;QAC7D,OAAO,CAAC,qDAAqD,CAAC,CAAC,OAAO;QACtE,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC/E,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACtF,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACzF,OAAO,CAAC,uCAAuC,CAAC,CAAC,OAAO;QAExD,UAAU;QACV,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACxE,OAAO,CAAC,sCAAsC,CAAC,CAAC,OAAO;QACvD,OAAO,CAAC,8CAA8C,CAAC,CAAC,OAAO;QAC/D,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO;QAC3D,OAAO,CAAC,0CAA0C,CAAC,CAAC,OAAO;QAE3D,UAAU;QACV,OAAO,CAAC,qCAAqC,CAAC,CAAC,OAAO;QACtD,OAAO,CAAC,kCAAkC,CAAC,CAAC,OAAO;QACnD,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC9E,OAAO,CAAC,qCAAqC,CAAC,CAAC,OAAO;KACvD,CAAA;IACD,YAAY,CAAC,OAAO,GAAG,KAAK,CAAA;IAC5B,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { FileTransformer, log } from \"builder-util\"\nimport { safeStringifyJson } from \"builder-util-runtime\"\nimport { Platform } from \"./core\"\nimport { NODE_MODULES_PATTERN } from \"./fileTransformer\"\nimport { LibUiFramework } from \"./frameworks/LibUiFramework\"\nimport { getTemplatePath } from \"./util/pathManager\"\n\nexport class ProtonFramework extends LibUiFramework {\n readonly name = \"proton\"\n\n // noinspection JSUnusedGlobalSymbols\n readonly defaultAppIdPrefix = \"com.proton-native.\"\n\n constructor(version: string, macOsProductName: string, isUseLaunchUi: boolean) {\n super(version, macOsProductName, isUseLaunchUi)\n }\n\n getDefaultIcon(platform: Platform): string {\n if (platform === Platform.WINDOWS) {\n return getTemplatePath(\"icons/proton-native/proton-native.ico\")\n } else if (platform === Platform.LINUX) {\n return getTemplatePath(\"icons/proton-native/linux\")\n } else {\n return getTemplatePath(\"icons/proton-native/proton-native.icns\")\n }\n }\n\n createTransformer(): FileTransformer | null {\n let babel: any\n const babelOptions: any = { ast: false, sourceMaps: \"inline\" }\n if (process.env.TEST_SET_BABEL_PRESET === \"true\") {\n babel = require(\"@babel/core\")\n\n babel = testOnlyBabel(babel, babelOptions, this.version)\n } else {\n try {\n babel = require(\"babel-core\")\n } catch (_e: any) {\n // babel isn't installed\n log.debug(null, \"don't transpile source code using Babel\")\n return null\n }\n }\n\n log.info(\n {\n options: safeStringifyJson(babelOptions, new Set<string>([\"presets\"])),\n },\n \"transpile source code using Babel\"\n )\n return (file): Promise<any> | null => {\n if (!(file.endsWith(\".js\") || file.endsWith(\".jsx\")) || file.includes(NODE_MODULES_PATTERN)) {\n return null\n }\n\n return new Promise((resolve, reject) => {\n return babel.transformFile(file, babelOptions, (error: Error, result: any) => {\n if (error == null) {\n resolve(result.code)\n } else {\n reject(error)\n }\n })\n })\n }\n }\n}\n\nfunction testOnlyBabel(babel: any, babelOptions: any, nodeVersion: string): any {\n // out test dir can be located outside of electron-builder node_modules and babel cannot resolve string names of preset\n babelOptions.presets = [[require(\"@babel/preset-env\").default, { targets: { node: nodeVersion } }], require(\"@babel/preset-react\")]\n babelOptions.plugins = [\n // stage 0\n require(\"@babel/plugin-proposal-function-bind\").default,\n\n // stage 1\n require(\"@babel/plugin-proposal-export-default-from\").default,\n require(\"@babel/plugin-proposal-logical-assignment-operators\").default,\n [require(\"@babel/plugin-proposal-optional-chaining\").default, { loose: false }],\n [require(\"@babel/plugin-proposal-pipeline-operator\").default, { proposal: \"minimal\" }],\n [require(\"@babel/plugin-proposal-nullish-coalescing-operator\").default, { loose: false }],\n require(\"@babel/plugin-proposal-do-expressions\").default,\n\n // stage 2\n [require(\"@babel/plugin-proposal-decorators\").default, { legacy: true }],\n require(\"@babel/plugin-proposal-function-sent\").default,\n require(\"@babel/plugin-proposal-export-namespace-from\").default,\n require(\"@babel/plugin-proposal-numeric-separator\").default,\n require(\"@babel/plugin-proposal-throw-expressions\").default,\n\n // stage 3\n require(\"@babel/plugin-syntax-dynamic-import\").default,\n require(\"@babel/plugin-syntax-import-meta\").default,\n [require(\"@babel/plugin-proposal-class-properties\").default, { loose: false }],\n require(\"@babel/plugin-proposal-json-strings\").default,\n ]\n babelOptions.babelrc = false\n return babel\n}\n"]}
|
package/out/configuration.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BeforeBuildContext, Target } from "./core";
|
|
|
3
3
|
import { ElectronBrandingOptions } from "./electron/ElectronFramework";
|
|
4
4
|
import { PrepareApplicationStageDirectoryOptions } from "./Framework";
|
|
5
5
|
import { AppXOptions } from "./options/AppXOptions";
|
|
6
|
-
import { AppImageOptions, DebOptions, FlatpakOptions, LinuxConfiguration, LinuxTargetSpecificOptions } from "./options/linuxOptions";
|
|
6
|
+
import { AppImageOptions, DebOptions, FlatpakOptions, LinuxConfiguration, LinuxTargetSpecificOptions, PacmanOptions, RpmOptions } from "./options/linuxOptions";
|
|
7
7
|
import { DmgOptions, MacConfiguration, MasConfiguration } from "./options/macOptions";
|
|
8
8
|
import { MsiOptions } from "./options/MsiOptions";
|
|
9
9
|
import { MsiWrappedOptions } from "./options/MsiWrappedOptions";
|
|
@@ -69,39 +69,75 @@ export interface CommonConfiguration {
|
|
|
69
69
|
* Options related to how build Windows targets.
|
|
70
70
|
*/
|
|
71
71
|
readonly win?: WindowsConfiguration | null;
|
|
72
|
+
/** NSIS installer options. */
|
|
72
73
|
readonly nsis?: NsisOptions | null;
|
|
74
|
+
/** NSIS web installer options (downloads app package at install time). */
|
|
73
75
|
readonly nsisWeb?: NsisWebOptions | null;
|
|
76
|
+
/** Portable executable options (no installation required). */
|
|
74
77
|
readonly portable?: PortableOptions | null;
|
|
78
|
+
/** Windows Store (AppX) package options. */
|
|
75
79
|
readonly appx?: AppXOptions | null;
|
|
76
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* MSI package options.
|
|
82
|
+
*/
|
|
77
83
|
readonly msi?: MsiOptions | null;
|
|
78
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* MSI-wrapped installer options.
|
|
86
|
+
*/
|
|
79
87
|
readonly msiWrapped?: MsiWrappedOptions | null;
|
|
88
|
+
/**
|
|
89
|
+
* Squirrel.Windows installer options. Requires the `electron-builder-squirrel-windows` dependency.
|
|
90
|
+
*/
|
|
80
91
|
readonly squirrelWindows?: SquirrelWindowsOptions | null;
|
|
81
92
|
/**
|
|
82
|
-
*
|
|
93
|
+
* General Linux build options shared across all Linux targets (icon, category, desktop entry,
|
|
94
|
+
* executable name, etc.). Target-specific compression and packaging options live in the
|
|
95
|
+
* per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`, etc.).
|
|
83
96
|
*/
|
|
84
97
|
readonly linux?: LinuxConfiguration | null;
|
|
85
98
|
/**
|
|
86
|
-
* Debian package options.
|
|
99
|
+
* Debian package options. Targets Debian, Ubuntu, and Debian-based distributions.
|
|
100
|
+
* Produces a `.deb` archive installable via `dpkg -i` or `apt install`.
|
|
87
101
|
*/
|
|
88
102
|
readonly deb?: DebOptions | null;
|
|
89
103
|
/**
|
|
90
|
-
* Snap options.
|
|
104
|
+
* Snap package options. Requires [snapcraft](https://snapcraft.io/) to be installed.
|
|
91
105
|
*/
|
|
92
106
|
readonly snap?: SnapOptions | null;
|
|
93
107
|
/**
|
|
94
|
-
* AppImage options.
|
|
108
|
+
* AppImage options. AppImage is a portable application format that bundles the app
|
|
109
|
+
* and its dependencies into a single self-contained executable that runs on most
|
|
110
|
+
* Linux distributions without installation.
|
|
95
111
|
*/
|
|
96
112
|
readonly appImage?: AppImageOptions | null;
|
|
97
113
|
/**
|
|
98
|
-
* Flatpak options.
|
|
114
|
+
* Flatpak options. Flatpak is a sandboxed application distribution format for Linux
|
|
115
|
+
* that runs in a controlled environment and is distributed via [Flathub](https://flathub.org/)
|
|
116
|
+
* or other Flatpak repositories.
|
|
99
117
|
*/
|
|
100
118
|
readonly flatpak?: FlatpakOptions | null;
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Pacman package options. Targets Arch Linux and Arch-based distributions
|
|
121
|
+
* (Manjaro, EndeavourOS, etc.). Produces a `.pacman` archive installable via `pacman -U`.
|
|
122
|
+
*/
|
|
123
|
+
readonly pacman?: PacmanOptions | null;
|
|
124
|
+
/**
|
|
125
|
+
* RPM package options. Targets Fedora, Red Hat Enterprise Linux, SUSE, and related
|
|
126
|
+
* distributions. Produces a `.rpm` archive installable via `rpm` or `dnf`.
|
|
127
|
+
*/
|
|
128
|
+
readonly rpm?: RpmOptions | null;
|
|
129
|
+
/**
|
|
130
|
+
* FreeBSD package options. Produces a `.pkg` archive for the FreeBSD `pkg` package manager.
|
|
131
|
+
*/
|
|
103
132
|
readonly freebsd?: LinuxTargetSpecificOptions | null;
|
|
133
|
+
/**
|
|
134
|
+
* Solaris IPS package options. Produces a `.p5p` archive for the Solaris Image Packaging
|
|
135
|
+
* System (`pkg`).
|
|
136
|
+
*/
|
|
104
137
|
readonly p5p?: LinuxTargetSpecificOptions | null;
|
|
138
|
+
/**
|
|
139
|
+
* Alpine Linux APK package options. Produces an `.apk` archive installable via `apk add`.
|
|
140
|
+
*/
|
|
105
141
|
readonly apk?: LinuxTargetSpecificOptions | null;
|
|
106
142
|
/**
|
|
107
143
|
* Whether to build the application native dependencies from source.
|
|
@@ -182,6 +218,7 @@ export interface CommonConfiguration {
|
|
|
182
218
|
export interface Configuration extends CommonConfiguration, PlatformSpecificBuildOptions, Hooks {
|
|
183
219
|
/**
|
|
184
220
|
* 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.
|
|
221
|
+
* @deprecated `electron-compile` is no longer maintained. Compile your app with a modern bundler (webpack, vite, etc.) instead.
|
|
185
222
|
*/
|
|
186
223
|
readonly electronCompile?: boolean;
|
|
187
224
|
/**
|
|
@@ -208,14 +245,17 @@ export interface Configuration extends CommonConfiguration, PlatformSpecificBuil
|
|
|
208
245
|
/**
|
|
209
246
|
* *libui-based frameworks only* The version of NodeJS you are packaging for.
|
|
210
247
|
* You can set it to `current` to set the Node.js version that you use to run.
|
|
248
|
+
* @deprecated libui-based frameworks (proton-native, etc.) are no longer actively maintained. This option has no effect when using Electron.
|
|
211
249
|
*/
|
|
212
250
|
readonly nodeVersion?: string | null;
|
|
213
251
|
/**
|
|
214
252
|
* *libui-based frameworks only* The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.
|
|
253
|
+
* @deprecated libui-based frameworks (proton-native, etc.) are no longer actively maintained. This option has no effect when using Electron.
|
|
215
254
|
*/
|
|
216
255
|
readonly launchUiVersion?: boolean | string | null;
|
|
217
256
|
/**
|
|
218
257
|
* The framework name. One of `electron`, `proton`, `libui`. Defaults to `electron`.
|
|
258
|
+
* @deprecated `proton` and `libui` framework support is no longer actively maintained. Use `electron` (the default).
|
|
219
259
|
*/
|
|
220
260
|
readonly framework?: string | null;
|
|
221
261
|
/**
|
|
@@ -269,79 +309,69 @@ export interface ToolsetConfig {
|
|
|
269
309
|
}
|
|
270
310
|
export interface Hooks {
|
|
271
311
|
/**
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
!!! example "myBeforePackHook.js"
|
|
297
|
-
```js
|
|
298
|
-
exports.default = async function(context) {
|
|
299
|
-
// your custom code
|
|
300
|
-
}
|
|
301
|
-
```
|
|
312
|
+
* The function (or path to file or module id) to be run before pack.
|
|
313
|
+
* Receives a {@link BeforePackContext}.
|
|
314
|
+
*
|
|
315
|
+
* Can be specified inline as a function in JavaScript configs:
|
|
316
|
+
* ```js
|
|
317
|
+
* // electron-builder.config.js
|
|
318
|
+
* module.exports = {
|
|
319
|
+
* beforePack: async (context) => {
|
|
320
|
+
* // your code
|
|
321
|
+
* }
|
|
322
|
+
* }
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* Or as a path to a module that exports the function as its default export:
|
|
326
|
+
* ```json
|
|
327
|
+
* { "build": { "beforePack": "./myBeforePackHook.js" } }
|
|
328
|
+
* ```
|
|
329
|
+
* ```js
|
|
330
|
+
* // myBeforePackHook.js
|
|
331
|
+
* exports.default = async function(context) {
|
|
332
|
+
* // your custom code
|
|
333
|
+
* }
|
|
334
|
+
* ```
|
|
302
335
|
*/
|
|
303
336
|
readonly beforePack?: Hook<BeforePackContext, void> | string | null;
|
|
304
337
|
/**
|
|
305
|
-
* The function (or path to file or module id) to be
|
|
306
|
-
*
|
|
338
|
+
* The function (or path to file or module id) to be run after the prebuilt Electron binary has been extracted to the output directory.
|
|
339
|
+
* Receives an {@link AfterExtractContext}. For file/module setup, see {@link beforePack}.
|
|
307
340
|
*/
|
|
308
341
|
readonly afterExtract?: Hook<AfterExtractContext, void> | string | null;
|
|
309
342
|
/**
|
|
310
|
-
* The function (or path to file or module id) to be
|
|
311
|
-
*
|
|
343
|
+
* The function (or path to file or module id) to be run after pack but before pack into distributable format and sign.
|
|
344
|
+
* Receives an {@link AfterPackContext}. For file/module setup, see {@link beforePack}.
|
|
312
345
|
*/
|
|
313
346
|
readonly afterPack?: Hook<AfterPackContext, void> | string | null;
|
|
314
347
|
/**
|
|
315
|
-
* The function (or path to file or module id) to be
|
|
316
|
-
*
|
|
348
|
+
* The function (or path to file or module id) to be run after pack and sign but before pack into distributable format.
|
|
349
|
+
* Receives an {@link AfterPackContext}. For file/module setup, see {@link beforePack}.
|
|
317
350
|
*/
|
|
318
351
|
readonly afterSign?: Hook<AfterPackContext, void> | string | null;
|
|
319
352
|
/**
|
|
320
|
-
* The function (or path to file or module id) to be run
|
|
321
|
-
*
|
|
353
|
+
* The function (or path to file or module id) to be run when an individual artifact build starts.
|
|
354
|
+
* Receives an {@link ArtifactBuildStarted}. For file/module setup, see {@link beforePack}.
|
|
322
355
|
*/
|
|
323
356
|
readonly artifactBuildStarted?: Hook<ArtifactBuildStarted, void> | string | null;
|
|
324
357
|
/**
|
|
325
|
-
* The function (or path to file or module id) to be run
|
|
326
|
-
*
|
|
358
|
+
* The function (or path to file or module id) to be run when an individual artifact build completes.
|
|
359
|
+
* Receives an {@link ArtifactCreated}. For file/module setup, see {@link beforePack}.
|
|
327
360
|
*/
|
|
328
361
|
readonly artifactBuildCompleted?: Hook<ArtifactCreated, void> | string | null;
|
|
329
362
|
/**
|
|
330
363
|
* The function (or path to file or module id) to be run after all artifacts are built.
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
return ["/path/to/additional/result/file"]
|
|
343
|
-
}
|
|
344
|
-
```
|
|
364
|
+
* Receives a {@link BuildResult}. May return an array of additional file paths to publish.
|
|
365
|
+
*
|
|
366
|
+
* For file/module setup, see {@link beforePack}.
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* ```js
|
|
370
|
+
* exports.default = function () {
|
|
371
|
+
* // return additional files to publish
|
|
372
|
+
* return ["/path/to/additional/result/file"]
|
|
373
|
+
* }
|
|
374
|
+
* ```
|
|
345
375
|
*/
|
|
346
376
|
readonly afterAllArtifactBuild?: Hook<BuildResult, Array<string>> | string | null;
|
|
347
377
|
/**
|
|
@@ -379,7 +409,7 @@ export interface MetadataDirectories {
|
|
|
379
409
|
*/
|
|
380
410
|
readonly buildResources?: string | null;
|
|
381
411
|
/**
|
|
382
|
-
* The output directory. [File macros](
|
|
412
|
+
* The output directory. [File macros](https://www.electron.build/file-patterns#file-macros) are supported.
|
|
383
413
|
* @default dist
|
|
384
414
|
*/
|
|
385
415
|
readonly output?: string | null;
|
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 } 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\"\nimport { ElectronDownloadOptions, ElectronGetOptions } from \"./util/electronGet\"\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 * Configuration of toolsets utilized by electron-builder\n */\n readonly toolsets?: ToolsetConfig | 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\n /**\n * Options to pass to `@electron/fuses`\n * Ref: https://github.com/electron/fuses\n */\n readonly electronFuses?: FuseOptionsV1 | null\n\n /**\n * [Experimental] Configuration for concurrent builds.\n */\n readonly concurrency?: Concurrency | null\n}\n\nexport interface Configuration extends CommonConfiguration, PlatformSpecificBuildOptions, Hooks {\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 * The [electron-download](https://github.com/electron-userland/electron-download#usage) options. (legacy)\n * Alternatively, you can use [electron/get](https://github.com/electron/get#usage) options.\n */\n readonly electronDownload?: ElectronDownloadOptions | ElectronGetOptions | null\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 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\n/**\n * Configuration of toolsets utilized by electron-builder\n */\nexport interface ToolsetConfig {\n /**\n * `win-codesign` version to use for signing Windows artifacts.\n * Located at https://github.com/electron-userland/electron-builder-binaries/releases?q=win-codesign&expanded=true\n *\n * Stable:\n * v0.0.0 (winCodeSign)\n *\n * Beta:\n * Windows Kits 10.0.26100.0\n * v1.0.0, v1.1.0\n *\n * @default \"0.0.0\"\n */\n readonly winCodeSign?: \"0.0.0\" | \"1.0.0\" | \"1.1.0\" | null\n\n /**\n * `appimage` bundle version to use for Appimage packaging and runtime.\n * Located at https://github.com/electron-userland/electron-builder-binaries/releases?q=appimage&expanded=true\n * 0.0.0 - legacy toolset (appimage)\n *\n * Betas:\n * 1.0.2 - Runtime 20251108\n * 1.0.3 - Runtime 20251108 (Resolves GH issue #9598)\n *\n * @default \"0.0.0\"\n */\n readonly appimage?: \"0.0.0\" | \"1.0.2\" | \"1.0.3\" | null\n}\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, void> | 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, void> | 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, void> | 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, void> | 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, void> | 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, void> | 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 * The function (or path to file or module id) to be run after MSI project created on disk - not packed into .msi package yet.\n */\n readonly msiProjectCreated?: Hook<string, void> | string | null\n /**\n * The function (or path to file or module id) to be run after Appx manifest created on disk - not packed into .appx package yet.\n */\n readonly appxManifestCreated?: Hook<string, void> | 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 * The function (or path to file or module id) to be run when staging the electron artifact environment.\n * Returns the path to custom Electron build (e.g. `~/electron/out/R`) or folder of electron zips.\n *\n * 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?: Hook<PrepareApplicationStageDirectoryOptions, string> | 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\n/**\n * All options come from [@electron/fuses](https://github.com/electron/fuses)\n * Ref: https://raw.githubusercontent.com/electron/electron/refs/heads/main/docs/tutorial/fuses.md\n */\nexport interface FuseOptionsV1 {\n /**\n *The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. Instead, we recommend that you use [Utility Processes](https://github.com/electron/electron/blob/main/docs/api/utility-process.md), which work for many use cases where you need a standalone Node.js process (like a Sqlite server process or similar scenarios).\n */\n runAsNode?: boolean\n /**\n * The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.\n */\n enableCookieEncryption?: boolean\n /**\n * The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.\n */\n enableNodeOptionsEnvironmentVariable?: boolean\n /**\n * The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.\n */\n enableNodeCliInspectArguments?: boolean\n /**\n * The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.\n * Currently, ASAR integrity checking is supported on:\n *\n * - macOS as of electron>=16.0.0\n * - Windows as of electron>=30.0.0\n *\n * For more information on how to use asar integrity validation please read the [Asar Integrity](https://github.com/electron/electron/blob/main/docs/tutorial/asar-integrity.md) documentation.\n */\n enableEmbeddedAsarIntegrityValidation?: boolean\n /**\n * The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.\n */\n onlyLoadAppFromAsar?: boolean\n /**\n * The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.\n */\n loadBrowserProcessSpecificV8Snapshot?: boolean\n /**\n * The grantFileProtocolExtraPrivileges fuse changes whether pages loaded from the `file://` protocol are given privileges beyond what they would receive in a traditional web browser. This behavior was core to Electron apps in original versions of Electron but is no longer required as apps should be [serving local files from custom protocols](https://github.com/electron/electron/blob/main/docs/tutorial/security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead. If you aren't serving pages from `file://` you should disable this fuse.\n * The extra privileges granted to the `file://` protocol by this fuse are incompletely documented below:\n *\n * - `file://` protocol pages can use `fetch` to load other assets over `file://`\n * - `file://` protocol pages can use service workers\n * - `file://` protocol pages have universal access granted to child frames also running on `file://` protocols regardless of sandbox settings\n */\n grantFileProtocolExtraPrivileges?: boolean\n /**\n * Resets the app signature, specifically used for macOS.\n * Note: This should be unneeded since electron-builder signs the app directly after flipping the fuses.\n * Ref: https://github.com/electron/fuses?tab=readme-ov-file#apple-silicon\n */\n resetAdHocDarwinSignature?: boolean\n}\n\nexport interface Concurrency {\n /**\n * The maximum number of concurrent jobs to run.\n * @default 1\n */\n jobs: number\n}\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 } from \"./electron/ElectronFramework\"\nimport { PrepareApplicationStageDirectoryOptions } from \"./Framework\"\nimport { AppXOptions } from \"./options/AppXOptions\"\nimport { AppImageOptions, DebOptions, FlatpakOptions, LinuxConfiguration, LinuxTargetSpecificOptions, PacmanOptions, RpmOptions } 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\"\nimport { ElectronDownloadOptions, ElectronGetOptions } from \"./util/electronGet\"\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 * Configuration of toolsets utilized by electron-builder\n */\n readonly toolsets?: ToolsetConfig | 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 /** NSIS installer options. */\n readonly nsis?: NsisOptions | null\n /** NSIS web installer options (downloads app package at install time). */\n readonly nsisWeb?: NsisWebOptions | null\n /** Portable executable options (no installation required). */\n readonly portable?: PortableOptions | null\n /** Windows Store (AppX) package options. */\n readonly appx?: AppXOptions | null\n /**\n * MSI package options.\n */\n readonly msi?: MsiOptions | null\n /**\n * MSI-wrapped installer options.\n */\n readonly msiWrapped?: MsiWrappedOptions | null\n /**\n * Squirrel.Windows installer options. Requires the `electron-builder-squirrel-windows` dependency.\n */\n readonly squirrelWindows?: SquirrelWindowsOptions | null\n /**\n * General Linux build options shared across all Linux targets (icon, category, desktop entry,\n * executable name, etc.). Target-specific compression and packaging options live in the\n * per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`, etc.).\n */\n readonly linux?: LinuxConfiguration | null\n /**\n * Debian package options. Targets Debian, Ubuntu, and Debian-based distributions.\n * Produces a `.deb` archive installable via `dpkg -i` or `apt install`.\n */\n readonly deb?: DebOptions | null\n /**\n * Snap package options. Requires [snapcraft](https://snapcraft.io/) to be installed.\n */\n readonly snap?: SnapOptions | null\n /**\n * AppImage options. AppImage is a portable application format that bundles the app\n * and its dependencies into a single self-contained executable that runs on most\n * Linux distributions without installation.\n */\n readonly appImage?: AppImageOptions | null\n /**\n * Flatpak options. Flatpak is a sandboxed application distribution format for Linux\n * that runs in a controlled environment and is distributed via [Flathub](https://flathub.org/)\n * or other Flatpak repositories.\n */\n readonly flatpak?: FlatpakOptions | null\n /**\n * Pacman package options. Targets Arch Linux and Arch-based distributions\n * (Manjaro, EndeavourOS, etc.). Produces a `.pacman` archive installable via `pacman -U`.\n */\n readonly pacman?: PacmanOptions | null\n /**\n * RPM package options. Targets Fedora, Red Hat Enterprise Linux, SUSE, and related\n * distributions. Produces a `.rpm` archive installable via `rpm` or `dnf`.\n */\n readonly rpm?: RpmOptions | null\n /**\n * FreeBSD package options. Produces a `.pkg` archive for the FreeBSD `pkg` package manager.\n */\n readonly freebsd?: LinuxTargetSpecificOptions | null\n /**\n * Solaris IPS package options. Produces a `.p5p` archive for the Solaris Image Packaging\n * System (`pkg`).\n */\n readonly p5p?: LinuxTargetSpecificOptions | null\n /**\n * Alpine Linux APK package options. Produces an `.apk` archive installable via `apk add`.\n */\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\n /**\n * Options to pass to `@electron/fuses`\n * Ref: https://github.com/electron/fuses\n */\n readonly electronFuses?: FuseOptionsV1 | null\n\n /**\n * [Experimental] Configuration for concurrent builds.\n */\n readonly concurrency?: Concurrency | null\n}\n\nexport interface Configuration extends CommonConfiguration, PlatformSpecificBuildOptions, Hooks {\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 * @deprecated `electron-compile` is no longer maintained. Compile your app with a modern bundler (webpack, vite, etc.) instead.\n */\n readonly electronCompile?: boolean\n\n /**\n * The [electron-download](https://github.com/electron-userland/electron-download#usage) options. (legacy)\n * Alternatively, you can use [electron/get](https://github.com/electron/get#usage) options.\n */\n readonly electronDownload?: ElectronDownloadOptions | ElectronGetOptions | null\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 * @deprecated libui-based frameworks (proton-native, etc.) are no longer actively maintained. This option has no effect when using Electron.\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 * @deprecated libui-based frameworks (proton-native, etc.) are no longer actively maintained. This option has no effect when using Electron.\n */\n readonly launchUiVersion?: boolean | string | null\n\n /**\n * The framework name. One of `electron`, `proton`, `libui`. Defaults to `electron`.\n * @deprecated `proton` and `libui` framework support is no longer actively maintained. Use `electron` (the default).\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 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\n/**\n * Configuration of toolsets utilized by electron-builder\n */\nexport interface ToolsetConfig {\n /**\n * `win-codesign` version to use for signing Windows artifacts.\n * Located at https://github.com/electron-userland/electron-builder-binaries/releases?q=win-codesign&expanded=true\n *\n * Stable:\n * v0.0.0 (winCodeSign)\n *\n * Beta:\n * Windows Kits 10.0.26100.0\n * v1.0.0, v1.1.0\n *\n * @default \"0.0.0\"\n */\n readonly winCodeSign?: \"0.0.0\" | \"1.0.0\" | \"1.1.0\" | null\n\n /**\n * `appimage` bundle version to use for Appimage packaging and runtime.\n * Located at https://github.com/electron-userland/electron-builder-binaries/releases?q=appimage&expanded=true\n * 0.0.0 - legacy toolset (appimage)\n *\n * Betas:\n * 1.0.2 - Runtime 20251108\n * 1.0.3 - Runtime 20251108 (Resolves GH issue #9598)\n *\n * @default \"0.0.0\"\n */\n readonly appimage?: \"0.0.0\" | \"1.0.2\" | \"1.0.3\" | null\n}\n\nexport interface Hooks {\n /**\n * The function (or path to file or module id) to be run before pack.\n * Receives a {@link BeforePackContext}.\n *\n * Can be specified inline as a function in JavaScript configs:\n * ```js\n * // electron-builder.config.js\n * module.exports = {\n * beforePack: async (context) => {\n * // your code\n * }\n * }\n * ```\n *\n * Or as a path to a module that exports the function as its default export:\n * ```json\n * { \"build\": { \"beforePack\": \"./myBeforePackHook.js\" } }\n * ```\n * ```js\n * // myBeforePackHook.js\n * exports.default = async function(context) {\n * // your custom code\n * }\n * ```\n */\n readonly beforePack?: Hook<BeforePackContext, void> | 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.\n * Receives an {@link AfterExtractContext}. For file/module setup, see {@link beforePack}.\n */\n readonly afterExtract?: Hook<AfterExtractContext, void> | string | null\n\n /**\n * The function (or path to file or module id) to be run after pack but before pack into distributable format and sign.\n * Receives an {@link AfterPackContext}. For file/module setup, see {@link beforePack}.\n */\n readonly afterPack?: Hook<AfterPackContext, void> | string | null\n\n /**\n * The function (or path to file or module id) to be run after pack and sign but before pack into distributable format.\n * Receives an {@link AfterPackContext}. For file/module setup, see {@link beforePack}.\n */\n readonly afterSign?: Hook<AfterPackContext, void> | string | null\n\n /**\n * The function (or path to file or module id) to be run when an individual artifact build starts.\n * Receives an {@link ArtifactBuildStarted}. For file/module setup, see {@link beforePack}.\n */\n readonly artifactBuildStarted?: Hook<ArtifactBuildStarted, void> | string | null\n /**\n * The function (or path to file or module id) to be run when an individual artifact build completes.\n * Receives an {@link ArtifactCreated}. For file/module setup, see {@link beforePack}.\n */\n readonly artifactBuildCompleted?: Hook<ArtifactCreated, void> | string | null\n /**\n * The function (or path to file or module id) to be run after all artifacts are built.\n * Receives a {@link BuildResult}. May return an array of additional file paths to publish.\n *\n * For file/module setup, see {@link beforePack}.\n *\n * @example\n * ```js\n * exports.default = function () {\n * // 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 * The function (or path to file or module id) to be run after MSI project created on disk - not packed into .msi package yet.\n */\n readonly msiProjectCreated?: Hook<string, void> | string | null\n /**\n * The function (or path to file or module id) to be run after Appx manifest created on disk - not packed into .appx package yet.\n */\n readonly appxManifestCreated?: Hook<string, void> | 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 * The function (or path to file or module id) to be run when staging the electron artifact environment.\n * Returns the path to custom Electron build (e.g. `~/electron/out/R`) or folder of electron zips.\n *\n * 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?: Hook<PrepareApplicationStageDirectoryOptions, string> | 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](https://www.electron.build/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\n/**\n * All options come from [@electron/fuses](https://github.com/electron/fuses)\n * Ref: https://raw.githubusercontent.com/electron/electron/refs/heads/main/docs/tutorial/fuses.md\n */\nexport interface FuseOptionsV1 {\n /**\n *The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. Instead, we recommend that you use [Utility Processes](https://github.com/electron/electron/blob/main/docs/api/utility-process.md), which work for many use cases where you need a standalone Node.js process (like a Sqlite server process or similar scenarios).\n */\n runAsNode?: boolean\n /**\n * The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.\n */\n enableCookieEncryption?: boolean\n /**\n * The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.\n */\n enableNodeOptionsEnvironmentVariable?: boolean\n /**\n * The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.\n */\n enableNodeCliInspectArguments?: boolean\n /**\n * The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.\n * Currently, ASAR integrity checking is supported on:\n *\n * - macOS as of electron>=16.0.0\n * - Windows as of electron>=30.0.0\n *\n * For more information on how to use asar integrity validation please read the [Asar Integrity](https://github.com/electron/electron/blob/main/docs/tutorial/asar-integrity.md) documentation.\n */\n enableEmbeddedAsarIntegrityValidation?: boolean\n /**\n * The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.\n */\n onlyLoadAppFromAsar?: boolean\n /**\n * The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.\n */\n loadBrowserProcessSpecificV8Snapshot?: boolean\n /**\n * The grantFileProtocolExtraPrivileges fuse changes whether pages loaded from the `file://` protocol are given privileges beyond what they would receive in a traditional web browser. This behavior was core to Electron apps in original versions of Electron but is no longer required as apps should be [serving local files from custom protocols](https://github.com/electron/electron/blob/main/docs/tutorial/security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead. If you aren't serving pages from `file://` you should disable this fuse.\n * The extra privileges granted to the `file://` protocol by this fuse are incompletely documented below:\n *\n * - `file://` protocol pages can use `fetch` to load other assets over `file://`\n * - `file://` protocol pages can use service workers\n * - `file://` protocol pages have universal access granted to child frames also running on `file://` protocols regardless of sandbox settings\n */\n grantFileProtocolExtraPrivileges?: boolean\n /**\n * Resets the app signature, specifically used for macOS.\n * Note: This should be unneeded since electron-builder signs the app directly after flipping the fuses.\n * Ref: https://github.com/electron/fuses?tab=readme-ov-file#apple-silicon\n */\n resetAdHocDarwinSignature?: boolean\n}\n\nexport interface Concurrency {\n /**\n * The maximum number of concurrent jobs to run.\n * @default 1\n */\n jobs: number\n}\n"]}
|
package/out/core.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ export declare abstract class Target {
|
|
|
31
31
|
abstract readonly outDir: string;
|
|
32
32
|
abstract readonly options: TargetSpecificOptions | Nullish;
|
|
33
33
|
readonly buildQueueManager: AsyncTaskManager;
|
|
34
|
-
|
|
34
|
+
constructor(name: string, isAsyncSupported?: boolean);
|
|
35
35
|
checkOptions(): Promise<any>;
|
|
36
36
|
abstract build(appOutDir: string, arch: Arch): Promise<any>;
|
|
37
37
|
finishBuild(): Promise<any>;
|
|
38
38
|
}
|
|
39
39
|
export interface TargetSpecificOptions {
|
|
40
40
|
/**
|
|
41
|
-
The [artifact file name template](
|
|
41
|
+
The [artifact file name template](https://www.electron.build/configuration#artifact-file-name-template).
|
|
42
42
|
*/
|
|
43
43
|
readonly artifactName?: string | null;
|
|
44
44
|
publish?: Publish;
|
package/out/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAAA,+CAA+E;AAC/E,+DAAoF;AAmBpF,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,CAAC,CAAC,IAAI,EAA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AK,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;IAO1B,YACW,IAAY,EACZ,mBAA4B,IAAI;QADhC,SAAI,GAAJ,IAAI,CAAQ;QACZ,qBAAgB,GAAhB,gBAAgB,CAAgB;QAL3C,+HAA+H;QACtH,sBAAiB,GAAG,IAAI,+BAAgB,CAAC,IAAI,wCAAiB,EAAE,CAAC,CAAA;IAKvE,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,SAAS;IACX,CAAC;IAID,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAA;IAC3C,CAAC;CACF;AArBD,wBAqBC;AAWY,QAAA,cAAc,GAAG,SAAS,CAAA;AAC1B,QAAA,UAAU,GAAG,KAAK,CAAA","sourcesContent":["import { Arch, archFromString, ArchType, AsyncTaskManager } from \"builder-util\"\nimport { AllPublishOptions, CancellationToken, Nullish } 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 | Nullish\n\n // use only for tasks that cannot be executed in parallel (such as signing on windows and hdiutil on macOS due to file locking)\n readonly buildQueueManager = new AsyncTaskManager(new CancellationToken())\n\n
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;AAAA,+CAA+E;AAC/E,+DAAoF;AAmBpF,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,E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OAAO,CAAC,IAAI,CAAC;YAC3B,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;IAO1B,YACW,IAAY,EACZ,mBAA4B,IAAI;QADhC,SAAI,GAAJ,IAAI,CAAQ;QACZ,qBAAgB,GAAhB,gBAAgB,CAAgB;QAL3C,+HAA+H;QACtH,sBAAiB,GAAG,IAAI,+BAAgB,CAAC,IAAI,wCAAiB,EAAE,CAAC,CAAA;IAKvE,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,SAAS;IACX,CAAC;IAID,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAA;IAC3C,CAAC;CACF;AArBD,wBAqBC;AAWY,QAAA,cAAc,GAAG,SAAS,CAAA;AAC1B,QAAA,UAAU,GAAG,KAAK,CAAA","sourcesContent":["import { Arch, archFromString, ArchType, AsyncTaskManager } from \"builder-util\"\nimport { AllPublishOptions, CancellationToken, Nullish } 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 | Nullish\n\n // use only for tasks that cannot be executed in parallel (such as signing on windows and hdiutil on macOS due to file locking)\n readonly buildQueueManager = new AsyncTaskManager(new CancellationToken())\n\n public 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 async finishBuild(): Promise<any> {\n await this.buildQueueManager.awaitTasks()\n }\n}\n\nexport interface TargetSpecificOptions {\n /**\n The [artifact file name template](https://www.electron.build/configuration#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"]}
|
|
@@ -100,10 +100,10 @@ async function removeUnusedLanguagesIfNeeded(options) {
|
|
|
100
100
|
await (0, tiny_async_pool_1.default)(builder_util_1.MAX_FILE_REQUESTS, allDeletedFiles, it => it);
|
|
101
101
|
}
|
|
102
102
|
class ElectronFramework {
|
|
103
|
-
constructor(name, version,
|
|
103
|
+
constructor(name, version, macOsProductName) {
|
|
104
104
|
this.name = name;
|
|
105
105
|
this.version = version;
|
|
106
|
-
this.
|
|
106
|
+
this.macOsProductName = macOsProductName;
|
|
107
107
|
// noinspection JSUnusedGlobalSymbols
|
|
108
108
|
this.macOsDefaultTargets = ["zip", "dmg"];
|
|
109
109
|
// noinspection JSUnusedGlobalSymbols
|
|
@@ -113,6 +113,9 @@ class ElectronFramework {
|
|
|
113
113
|
// noinspection JSUnusedGlobalSymbols
|
|
114
114
|
this.isNpmRebuildRequired = true;
|
|
115
115
|
}
|
|
116
|
+
get distMacOsAppName() {
|
|
117
|
+
return `${this.macOsProductName}.app`;
|
|
118
|
+
}
|
|
116
119
|
getDefaultIcon(platform) {
|
|
117
120
|
if (platform === index_1.Platform.LINUX) {
|
|
118
121
|
return path.join((0, pathManager_1.getTemplatePath)("icons"), "electron-linux");
|
|
@@ -151,7 +154,7 @@ async function createElectronFrameworkSupport(configuration, packager) {
|
|
|
151
154
|
configuration.electronVersion = version;
|
|
152
155
|
}
|
|
153
156
|
const branding = createBrandingOpts(configuration);
|
|
154
|
-
return new ElectronFramework(branding.projectName, version,
|
|
157
|
+
return new ElectronFramework(branding.projectName, version, branding.productName);
|
|
155
158
|
}
|
|
156
159
|
/**
|
|
157
160
|
* Unpacks a custom or default Electron distribution into the app output directory.
|