app-builder-lib 25.1.3 → 25.1.5

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.
Files changed (48) hide show
  1. package/out/ProtonFramework.js +1 -1
  2. package/out/ProtonFramework.js.map +1 -1
  3. package/out/asar/asarFileChecker.js +1 -1
  4. package/out/asar/asarFileChecker.js.map +1 -1
  5. package/out/asar/asarUtil.js.map +1 -1
  6. package/out/codeSign/windowsSignAzureManager.js +17 -7
  7. package/out/codeSign/windowsSignAzureManager.js.map +1 -1
  8. package/out/codeSign/windowsSignToolManager.js +28 -2
  9. package/out/codeSign/windowsSignToolManager.js.map +1 -1
  10. package/out/configuration.d.ts +108 -54
  11. package/out/configuration.js.map +1 -1
  12. package/out/fileMatcher.js.map +1 -1
  13. package/out/index.d.ts +1 -1
  14. package/out/index.js.map +1 -1
  15. package/out/options/AppXOptions.d.ts +1 -1
  16. package/out/options/AppXOptions.js.map +1 -1
  17. package/out/options/PlatformSpecificBuildOptions.d.ts +5 -5
  18. package/out/options/PlatformSpecificBuildOptions.js.map +1 -1
  19. package/out/options/SnapOptions.d.ts +1 -1
  20. package/out/options/SnapOptions.js.map +1 -1
  21. package/out/options/linuxOptions.d.ts +4 -4
  22. package/out/options/linuxOptions.js.map +1 -1
  23. package/out/options/macOptions.d.ts +1 -1
  24. package/out/options/macOptions.js.map +1 -1
  25. package/out/options/winOptions.d.ts +10 -10
  26. package/out/options/winOptions.js.map +1 -1
  27. package/out/publish/PublishManager.js +1 -1
  28. package/out/publish/PublishManager.js.map +1 -1
  29. package/out/targets/AppxTarget.js +5 -2
  30. package/out/targets/AppxTarget.js.map +1 -1
  31. package/out/targets/nsis/NsisTarget.js +2 -2
  32. package/out/targets/nsis/NsisTarget.js.map +1 -1
  33. package/out/targets/nsis/nsisOptions.d.ts +6 -6
  34. package/out/targets/nsis/nsisOptions.js.map +1 -1
  35. package/out/util/config/config.js +1 -1
  36. package/out/util/config/config.js.map +1 -1
  37. package/out/util/config/load.js +1 -1
  38. package/out/util/config/load.js.map +1 -1
  39. package/out/util/packageMetadata.js +1 -1
  40. package/out/util/packageMetadata.js.map +1 -1
  41. package/out/version.d.ts +1 -1
  42. package/out/version.js +1 -1
  43. package/out/version.js.map +1 -1
  44. package/out/winPackager.d.ts +1 -1
  45. package/out/winPackager.js +5 -36
  46. package/out/winPackager.js.map +1 -1
  47. package/package.json +9 -9
  48. package/scheme.json +51 -51
@@ -17,7 +17,7 @@ export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
17
17
  [key: string]: string;
18
18
  } | null;
19
19
  /**
20
- * The 78 character long summary. Defaults to [productName](./configuration.md#Configuration-productName).
20
+ * The 78 character long summary. Defaults to [productName](./configuration.md#productName).
21
21
  */
22
22
  readonly summary?: string | null;
23
23
  /**
@@ -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 * A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core20`\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.md#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`, `core22`. Defaults to `core20`\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.md#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,15 +10,15 @@ export interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecific
10
10
  */
11
11
  readonly target?: TargetConfigType;
12
12
  /**
13
- * The maintainer. Defaults to [author](./configuration.md#Metadata-author).
13
+ * The maintainer. Defaults to [author](./configuration.md#author).
14
14
  */
15
15
  readonly maintainer?: string | null;
16
16
  /**
17
- * The vendor. Defaults to [author](./configuration.md#Metadata-author).
17
+ * The vendor. Defaults to [author](./configuration.md#author).
18
18
  */
19
19
  readonly vendor?: string | null;
20
20
  /**
21
- * The path to icon set directory or one png file, relative to the [build resources](./configuration.md#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.
21
+ * The path to icon set directory or one png file, relative to the [build resources](./contents.md#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.
22
22
  * By default will be generated automatically based on the macOS icns file.
23
23
  */
24
24
  readonly icon?: string;
@@ -34,7 +34,7 @@ export interface CommonLinuxOptions {
34
34
  */
35
35
  readonly synopsis?: string | null;
36
36
  /**
37
- * As [description](./configuration.md#Metadata-description) from application package.json, but allows you to specify different for Linux.
37
+ * As [description](./configuration.md#description) from application package.json, but allows you to specify different for Linux.
38
38
  */
39
39
  readonly description?: string | null;
40
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from \"../index\"\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](./multi-platform-build.md#docker) can be used to build Linux targets on any platform.\n *\n * Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](./configuration.md#Metadata-author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](./configuration.md#Metadata-author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](./configuration.md#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place\n * @private\n */\n readonly packageCategory?: string | null\n}\n\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](./configuration.md#Metadata-description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files) entries (name to value).\n */\n readonly desktop?: any | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"lzo\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n readonly afterInstall?: string | null\n readonly afterRemove?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies. Defaults to `[\"gconf2\", \"gconf-service\", \"libnotify4\", \"libappindicator1\", \"libxtst6\", \"libnss3\"]`.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps)..\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
1
+ {"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from \"../index\"\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](./multi-platform-build.md#docker) can be used to build Linux targets on any platform.\n *\n * Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](./configuration.md#author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](./configuration.md#author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](./contents.md#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place\n * @private\n */\n readonly packageCategory?: string | null\n}\n\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](./configuration.md#description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files) entries (name to value).\n */\n readonly desktop?: any | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"lzo\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n readonly afterInstall?: string | null\n readonly afterRemove?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies. Defaults to `[\"gconf2\", \"gconf-service\", \"libnotify4\", \"libappindicator1\", \"libxtst6\", \"libnss3\"]`.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps)..\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
@@ -215,7 +215,7 @@ export interface DmgOptions extends TargetSpecificOptions {
215
215
  */
216
216
  backgroundColor?: string | null;
217
217
  /**
218
- * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](./configuration.md#MetadataDirectories-buildResources) or to the project directory.
218
+ * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](./contents.md#extraresources) or to the project directory.
219
219
  * Defaults to the application icon (`build/icon.icns`).
220
220
  */
221
221
  icon?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\nimport { CustomMacSign } from \"../macPackager\"\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.md) instead of specifying this option.\n * MAS installer identity is specified in the [mas](./mas.md).\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](./mas.md).\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 /** @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?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: 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 * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | 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 * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\n * Use `false` to explicitly disable\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: NotarizeNotaryOptions | boolean | null\n}\n\nexport interface NotarizeNotaryOptions {\n /**\n * The team ID you want to notarize under for when using `notarytool`\n * @deprecated Set the `APPLE_TEAM_ID` environment variable instead\n */\n readonly teamId?: 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.md#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\"\nimport { CustomMacSign } from \"../macPackager\"\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.md) instead of specifying this option.\n * MAS installer identity is specified in the [mas](./mas.md).\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](./mas.md).\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 /** @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?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: 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 * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | 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 * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Options to use for @electron/notarize (ref: https://github.com/electron/notarize).\n * Use `false` to explicitly disable\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: NotarizeNotaryOptions | boolean | null\n}\n\nexport interface NotarizeNotaryOptions {\n /**\n * The team ID you want to notarize under for when using `notarytool`\n * @deprecated Set the `APPLE_TEAM_ID` environment variable instead\n */\n readonly teamId?: 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](./contents.md#extraresources) 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"]}
@@ -21,57 +21,57 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
21
21
  readonly legalTrademarks?: string | null;
22
22
  /**
23
23
  * Array of signing algorithms used. For AppX `sha256` is always used.
24
- * @deprecated Please use {@link signtoolOptions.signingHashAlgorithms}
24
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.signingHashAlgorithms}
25
25
  */
26
26
  readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
27
27
  /**
28
28
  * The custom function (or path to file or module id) to sign Windows executables
29
- * @deprecated Please use {@link signtoolOptions.sign}
29
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.sign}
30
30
  */
31
31
  readonly sign?: CustomWindowsSign | string | null;
32
32
  /**
33
33
  * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.
34
34
  * Please see [Code Signing](./code-signing.md).
35
- * @deprecated Please use {@link signtoolOptions.certificateFile}
35
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateFile}
36
36
  */
37
37
  readonly certificateFile?: string | null;
38
38
  /**
39
39
  * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.
40
40
  * Please see [Code Signing](./code-signing.md).
41
- * @deprecated Please use {@link signtoolOptions.certificatePassword}
41
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificatePassword}
42
42
  */
43
43
  readonly certificatePassword?: string | null;
44
44
  /**
45
45
  * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).
46
- * @deprecated Please use {@link signtoolOptions.certificateSubjectName}
46
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateSubjectName}
47
47
  */
48
48
  readonly certificateSubjectName?: string | null;
49
49
  /**
50
50
  * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).
51
- * @deprecated Please use win.signtoolOptions.certificateSha1
51
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateSha1}
52
52
  */
53
53
  readonly certificateSha1?: string | null;
54
54
  /**
55
55
  * The path to an additional certificate file you want to add to the signature block.
56
- * @deprecated Please use {@link signtoolOptions.additionalCertificateFile}
56
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.additionalCertificateFile}
57
57
  */
58
58
  readonly additionalCertificateFile?: string | null;
59
59
  /**
60
60
  * The URL of the RFC 3161 time stamp server.
61
61
  * @default http://timestamp.digicert.com
62
- * @deprecated Please use {@link signtoolOptions.rfc3161TimeStampServer}
62
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.rfc3161TimeStampServer}
63
63
  */
64
64
  readonly rfc3161TimeStampServer?: string | null;
65
65
  /**
66
66
  * The URL of the time stamp server.
67
67
  * @default http://timestamp.digicert.com
68
- * @deprecated Please use {@link signtoolOptions.timeStampServer}
68
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.timeStampServer}
69
69
  */
70
70
  readonly timeStampServer?: string | null;
71
71
  /**
72
72
  * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.
73
73
  * Defaults to common name from your code signing certificate.
74
- * @deprecated Please use {@link signtoolOptions.publisherName}
74
+ * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.publisherName}
75
75
  */
76
76
  readonly publisherName?: string | Array<string> | null;
77
77
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType } from \"../index\"\nimport { CustomWindowsSign } from \"../codeSign/windowsSignToolManager\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]./nsis.md#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * AppX package can be built only on Windows 10.\n *\n * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.\n *\n * @default nsis\n */\n readonly target?: TargetConfigType\n\n /**\n * The path to application icon.\n * @default build/icon.ico\n */\n readonly icon?: string | null\n\n /**\n * The trademarks and registered trademarks.\n */\n readonly legalTrademarks?: string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @deprecated Please use {@link signtoolOptions.signingHashAlgorithms}\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n * @deprecated Please use {@link signtoolOptions.sign}\n */\n readonly sign?: CustomWindowsSign | string | null\n /**\n * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n * @deprecated Please use {@link signtoolOptions.certificateFile}\n */\n readonly certificateFile?: string | null\n /**\n * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n * @deprecated Please use {@link signtoolOptions.certificatePassword}\n */\n readonly certificatePassword?: string | null\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n * @deprecated Please use {@link signtoolOptions.certificateSubjectName}\n */\n readonly certificateSubjectName?: string | null\n /**\n * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n * @deprecated Please use win.signtoolOptions.certificateSha1\n */\n readonly certificateSha1?: string | null\n /**\n * The path to an additional certificate file you want to add to the signature block.\n * @deprecated Please use {@link signtoolOptions.additionalCertificateFile}\n */\n readonly additionalCertificateFile?: string | null\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n * @deprecated Please use {@link signtoolOptions.rfc3161TimeStampServer}\n */\n readonly rfc3161TimeStampServer?: string | null\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n * @deprecated Please use {@link signtoolOptions.timeStampServer}\n */\n readonly timeStampServer?: string | null\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n * @deprecated Please use {@link signtoolOptions.publisherName}\n */\n readonly publisherName?: string | Array<string> | null\n\n /**\n * Options for usage with signtool.exe\n */\n readonly signtoolOptions?: WindowsSigntoolConfiguration | null\n\n /**\n * Options for usage of Azure Trusted Signing (beta)\n */\n readonly azureSignOptions?: WindowsAzureSigningConfiguration | null\n\n /**\n * Whether to verify the signature of an available update before installation.\n * The [publisher name](#publisherName) will be used for the signature verification.\n *\n * @default true\n */\n readonly verifyUpdateCodeSignature?: boolean\n\n /**\n * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.\n * Cannot be specified per target, allowed only in the `win`.\n * @default asInvoker\n */\n readonly requestedExecutionLevel?: RequestedExecutionLevel | null\n\n /**\n * Whether to sign and add metadata to executable. Advanced option.\n * @default true\n */\n readonly signAndEditExecutable?: boolean\n\n /**\n * Whether to sign DLL files. Advanced option.\n * @see https://github.com/electron-userland/electron-builder/issues/3101#issuecomment-404212384\n * @default false\n * @deprecated Use {@link signExts} instead for more explicit control\n */\n readonly signDlls?: boolean\n\n /**\n * Explicit file extensions to also sign. Advanced option.\n * @see https://github.com/electron-userland/electron-builder/issues/7329\n * @default null\n */\n readonly signExts?: string[] | null\n}\n\nexport type RequestedExecutionLevel = \"asInvoker\" | \"highestAvailable\" | \"requireAdministrator\"\n\nexport interface WindowsSigntoolConfiguration {\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n */\n readonly sign?: CustomWindowsSign | string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n */\n readonly certificateFile?: string | null\n\n /**\n * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n */\n readonly certificatePassword?: string | null\n\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSha1?: string | null\n\n /**\n * The path to an additional certificate file you want to add to the signature block.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n */\n readonly publisherName?: string | Array<string> | null\n}\n\n// https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations\nexport interface WindowsAzureSigningConfiguration {\n /**\n * The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the\n * region your Trusted Signing Account and Certificate Profile you are specifying were created\n * in during the setup of these resources.\n *\n * Translates to field: Endpoint\n *\n * Requires one of environment variable configurations for authenticating to Microsoft Entra ID per [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition)\n */\n readonly endpoint: string\n /**\n * The Certificate Profile name. Translates to field: CertificateProfileName\n */\n readonly certificateProfileName: string\n /**\n * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning`\n */\n [k: string]: string\n}\n"]}
1
+ {"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType } from \"../index\"\nimport { CustomWindowsSign } from \"../codeSign/windowsSignToolManager\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]./nsis.md#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * AppX package can be built only on Windows 10.\n *\n * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.\n *\n * @default nsis\n */\n readonly target?: TargetConfigType\n\n /**\n * The path to application icon.\n * @default build/icon.ico\n */\n readonly icon?: string | null\n\n /**\n * The trademarks and registered trademarks.\n */\n readonly legalTrademarks?: string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.signingHashAlgorithms}\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.sign}\n */\n readonly sign?: CustomWindowsSign | string | null\n /**\n * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateFile}\n */\n readonly certificateFile?: string | null\n /**\n * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificatePassword}\n */\n readonly certificatePassword?: string | null\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateSubjectName}\n */\n readonly certificateSubjectName?: string | null\n /**\n * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.certificateSha1}\n */\n readonly certificateSha1?: string | null\n /**\n * The path to an additional certificate file you want to add to the signature block.\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.additionalCertificateFile}\n */\n readonly additionalCertificateFile?: string | null\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.rfc3161TimeStampServer}\n */\n readonly rfc3161TimeStampServer?: string | null\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.timeStampServer}\n */\n readonly timeStampServer?: string | null\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n * @deprecated Please use {@link signtoolOptions}: {@link WindowsSigntoolConfiguration.publisherName}\n */\n readonly publisherName?: string | Array<string> | null\n\n /**\n * Options for usage with signtool.exe\n */\n readonly signtoolOptions?: WindowsSigntoolConfiguration | null\n\n /**\n * Options for usage of Azure Trusted Signing (beta)\n */\n readonly azureSignOptions?: WindowsAzureSigningConfiguration | null\n\n /**\n * Whether to verify the signature of an available update before installation.\n * The [publisher name](#publisherName) will be used for the signature verification.\n *\n * @default true\n */\n readonly verifyUpdateCodeSignature?: boolean\n\n /**\n * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.\n * Cannot be specified per target, allowed only in the `win`.\n * @default asInvoker\n */\n readonly requestedExecutionLevel?: RequestedExecutionLevel | null\n\n /**\n * Whether to sign and add metadata to executable. Advanced option.\n * @default true\n */\n readonly signAndEditExecutable?: boolean\n\n /**\n * Whether to sign DLL files. Advanced option.\n * @see https://github.com/electron-userland/electron-builder/issues/3101#issuecomment-404212384\n * @default false\n * @deprecated Use {@link signExts} instead for more explicit control\n */\n readonly signDlls?: boolean\n\n /**\n * Explicit file extensions to also sign. Advanced option.\n * @see https://github.com/electron-userland/electron-builder/issues/7329\n * @default null\n */\n readonly signExts?: string[] | null\n}\n\nexport type RequestedExecutionLevel = \"asInvoker\" | \"highestAvailable\" | \"requireAdministrator\"\n\nexport interface WindowsSigntoolConfiguration {\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n */\n readonly sign?: CustomWindowsSign | string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n */\n readonly certificateFile?: string | null\n\n /**\n * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.\n * Please see [Code Signing](./code-signing.md).\n */\n readonly certificatePassword?: string | null\n\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSha1?: string | null\n\n /**\n * The path to an additional certificate file you want to add to the signature block.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n */\n readonly publisherName?: string | Array<string> | null\n}\n\n// https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations\nexport interface WindowsAzureSigningConfiguration {\n /**\n * The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the\n * region your Trusted Signing Account and Certificate Profile you are specifying were created\n * in during the setup of these resources.\n *\n * Translates to field: Endpoint\n *\n * Requires one of environment variable configurations for authenticating to Microsoft Entra ID per [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition)\n */\n readonly endpoint: string\n /**\n * The Certificate Profile name. Translates to field: CertificateProfileName\n */\n readonly certificateProfileName: string\n /**\n * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning`\n */\n [k: string]: string\n}\n"]}
@@ -274,7 +274,7 @@ function requireProviderClass(provider, packager) {
274
274
  try {
275
275
  module = require(path.join(packager.buildResourcesDir, name + ".js"));
276
276
  }
277
- catch (ignored) {
277
+ catch (_ignored) {
278
278
  builder_util_1.log.debug({ path: path.join(packager.buildResourcesDir, name + ".js") }, "Unable to find publish provider in build resources");
279
279
  }
280
280
  if (module == null) {
@@ -1 +1 @@
1
- {"version":3,"file":"PublishManager.js","sourceRoot":"","sources":["../../src/publish/PublishManager.ts"],"names":[],"mappings":";;;AAsPA,4EAmBC;AAED,wEAwBC;AAED,0CAwBC;AA0CD,gDAuBC;AAED,8CAgCC;AAhaD,+CAA0C;AAC1C,+CAAkK;AAClK,+DAW6B;AAC7B,iCAA0B;AAC1B,uDAAkG;AAClG,0EAAsE;AACtE,sEAAkE;AAClE,kDAA0C;AAC1C,0DAAkD;AAClD,0CAAuC;AACvC,8BAA6B;AAC7B,6BAA4B;AAE5B,2BAA0B;AAC1B,oCAAkH;AAGlH,yDAAmD;AAEnD,6DAAyD;AACzD,2DAAqG;AACrG,uDAAmD;AACnD,6DAAyD;AAEzD,MAAM,mBAAmB,GACvB,sKAAsK;IACtK,6LAA6L,CAAA;AAE/L,MAAM,KAAK,GAAG,IAAA,eAAM,EAAC,0BAA0B,CAAC,CAAA;AAEhD,SAAS,YAAY,CAAC,aAAkB;IACtC,IAAI,aAAa,IAAI,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,aAAa,KAAK,cAAc,IAAI,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,OAAO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I,CAAC,OAAO,CAAA;QACxB,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,IAAK,OAAyB,CAAC,KAAK,IAAI,IAAI,IAAI,CAAE,OAAyB,CAAC,OAAO,EAAE,CAAC;YACpF,kBAAG,CAAC,IAAI,CAAC,yJAAyJ,CAAC,CAAA;QACrK,CAAC;QACD,2DAA2D;QAC3D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAmB,CAAA;IAC9D,CAAC;SAAM,CAAC;QACN,2DAA2D;QAC3D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAsB,CAAA;IACjE,CAAC;AACH,CAAC","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { Arch, asArray, AsyncTaskManager, InvalidConfigurationError, isEmptyOrSpaces, isPullRequest, log, safeStringifyJson, serializeToYaml } from \"builder-util\"\nimport {\n CancellationToken,\n GenericServerOptions,\n getS3LikeProviderBaseUrl,\n GithubOptions,\n githubUrl,\n KeygenOptions,\n SnapStoreOptions,\n PublishConfiguration,\n PublishProvider,\n BitbucketOptions,\n} from \"builder-util-runtime\"\nimport _debug from \"debug\"\nimport { getCiTag, PublishContext, Publisher, PublishOptions, UploadTask } from \"electron-publish\"\nimport { GitHubPublisher } from \"electron-publish/out/gitHubPublisher\"\nimport { MultiProgress } from \"electron-publish/out/multiProgress\"\nimport S3Publisher from \"./s3/s3Publisher\"\nimport SpacesPublisher from \"./s3/spacesPublisher\"\nimport { writeFile } from \"fs/promises\"\nimport * as isCi from \"is-ci\"\nimport * as path from \"path\"\nimport { WriteStream as TtyWriteStream } from \"tty\"\nimport * as url from \"url\"\nimport { AppInfo, ArtifactCreated, Configuration, Platform, PlatformSpecificBuildOptions, Target } from \"../index\"\nimport { Packager } from \"../packager\"\nimport { PlatformPackager } from \"../platformPackager\"\nimport { expandMacro } from \"../util/macroExpander\"\nimport { WinPackager } from \"../winPackager\"\nimport { SnapStorePublisher } from \"./SnapStorePublisher\"\nimport { createUpdateInfoTasks, UpdateInfoFileTask, writeUpdateInfoFiles } from \"./updateInfoBuilder\"\nimport { KeygenPublisher } from \"./KeygenPublisher\"\nimport { BitbucketPublisher } from \"./BitbucketPublisher\"\n\nconst publishForPrWarning =\n \"There are serious security concerns with PUBLISH_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)\" +\n \"\\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.\"\n\nconst debug = _debug(\"electron-builder:publish\")\n\nfunction checkOptions(publishPolicy: any) {\n if (publishPolicy != null && publishPolicy !== \"onTag\" && publishPolicy !== \"onTagOrDraft\" && publishPolicy !== \"always\" && publishPolicy !== \"never\") {\n if (typeof publishPolicy === \"string\") {\n throw new InvalidConfigurationError(\n `Expected one of \"onTag\", \"onTagOrDraft\", \"always\", \"never\", but got ${JSON.stringify(\n publishPolicy\n )}.\\nPlease note that publish configuration should be specified under \"config\"`\n )\n }\n }\n}\n\nexport class PublishManager implements PublishContext {\n private readonly nameToPublisher = new Map<string, Publisher | null>()\n\n private readonly taskManager: AsyncTaskManager\n\n readonly isPublish: boolean = false\n\n readonly progress = (process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : null\n\n private readonly updateFileWriteTask: Array<UpdateInfoFileTask> = []\n\n constructor(\n private readonly packager: Packager,\n private readonly publishOptions: PublishOptions,\n readonly cancellationToken: CancellationToken = packager.cancellationToken\n ) {\n checkOptions(publishOptions.publish)\n\n this.taskManager = new AsyncTaskManager(cancellationToken)\n\n const forcePublishForPr = process.env.PUBLISH_FOR_PULL_REQUEST === \"true\"\n if (!isPullRequest() || forcePublishForPr) {\n if (publishOptions.publish === undefined) {\n if (process.env.npm_lifecycle_event === \"release\") {\n publishOptions.publish = \"always\"\n } else {\n const tag = getCiTag()\n if (tag != null) {\n log.info({ reason: \"tag is defined\", tag }, \"artifacts will be published\")\n publishOptions.publish = \"onTag\"\n } else if (isCi) {\n log.info({ reason: \"CI detected\" }, \"artifacts will be published if draft release exists\")\n publishOptions.publish = \"onTagOrDraft\"\n }\n }\n }\n\n const publishPolicy = publishOptions.publish\n this.isPublish = publishPolicy != null && publishOptions.publish !== \"never\" && (publishPolicy !== \"onTag\" || getCiTag() != null)\n if (this.isPublish && forcePublishForPr) {\n log.warn(publishForPrWarning)\n }\n } else if (publishOptions.publish !== \"never\") {\n log.info(\n {\n reason: \"current build is a part of pull request\",\n solution: `set env PUBLISH_FOR_PULL_REQUEST to true to force code signing\\n${publishForPrWarning}`,\n },\n \"publishing will be skipped\"\n )\n }\n\n packager.addAfterPackHandler(async event => {\n const packager = event.packager\n if (event.electronPlatformName === \"darwin\") {\n if (!event.targets.some(it => it.name === \"dmg\" || it.name === \"zip\")) {\n return\n }\n } else if (packager.platform === Platform.WINDOWS) {\n if (!event.targets.some(it => isSuitableWindowsTarget(it))) {\n return\n }\n }\n\n const publishConfig = await getAppUpdatePublishConfiguration(packager, event.arch, this.isPublish)\n if (publishConfig != null) {\n await writeFile(path.join(packager.getResourcesDir(event.appOutDir), \"app-update.yml\"), serializeToYaml(publishConfig))\n }\n })\n\n packager.artifactCreated(event => {\n const publishConfiguration = event.publishConfig\n if (publishConfiguration == null) {\n this.taskManager.addTask(this.artifactCreatedWithoutExplicitPublishConfig(event))\n } else if (this.isPublish) {\n if (debug.enabled) {\n debug(`artifactCreated (isPublish: ${this.isPublish}): ${safeStringifyJson(event, new Set([\"packager\"]))},\\n publishConfig: ${safeStringifyJson(publishConfiguration)}`)\n }\n this.scheduleUpload(publishConfiguration, event, this.getAppInfo(event.packager))\n }\n })\n }\n\n private getAppInfo(platformPackager: PlatformPackager<any> | null) {\n return platformPackager == null ? this.packager.appInfo : platformPackager.appInfo\n }\n\n async getGlobalPublishConfigurations(): Promise<Array<PublishConfiguration> | null> {\n const publishers = this.packager.config.publish\n return await resolvePublishConfigurations(publishers, null, this.packager, null, true)\n }\n\n scheduleUpload(publishConfig: PublishConfiguration, event: UploadTask, appInfo: AppInfo): void {\n if (publishConfig.provider === \"generic\") {\n return\n }\n\n const publisher = this.getOrCreatePublisher(publishConfig, appInfo)\n if (publisher == null) {\n log.debug(\n {\n file: log.filePath(event.file),\n reason: \"publisher is null\",\n publishConfig: safeStringifyJson(publishConfig),\n },\n \"not published\"\n )\n return\n }\n\n const providerName = publisher.providerName\n if (this.publishOptions.publish === \"onTagOrDraft\" && getCiTag() == null && providerName !== \"bitbucket\" && providerName !== \"github\") {\n log.info({ file: log.filePath(event.file), reason: \"current build is not for a git tag\", publishPolicy: \"onTagOrDraft\" }, `not published to ${providerName}`)\n return\n }\n\n if (publishConfig.timeout) {\n event.timeout = publishConfig.timeout\n }\n\n this.taskManager.addTask(publisher.upload(event))\n }\n\n private async artifactCreatedWithoutExplicitPublishConfig(event: ArtifactCreated) {\n const platformPackager = event.packager\n const target = event.target\n const publishConfigs = await getPublishConfigs(platformPackager, target == null ? null : target.options, event.arch, this.isPublish)\n\n if (debug.enabled) {\n debug(`artifactCreated (isPublish: ${this.isPublish}): ${safeStringifyJson(event, new Set([\"packager\"]))},\\n publishConfigs: ${safeStringifyJson(publishConfigs)}`)\n }\n\n const eventFile = event.file\n if (publishConfigs == null) {\n if (this.isPublish) {\n log.debug({ file: eventFile, reason: \"no publish configs\" }, \"not published\")\n }\n return\n }\n\n if (this.isPublish) {\n for (const publishConfig of publishConfigs) {\n if (this.cancellationToken.cancelled) {\n log.debug({ file: event.file, reason: \"cancelled\" }, \"not published\")\n break\n }\n\n this.scheduleUpload(publishConfig, event, this.getAppInfo(platformPackager))\n }\n }\n\n if (\n event.isWriteUpdateInfo &&\n target != null &&\n eventFile != null &&\n !this.cancellationToken.cancelled &&\n (platformPackager.platform !== Platform.WINDOWS || isSuitableWindowsTarget(target))\n ) {\n this.taskManager.addTask(createUpdateInfoTasks(event, publishConfigs).then(it => this.updateFileWriteTask.push(...it)))\n }\n }\n\n private getOrCreatePublisher(publishConfig: PublishConfiguration, appInfo: AppInfo): Publisher | null {\n // to not include token into cache key\n const providerCacheKey = safeStringifyJson(publishConfig)\n let publisher = this.nameToPublisher.get(providerCacheKey)\n if (publisher == null) {\n publisher = createPublisher(this, appInfo.version, publishConfig, this.publishOptions, this.packager)\n this.nameToPublisher.set(providerCacheKey, publisher)\n log.info({ publisher: publisher!.toString() }, \"publishing\")\n }\n return publisher\n }\n\n // noinspection JSUnusedGlobalSymbols\n cancelTasks() {\n this.taskManager.cancelTasks()\n this.nameToPublisher.clear()\n }\n\n async awaitTasks(): Promise<void> {\n await this.taskManager.awaitTasks()\n\n const updateInfoFileTasks = this.updateFileWriteTask\n if (this.cancellationToken.cancelled || updateInfoFileTasks.length === 0) {\n return\n }\n\n await writeUpdateInfoFiles(updateInfoFileTasks, this.packager)\n await this.taskManager.awaitTasks()\n }\n}\n\nexport async function getAppUpdatePublishConfiguration(packager: PlatformPackager<any>, arch: Arch, errorIfCannot: boolean) {\n const publishConfigs = await getPublishConfigsForUpdateInfo(packager, await getPublishConfigs(packager, null, arch, errorIfCannot), arch)\n if (publishConfigs == null || publishConfigs.length === 0) {\n return null\n }\n\n const publishConfig = {\n ...publishConfigs[0],\n updaterCacheDirName: packager.appInfo.updaterCacheDirName,\n }\n\n if (packager.platform === Platform.WINDOWS && publishConfig.publisherName == null) {\n const winPackager = packager as WinPackager\n const publisherName = winPackager.isForceCodeSigningVerification ? await (await winPackager.signtoolManager.value).computedPublisherName.value : undefined\n if (publisherName != null) {\n publishConfig.publisherName = publisherName\n }\n }\n return publishConfig\n}\n\nexport async function getPublishConfigsForUpdateInfo(\n packager: PlatformPackager<any>,\n publishConfigs: Array<PublishConfiguration> | null,\n arch: Arch | null\n): Promise<Array<PublishConfiguration> | null> {\n if (publishConfigs === null) {\n return null\n }\n\n if (publishConfigs.length === 0) {\n log.debug(null, \"getPublishConfigsForUpdateInfo: no publishConfigs, detect using repository info\")\n // https://github.com/electron-userland/electron-builder/issues/925#issuecomment-261732378\n // default publish config is github, file should be generated regardless of publish state (user can test installer locally or manage the release process manually)\n const repositoryInfo = await packager.info.repositoryInfo\n debug(`getPublishConfigsForUpdateInfo: ${safeStringifyJson(repositoryInfo)}`)\n if (repositoryInfo != null && repositoryInfo.type === \"github\") {\n const resolvedPublishConfig = await getResolvedPublishConfig(packager, packager.info, { provider: repositoryInfo.type }, arch, false)\n if (resolvedPublishConfig != null) {\n debug(`getPublishConfigsForUpdateInfo: resolve to publish config ${safeStringifyJson(resolvedPublishConfig)}`)\n return [resolvedPublishConfig]\n }\n }\n }\n return publishConfigs\n}\n\nexport function createPublisher(context: PublishContext, version: string, publishConfig: PublishConfiguration, options: PublishOptions, packager: Packager): Publisher | null {\n if (debug.enabled) {\n debug(`Create publisher: ${safeStringifyJson(publishConfig)}`)\n }\n\n const provider = publishConfig.provider\n switch (provider) {\n case \"github\":\n return new GitHubPublisher(context, publishConfig as GithubOptions, version, options)\n\n case \"keygen\":\n return new KeygenPublisher(context, publishConfig as KeygenOptions, version)\n\n case \"snapStore\":\n return new SnapStorePublisher(context, publishConfig as SnapStoreOptions)\n\n case \"generic\":\n return null\n\n default: {\n const clazz = requireProviderClass(provider, packager)\n return clazz == null ? null : new clazz(context, publishConfig)\n }\n }\n}\n\nfunction requireProviderClass(provider: string, packager: Packager): any | null {\n switch (provider) {\n case \"github\":\n return GitHubPublisher\n\n case \"generic\":\n return null\n\n case \"keygen\":\n return KeygenPublisher\n\n case \"s3\":\n return S3Publisher\n\n case \"snapStore\":\n return SnapStorePublisher\n\n case \"spaces\":\n return SpacesPublisher\n\n case \"bitbucket\":\n return BitbucketPublisher\n\n default: {\n const name = `electron-publisher-${provider}`\n let module: any = null\n try {\n module = require(path.join(packager.buildResourcesDir, name + \".js\"))\n } catch (ignored) {\n log.debug({ path: path.join(packager.buildResourcesDir, name + \".js\") }, \"Unable to find publish provider in build resources\")\n }\n\n if (module == null) {\n module = require(name)\n }\n return module.default || module\n }\n }\n}\n\nexport function computeDownloadUrl(publishConfiguration: PublishConfiguration, fileName: string | null, packager: PlatformPackager<any>) {\n if (publishConfiguration.provider === \"generic\") {\n const baseUrlString = (publishConfiguration as GenericServerOptions).url\n if (fileName == null) {\n return baseUrlString\n }\n\n const baseUrl = url.parse(baseUrlString)\n return url.format({ ...(baseUrl as url.UrlObject), pathname: path.posix.resolve(baseUrl.pathname || \"/\", encodeURI(fileName)) })\n }\n\n let baseUrl\n if (publishConfiguration.provider === \"github\") {\n const gh = publishConfiguration as GithubOptions\n baseUrl = `${githubUrl(gh)}/${gh.owner}/${gh.repo}/releases/download/${gh.vPrefixedTagName === false ? \"\" : \"v\"}${packager.appInfo.version}`\n } else {\n baseUrl = getS3LikeProviderBaseUrl(publishConfiguration)\n }\n\n if (fileName == null) {\n return baseUrl\n }\n return `${baseUrl}/${encodeURI(fileName)}`\n}\n\nexport async function getPublishConfigs(\n platformPackager: PlatformPackager<any>,\n targetSpecificOptions: PlatformSpecificBuildOptions | null | undefined,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<Array<PublishConfiguration> | null> {\n let publishers\n\n // check build.nsis (target)\n if (targetSpecificOptions != null) {\n publishers = targetSpecificOptions.publish\n // if explicitly set to null - do not publish\n if (publishers === null) {\n return null\n }\n }\n\n // check build.win (platform)\n if (publishers == null) {\n publishers = platformPackager.platformSpecificBuildOptions.publish\n if (publishers === null) {\n return null\n }\n }\n\n if (publishers == null) {\n publishers = platformPackager.config.publish\n if (publishers === null) {\n return null\n }\n }\n return await resolvePublishConfigurations(publishers, platformPackager, platformPackager.info, arch, errorIfCannot)\n}\n\nasync function resolvePublishConfigurations(\n publishers: any,\n platformPackager: PlatformPackager<any> | null,\n packager: Packager,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<Array<PublishConfiguration> | null> {\n if (publishers == null) {\n let serviceName: PublishProvider | null = null\n if (!isEmptyOrSpaces(process.env.GH_TOKEN) || !isEmptyOrSpaces(process.env.GITHUB_TOKEN)) {\n serviceName = \"github\"\n } else if (!isEmptyOrSpaces(process.env.KEYGEN_TOKEN)) {\n serviceName = \"keygen\"\n } else if (!isEmptyOrSpaces(process.env.BITBUCKET_TOKEN)) {\n serviceName = \"bitbucket\"\n } else if (!isEmptyOrSpaces(process.env.BT_TOKEN)) {\n throw new Error(\n \"Bintray has been sunset and is no longer supported by electron-builder. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/\"\n )\n }\n\n if (serviceName != null) {\n log.debug(null, `detect ${serviceName} as publish provider`)\n return [(await getResolvedPublishConfig(platformPackager, packager, { provider: serviceName }, arch, errorIfCannot))!]\n }\n }\n\n if (publishers == null) {\n return []\n }\n\n debug(`Explicit publish provider: ${safeStringifyJson(publishers)}`)\n return await (BluebirdPromise.map(asArray(publishers), it =>\n getResolvedPublishConfig(platformPackager, packager, typeof it === \"string\" ? { provider: it } : it, arch, errorIfCannot)\n ) as Promise<Array<PublishConfiguration>>)\n}\n\nfunction isSuitableWindowsTarget(target: Target) {\n if (target.name === \"appx\" && target.options != null && (target.options as any).electronUpdaterAware) {\n return true\n }\n return target.name === \"nsis\" || target.name.startsWith(\"nsis-\")\n}\n\nfunction expandPublishConfig(options: any, platformPackager: PlatformPackager<any> | null, packager: Packager, arch: Arch | null): void {\n for (const name of Object.keys(options)) {\n const value = options[name]\n if (typeof value === \"string\") {\n const archValue = arch == null ? null : Arch[arch]\n const expanded = platformPackager == null ? expandMacro(value, archValue, packager.appInfo) : platformPackager.expandMacro(value, archValue)\n if (expanded !== value) {\n options[name] = expanded\n }\n }\n }\n}\n\nfunction isDetectUpdateChannel(platformSpecificConfiguration: PlatformSpecificBuildOptions | null, configuration: Configuration) {\n const value = platformSpecificConfiguration == null ? null : platformSpecificConfiguration.detectUpdateChannel\n return value == null ? configuration.detectUpdateChannel !== false : value\n}\n\nasync function getResolvedPublishConfig(\n platformPackager: PlatformPackager<any> | null,\n packager: Packager,\n options: PublishConfiguration,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<PublishConfiguration | GithubOptions | BitbucketOptions | null> {\n options = { ...options }\n expandPublishConfig(options, platformPackager, packager, arch)\n\n let channelFromAppVersion: string | null = null\n if (\n (options as GenericServerOptions).channel == null &&\n isDetectUpdateChannel(platformPackager == null ? null : platformPackager.platformSpecificBuildOptions, packager.config)\n ) {\n channelFromAppVersion = packager.appInfo.channel\n }\n\n const provider = options.provider\n if (provider === \"generic\") {\n const o = options as GenericServerOptions\n if (o.url == null) {\n throw new InvalidConfigurationError(`Please specify \"url\" for \"generic\" update server`)\n }\n\n if (channelFromAppVersion != null) {\n ;(o as any).channel = channelFromAppVersion\n }\n return options\n }\n\n const providerClass = requireProviderClass(options.provider, packager)\n if (providerClass != null && providerClass.checkAndResolveOptions != null) {\n await providerClass.checkAndResolveOptions(options, channelFromAppVersion, errorIfCannot)\n return options\n }\n\n if (provider === \"keygen\") {\n return {\n ...options,\n platform: platformPackager?.platform.name,\n } as KeygenOptions\n }\n\n const isGithub = provider === \"github\"\n if (!isGithub && provider !== \"bitbucket\") {\n return options\n }\n\n let owner = isGithub ? (options as GithubOptions).owner : (options as BitbucketOptions).owner\n let project = isGithub ? (options as GithubOptions).repo : (options as BitbucketOptions).slug\n\n if (isGithub && owner == null && project != null) {\n const index = project.indexOf(\"/\")\n if (index > 0) {\n const repo = project\n project = repo.substring(0, index)\n owner = repo.substring(index + 1)\n }\n }\n\n async function getInfo() {\n const info = await packager.repositoryInfo\n if (info != null) {\n return info\n }\n\n const message = `Cannot detect repository by .git/config. Please specify \"repository\" in the package.json (https://docs.npmjs.com/files/package.json#repository).\\nPlease see https://electron.build/publish`\n if (errorIfCannot) {\n throw new Error(message)\n } else {\n log.warn(message)\n return null\n }\n }\n\n if (!owner || !project) {\n log.debug({ reason: \"owner or project is not specified explicitly\", provider, owner, project }, \"calling getInfo\")\n const info = await getInfo()\n if (info == null) {\n return null\n }\n\n if (!owner) {\n owner = info.user\n }\n if (!project) {\n project = info.project\n }\n }\n\n if (isGithub) {\n if ((options as GithubOptions).token != null && !(options as GithubOptions).private) {\n log.warn('\"token\" specified in the github publish options. It should be used only for [setFeedURL](module:electron-updater/out/AppUpdater.AppUpdater+setFeedURL).')\n }\n //tslint:disable-next-line:no-object-literal-type-assertion\n return { owner, repo: project, ...options } as GithubOptions\n } else {\n //tslint:disable-next-line:no-object-literal-type-assertion\n return { owner, slug: project, ...options } as BitbucketOptions\n }\n}\n"]}
1
+ {"version":3,"file":"PublishManager.js","sourceRoot":"","sources":["../../src/publish/PublishManager.ts"],"names":[],"mappings":";;;AAsPA,4EAmBC;AAED,wEAwBC;AAED,0CAwBC;AA0CD,gDAuBC;AAED,8CAgCC;AAhaD,+CAA0C;AAC1C,+CAAkK;AAClK,+DAW6B;AAC7B,iCAA0B;AAC1B,uDAAkG;AAClG,0EAAsE;AACtE,sEAAkE;AAClE,kDAA0C;AAC1C,0DAAkD;AAClD,0CAAuC;AACvC,8BAA6B;AAC7B,6BAA4B;AAE5B,2BAA0B;AAC1B,oCAAkH;AAGlH,yDAAmD;AAEnD,6DAAyD;AACzD,2DAAqG;AACrG,uDAAmD;AACnD,6DAAyD;AAEzD,MAAM,mBAAmB,GACvB,sKAAsK;IACtK,6LAA6L,CAAA;AAE/L,MAAM,KAAK,GAAG,IAAA,eAAM,EAAC,0BAA0B,CAAC,CAAA;AAEhD,SAAS,YAAY,CAAC,aAAkB;IACtC,IAAI,aAAa,IAAI,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,aAAa,KAAK,cAAc,IAAI,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,OAAO,EAAE,CAAC;QACtJ,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,wCAAyB,CACjC,uEAAuE,IAAI,CAAC,SAAS,CACnF,aAAa,CACd,8EAA8E,CAChF,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAa,cAAc;IAWzB,YACmB,QAAkB,EAClB,cAA8B,EACtC,oB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EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAmB,CAAA;IAC9D,CAAC;SAAM,CAAC;QACN,2DAA2D;QAC3D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAsB,CAAA;IACjE,CAAC;AACH,CAAC","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { Arch, asArray, AsyncTaskManager, InvalidConfigurationError, isEmptyOrSpaces, isPullRequest, log, safeStringifyJson, serializeToYaml } from \"builder-util\"\nimport {\n CancellationToken,\n GenericServerOptions,\n getS3LikeProviderBaseUrl,\n GithubOptions,\n githubUrl,\n KeygenOptions,\n SnapStoreOptions,\n PublishConfiguration,\n PublishProvider,\n BitbucketOptions,\n} from \"builder-util-runtime\"\nimport _debug from \"debug\"\nimport { getCiTag, PublishContext, Publisher, PublishOptions, UploadTask } from \"electron-publish\"\nimport { GitHubPublisher } from \"electron-publish/out/gitHubPublisher\"\nimport { MultiProgress } from \"electron-publish/out/multiProgress\"\nimport S3Publisher from \"./s3/s3Publisher\"\nimport SpacesPublisher from \"./s3/spacesPublisher\"\nimport { writeFile } from \"fs/promises\"\nimport * as isCi from \"is-ci\"\nimport * as path from \"path\"\nimport { WriteStream as TtyWriteStream } from \"tty\"\nimport * as url from \"url\"\nimport { AppInfo, ArtifactCreated, Configuration, Platform, PlatformSpecificBuildOptions, Target } from \"../index\"\nimport { Packager } from \"../packager\"\nimport { PlatformPackager } from \"../platformPackager\"\nimport { expandMacro } from \"../util/macroExpander\"\nimport { WinPackager } from \"../winPackager\"\nimport { SnapStorePublisher } from \"./SnapStorePublisher\"\nimport { createUpdateInfoTasks, UpdateInfoFileTask, writeUpdateInfoFiles } from \"./updateInfoBuilder\"\nimport { KeygenPublisher } from \"./KeygenPublisher\"\nimport { BitbucketPublisher } from \"./BitbucketPublisher\"\n\nconst publishForPrWarning =\n \"There are serious security concerns with PUBLISH_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)\" +\n \"\\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.\"\n\nconst debug = _debug(\"electron-builder:publish\")\n\nfunction checkOptions(publishPolicy: any) {\n if (publishPolicy != null && publishPolicy !== \"onTag\" && publishPolicy !== \"onTagOrDraft\" && publishPolicy !== \"always\" && publishPolicy !== \"never\") {\n if (typeof publishPolicy === \"string\") {\n throw new InvalidConfigurationError(\n `Expected one of \"onTag\", \"onTagOrDraft\", \"always\", \"never\", but got ${JSON.stringify(\n publishPolicy\n )}.\\nPlease note that publish configuration should be specified under \"config\"`\n )\n }\n }\n}\n\nexport class PublishManager implements PublishContext {\n private readonly nameToPublisher = new Map<string, Publisher | null>()\n\n private readonly taskManager: AsyncTaskManager\n\n readonly isPublish: boolean = false\n\n readonly progress = (process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : null\n\n private readonly updateFileWriteTask: Array<UpdateInfoFileTask> = []\n\n constructor(\n private readonly packager: Packager,\n private readonly publishOptions: PublishOptions,\n readonly cancellationToken: CancellationToken = packager.cancellationToken\n ) {\n checkOptions(publishOptions.publish)\n\n this.taskManager = new AsyncTaskManager(cancellationToken)\n\n const forcePublishForPr = process.env.PUBLISH_FOR_PULL_REQUEST === \"true\"\n if (!isPullRequest() || forcePublishForPr) {\n if (publishOptions.publish === undefined) {\n if (process.env.npm_lifecycle_event === \"release\") {\n publishOptions.publish = \"always\"\n } else {\n const tag = getCiTag()\n if (tag != null) {\n log.info({ reason: \"tag is defined\", tag }, \"artifacts will be published\")\n publishOptions.publish = \"onTag\"\n } else if (isCi) {\n log.info({ reason: \"CI detected\" }, \"artifacts will be published if draft release exists\")\n publishOptions.publish = \"onTagOrDraft\"\n }\n }\n }\n\n const publishPolicy = publishOptions.publish\n this.isPublish = publishPolicy != null && publishOptions.publish !== \"never\" && (publishPolicy !== \"onTag\" || getCiTag() != null)\n if (this.isPublish && forcePublishForPr) {\n log.warn(publishForPrWarning)\n }\n } else if (publishOptions.publish !== \"never\") {\n log.info(\n {\n reason: \"current build is a part of pull request\",\n solution: `set env PUBLISH_FOR_PULL_REQUEST to true to force code signing\\n${publishForPrWarning}`,\n },\n \"publishing will be skipped\"\n )\n }\n\n packager.addAfterPackHandler(async event => {\n const packager = event.packager\n if (event.electronPlatformName === \"darwin\") {\n if (!event.targets.some(it => it.name === \"dmg\" || it.name === \"zip\")) {\n return\n }\n } else if (packager.platform === Platform.WINDOWS) {\n if (!event.targets.some(it => isSuitableWindowsTarget(it))) {\n return\n }\n }\n\n const publishConfig = await getAppUpdatePublishConfiguration(packager, event.arch, this.isPublish)\n if (publishConfig != null) {\n await writeFile(path.join(packager.getResourcesDir(event.appOutDir), \"app-update.yml\"), serializeToYaml(publishConfig))\n }\n })\n\n packager.artifactCreated(event => {\n const publishConfiguration = event.publishConfig\n if (publishConfiguration == null) {\n this.taskManager.addTask(this.artifactCreatedWithoutExplicitPublishConfig(event))\n } else if (this.isPublish) {\n if (debug.enabled) {\n debug(`artifactCreated (isPublish: ${this.isPublish}): ${safeStringifyJson(event, new Set([\"packager\"]))},\\n publishConfig: ${safeStringifyJson(publishConfiguration)}`)\n }\n this.scheduleUpload(publishConfiguration, event, this.getAppInfo(event.packager))\n }\n })\n }\n\n private getAppInfo(platformPackager: PlatformPackager<any> | null) {\n return platformPackager == null ? this.packager.appInfo : platformPackager.appInfo\n }\n\n async getGlobalPublishConfigurations(): Promise<Array<PublishConfiguration> | null> {\n const publishers = this.packager.config.publish\n return await resolvePublishConfigurations(publishers, null, this.packager, null, true)\n }\n\n scheduleUpload(publishConfig: PublishConfiguration, event: UploadTask, appInfo: AppInfo): void {\n if (publishConfig.provider === \"generic\") {\n return\n }\n\n const publisher = this.getOrCreatePublisher(publishConfig, appInfo)\n if (publisher == null) {\n log.debug(\n {\n file: log.filePath(event.file),\n reason: \"publisher is null\",\n publishConfig: safeStringifyJson(publishConfig),\n },\n \"not published\"\n )\n return\n }\n\n const providerName = publisher.providerName\n if (this.publishOptions.publish === \"onTagOrDraft\" && getCiTag() == null && providerName !== \"bitbucket\" && providerName !== \"github\") {\n log.info({ file: log.filePath(event.file), reason: \"current build is not for a git tag\", publishPolicy: \"onTagOrDraft\" }, `not published to ${providerName}`)\n return\n }\n\n if (publishConfig.timeout) {\n event.timeout = publishConfig.timeout\n }\n\n this.taskManager.addTask(publisher.upload(event))\n }\n\n private async artifactCreatedWithoutExplicitPublishConfig(event: ArtifactCreated) {\n const platformPackager = event.packager\n const target = event.target\n const publishConfigs = await getPublishConfigs(platformPackager, target == null ? null : target.options, event.arch, this.isPublish)\n\n if (debug.enabled) {\n debug(`artifactCreated (isPublish: ${this.isPublish}): ${safeStringifyJson(event, new Set([\"packager\"]))},\\n publishConfigs: ${safeStringifyJson(publishConfigs)}`)\n }\n\n const eventFile = event.file\n if (publishConfigs == null) {\n if (this.isPublish) {\n log.debug({ file: eventFile, reason: \"no publish configs\" }, \"not published\")\n }\n return\n }\n\n if (this.isPublish) {\n for (const publishConfig of publishConfigs) {\n if (this.cancellationToken.cancelled) {\n log.debug({ file: event.file, reason: \"cancelled\" }, \"not published\")\n break\n }\n\n this.scheduleUpload(publishConfig, event, this.getAppInfo(platformPackager))\n }\n }\n\n if (\n event.isWriteUpdateInfo &&\n target != null &&\n eventFile != null &&\n !this.cancellationToken.cancelled &&\n (platformPackager.platform !== Platform.WINDOWS || isSuitableWindowsTarget(target))\n ) {\n this.taskManager.addTask(createUpdateInfoTasks(event, publishConfigs).then(it => this.updateFileWriteTask.push(...it)))\n }\n }\n\n private getOrCreatePublisher(publishConfig: PublishConfiguration, appInfo: AppInfo): Publisher | null {\n // to not include token into cache key\n const providerCacheKey = safeStringifyJson(publishConfig)\n let publisher = this.nameToPublisher.get(providerCacheKey)\n if (publisher == null) {\n publisher = createPublisher(this, appInfo.version, publishConfig, this.publishOptions, this.packager)\n this.nameToPublisher.set(providerCacheKey, publisher)\n log.info({ publisher: publisher!.toString() }, \"publishing\")\n }\n return publisher\n }\n\n // noinspection JSUnusedGlobalSymbols\n cancelTasks() {\n this.taskManager.cancelTasks()\n this.nameToPublisher.clear()\n }\n\n async awaitTasks(): Promise<void> {\n await this.taskManager.awaitTasks()\n\n const updateInfoFileTasks = this.updateFileWriteTask\n if (this.cancellationToken.cancelled || updateInfoFileTasks.length === 0) {\n return\n }\n\n await writeUpdateInfoFiles(updateInfoFileTasks, this.packager)\n await this.taskManager.awaitTasks()\n }\n}\n\nexport async function getAppUpdatePublishConfiguration(packager: PlatformPackager<any>, arch: Arch, errorIfCannot: boolean) {\n const publishConfigs = await getPublishConfigsForUpdateInfo(packager, await getPublishConfigs(packager, null, arch, errorIfCannot), arch)\n if (publishConfigs == null || publishConfigs.length === 0) {\n return null\n }\n\n const publishConfig = {\n ...publishConfigs[0],\n updaterCacheDirName: packager.appInfo.updaterCacheDirName,\n }\n\n if (packager.platform === Platform.WINDOWS && publishConfig.publisherName == null) {\n const winPackager = packager as WinPackager\n const publisherName = winPackager.isForceCodeSigningVerification ? await (await winPackager.signtoolManager.value).computedPublisherName.value : undefined\n if (publisherName != null) {\n publishConfig.publisherName = publisherName\n }\n }\n return publishConfig\n}\n\nexport async function getPublishConfigsForUpdateInfo(\n packager: PlatformPackager<any>,\n publishConfigs: Array<PublishConfiguration> | null,\n arch: Arch | null\n): Promise<Array<PublishConfiguration> | null> {\n if (publishConfigs === null) {\n return null\n }\n\n if (publishConfigs.length === 0) {\n log.debug(null, \"getPublishConfigsForUpdateInfo: no publishConfigs, detect using repository info\")\n // https://github.com/electron-userland/electron-builder/issues/925#issuecomment-261732378\n // default publish config is github, file should be generated regardless of publish state (user can test installer locally or manage the release process manually)\n const repositoryInfo = await packager.info.repositoryInfo\n debug(`getPublishConfigsForUpdateInfo: ${safeStringifyJson(repositoryInfo)}`)\n if (repositoryInfo != null && repositoryInfo.type === \"github\") {\n const resolvedPublishConfig = await getResolvedPublishConfig(packager, packager.info, { provider: repositoryInfo.type }, arch, false)\n if (resolvedPublishConfig != null) {\n debug(`getPublishConfigsForUpdateInfo: resolve to publish config ${safeStringifyJson(resolvedPublishConfig)}`)\n return [resolvedPublishConfig]\n }\n }\n }\n return publishConfigs\n}\n\nexport function createPublisher(context: PublishContext, version: string, publishConfig: PublishConfiguration, options: PublishOptions, packager: Packager): Publisher | null {\n if (debug.enabled) {\n debug(`Create publisher: ${safeStringifyJson(publishConfig)}`)\n }\n\n const provider = publishConfig.provider\n switch (provider) {\n case \"github\":\n return new GitHubPublisher(context, publishConfig as GithubOptions, version, options)\n\n case \"keygen\":\n return new KeygenPublisher(context, publishConfig as KeygenOptions, version)\n\n case \"snapStore\":\n return new SnapStorePublisher(context, publishConfig as SnapStoreOptions)\n\n case \"generic\":\n return null\n\n default: {\n const clazz = requireProviderClass(provider, packager)\n return clazz == null ? null : new clazz(context, publishConfig)\n }\n }\n}\n\nfunction requireProviderClass(provider: string, packager: Packager): any | null {\n switch (provider) {\n case \"github\":\n return GitHubPublisher\n\n case \"generic\":\n return null\n\n case \"keygen\":\n return KeygenPublisher\n\n case \"s3\":\n return S3Publisher\n\n case \"snapStore\":\n return SnapStorePublisher\n\n case \"spaces\":\n return SpacesPublisher\n\n case \"bitbucket\":\n return BitbucketPublisher\n\n default: {\n const name = `electron-publisher-${provider}`\n let module: any = null\n try {\n module = require(path.join(packager.buildResourcesDir, name + \".js\"))\n } catch (_ignored) {\n log.debug({ path: path.join(packager.buildResourcesDir, name + \".js\") }, \"Unable to find publish provider in build resources\")\n }\n\n if (module == null) {\n module = require(name)\n }\n return module.default || module\n }\n }\n}\n\nexport function computeDownloadUrl(publishConfiguration: PublishConfiguration, fileName: string | null, packager: PlatformPackager<any>) {\n if (publishConfiguration.provider === \"generic\") {\n const baseUrlString = (publishConfiguration as GenericServerOptions).url\n if (fileName == null) {\n return baseUrlString\n }\n\n const baseUrl = url.parse(baseUrlString)\n return url.format({ ...(baseUrl as url.UrlObject), pathname: path.posix.resolve(baseUrl.pathname || \"/\", encodeURI(fileName)) })\n }\n\n let baseUrl\n if (publishConfiguration.provider === \"github\") {\n const gh = publishConfiguration as GithubOptions\n baseUrl = `${githubUrl(gh)}/${gh.owner}/${gh.repo}/releases/download/${gh.vPrefixedTagName === false ? \"\" : \"v\"}${packager.appInfo.version}`\n } else {\n baseUrl = getS3LikeProviderBaseUrl(publishConfiguration)\n }\n\n if (fileName == null) {\n return baseUrl\n }\n return `${baseUrl}/${encodeURI(fileName)}`\n}\n\nexport async function getPublishConfigs(\n platformPackager: PlatformPackager<any>,\n targetSpecificOptions: PlatformSpecificBuildOptions | null | undefined,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<Array<PublishConfiguration> | null> {\n let publishers\n\n // check build.nsis (target)\n if (targetSpecificOptions != null) {\n publishers = targetSpecificOptions.publish\n // if explicitly set to null - do not publish\n if (publishers === null) {\n return null\n }\n }\n\n // check build.win (platform)\n if (publishers == null) {\n publishers = platformPackager.platformSpecificBuildOptions.publish\n if (publishers === null) {\n return null\n }\n }\n\n if (publishers == null) {\n publishers = platformPackager.config.publish\n if (publishers === null) {\n return null\n }\n }\n return await resolvePublishConfigurations(publishers, platformPackager, platformPackager.info, arch, errorIfCannot)\n}\n\nasync function resolvePublishConfigurations(\n publishers: any,\n platformPackager: PlatformPackager<any> | null,\n packager: Packager,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<Array<PublishConfiguration> | null> {\n if (publishers == null) {\n let serviceName: PublishProvider | null = null\n if (!isEmptyOrSpaces(process.env.GH_TOKEN) || !isEmptyOrSpaces(process.env.GITHUB_TOKEN)) {\n serviceName = \"github\"\n } else if (!isEmptyOrSpaces(process.env.KEYGEN_TOKEN)) {\n serviceName = \"keygen\"\n } else if (!isEmptyOrSpaces(process.env.BITBUCKET_TOKEN)) {\n serviceName = \"bitbucket\"\n } else if (!isEmptyOrSpaces(process.env.BT_TOKEN)) {\n throw new Error(\n \"Bintray has been sunset and is no longer supported by electron-builder. Ref: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/\"\n )\n }\n\n if (serviceName != null) {\n log.debug(null, `detect ${serviceName} as publish provider`)\n return [(await getResolvedPublishConfig(platformPackager, packager, { provider: serviceName }, arch, errorIfCannot))!]\n }\n }\n\n if (publishers == null) {\n return []\n }\n\n debug(`Explicit publish provider: ${safeStringifyJson(publishers)}`)\n return await (BluebirdPromise.map(asArray(publishers), it =>\n getResolvedPublishConfig(platformPackager, packager, typeof it === \"string\" ? { provider: it } : it, arch, errorIfCannot)\n ) as Promise<Array<PublishConfiguration>>)\n}\n\nfunction isSuitableWindowsTarget(target: Target) {\n if (target.name === \"appx\" && target.options != null && (target.options as any).electronUpdaterAware) {\n return true\n }\n return target.name === \"nsis\" || target.name.startsWith(\"nsis-\")\n}\n\nfunction expandPublishConfig(options: any, platformPackager: PlatformPackager<any> | null, packager: Packager, arch: Arch | null): void {\n for (const name of Object.keys(options)) {\n const value = options[name]\n if (typeof value === \"string\") {\n const archValue = arch == null ? null : Arch[arch]\n const expanded = platformPackager == null ? expandMacro(value, archValue, packager.appInfo) : platformPackager.expandMacro(value, archValue)\n if (expanded !== value) {\n options[name] = expanded\n }\n }\n }\n}\n\nfunction isDetectUpdateChannel(platformSpecificConfiguration: PlatformSpecificBuildOptions | null, configuration: Configuration) {\n const value = platformSpecificConfiguration == null ? null : platformSpecificConfiguration.detectUpdateChannel\n return value == null ? configuration.detectUpdateChannel !== false : value\n}\n\nasync function getResolvedPublishConfig(\n platformPackager: PlatformPackager<any> | null,\n packager: Packager,\n options: PublishConfiguration,\n arch: Arch | null,\n errorIfCannot: boolean\n): Promise<PublishConfiguration | GithubOptions | BitbucketOptions | null> {\n options = { ...options }\n expandPublishConfig(options, platformPackager, packager, arch)\n\n let channelFromAppVersion: string | null = null\n if (\n (options as GenericServerOptions).channel == null &&\n isDetectUpdateChannel(platformPackager == null ? null : platformPackager.platformSpecificBuildOptions, packager.config)\n ) {\n channelFromAppVersion = packager.appInfo.channel\n }\n\n const provider = options.provider\n if (provider === \"generic\") {\n const o = options as GenericServerOptions\n if (o.url == null) {\n throw new InvalidConfigurationError(`Please specify \"url\" for \"generic\" update server`)\n }\n\n if (channelFromAppVersion != null) {\n ;(o as any).channel = channelFromAppVersion\n }\n return options\n }\n\n const providerClass = requireProviderClass(options.provider, packager)\n if (providerClass != null && providerClass.checkAndResolveOptions != null) {\n await providerClass.checkAndResolveOptions(options, channelFromAppVersion, errorIfCannot)\n return options\n }\n\n if (provider === \"keygen\") {\n return {\n ...options,\n platform: platformPackager?.platform.name,\n } as KeygenOptions\n }\n\n const isGithub = provider === \"github\"\n if (!isGithub && provider !== \"bitbucket\") {\n return options\n }\n\n let owner = isGithub ? (options as GithubOptions).owner : (options as BitbucketOptions).owner\n let project = isGithub ? (options as GithubOptions).repo : (options as BitbucketOptions).slug\n\n if (isGithub && owner == null && project != null) {\n const index = project.indexOf(\"/\")\n if (index > 0) {\n const repo = project\n project = repo.substring(0, index)\n owner = repo.substring(index + 1)\n }\n }\n\n async function getInfo() {\n const info = await packager.repositoryInfo\n if (info != null) {\n return info\n }\n\n const message = `Cannot detect repository by .git/config. Please specify \"repository\" in the package.json (https://docs.npmjs.com/files/package.json#repository).\\nPlease see https://electron.build/publish`\n if (errorIfCannot) {\n throw new Error(message)\n } else {\n log.warn(message)\n return null\n }\n }\n\n if (!owner || !project) {\n log.debug({ reason: \"owner or project is not specified explicitly\", provider, owner, project }, \"calling getInfo\")\n const info = await getInfo()\n if (info == null) {\n return null\n }\n\n if (!owner) {\n owner = info.user\n }\n if (!project) {\n project = info.project\n }\n }\n\n if (isGithub) {\n if ((options as GithubOptions).token != null && !(options as GithubOptions).private) {\n log.warn('\"token\" specified in the github publish options. It should be used only for [setFeedURL](module:electron-updater/out/AppUpdater.AppUpdater+setFeedURL).')\n }\n //tslint:disable-next-line:no-object-literal-type-assertion\n return { owner, repo: project, ...options } as GithubOptions\n } else {\n //tslint:disable-next-line:no-object-literal-type-assertion\n return { owner, slug: project, ...options } as BitbucketOptions\n }\n}\n"]}
@@ -193,7 +193,10 @@ class AppXTarget extends core_1.Target {
193
193
  const validCharactersRegex = /^([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*$/;
194
194
  const identitynumber = parseInt(options.identityName, 10) || NaN;
195
195
  let result;
196
- if (!isNaN(identitynumber) && options.identityName !== null && options.identityName !== undefined) {
196
+ if (options.applicationId) {
197
+ result = options.applicationId;
198
+ }
199
+ else if (!isNaN(identitynumber) && options.identityName !== null && options.identityName !== undefined) {
197
200
  if (options.identityName[0] === "0") {
198
201
  builder_util_1.log.warn(`Remove the 0${identitynumber}`);
199
202
  result = options.identityName.replace("0" + identitynumber.toString(), "");
@@ -204,7 +207,7 @@ class AppXTarget extends core_1.Target {
204
207
  }
205
208
  }
206
209
  else {
207
- result = options.applicationId || options.identityName || appInfo.name;
210
+ result = options.identityName || appInfo.name;
208
211
  }
209
212
  if (result.length < 1 || result.length > 64) {
210
213
  const message = `Appx Application.Id with a value between 1 and 64 characters in length`;