app-builder-lib 23.6.0 → 24.0.0-alpha.10
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.js +4 -4
- package/out/ProtonFramework.js.map +1 -1
- package/out/appInfo.js +21 -9
- package/out/appInfo.js.map +1 -1
- package/out/asar/asar.d.ts +12 -0
- package/out/asar/asar.js +10 -11
- package/out/asar/asar.js.map +1 -1
- package/out/asar/asarFileChecker.js +2 -2
- package/out/asar/asarFileChecker.js.map +1 -1
- package/out/asar/asarUtil.js +13 -13
- package/out/asar/asarUtil.js.map +1 -1
- package/out/asar/integrity.js +9 -9
- package/out/asar/integrity.js.map +1 -1
- package/out/asar/unpackDetector.js +6 -6
- package/out/asar/unpackDetector.js.map +1 -1
- package/out/binDownload.js +2 -2
- package/out/binDownload.js.map +1 -1
- package/out/codeSign/codesign.js +4 -4
- package/out/codeSign/codesign.js.map +1 -1
- package/out/codeSign/macCodeSign.d.ts +2 -2
- package/out/codeSign/macCodeSign.js +26 -26
- package/out/codeSign/macCodeSign.js.map +1 -1
- package/out/codeSign/windowsCodeSign.js +16 -15
- package/out/codeSign/windowsCodeSign.js.map +1 -1
- package/out/core.js +1 -1
- package/out/core.js.map +1 -1
- package/out/electron/ElectronFramework.js +17 -17
- package/out/electron/ElectronFramework.js.map +1 -1
- package/out/electron/electronMac.js +16 -16
- package/out/electron/electronMac.js.map +1 -1
- package/out/electron/electronVersion.js +5 -5
- package/out/electron/electronVersion.js.map +1 -1
- package/out/fileMatcher.js +11 -11
- package/out/fileMatcher.js.map +1 -1
- package/out/fileTransformer.js +5 -5
- package/out/fileTransformer.js.map +1 -1
- package/out/forge-maker.js +1 -1
- package/out/forge-maker.js.map +1 -1
- package/out/frameworks/LibUiFramework.js +10 -10
- package/out/frameworks/LibUiFramework.js.map +1 -1
- package/out/index.js +3 -3
- package/out/index.js.map +1 -1
- package/out/linuxPackager.js +3 -3
- package/out/linuxPackager.js.map +1 -1
- package/out/macPackager.d.ts +3 -1
- package/out/macPackager.js +80 -31
- package/out/macPackager.js.map +1 -1
- package/out/options/CommonWindowsInstallerConfiguration.js +3 -3
- package/out/options/CommonWindowsInstallerConfiguration.js.map +1 -1
- package/out/options/SnapOptions.d.ts +4 -0
- package/out/options/SnapOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +27 -5
- package/out/options/macOptions.js.map +1 -1
- package/out/packager.js +34 -34
- package/out/packager.js.map +1 -1
- package/out/platformPackager.js +39 -39
- package/out/platformPackager.js.map +1 -1
- package/out/presets/rectCra.js +1 -1
- package/out/presets/rectCra.js.map +1 -1
- package/out/publish/BitbucketPublisher.js +5 -5
- package/out/publish/BitbucketPublisher.js.map +1 -1
- package/out/publish/KeygenPublisher.js +7 -7
- package/out/publish/KeygenPublisher.js.map +1 -1
- package/out/publish/PublishManager.d.ts +0 -1
- package/out/publish/PublishManager.js +24 -28
- package/out/publish/PublishManager.js.map +1 -1
- package/out/publish/SnapStorePublisher.js +1 -1
- package/out/publish/SnapStorePublisher.js.map +1 -1
- package/out/publish/s3/BaseS3Publisher.js +3 -3
- package/out/publish/s3/BaseS3Publisher.js.map +1 -1
- package/out/publish/s3/s3Publisher.js +1 -1
- package/out/publish/s3/s3Publisher.js.map +1 -1
- package/out/publish/s3/spacesPublisher.js +2 -2
- package/out/publish/s3/spacesPublisher.js.map +1 -1
- package/out/publish/updateInfoBuilder.js +9 -9
- package/out/publish/updateInfoBuilder.js.map +1 -1
- package/out/remoteBuilder/ProjectInfoManager.js +1 -1
- package/out/remoteBuilder/ProjectInfoManager.js.map +1 -1
- package/out/remoteBuilder/RemoteBuilder.js +3 -3
- package/out/remoteBuilder/RemoteBuilder.js.map +1 -1
- package/out/remoteBuilder/builder-cli.js +3 -3
- package/out/remoteBuilder/builder-cli.js.map +1 -1
- package/out/targets/AppImageTarget.js +6 -6
- package/out/targets/AppImageTarget.js.map +1 -1
- package/out/targets/AppxTarget.js +19 -19
- package/out/targets/AppxTarget.js.map +1 -1
- package/out/targets/ArchiveTarget.js +7 -7
- package/out/targets/ArchiveTarget.js.map +1 -1
- package/out/targets/FlatpakTarget.js +8 -8
- package/out/targets/FlatpakTarget.js.map +1 -1
- package/out/targets/{fpm.d.ts → FpmTarget.d.ts} +1 -0
- package/out/targets/{fpm.js → FpmTarget.js} +54 -20
- package/out/targets/FpmTarget.js.map +1 -0
- package/out/targets/LinuxTargetHelper.js +9 -9
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/MsiTarget.js +11 -11
- package/out/targets/MsiTarget.js.map +1 -1
- package/out/targets/archive.js +9 -9
- package/out/targets/archive.js.map +1 -1
- package/out/targets/differentialUpdateInfoBuilder.js +2 -2
- package/out/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/out/targets/nsis/NsisTarget.js +37 -37
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/WebInstallerTarget.js +2 -2
- package/out/targets/nsis/WebInstallerTarget.js.map +1 -1
- package/out/targets/nsis/nsisLang.js +5 -5
- package/out/targets/nsis/nsisLang.js.map +1 -1
- package/out/targets/nsis/nsisLicense.js +2 -2
- package/out/targets/nsis/nsisLicense.js.map +1 -1
- package/out/targets/nsis/nsisUtil.js +5 -5
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/targets/pkg.js +19 -25
- package/out/targets/pkg.js.map +1 -1
- package/out/targets/snap.js +22 -11
- package/out/targets/snap.js.map +1 -1
- package/out/targets/targetFactory.js +4 -4
- package/out/targets/targetFactory.js.map +1 -1
- package/out/targets/tools.js +1 -1
- package/out/targets/tools.js.map +1 -1
- package/out/util/AppFileWalker.js +2 -2
- package/out/util/AppFileWalker.js.map +1 -1
- package/out/util/NodeModuleCopyHelper.js +3 -3
- package/out/util/NodeModuleCopyHelper.js.map +1 -1
- package/out/util/appBuilder.js +2 -2
- package/out/util/appBuilder.js.map +1 -1
- package/out/util/appFileCopier.d.ts +1 -0
- package/out/util/appFileCopier.js +10 -9
- package/out/util/appFileCopier.js.map +1 -1
- package/out/util/cacheManager.js +5 -5
- package/out/util/cacheManager.js.map +1 -1
- package/out/util/config.js +10 -10
- package/out/util/config.js.map +1 -1
- package/out/util/flags.js +2 -2
- package/out/util/flags.js.map +1 -1
- package/out/util/hash.js +2 -2
- package/out/util/hash.js.map +1 -1
- package/out/util/license.js +2 -2
- package/out/util/license.js.map +1 -1
- package/out/util/macosVersion.js +3 -3
- package/out/util/macosVersion.js.map +1 -1
- package/out/util/normalizePackageData.js +4 -4
- package/out/util/normalizePackageData.js.map +1 -1
- package/out/util/packageDependencies.js +1 -1
- package/out/util/packageDependencies.js.map +1 -1
- package/out/util/packageMetadata.js +8 -8
- package/out/util/packageMetadata.js.map +1 -1
- package/out/util/repositoryInfo.js +2 -2
- package/out/util/repositoryInfo.js.map +1 -1
- package/out/util/yarn.d.ts +1 -1
- package/out/util/yarn.js +27 -38
- package/out/util/yarn.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/MonoVm.js +2 -2
- package/out/vm/MonoVm.js.map +1 -1
- package/out/vm/ParallelsVm.js +6 -6
- package/out/vm/ParallelsVm.js.map +1 -1
- package/out/vm/WineVm.js +1 -1
- package/out/vm/WineVm.js.map +1 -1
- package/out/vm/vm.js +2 -2
- package/out/vm/vm.js.map +1 -1
- package/out/winPackager.js +25 -25
- package/out/winPackager.js.map +1 -1
- package/out/wine.js +2 -2
- package/out/wine.js.map +1 -1
- package/package.json +17 -15
- package/scheme.json +96 -18
- package/templates/nsis/installSection.nsh +4 -1
- package/out/targets/fpm.js.map +0 -1
|
@@ -12,19 +12,19 @@ function getEffectiveOptions(options, packager) {
|
|
|
12
12
|
if (companyName == null) {
|
|
13
13
|
throw new builder_util_1.InvalidConfigurationError(`Please specify "author" in the application package.json — it is required because "menuCategory" is set to true.`);
|
|
14
14
|
}
|
|
15
|
-
menuCategory = filename_1.sanitizeFileName(companyName);
|
|
15
|
+
menuCategory = (0, filename_1.sanitizeFileName)(companyName);
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
menuCategory = options.menuCategory
|
|
19
19
|
.split(/[/\\]/)
|
|
20
|
-
.map(it => filename_1.sanitizeFileName(it))
|
|
20
|
+
.map(it => (0, filename_1.sanitizeFileName)(it))
|
|
21
21
|
.join("\\");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
25
|
isPerMachine: options.perMachine === true,
|
|
26
26
|
isAssisted: options.oneClick === false,
|
|
27
|
-
shortcutName: builder_util_1.isEmptyOrSpaces(options.shortcutName) ? appInfo.sanitizedProductName : packager.expandMacro(options.shortcutName),
|
|
27
|
+
shortcutName: (0, builder_util_1.isEmptyOrSpaces)(options.shortcutName) ? appInfo.sanitizedProductName : packager.expandMacro(options.shortcutName),
|
|
28
28
|
isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),
|
|
29
29
|
isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,
|
|
30
30
|
menuCategory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommonWindowsInstallerConfiguration.js","sourceRoot":"","sources":["../../src/options/CommonWindowsInstallerConfiguration.ts"],"names":[],"mappings":";;;AAAA,+CAAyE;AACzE,+CAAmD;AAqDnD,SAAgB,mBAAmB,CAAC,OAA4C,EAAE,QAAqB;IACrG,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEhC,IAAI,YAAY,GAAkB,IAAI,CAAA;IACtC,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,CAAC,YAAY,KAAK,KAAK,EAAE;QAClE,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,EAAE;YACjC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAA;YAChD,IAAI,WAAW,IAAI,IAAI,EAAE;gBACvB,MAAM,IAAI,wCAAyB,CAAC,iHAAiH,CAAC,CAAA;aACvJ;YACD,YAAY,GAAG,2BAAgB,
|
|
1
|
+
{"version":3,"file":"CommonWindowsInstallerConfiguration.js","sourceRoot":"","sources":["../../src/options/CommonWindowsInstallerConfiguration.ts"],"names":[],"mappings":";;;AAAA,+CAAyE;AACzE,+CAAmD;AAqDnD,SAAgB,mBAAmB,CAAC,OAA4C,EAAE,QAAqB;IACrG,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEhC,IAAI,YAAY,GAAkB,IAAI,CAAA;IACtC,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,CAAC,YAAY,KAAK,KAAK,EAAE;QAClE,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,EAAE;YACjC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAA;YAChD,IAAI,WAAW,IAAI,IAAI,EAAE;gBACvB,MAAM,IAAI,wCAAyB,CAAC,iHAAiH,CAAC,CAAA;aACvJ;YACD,YAAY,GAAG,IAAA,2BAAgB,EAAC,WAAW,CAAC,CAAA;SAC7C;aAAM;YACL,YAAY,GAAG,OAAO,CAAC,YAAY;iBAChC,KAAK,CAAC,OAAO,CAAC;iBACd,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAA,2BAAgB,EAAC,EAAE,CAAC,CAAC;iBAC/B,IAAI,CAAC,IAAI,CAAC,CAAA;SACd;KACF;IAED,OAAO;QACL,YAAY,EAAE,OAAO,CAAC,UAAU,KAAK,IAAI;QACzC,UAAU,EAAE,OAAO,CAAC,QAAQ,KAAK,KAAK;QAEtC,YAAY,EAAE,IAAA,8BAAe,EAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC;QAC/H,uBAAuB,EAAE,sCAAsC,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC9F,yBAAyB,EAAE,OAAO,CAAC,uBAAuB,KAAK,KAAK;QACpE,YAAY;KACb,CAAA;AACH,CAAC;AA5BD,kDA4BC;AAED,SAAS,sCAAsC,CAAC,KAAmC;IACjF,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,6BAA6B,CAAC,KAAK,CAAA;KAC3C;SAAM,IAAI,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,6BAA6B,CAAC,MAAM,CAAA;KAC5C;SAAM;QACL,OAAO,6BAA6B,CAAC,aAAa,CAAA;KACnD;AACH,CAAC;AAED,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,mGAAa,CAAA;IACb,qFAAM,CAAA;IACN,mFAAK,CAAA;AACP,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC","sourcesContent":["import { InvalidConfigurationError, isEmptyOrSpaces } from \"builder-util\"\nimport { sanitizeFileName } from \"../util/filename\"\nimport { WinPackager } from \"../winPackager\"\n\nexport interface CommonWindowsInstallerConfiguration {\n readonly oneClick?: boolean\n\n /**\n * Whether to install per all users (per-machine).\n * @default false\n */\n readonly perMachine?: boolean\n\n /**\n * Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.\n * @default true\n */\n readonly runAfterFinish?: boolean\n\n /**\n * Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).\n * @default true\n */\n readonly createDesktopShortcut?: boolean | \"always\"\n\n /**\n * Whether to create start menu shortcut.\n * @default true\n */\n readonly createStartMenuShortcut?: boolean\n\n /**\n * Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value.\n * @default false\n */\n readonly menuCategory?: boolean | string\n\n /**\n * The name that will be used for all shortcuts. Defaults to the application name.\n */\n readonly shortcutName?: string | null\n}\n\nexport interface FinalCommonWindowsInstallerOptions {\n isAssisted: boolean\n isPerMachine: boolean\n\n shortcutName: string\n menuCategory: string | null\n\n isCreateDesktopShortcut: DesktopShortcutCreationPolicy\n isCreateStartMenuShortcut: boolean\n}\n\nexport function getEffectiveOptions(options: CommonWindowsInstallerConfiguration, packager: WinPackager): FinalCommonWindowsInstallerOptions {\n const appInfo = packager.appInfo\n\n let menuCategory: string | null = null\n if (options.menuCategory != null && options.menuCategory !== false) {\n if (options.menuCategory === true) {\n const companyName = packager.appInfo.companyName\n if (companyName == null) {\n throw new InvalidConfigurationError(`Please specify \"author\" in the application package.json — it is required because \"menuCategory\" is set to true.`)\n }\n menuCategory = sanitizeFileName(companyName)\n } else {\n menuCategory = options.menuCategory\n .split(/[/\\\\]/)\n .map(it => sanitizeFileName(it))\n .join(\"\\\\\")\n }\n }\n\n return {\n isPerMachine: options.perMachine === true,\n isAssisted: options.oneClick === false,\n\n shortcutName: isEmptyOrSpaces(options.shortcutName) ? appInfo.sanitizedProductName : packager.expandMacro(options.shortcutName),\n isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),\n isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,\n menuCategory,\n }\n}\n\nfunction convertToDesktopShortcutCreationPolicy(value: boolean | undefined | string): DesktopShortcutCreationPolicy {\n if (value === false) {\n return DesktopShortcutCreationPolicy.NEVER\n } else if (value === \"always\") {\n return DesktopShortcutCreationPolicy.ALWAYS\n } else {\n return DesktopShortcutCreationPolicy.FRESH_INSTALL\n }\n}\n\nexport enum DesktopShortcutCreationPolicy {\n FRESH_INSTALL,\n ALWAYS,\n NEVER,\n}\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { TargetSpecificOptions } from "../core";
|
|
2
2
|
import { CommonLinuxOptions } from "./linuxOptions";
|
|
3
3
|
export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
|
4
|
+
/**
|
|
5
|
+
* A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`. Defaults to `core18`
|
|
6
|
+
*/
|
|
7
|
+
readonly base?: string | null;
|
|
4
8
|
/**
|
|
5
9
|
* The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.
|
|
6
10
|
* @default strict
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\nimport { CommonLinuxOptions } from \"./linuxOptions\"\n\nexport interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The custom environment. Defaults to `{\"TMPDIR: \"$XDG_RUNTIME_DIR\"}`. If you set custom, it will be merged with default.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * The 78 character long summary. Defaults to [productName](/configuration/configuration#Configuration-productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels).\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * The list of features that must be supported by the core in order for this snap to install.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * The list of debian packages needs to be installed for building this snap.\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom package `foo` in addition to defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * The list of [plugs](https://snapcraft.io/docs/reference/interfaces).\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\", \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom plug `foo` in addition to defaults.\n *\n * Additional attributes can be specified using object instead of just name of plug:\n * ```\n *[\n * {\n * \"browser-sandbox\": {\n * \"interface\": \"browser-support\",\n * \"allow-sandbox\": true\n * },\n * },\n * \"another-simple-plug-name\"\n *]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * The list of [slots](https://snapcraft.io/docs/reference/interfaces).\n *\n * Additional attributes can be specified using object instead of just name of slot:\n * ```\n *[\n * {\n * \"mpris\": {\n * \"name\": \"chromium\"\n * },\n * }\n *]\n *\n * In case you want your application to be a compliant MPris player, you will need to definie\n * The mpris slot with \"chromium\" name.\n * This electron has it [hardcoded](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1),\n * and we need to pass this name so snap [will allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7) in strict confinement.\n *\n */\n readonly slots?: Array<string | SlotDescriptor> | PlugDescriptor | null\n\n /**\n * Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.\n * Defaults to `[\"desktop-gtk2\"\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom parts `foo` in addition to defaults.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether to use template snap. Defaults to `true` if `stagePackages` not specified.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * Whether or not the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.\n *\n * The defaults can be found in [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * An optional title for the snap, may contain uppercase letters and spaces. Defaults to `productName`. See [snap format documentation](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Sets the compression type for the snap. Can be xz, lzo, or null.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow running the program with native wayland support with --ozone-platform=wayland.\n * Disabled by default because of this issue in older Electron/Snap versions: https://github.com/electron-userland/electron-builder/issues/4007\n */\n readonly allowNativeWayland?: boolean | null\n}\n\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\nimport { CommonLinuxOptions } from \"./linuxOptions\"\n\nexport interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`. Defaults to `core18`\n */\n readonly base?: string | null\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The custom environment. Defaults to `{\"TMPDIR: \"$XDG_RUNTIME_DIR\"}`. If you set custom, it will be merged with default.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * The 78 character long summary. Defaults to [productName](/configuration/configuration#Configuration-productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels).\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * The list of features that must be supported by the core in order for this snap to install.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * The list of debian packages needs to be installed for building this snap.\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom package `foo` in addition to defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * The list of [plugs](https://snapcraft.io/docs/reference/interfaces).\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\", \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom plug `foo` in addition to defaults.\n *\n * Additional attributes can be specified using object instead of just name of plug:\n * ```\n *[\n * {\n * \"browser-sandbox\": {\n * \"interface\": \"browser-support\",\n * \"allow-sandbox\": true\n * },\n * },\n * \"another-simple-plug-name\"\n *]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * The list of [slots](https://snapcraft.io/docs/reference/interfaces).\n *\n * Additional attributes can be specified using object instead of just name of slot:\n * ```\n *[\n * {\n * \"mpris\": {\n * \"name\": \"chromium\"\n * },\n * }\n *]\n *\n * In case you want your application to be a compliant MPris player, you will need to definie\n * The mpris slot with \"chromium\" name.\n * This electron has it [hardcoded](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1),\n * and we need to pass this name so snap [will allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7) in strict confinement.\n *\n */\n readonly slots?: Array<string | SlotDescriptor> | PlugDescriptor | null\n\n /**\n * Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.\n * Defaults to `[\"desktop-gtk2\"\"]`.\n *\n * If list contains `default`, it will be replaced to default list, so, `[\"default\", \"foo\"]` can be used to add custom parts `foo` in addition to defaults.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether to use template snap. Defaults to `true` if `stagePackages` not specified.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * Whether or not the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.\n *\n * The defaults can be found in [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * An optional title for the snap, may contain uppercase letters and spaces. Defaults to `productName`. See [snap format documentation](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Sets the compression type for the snap. Can be xz, lzo, or null.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow running the program with native wayland support with --ozone-platform=wayland.\n * Disabled by default because of this issue in older Electron/Snap versions: https://github.com/electron-userland/electron-builder/issues/4007\n */\n readonly allowNativeWayland?: boolean | null\n}\n\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
@@ -10,7 +10,7 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
10
10
|
*/
|
|
11
11
|
readonly category?: string | null;
|
|
12
12
|
/**
|
|
13
|
-
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
|
|
13
|
+
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (`dmg` and `zip` for Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.
|
|
14
14
|
*/
|
|
15
15
|
readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null;
|
|
16
16
|
/**
|
|
@@ -130,12 +130,12 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
130
130
|
*/
|
|
131
131
|
readonly hardenedRuntime?: boolean;
|
|
132
132
|
/**
|
|
133
|
-
* Whether to let electron
|
|
133
|
+
* Whether to let @electron/osx-sign validate the signing or not.
|
|
134
134
|
* @default false
|
|
135
135
|
*/
|
|
136
136
|
readonly gatekeeperAssess?: boolean;
|
|
137
137
|
/**
|
|
138
|
-
* Whether to let electron
|
|
138
|
+
* Whether to let @electron/osx-sign verify the contents or not.
|
|
139
139
|
* @default true
|
|
140
140
|
*/
|
|
141
141
|
readonly strictVerify?: Array<string> | string | boolean;
|
|
@@ -161,7 +161,7 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
161
161
|
* This option has no effect unless building for "universal" arch and applies
|
|
162
162
|
* only if `mergeASARs` is `true`.
|
|
163
163
|
*/
|
|
164
|
-
readonly singleArchFiles?: string;
|
|
164
|
+
readonly singleArchFiles?: string | null;
|
|
165
165
|
/**
|
|
166
166
|
* Minimatch pattern of paths that are allowed to be x64 binaries in both
|
|
167
167
|
* ASAR files
|
|
@@ -169,7 +169,29 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
169
169
|
* This option has no effect unless building for "universal" arch and applies
|
|
170
170
|
* only if `mergeASARs` is `true`.
|
|
171
171
|
*/
|
|
172
|
-
readonly x64ArchFiles?: string;
|
|
172
|
+
readonly x64ArchFiles?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* Options to use for @electron/notarize (ref: https://github.com/electron/notarize).
|
|
175
|
+
* Supports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable
|
|
176
|
+
*
|
|
177
|
+
* Note: You MUST specify `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` via environment variables to activate notarization step
|
|
178
|
+
*/
|
|
179
|
+
readonly notarize?: NotarizeOptions | boolean | null;
|
|
180
|
+
}
|
|
181
|
+
export interface NotarizeOptions {
|
|
182
|
+
/**
|
|
183
|
+
* The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely).
|
|
184
|
+
* Only used by `legacy` notarization tool
|
|
185
|
+
*/
|
|
186
|
+
readonly appBundleId?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* Your Team Short Name. Only used by `legacy` notarization tool
|
|
189
|
+
*/
|
|
190
|
+
readonly ascProvider?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* The team ID you want to notarize under. Only needed if using `notarytool`
|
|
193
|
+
*/
|
|
194
|
+
readonly teamId?: string | null;
|
|
173
195
|
}
|
|
174
196
|
export interface DmgOptions extends TargetSpecificOptions {
|
|
175
197
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.\n * MAS installer identity is specified in the [mas](/configuration/mas).\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).\n * MAS entitlements is specified in the [mas](/configuration/mas).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /**\n * The electron locales. By default Electron locales used as is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let electron-osx-sign validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let electron-osx-sign verify the contents or not.\n * @default true\n */\n readonly strictVerify?: Array<string> | string | boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (`dmg` and `zip` for Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.\n * MAS installer identity is specified in the [mas](/configuration/mas).\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).\n * MAS entitlements is specified in the [mas](/configuration/mas).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /**\n * The electron locales. By default Electron locales used as is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let @electron/osx-sign validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let @electron/osx-sign verify the contents or not.\n * @default true\n */\n readonly strictVerify?: Array<string> | string | boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string | null\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string | null\n\n /**\n * Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\n * Supports both `legacy` and `notarytool` notarization tools. Use `false` to explicitly disable\n *\n * Note: You MUST specify `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` via environment variables to activate notarization step\n */\n readonly notarize?: NotarizeOptions | boolean | null\n}\n\nexport interface NotarizeOptions {\n /**\n * The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely).\n * Only used by `legacy` notarization tool\n */\n readonly appBundleId?: string | null\n\n /**\n * Your Team Short Name. Only used by `legacy` notarization tool\n */\n readonly ascProvider?: string | null\n\n /**\n * The team ID you want to notarize under. Only needed if using `notarytool`\n */\n readonly teamId?: string | null\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
package/out/packager.js
CHANGED
|
@@ -36,7 +36,7 @@ async function createFrameworkInfo(configuration, packager) {
|
|
|
36
36
|
}
|
|
37
37
|
let nodeVersion = configuration.nodeVersion;
|
|
38
38
|
if (framework === "electron" || framework == null) {
|
|
39
|
-
return await ElectronFramework_1.createElectronFrameworkSupport(configuration, packager);
|
|
39
|
+
return await (0, ElectronFramework_1.createElectronFrameworkSupport)(configuration, packager);
|
|
40
40
|
}
|
|
41
41
|
if (nodeVersion == null || nodeVersion === "current") {
|
|
42
42
|
nodeVersion = process.versions.node;
|
|
@@ -66,12 +66,12 @@ class Packager {
|
|
|
66
66
|
this.eventEmitter = new events_1.EventEmitter();
|
|
67
67
|
this._appInfo = null;
|
|
68
68
|
this.tempDirManager = new builder_util_1.TmpDir("packager");
|
|
69
|
-
this._repositoryInfo = new lazy_val_1.Lazy(() => repositoryInfo_1.getRepositoryInfo(this.projectDir, this.metadata, this.devMetadata));
|
|
69
|
+
this._repositoryInfo = new lazy_val_1.Lazy(() => (0, repositoryInfo_1.getRepositoryInfo)(this.projectDir, this.metadata, this.devMetadata));
|
|
70
70
|
this.afterPackHandlers = [];
|
|
71
71
|
this.debugLogger = new builder_util_1.DebugLogger(builder_util_1.log.isDebugEnabled);
|
|
72
72
|
this.nodeDependencyInfo = new Map();
|
|
73
73
|
this.stageDirPathCustomizer = (target, packager, arch) => {
|
|
74
|
-
return path.join(target.outDir, `__${target.name}-${arch_1.getArtifactArchName(arch, target.name)}`);
|
|
74
|
+
return path.join(target.outDir, `__${target.name}-${(0, arch_1.getArtifactArchName)(arch, target.name)}`);
|
|
75
75
|
};
|
|
76
76
|
this._buildResourcesDir = null;
|
|
77
77
|
this._framework = null;
|
|
@@ -89,7 +89,7 @@ class Packager {
|
|
|
89
89
|
function processTargets(platform, types) {
|
|
90
90
|
function commonArch(currentIfNotSpecified) {
|
|
91
91
|
const result = Array();
|
|
92
|
-
return result.length === 0 && currentIfNotSpecified ? [builder_util_1.archFromString(process.arch)] : result;
|
|
92
|
+
return result.length === 0 && currentIfNotSpecified ? [(0, builder_util_1.archFromString)(process.arch)] : result;
|
|
93
93
|
}
|
|
94
94
|
let archToType = targets.get(platform);
|
|
95
95
|
if (archToType == null) {
|
|
@@ -105,11 +105,11 @@ class Packager {
|
|
|
105
105
|
for (const type of types) {
|
|
106
106
|
const suffixPos = type.lastIndexOf(":");
|
|
107
107
|
if (suffixPos > 0) {
|
|
108
|
-
builder_util_1.addValue(archToType, builder_util_1.archFromString(type.substring(suffixPos + 1)), type.substring(0, suffixPos));
|
|
108
|
+
(0, builder_util_1.addValue)(archToType, (0, builder_util_1.archFromString)(type.substring(suffixPos + 1)), type.substring(0, suffixPos));
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
111
|
for (const arch of commonArch(true)) {
|
|
112
|
-
builder_util_1.addValue(archToType, arch, type);
|
|
112
|
+
(0, builder_util_1.addValue)(archToType, arch, type);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -130,7 +130,7 @@ class Packager {
|
|
|
130
130
|
prepackaged: options.prepackaged == null ? null : path.resolve(this.projectDir, options.prepackaged),
|
|
131
131
|
};
|
|
132
132
|
try {
|
|
133
|
-
builder_util_1.log.info({ version: version_1.PACKAGE_VERSION, os: os_1.release() }, "electron-builder");
|
|
133
|
+
builder_util_1.log.info({ version: version_1.PACKAGE_VERSION, os: (0, os_1.release)() }, "electron-builder");
|
|
134
134
|
}
|
|
135
135
|
catch (e) {
|
|
136
136
|
// error in dev mode without babel
|
|
@@ -174,7 +174,7 @@ class Packager {
|
|
|
174
174
|
}
|
|
175
175
|
let result = this.nodeDependencyInfo.get(key);
|
|
176
176
|
if (result == null) {
|
|
177
|
-
result = packageDependencies_1.createLazyProductionDeps(this.appDir, excludedDependencies);
|
|
177
|
+
result = (0, packageDependencies_1.createLazyProductionDeps)(this.appDir, excludedDependencies);
|
|
178
178
|
this.nodeDependencyInfo.set(key, result);
|
|
179
179
|
}
|
|
180
180
|
return result;
|
|
@@ -209,7 +209,7 @@ class Packager {
|
|
|
209
209
|
arch: event.arch == null ? null : builder_util_1.Arch[event.arch],
|
|
210
210
|
file: builder_util_1.log.filePath(event.file),
|
|
211
211
|
}, "building");
|
|
212
|
-
const handler = platformPackager_1.resolveFunction(this.config.artifactBuildStarted, "artifactBuildStarted");
|
|
212
|
+
const handler = (0, platformPackager_1.resolveFunction)(this.config.artifactBuildStarted, "artifactBuildStarted");
|
|
213
213
|
if (handler != null) {
|
|
214
214
|
await Promise.resolve(handler(event));
|
|
215
215
|
}
|
|
@@ -221,20 +221,20 @@ class Packager {
|
|
|
221
221
|
this.eventEmitter.emit("artifactCreated", event);
|
|
222
222
|
}
|
|
223
223
|
async callArtifactBuildCompleted(event) {
|
|
224
|
-
const handler = platformPackager_1.resolveFunction(this.config.artifactBuildCompleted, "artifactBuildCompleted");
|
|
224
|
+
const handler = (0, platformPackager_1.resolveFunction)(this.config.artifactBuildCompleted, "artifactBuildCompleted");
|
|
225
225
|
if (handler != null) {
|
|
226
226
|
await Promise.resolve(handler(event));
|
|
227
227
|
}
|
|
228
228
|
this.dispatchArtifactCreated(event);
|
|
229
229
|
}
|
|
230
230
|
async callAppxManifestCreated(path) {
|
|
231
|
-
const handler = platformPackager_1.resolveFunction(this.config.appxManifestCreated, "appxManifestCreated");
|
|
231
|
+
const handler = (0, platformPackager_1.resolveFunction)(this.config.appxManifestCreated, "appxManifestCreated");
|
|
232
232
|
if (handler != null) {
|
|
233
233
|
await Promise.resolve(handler(path));
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
async callMsiProjectCreated(path) {
|
|
237
|
-
const handler = platformPackager_1.resolveFunction(this.config.msiProjectCreated, "msiProjectCreated");
|
|
237
|
+
const handler = (0, platformPackager_1.resolveFunction)(this.config.msiProjectCreated, "msiProjectCreated");
|
|
238
238
|
if (handler != null) {
|
|
239
239
|
await Promise.resolve(handler(path));
|
|
240
240
|
}
|
|
@@ -253,13 +253,13 @@ class Packager {
|
|
|
253
253
|
}
|
|
254
254
|
const projectDir = this.projectDir;
|
|
255
255
|
const devPackageFile = path.join(projectDir, "package.json");
|
|
256
|
-
this._devMetadata = await promise_1.orNullIfFileNotExist(packageMetadata_1.readPackageJson(devPackageFile));
|
|
256
|
+
this._devMetadata = await (0, promise_1.orNullIfFileNotExist)((0, packageMetadata_1.readPackageJson)(devPackageFile));
|
|
257
257
|
const devMetadata = this.devMetadata;
|
|
258
|
-
const configuration = await config_1.getConfig(projectDir, configPath, configFromOptions, new lazy_val_1.Lazy(() => Promise.resolve(devMetadata)));
|
|
258
|
+
const configuration = await (0, config_1.getConfig)(projectDir, configPath, configFromOptions, new lazy_val_1.Lazy(() => Promise.resolve(devMetadata)));
|
|
259
259
|
if (builder_util_1.log.isDebugEnabled) {
|
|
260
260
|
builder_util_1.log.debug({ config: getSafeEffectiveConfig(configuration) }, "effective config");
|
|
261
261
|
}
|
|
262
|
-
this._appDir = await config_1.computeDefaultAppDirectory(projectDir, configuration.directories.app);
|
|
262
|
+
this._appDir = await (0, config_1.computeDefaultAppDirectory)(projectDir, configuration.directories.app);
|
|
263
263
|
this.isTwoPackageJsonProjectLayoutUsed = this._appDir !== projectDir;
|
|
264
264
|
const appPackageFile = this.isTwoPackageJsonProjectLayoutUsed ? path.join(this.appDir, "package.json") : devPackageFile;
|
|
265
265
|
// tslint:disable:prefer-conditional-expression
|
|
@@ -269,16 +269,16 @@ class Packager {
|
|
|
269
269
|
else {
|
|
270
270
|
this._metadata = await this.readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile);
|
|
271
271
|
}
|
|
272
|
-
builder_util_1.deepAssign(this.metadata, configuration.extraMetadata);
|
|
272
|
+
(0, builder_util_1.deepAssign)(this.metadata, configuration.extraMetadata);
|
|
273
273
|
if (this.isTwoPackageJsonProjectLayoutUsed) {
|
|
274
274
|
builder_util_1.log.debug({ devPackageFile, appPackageFile }, "two package.json structure is used");
|
|
275
275
|
}
|
|
276
|
-
packageMetadata_1.checkMetadata(this.metadata, this.devMetadata, appPackageFile, devPackageFile);
|
|
276
|
+
(0, packageMetadata_1.checkMetadata)(this.metadata, this.devMetadata, appPackageFile, devPackageFile);
|
|
277
277
|
return await this._build(configuration, this._metadata, this._devMetadata);
|
|
278
278
|
}
|
|
279
279
|
// external caller of this method always uses isTwoPackageJsonProjectLayoutUsed=false and appDir=projectDir, no way (and need) to use another values
|
|
280
280
|
async _build(configuration, metadata, devMetadata, repositoryInfo) {
|
|
281
|
-
await config_1.validateConfig(configuration, this.debugLogger);
|
|
281
|
+
await (0, config_1.validateConfig)(configuration, this.debugLogger);
|
|
282
282
|
this._configuration = configuration;
|
|
283
283
|
this._metadata = metadata;
|
|
284
284
|
this._devMetadata = devMetadata;
|
|
@@ -287,13 +287,13 @@ class Packager {
|
|
|
287
287
|
}
|
|
288
288
|
this._appInfo = new appInfo_1.AppInfo(this, null);
|
|
289
289
|
this._framework = await createFrameworkInfo(this.config, this);
|
|
290
|
-
const commonOutDirWithoutPossibleOsMacro = path.resolve(this.projectDir, macroExpander_1.expandMacro(configuration.directories.output, null, this._appInfo, {
|
|
290
|
+
const commonOutDirWithoutPossibleOsMacro = path.resolve(this.projectDir, (0, macroExpander_1.expandMacro)(configuration.directories.output, null, this._appInfo, {
|
|
291
291
|
os: "",
|
|
292
292
|
}));
|
|
293
293
|
if (!isCI && process.stdout.isTTY) {
|
|
294
294
|
const effectiveConfigFile = path.join(commonOutDirWithoutPossibleOsMacro, "builder-effective-config.yaml");
|
|
295
295
|
builder_util_1.log.info({ file: builder_util_1.log.filePath(effectiveConfigFile) }, "writing effective config");
|
|
296
|
-
await fs_extra_1.outputFile(effectiveConfigFile, getSafeEffectiveConfig(configuration));
|
|
296
|
+
await (0, fs_extra_1.outputFile)(effectiveConfigFile, getSafeEffectiveConfig(configuration));
|
|
297
297
|
}
|
|
298
298
|
// because artifact event maybe dispatched several times for different publish providers
|
|
299
299
|
const artifactPaths = new Set();
|
|
@@ -303,14 +303,14 @@ class Packager {
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
this.disposeOnBuildFinish(() => this.tempDirManager.cleanup());
|
|
306
|
-
const platformToTargets = await promise_1.executeFinally(this.doBuild(), async () => {
|
|
306
|
+
const platformToTargets = await (0, promise_1.executeFinally)(this.doBuild(), async () => {
|
|
307
307
|
if (this.debugLogger.isEnabled) {
|
|
308
308
|
await this.debugLogger.save(path.join(commonOutDirWithoutPossibleOsMacro, "builder-debug.yml"));
|
|
309
309
|
}
|
|
310
310
|
const toDispose = this.toDispose.slice();
|
|
311
311
|
this.toDispose.length = 0;
|
|
312
312
|
for (const disposer of toDispose) {
|
|
313
|
-
await disposer().catch(e => {
|
|
313
|
+
await disposer().catch((e) => {
|
|
314
314
|
builder_util_1.log.warn({ error: e }, "cannot dispose");
|
|
315
315
|
});
|
|
316
316
|
}
|
|
@@ -323,11 +323,11 @@ class Packager {
|
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
325
|
async readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile) {
|
|
326
|
-
let data = await promise_1.orNullIfFileNotExist(packageMetadata_1.readPackageJson(appPackageFile));
|
|
326
|
+
let data = await (0, promise_1.orNullIfFileNotExist)((0, packageMetadata_1.readPackageJson)(appPackageFile));
|
|
327
327
|
if (data != null) {
|
|
328
328
|
return data;
|
|
329
329
|
}
|
|
330
|
-
data = await promise_1.orNullIfFileNotExist(asar_1.readAsarJson(path.join(this.projectDir, "app.asar"), "package.json"));
|
|
330
|
+
data = await (0, promise_1.orNullIfFileNotExist)((0, asar_1.readAsarJson)(path.join(this.projectDir, "app.asar"), "package.json"));
|
|
331
331
|
if (data != null) {
|
|
332
332
|
this._isPrepackedAppAsar = true;
|
|
333
333
|
return data;
|
|
@@ -348,13 +348,13 @@ class Packager {
|
|
|
348
348
|
const packager = await this.createHelper(platform);
|
|
349
349
|
const nameToTarget = new Map();
|
|
350
350
|
platformToTarget.set(platform, nameToTarget);
|
|
351
|
-
for (const [arch, targetNames] of targetFactory_1.computeArchToTargetNamesMap(archToType, packager, platform)) {
|
|
351
|
+
for (const [arch, targetNames] of (0, targetFactory_1.computeArchToTargetNamesMap)(archToType, packager, platform)) {
|
|
352
352
|
if (this.cancellationToken.cancelled) {
|
|
353
353
|
break;
|
|
354
354
|
}
|
|
355
355
|
// support os and arch macro in output value
|
|
356
356
|
const outDir = path.resolve(this.projectDir, packager.expandMacro(this._configuration.directories.output, builder_util_1.Arch[arch]));
|
|
357
|
-
const targetList = targetFactory_1.createTargets(nameToTarget, targetNames.length === 0 ? packager.defaultTarget : targetNames, outDir, packager);
|
|
357
|
+
const targetList = (0, targetFactory_1.createTargets)(nameToTarget, targetNames.length === 0 ? packager.defaultTarget : targetNames, outDir, packager);
|
|
358
358
|
await createOutDirIfNeed(targetList, createdOutDirs);
|
|
359
359
|
await packager.pack(outDir, arch, targetList, taskManager);
|
|
360
360
|
}
|
|
@@ -394,13 +394,13 @@ class Packager {
|
|
|
394
394
|
const frameworkInfo = { version: this.framework.version, useCustomDist: true };
|
|
395
395
|
const config = this.config;
|
|
396
396
|
if (config.nodeGypRebuild === true) {
|
|
397
|
-
await yarn_1.nodeGypRebuild(
|
|
397
|
+
await (0, yarn_1.nodeGypRebuild)(builder_util_1.Arch[arch]);
|
|
398
398
|
}
|
|
399
399
|
if (config.npmRebuild === false) {
|
|
400
400
|
builder_util_1.log.info({ reason: "npmRebuild is set to false" }, "skipped dependencies rebuild");
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
|
-
const beforeBuild = platformPackager_1.resolveFunction(config.beforeBuild, "beforeBuild");
|
|
403
|
+
const beforeBuild = (0, platformPackager_1.resolveFunction)(config.beforeBuild, "beforeBuild");
|
|
404
404
|
if (beforeBuild != null) {
|
|
405
405
|
const performDependenciesInstallOrRebuild = await beforeBuild({
|
|
406
406
|
appDir: this.appDir,
|
|
@@ -418,7 +418,7 @@ class Packager {
|
|
|
418
418
|
builder_util_1.log.info({ reason: "platform is different and buildDependenciesFromSource is set to true" }, "skipped dependencies rebuild");
|
|
419
419
|
}
|
|
420
420
|
else {
|
|
421
|
-
await yarn_1.installOrRebuild(config, this.appDir, {
|
|
421
|
+
await (0, yarn_1.installOrRebuild)(config, this.appDir, {
|
|
422
422
|
frameworkInfo,
|
|
423
423
|
platform: platform.nodeName,
|
|
424
424
|
arch: builder_util_1.Arch[arch],
|
|
@@ -427,7 +427,7 @@ class Packager {
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
async afterPack(context) {
|
|
430
|
-
const afterPack = platformPackager_1.resolveFunction(this.config.afterPack, "afterPack");
|
|
430
|
+
const afterPack = (0, platformPackager_1.resolveFunction)(this.config.afterPack, "afterPack");
|
|
431
431
|
const handlers = this.afterPackHandlers.slice();
|
|
432
432
|
if (afterPack != null) {
|
|
433
433
|
// user handler should be last
|
|
@@ -457,16 +457,16 @@ function createOutDirIfNeed(targetList, createdOutDirs) {
|
|
|
457
457
|
return Promise.all(Array.from(ourDirs)
|
|
458
458
|
.sort()
|
|
459
459
|
.map(dir => {
|
|
460
|
-
return fs_extra_1.mkdirs(dir)
|
|
461
|
-
.then(() => fs_extra_1.chmod(dir, 0o755) /* set explicitly */)
|
|
460
|
+
return (0, fs_extra_1.mkdirs)(dir)
|
|
461
|
+
.then(() => (0, fs_extra_1.chmod)(dir, 0o755) /* set explicitly */)
|
|
462
462
|
.then(() => createdOutDirs.add(dir));
|
|
463
463
|
}));
|
|
464
464
|
}
|
|
465
465
|
function getSafeEffectiveConfig(configuration) {
|
|
466
|
-
const o = JSON.parse(builder_util_1.safeStringifyJson(configuration));
|
|
466
|
+
const o = JSON.parse((0, builder_util_1.safeStringifyJson)(configuration));
|
|
467
467
|
if (o.cscLink != null) {
|
|
468
468
|
o.cscLink = "<hidden by builder>";
|
|
469
469
|
}
|
|
470
|
-
return builder_util_1.serializeToYaml(o, true);
|
|
470
|
+
return (0, builder_util_1.serializeToYaml)(o, true);
|
|
471
471
|
}
|
|
472
472
|
//# sourceMappingURL=packager.js.map
|