declare module "electron-builder/out/options/linuxOptions" { import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from "electron-builder-core" /** * Linux Options */ export interface LinuxBuildOptions extends PlatformSpecificBuildOptions, CommonLinuxOptions { /** * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry). */ readonly category?: string | null /** * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section). Not applicable for AppImage. */ readonly packageCategory?: string | null /** * As [description](#AppMetadata-description) from application package.json, but allows you to specify different for Linux. */ readonly description?: string | null /** * Target package type: list of `AppImage`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. * * electron-builder [docker image](https://github.com/electron-userland/electron-builder/wiki/Docker) can be used to build Linux targets on any platform. See [Multi platform build](https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build). * * @see [Please do not put an AppImage into another archive like a .zip or .tar.gz](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) * @default AppImage */ readonly target?: TargetConfigType /** * The maintainer. Defaults to [author](#AppMetadata-author). */ readonly maintainer?: string | null /** * The vendor. Defaults to [author](#AppMetadata-author). */ readonly vendor?: string | null /** * The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value). */ readonly desktop?: { [key: string]: string } | null /** * @deprecated * @private */ readonly depends?: string[] | null /** * The executable name. Defaults to `productName`. * Cannot be specified per target, allowed only in the `linux`. */ readonly executableName?: string | null /** * The path to icon set directory, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon. * By default will be generated automatically based on the macOS icns file. */ readonly icon?: string /** * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description). */ readonly synopsis?: string | null } export interface CommonLinuxOptions { readonly synopsis?: string | null readonly description?: string | null readonly category?: string | null readonly packageCategory?: string | null readonly desktop?: { [key: string]: string } | null readonly vendor?: string | null readonly maintainer?: string | null readonly afterInstall?: string | null readonly afterRemove?: string | null /** * should be not documented, only to experiment * @private */ readonly fpm?: Array | null } export interface LinuxTargetSpecificOptions extends TargetSpecificOptions, CommonLinuxOptions { /** * Package dependencies. */ readonly depends?: string[] | null readonly icon?: string } /** * Debian Package Specific Options */ export interface DebOptions extends LinuxTargetSpecificOptions { /** * The compression type. * @default xz */ readonly compression?: "gz" | "bzip2" | "xz" | null /** * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute. */ readonly priority?: string | null /** * Package dependencies. Defaults to `["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]`. */ readonly depends?: string[] | null } /** * [Snap](http://snapcraft.io) Options */ export interface SnapOptions extends LinuxBuildOptions { /** * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap. * @default strict */ readonly confinement?: "devmode" | "strict" | "classic" | null /** * The 78 character long summary. Defaults to [productName](#AppMetadata-productName). */ readonly summary?: string | null /** * 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). * @default stable */ readonly grade?: "devel" | "stable" | null /** * The list of features that must be supported by the core in order for this snap to install. */ readonly assumes?: Array | null /** * The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`. * Defaults to `["libnotify4", "libappindicator1", "libxtst6", "libnss3", "libxss1", "fontconfig-config", "gconf2", "libasound2", "pulseaudio"]`. * * 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. */ readonly stagePackages?: Array | null /** * The list of [plugs](https://snapcraft.io/docs/reference/interfaces). * Defaults to `["home", "x11", "unity7", "browser-support", "network", "gsettings", "pulseaudio", "opengl"]`. * * 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. */ readonly plugs?: Array | null /** * Specify `ubuntu-app-platform1` to use [ubuntu-app-platform](https://insights.ubuntu.com/2016/11/17/how-to-create-snap-packages-on-qt-applications/). * Snap size will be greatly reduced, but it is not recommended for now because "the snaps must be connected before running uitk-gallery for the first time". */ readonly ubuntuAppPlatformContent?: string | null } } declare module "electron-builder/out/options/macOptions" { import { PlatformSpecificBuildOptions, TargetConfig, TargetSpecificOptions } from "electron-builder-core" export type MacOsTargetName = "default" | "dmg" | "mas" | "pkg" | "7z" | "zip" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "dir" /** * macOS Options ([mac](#Config-mac)). */ export interface MacOptions extends PlatformSpecificBuildOptions { /** * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory. * * For example, `"category": "public.app-category.developer-tools"` will set the application category to *Developer Tools*. * * 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). */ readonly category?: string | null /** * The target package type: list of `default`, `dmg`, `mas`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac). */ readonly target?: Array | MacOsTargetName | TargetConfig | null /** * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing) instead of specifying this option. * MAS installer identity is specified in the [mas](#MasBuildOptions-identity). */ readonly identity?: string | null /** * The path to application icon. * @default build/icon.icns */ readonly icon?: string | null /** * 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). * MAS entitlements is specified in the [mas](#MasBuildOptions-entitlements). */ readonly entitlements?: string | null /** * 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). * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist). * * This option only applies when signing with `entitlements` provided. */ readonly entitlementsInherit?: string | null /** * The `CFBundleVersion`. Do not use it unless [you need to](see (https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643)). */ readonly bundleVersion?: string | null /** * The bundle identifier to use in the application helper's plist. * @default ${appBundleIdentifier}.helper */ readonly helperBundleId?: string | null /** * Whether to sign app for development or for distribution. * @default distribution */ readonly type?: "distribution" | "development" | null /** * The extra entries for `Info.plist`. */ readonly extendInfo?: any } /** * macOS Product Archive Options ([pkg](#Config-pkg)). */ export interface PkgOptions extends TargetSpecificOptions { /** * The scripts directory, relative to `build` (build resources directory). * The scripts can be in any language so long as the files are marked executable and have the appropriate shebang indicating the path to the interpreter. * Scripts are required to be executable (`chmod +x file`). * @default build/pkg-scripts * @see [Scripting in installer packages](http://macinstallers.blogspot.de/2012/07/scripting-in-installer-packages.html). */ readonly scripts?: string | null /** * should be not documented, only to experiment * @private */ readonly productbuild?: Array | null /** * The install location. * @default /Applications */ readonly installLocation?: string | null readonly identity?: string | null } /** * macOS DMG Options ([dmg](#Config-dmg)). */ export interface DmgOptions extends TargetSpecificOptions { /** * 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. * If background is not specified, use `window.size`. Default locations expected background size to be 540x380. * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191). */ readonly background?: string | null /** * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image. */ readonly backgroundColor?: string | null /** * The path to DMG icon (volume icon), which will be shown when mounted, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * Defaults to the application icon (`build/icon.icns`). */ readonly icon?: string | null /** * The size of all the icons inside the DMG. * @default 80 */ readonly iconSize?: number | null /** * The size of all the icon texts inside the DMG. * @default 12 */ readonly iconTextSize?: number | null /** * The title of the produced DMG, which will be shown when mounted (volume name). * * Macro `${productName}`, `${version}` and `${name}` are supported. * @default ${productName} ${version} */ readonly title?: string | null /** * The content — to customize icon locations. */ readonly contents?: Array /** * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). * @default UDZO */ readonly format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO" /** * The DMG windows position and size. See [dmg.window](#DmgWindow). */ window?: DmgWindow } /** * DMG Windows Position and Size */ export interface DmgWindow { /** * The X position relative to left of the screen. * @default 400 */ x?: number /** * The Y position relative to top of the screen. * @default 100 */ y?: number /** * The width. Defaults to background image width or 540. */ width?: number /** * The height. Defaults to background image height or 380. */ height?: number } export interface DmgContent { x: number y: number type?: "link" | "file" /** * The name of the file within the DMG. Defaults to basename of `path`. */ name?: string path?: string } /** * MAS (Mac Application Store) Options ([mas](#Config-mas)). */ export interface MasBuildOptions extends MacOptions { /** * 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). * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist). */ readonly entitlements?: string | null /** * 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). * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist). */ readonly entitlementsInherit?: string | null } } declare module "electron-builder/out/options/winOptions" { import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from "electron-builder-core" /** * Windows Specific Options ([win](#Config-win)). */ export interface WinBuildOptions extends PlatformSpecificBuildOptions { /** * Target package type: list of `nsis`, `nsis-web` (Web installer), `portable` (portable app without installation), `appx`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `nsis`. * AppX package can be built only on Windows 10. * * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency. */ readonly target?: TargetConfigType /** * Array of signing algorithms used. Defaults to `['sha1', 'sha256']` * * For AppX `sha256` is always used. */ readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null /** * The path to application icon. * @default build/icon.ico */ readonly icon?: string | null /** * The trademarks and registered trademarks. */ readonly legalTrademarks?: string | null /** * 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. * Please see [Code Signing](https://github.com/electron-userland/electron-builder/wiki/Code-Signing). */ readonly certificateFile?: string /** * 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. * Please see [Code Signing](https://github.com/electron-userland/electron-builder/wiki/Code-Signing). */ readonly certificatePassword?: string /** * The name of the subject of the signing certificate. Required only for EV Code Signing and works only on Windows. */ readonly certificateSubjectName?: string /** * 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. */ readonly certificateSha1?: string /** * The URL of the RFC 3161 time stamp server. Defaults to `http://timestamp.comodoca.com/rfc3161`. */ readonly rfc3161TimeStampServer?: string /** * The URL of the time stamp server. Defaults to `http://timestamp.verisign.com/scripts/timstamp.dll`. */ readonly timeStampServer?: string /** * [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. * Defaults to common name from your code signing certificate. */ readonly publisherName?: string | Array | null } export interface CommonNsisOptions { readonly unicode?: boolean readonly guid?: string | null readonly warningsAsErrors?: boolean } /** * NSIS specific options ([nsis](#Config-nsis)). * * See [NSIS target notes](https://github.com/electron-userland/electron-builder/wiki/NSIS). */ export interface NsisOptions extends CommonNsisOptions, TargetSpecificOptions { /** * One-click installation. * @default true */ readonly oneClick?: boolean /*** * If `oneClick` is `true` (default): Install per all users (per-machine). * * If `oneClick` is `false`: no install mode installer page (choice per-machine or per-user), always install per-machine. * @default false */ readonly perMachine?: boolean /** * *boring installer only.* Allow requesting for elevation. If false, user will have to restart installer with elevated permissions. * @default true */ readonly allowElevation?: boolean /** * *boring installer only.* Whether to allow user to change installation directory. * @default false */ readonly allowToChangeInstallationDirectory?: boolean /** * *one-click installer only.* Run application after finish. * @default true */ readonly runAfterFinish?: boolean /** * See [GUID vs Application Name](https://github.com/electron-userland/electron-builder/wiki/NSIS#guid-vs-application-name). */ readonly guid?: string | null /** * The path to installer icon, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * Defaults to `build/installerIcon.ico` or application icon. */ readonly installerIcon?: string | null /** * *boring installer only.* `MUI_HEADERIMAGE`, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * @default build/installerHeader.bmp */ readonly installerHeader?: string | null /** * *boring installer only.* `MUI_WELCOMEFINISHPAGE_BITMAP`, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * Defaults to `build/installerSidebar.bmp` or `${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp` */ readonly installerSidebar?: string | null /** * *boring installer only.* `MUI_UNWELCOMEFINISHPAGE_BITMAP`, relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * Defaults to `installerSidebar` option or `build/uninstallerSidebar.bmp` or `build/installerSidebar.bmp` or `${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp` */ readonly uninstallerSidebar?: string | null /** * *one-click installer only.* The path to header icon (above the progress bar), relative to the the [build resources](https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources) or to the project directory. * Defaults to `build/installerHeaderIcon.ico` or application icon. */ readonly installerHeaderIcon?: string | null /** * The path to NSIS include script to customize installer. Defaults to `build/installer.nsh`. See [Custom NSIS script](https://github.com/electron-userland/electron-builder/wiki/NSIS#custom-nsis-script). */ readonly include?: string | null /** * The path to NSIS script to customize installer. Defaults to `build/installer.nsi`. See [Custom NSIS script](https://github.com/electron-userland/electron-builder/wiki/NSIS#custom-nsis-script). */ readonly script?: string | null /** * The path to EULA license file. Defaults to `license.rtf` or `license.txt` or `eula.rtf` or `eula.txt` (or uppercase variants, e.g. `EULA.txt` or `LICENSE.TXT`). * * Multiple license files in different languages are supported — use lang postfix (e.g. `_de`, `_ru`)). For example, create files `license_de.txt` and `license_en.txt` in the build resources. * If OS language is german, `license_de.txt` will be displayed. See map of [language code to name](https://github.com/meikidd/iso-639-1/blob/master/src/data.js). * * Appropriate license file will be selected by user OS language. */ readonly license?: string | null /** * [LCID Dec](https://msdn.microsoft.com/en-au/goglobal/bb964664.aspx), defaults to `1033`(`English - United States`). */ readonly language?: string | null /** * *boring installer only.* Whether to create multi-language installer. Defaults to `unicode` option value. * [Not all strings are translated](https://github.com/electron-userland/electron-builder/issues/646#issuecomment-238155800). */ readonly multiLanguageInstaller?: boolean /** * If `warningsAsErrors` is `true` (default): NSIS will treat warnings as errors. If `warningsAsErrors` is `false`: NSIS will allow warnings. * @default true */ readonly warningsAsErrors?: boolean /** * Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value. * @default false */ readonly menuCategory?: boolean | string /** * @private * @default false */ readonly useZip?: boolean /** * The [artifact file name pattern](https://github.com/electron-userland/electron-builder/wiki/Options#artifact-file-name-pattern). Defaults to `${productName} Setup ${version}.${ext}`. */ readonly artifactName?: string | null /** * Whether to create [Unicode installer](http://nsis.sourceforge.net/Docs/Chapter1.html#intro-unicode). * @default true */ readonly unicode?: boolean /** * *one-click installer only.* Whether to delete app data on uninstall. * @default false */ readonly deleteAppDataOnUninstall?: boolean } /** * Portable Specific Options ([portable](#Config-portable)). */ export interface PortableOptions extends TargetSpecificOptions, CommonNsisOptions { /** * The [requested execution level](http://nsis.sourceforge.net/Reference/RequestExecutionLevel) for Windows. * @default user */ readonly requestExecutionLevel?: "user" | "highest" | "admin" } /** * Web Installer Specific Options ([nsisWeb](#Config-nsisWeb)). */ export interface NsisWebOptions extends NsisOptions { /** * The application package download URL. Optional — by default computed using publish configuration. * * URL like `https://example.com/download/latest` allows web installer to be version independent (installer will download latest application package). * * Custom `X-Arch` http header is set to `32` or `64`. */ readonly appPackageUrl?: string | null /** * The [artifact file name pattern](https://github.com/electron-userland/electron-builder/wiki/Options#artifact-file-name-pattern). Defaults to `${productName} Web Setup ${version}.${ext}`. */ readonly artifactName?: string | null } /** * Squirrel.Windows Options ([squirrelWindows](#Config-squirrelWindows)). * * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency. Squirrel.Windows target is maintained, but deprecated. Please use `nsis` instead. */ export interface SquirrelWindowsOptions extends WinBuildOptions { /** * A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon. * * Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http. * * If you don't plan to build windows installer, you can omit it. * If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default. */ readonly iconUrl?: string | null /** * The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set) * (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)). */ readonly loadingGif?: string | null /** * Whether to create an MSI installer. Defaults to `false` (MSI is not created). */ readonly msi?: boolean /** * A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates. */ readonly remoteReleases?: string | boolean | null /** * Authentication token for remote updates */ readonly remoteToken?: string | null /** * Use `appId` to identify package instead of `name`. */ readonly useAppIdAsId?: boolean } /** * AppX Options ([appx](#Config-appx)). * @see [Windows AppX docs](https://msdn.microsoft.com/en-us/library/windows/apps/br211453.aspx). */ export interface AppXOptions { /** * The background color of the app tile. * @see [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx). */ readonly backgroundColor?: string | null /** * @private */ readonly makeappxArgs?: Array | null /** * Describes the publisher information in a form `CN=your name exactly as in your cert`. The Publisher attribute must match the publisher subject information of the certificate used to sign a package. * By default will be extracted from code sign certificate. */ readonly publisher?: string | null /** * A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx). */ readonly displayName?: string | null /** * A friendly name for the publisher that can be displayed to users. Corresponds to [Properties.PublisherDisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211460.aspx). */ readonly publisherDisplayName?: string | null /** * Describes the contents of the package. The Name attribute is case-sensitive. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). */ readonly identityName?: string | null } } declare module "electron-builder/out/asar" { /// import { Stats } from "fs-extra-p" export class Node { files?: { [key: string]: Node } unpacked?: boolean size: number offset: number executable?: boolean link?: string } export class AsarFilesystem { readonly src: string readonly header: Node readonly headerSize: number private offset constructor(src: string, header?: Node, headerSize?: number) searchNodeFromDirectory(p: string): Node getOrCreateNode(p: string): Node insertDirectory(p: string, unpacked?: boolean): { [key: string]: Node } insertFileNode(node: Node, stat: Stats, file: string): void getNode(p: string): Node getFile(p: string, followLinks?: boolean): Node readJson(file: string): Promise readFile(file: string): Promise } export function readAsar(archive: string): Promise export function readAsarJson(archive: string, file: string): Promise } declare module "electron-builder/out/packagerApi" { /// import { Arch, Platform, SourceRepositoryInfo, Target } from "electron-builder-core" import { CancellationToken } from "electron-builder-http/out/CancellationToken" import { PublishConfiguration } from "electron-builder-http/out/publishOptions" import { TmpDir } from "electron-builder-util/out/tmp" import { AppInfo } from "electron-builder/out/appInfo" import { AfterPackContext, Config, Metadata } from "electron-builder/out/metadata" import { PlatformPackager } from "electron-builder/out/platformPackager" export interface PackagerOptions { targets?: Map>> projectDir?: string | null cscLink?: string | null cscKeyPassword?: string | null cscInstallerLink?: string | null cscInstallerKeyPassword?: string | null platformPackagerFactory?: ((info: BuildInfo, platform: Platform, cleanupTasks: Array<() => Promise>) => PlatformPackager) | null /** * @deprecated Use {@link PackagerOptions#config} instead. */ readonly devMetadata?: Metadata readonly config?: Config | string | null /** * The same as [application package.json](https://github.com/electron-userland/electron-builder/wiki/Options#AppMetadata). * * Application `package.json` will be still read, but options specified in this object will override. */ readonly appMetadata?: Metadata readonly effectiveOptionComputed?: (options: any) => Promise readonly extraMetadata?: any readonly prepackaged?: string } export interface BuildInfo { readonly options: PackagerOptions readonly metadata: Metadata readonly devMetadata: Metadata readonly config: Config readonly projectDir: string readonly appDir: string readonly electronVersion: string readonly muonVersion?: string | null readonly isTwoPackageJsonProjectLayoutUsed: boolean readonly appInfo: AppInfo readonly tempDirManager: TmpDir readonly repositoryInfo: Promise readonly isPrepackedAppAsar: boolean readonly prepackaged?: string | null readonly cancellationToken: CancellationToken dispatchArtifactCreated(event: ArtifactCreated): void afterPack(context: AfterPackContext): Promise } export interface ArtifactCreated { readonly packager: PlatformPackager readonly target: Target | null readonly arch: Arch | null readonly file?: string readonly data?: Buffer readonly safeArtifactName?: string readonly publishConfig?: PublishConfiguration } } declare module "electron-builder/out/fileTransformer" { import { FileTransformer } from "electron-builder-util/out/fs" import { BuildInfo } from "electron-builder/out/packagerApi" export function isElectronCompileUsed(info: BuildInfo): boolean export function createTransformer(srcDir: string, extraMetadata: any): Promise export interface CompilerHost { compile(file: string): any saveConfiguration(): Promise } export function createElectronCompilerHost(projectDir: string, cacheDir: string): Promise } declare module "electron-builder/out/asarUtil" { import { AsarOptions } from "electron-builder-core" import { FileTransformer, Filter } from "electron-builder-util/out/fs" export class AsarPackager { private readonly src private readonly options private readonly unpackPattern private readonly transformer private readonly fs private readonly outFile private transformedFiles private readonly metadata constructor(src: string, destination: string, options: AsarOptions, unpackPattern: Filter | null, transformer: FileTransformer) pack(filter: Filter, isElectronCompile: boolean): Promise compileUsingElectronCompile(files: Array): Promise> detectUnpackedDirs(files: Array, autoUnpackDirs: Set, unpackedDest: string): Promise createPackageFromFiles(files: Array): Promise private writeAsarFile(files) private order(filenames) } export function checkFileInArchive(asarFile: string, relativeFile: string, messagePrefix: string): Promise } declare module "electron-builder/out/util/filter" { import { Minimatch } from "minimatch" import { Filter } from "electron-builder-util/out/fs" export function hasMagic(pattern: Minimatch): boolean export function createFilter(src: string, patterns: Array, ignoreFiles?: Set, rawFilter?: (file: string) => boolean, excludePatterns?: Array | null): Filter } declare module "electron-builder/out/fileMatcher" { import { PlatformSpecificBuildOptions } from "electron-builder-core" import { Filter } from "electron-builder-util/out/fs" import { Minimatch } from "minimatch" import { Config } from "electron-builder/out/metadata" import { BuildInfo } from "electron-builder/out/packagerApi" export class FileMatcher { private readonly macroExpander readonly from: string readonly to: string readonly patterns: Array constructor(from: string, to: string, macroExpander: (pattern: string) => string, patterns?: Array | string | n) addPattern(pattern: string): void addAllPattern(): void isEmpty(): boolean containsOnlyIgnore(): boolean computeParsedPatterns(result: Array, fromDir?: string): void createFilter(ignoreFiles?: Set, rawFilter?: (file: string) => boolean, excludePatterns?: Array | n): Filter } export function createFileMatcher(info: BuildInfo, appDir: string, resourcesPath: string, macroExpander: (pattern: string) => string, platformSpecificBuildOptions: PlatformSpecificBuildOptions): FileMatcher export function getFileMatchers(config: Config, name: "files" | "extraFiles" | "extraResources" | "asarUnpack", defaultSrc: string, defaultDest: string, allowAdvancedMatching: boolean, macroExpander: (pattern: string) => string, customBuildOptions: PlatformSpecificBuildOptions): Array | null export function copyFiles(patterns: Array | null): Promise } declare module "electron-builder/out/packager/dirPackager" { import { PlatformPackager } from "electron-builder/out/platformPackager" export function unpackElectron(packager: PlatformPackager, out: string, platform: string, arch: string, version: string): Promise export function unpackMuon(packager: PlatformPackager, out: string, platform: string, arch: string, version: string): Promise } declare module "electron-builder/out/readInstalled" { export interface Dependency { name: string path: string extraneous: boolean optional: boolean dependencies: { [name: string]: Dependency } } export function readInstalled(folder: string): Promise> } declare module "electron-builder/out/platformPackager" { import { Arch, FileAssociation, Platform, PlatformSpecificBuildOptions, Target, TargetSpecificOptions } from "electron-builder-core" import { AppInfo } from "electron-builder/out/appInfo" import { Config } from "electron-builder/out/metadata" import { BuildInfo, PackagerOptions } from "electron-builder/out/packagerApi" export abstract class PlatformPackager { readonly info: BuildInfo readonly packagerOptions: PackagerOptions readonly projectDir: string readonly buildResourcesDir: string readonly config: Config readonly platformSpecificBuildOptions: DC readonly resourceList: Promise> private readonly _resourceList readonly abstract platform: Platform readonly appInfo: AppInfo constructor(info: BuildInfo) readonly abstract defaultTarget: Array protected prepareAppInfo(appInfo: AppInfo): AppInfo private static normalizePlatformSpecificBuildOptions(options) abstract createTargets(targets: Array, mapper: (name: string, factory: (outDir: string) => Target) => void, cleanupTasks: Array<() => Promise>): void protected getCscPassword(): string protected doGetCscPassword(): any readonly relativeBuildResourcesDirname: string protected computeAppOutDir(outDir: string, arch: Arch): string dispatchArtifactCreated(file: string, target: Target | null, arch: Arch | null, safeArtifactName?: string): void pack(outDir: string, arch: Arch, targets: Array, postAsyncTasks: Array>): Promise protected packageInDistributableFormat(appOutDir: string, arch: Arch, targets: Array, postAsyncTasks: Array>): void private getExtraFileMatchers(isResources, appOutDir, macroExpander, customBuildOptions) readonly electronDistMacOsAppName: string readonly electronDistExecutableName: string readonly electronDistMacOsExecutableName: string protected doPack(outDir: string, appOutDir: string, platformName: string, arch: Arch, platformSpecificBuildOptions: DC, targets: Array): Promise protected postInitApp(executableFile: string): Promise getIconPath(): Promise private computeAsarOptions(customBuildOptions) getResourcesDir(appOutDir: string): string getMacOsResourcesDir(appOutDir: string): string private checkFileInPackage(resourcesDir, file, messagePrefix, isAsar) private sanityCheckPackage(appOutDir, isAsar) expandArtifactNamePattern(targetSpecificOptions: TargetSpecificOptions | n, ext: string, arch?: Arch | null, defaultPattern?: string): string expandMacro(pattern: string, arch: Arch | n, extra?: any): string generateName(ext: string | null, arch: Arch, deployment: boolean, classifier?: string | null): string generateName2(ext: string | null, classifier: string | n, deployment: boolean): string getDefaultIcon(ext: string): Promise getTempFile(suffix: string): Promise readonly fileAssociations: Array getResource(custom: string | n, ...names: Array): Promise readonly forceCodeSigning: boolean } export function normalizeExt(ext: string): string } declare module "electron-builder/out/metadata" { import { Arch, AsarOptions, AuthorMetadata, BeforeBuildContext, CompressionLevel, FileAssociation, FilePattern, MetadataDirectories, PlatformSpecificBuildOptions, Protocol, RepositoryInfo, Target } from "electron-builder-core" import { Publish } from "electron-builder-http/out/publishOptions" import { DebOptions, LinuxBuildOptions, LinuxTargetSpecificOptions, SnapOptions } from "electron-builder/out/options/linuxOptions" import { DmgOptions, MacOptions, MasBuildOptions, PkgOptions } from "electron-builder/out/options/macOptions" import { AppXOptions, NsisOptions, NsisWebOptions, PortableOptions, SquirrelWindowsOptions, WinBuildOptions } from "electron-builder/out/options/winOptions" import { PlatformPackager } from "electron-builder/out/platformPackager" /** * Fields in the package.json * Some standard fields should be defined in the `package.json`. */ export interface Metadata { readonly repository?: string | RepositoryInfo | null readonly dependencies?: { [key: string]: string } readonly version?: string /** * The application name. * @required */ readonly name?: string readonly productName?: string | null /** * The application description. */ readonly description?: string readonly main?: string | null readonly author?: AuthorMetadata /** * The url to the project [homepage](https://docs.npmjs.com/files/package.json#homepage) (NuGet Package `projectUrl` (optional) or Linux Package URL (required)). * * If not specified and your project repository is public on GitHub, it will be `https://github.com/${user}/${project}` by default. */ readonly homepage?: string | null /** *linux-only.* The [license](https://docs.npmjs.com/files/package.json#license) name. */ readonly license?: string | null readonly build?: Config } /** * Configuration Options */ export interface Config extends PlatformSpecificBuildOptions { /** * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). * * Defaults to `com.electron.${name}`. It is strongly recommended that an explicit ID be set. */ readonly appId?: string | null /** * The human-readable copyright line for the app. Defaults to `Copyright © year author`. */ readonly copyright?: string | null /** * As [name](#AppMetadata-name), but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the [name property](https://docs.npmjs.com/files/package.json#name}). */ readonly productName?: string | null /** * A [glob patterns](https://www.npmjs.com/package/glob#glob-primer) relative to the [app directory](#MetadataDirectories-app), which specifies which files to include when copying files to create the package. * @see [File Patterns](#file-patterns). */ readonly files?: Array | string | null /** * A [glob patterns](https://www.npmjs.com/package/glob#glob-primer) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux/Windows). * * Glob rules the same as for [files](#multiple-glob-patterns). */ readonly extraResources?: Array | FilePattern | string | null /** * The same as [extraResources](#Config-extraResources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux/Windows). */ readonly extraFiles?: Array | FilePattern | string | null /** * Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/). * * Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#Config-asarUnpack) - please file issue if this doesn't work. * @default true */ readonly asar?: AsarOptions | boolean | null /** * A [glob patterns](https://www.npmjs.com/package/glob#glob-primer) relative to the [app directory](#MetadataDirectories-app), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive. */ readonly asarUnpack?: Array | string | null /** * File associations. */ readonly fileAssociations?: Array | FileAssociation /** * URL protocol schemes. */ readonly protocols?: Array | Protocol /** * The compression level. If you want to rapidly test build, `store` can reduce build time significantly. * @default normal */ readonly compression?: CompressionLevel | null /** * *programmatic API only* The function to be run after pack (but before pack into distributable format and sign). Promise must be returned. */ readonly afterPack?: (context: AfterPackContext) => Promise | null /** * *programmatic API only* The function to be run before dependencies are installed or rebuilt. Works when `npmRebuild` is set to `true`. Promise must be returned. Resolving to `false` will skip dependencies install or rebuild. */ readonly beforeBuild?: (context: BeforeBuildContext) => Promise | null /** * Whether to [rebuild](https://docs.npmjs.com/cli/rebuild) native dependencies (`npm rebuild`) before starting to package the app. * @default true */ readonly npmRebuild?: boolean /** * Whether to omit using [--build-from-source](https://github.com/mapbox/node-pre-gyp#options) flag when installing app native deps. * @default false */ readonly npmSkipBuildFromSource?: boolean /** * Additional command line arguments to use when installing app native deps. */ readonly npmArgs?: Array | string | null /** * Whether to execute `node-gyp rebuild` before starting to package the app. * @default false */ readonly nodeGypRebuild?: boolean /** * The path to custom Electron build (e.g. `~/electron/out/R`). Only macOS supported, file issue if need for Linux or Windows. */ readonly electronDist?: string /** * The [electron-download](https://github.com/electron-userland/electron-download#usage) options. */ readonly electronDownload?: any /** * Array of option objects. Order is important — first item will be used as a default auto-update server. * @see [Publish options](https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#publish-options). */ readonly publish?: Publish /** * Whether to fail if application will be not signed (to prevent unsigned app if code signing configuration is not correct). * @default false */ readonly forceCodeSigning?: boolean readonly directories?: MetadataDirectories | null /** * The version of electron you are packaging for. Defaults to version of `electron`, `electron-prebuilt` or `electron-prebuilt-compile` dependency. */ readonly electronVersion?: string | null /** * The version of muon you are packaging for. */ readonly muonVersion?: string | null /** * The [artifact file name pattern](https://github.com/electron-userland/electron-builder/wiki/Options#artifact-file-name-pattern). Defaults to `${productName}-${version}.${ext}` (some target can have another defaults, see corresponding options). * * Currently supported only for `mas`, `pkg`, `dmg` and `nsis`. */ readonly artifactName?: string | null /** * The build version. Maps to the `CFBundleVersion` on macOS, and `FileVersion` metadata property on Windows. Defaults to the `version`. * If `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_NUMBER` or `bamboo.buildNumber` env defined, it will be used as a build version (`version.build_number`). */ readonly buildVersion?: string | null /** * Whether to use [electron-compile](http://github.com/electron/electron-compile) to compile app. Defaults to `true` if `electron-compile` in the dependencies. And `false` if in the `devDependencies` or doesn't specified. */ readonly electronCompile?: boolean readonly mac?: MacOptions | null readonly mas?: MasBuildOptions | null readonly dmg?: DmgOptions | null readonly pkg?: PkgOptions | null readonly win?: WinBuildOptions | null readonly nsis?: NsisOptions | null readonly nsisWeb?: NsisWebOptions | null readonly portable?: PortableOptions | null readonly appx?: AppXOptions | null readonly squirrelWindows?: SquirrelWindowsOptions | null readonly linux?: LinuxBuildOptions | null readonly deb?: DebOptions | null readonly snap?: SnapOptions | null readonly appimage?: LinuxTargetSpecificOptions | null readonly pacman?: LinuxTargetSpecificOptions | null readonly rpm?: LinuxTargetSpecificOptions | null readonly freebsd?: LinuxTargetSpecificOptions | null readonly p5p?: LinuxTargetSpecificOptions | null readonly apk?: LinuxTargetSpecificOptions | null /** * @private */ readonly icon?: string | null } export interface AfterPackContext { readonly appOutDir: string readonly packager: PlatformPackager readonly electronPlatformName: string readonly arch: Arch readonly targets: Array } } declare module "electron-builder/out/appInfo" { import { Metadata } from "electron-builder/out/metadata" import { BuildInfo } from "electron-builder/out/packagerApi" export class AppInfo { readonly metadata: Metadata private readonly info readonly description: string readonly version: string readonly buildNumber: string readonly buildVersion: string readonly productName: string readonly productFilename: string private readonly config constructor(metadata: Metadata, info: BuildInfo, buildVersion?: string | null) readonly versionInWeirdWindowsForm: string readonly companyName: string readonly id: string readonly name: string readonly copyright: string computePackageUrl(): Promise } } declare module "electron-builder/out/codeSign" { import { TmpDir } from "electron-builder-util/out/tmp" export const appleCertificatePrefixes: string[] export type CertType = "Developer ID Application" | "Developer ID Installer" | "3rd Party Mac Developer Application" | "3rd Party Mac Developer Installer" | "Mac Developer" export interface CodeSigningInfo { keychainName?: string | null } export function downloadCertificate(urlOrBase64: string, tmpDir: TmpDir): Promise export function createKeychain(tmpDir: TmpDir, cscLink: string, cscKeyPassword: string, cscILink?: string | null, cscIKeyPassword?: string | null): Promise export function sign(path: string, name: string, keychain: string): Promise export let findIdentityRawResult: Promise> | null export function findIdentity(certType: CertType, qualifier?: string | null, keychain?: string | null): Promise } declare module "electron-builder/out/targets/dmg" { import { Arch, Target } from "electron-builder-core" import { DmgOptions, MacOptions } from "electron-builder/out/options/macOptions" import { PlatformPackager } from "electron-builder/out/platformPackager" export class DmgTarget extends Target { private readonly packager readonly outDir: string readonly options: DmgOptions | null | undefined private helperDir constructor(packager: PlatformPackager, outDir: string) build(appPath: string, arch: Arch): Promise computeVolumeName(custom?: string | null): string computeDmgOptions(): Promise } export function attachAndExecute(dmgPath: string, readWrite: boolean, task: () => Promise): Promise } declare module "electron-builder/out/packager/mac" { import { PlatformPackager } from "electron-builder/out/platformPackager" export function filterCFBundleIdentifier(identifier: string): string export function createApp(packager: PlatformPackager, appOutDir: string): Promise } declare module "electron-builder/out/targets/pkg" { import { Arch, Target } from "electron-builder-core" import MacPackager from "electron-builder/out/macPackager" import { PkgOptions } from "electron-builder/out/options/macOptions" export class PkgTarget extends Target { private readonly packager readonly outDir: string readonly options: PkgOptions private readonly installLocation constructor(packager: MacPackager, outDir: string) build(appPath: string, arch: Arch): Promise private buildComponentPackage(appPath, outFile) } export function prepareProductBuildArgs(identity: string | n, keychain: string | n): string[] } declare module "electron-builder/out/targets/archive" { import { CompressionLevel } from "electron-builder-core" export function tar(compression: CompressionLevel | n, format: string, outFile: string, dirToArchive: string, isMacApp?: boolean): Promise export function archive(compression: CompressionLevel | n, format: string, outFile: string, dirToArchive: string, withoutDir?: boolean): Promise } declare module "electron-builder/out/targets/ArchiveTarget" { import { Arch, Target } from "electron-builder-core" import { PlatformPackager } from "electron-builder/out/platformPackager" export class ArchiveTarget extends Target { readonly outDir: string private readonly packager readonly options: any constructor(name: string, outDir: string, packager: PlatformPackager) build(appOutDir: string, arch: Arch): Promise } } declare module "electron-builder/out/targets/targetFactory" { import { Arch, Platform, PlatformSpecificBuildOptions, Target } from "electron-builder-core" import { PlatformPackager } from "electron-builder/out/platformPackager" export function computeArchToTargetNamesMap(raw: Map, options: PlatformSpecificBuildOptions, platform: Platform): Map export function createTargets(nameToTarget: Map, rawList: Array, outDir: string, packager: PlatformPackager, cleanupTasks: Array<() => Promise>): Array export function createCommonTarget(target: string, outDir: string, packager: PlatformPackager): Target export class NoOpTarget extends Target { readonly options: null constructor(name: string) readonly outDir: string build(appOutDir: string, arch: Arch): Promise } } declare module "electron-builder/out/macPackager" { import { Arch, Platform, Target } from "electron-builder-core" import { SignOptions } from "electron-osx-sign" import { AppInfo } from "electron-builder/out/appInfo" import { CodeSigningInfo } from "electron-builder/out/codeSign" import { MacOptions } from "electron-builder/out/options/macOptions" import { BuildInfo } from "electron-builder/out/packagerApi" import { PlatformPackager } from "electron-builder/out/platformPackager" export default class MacPackager extends PlatformPackager { readonly codeSigningInfo: Promise constructor(info: BuildInfo) readonly defaultTarget: Array protected prepareAppInfo(appInfo: AppInfo): AppInfo getIconPath(): Promise createTargets(targets: Array, mapper: (name: string, factory: (outDir: string) => Target) => void, cleanupTasks: Array<() => Promise>): void readonly platform: Platform pack(outDir: string, arch: Arch, targets: Array, postAsyncTasks: Array>): Promise private sign(appPath, outDir, masOptions) protected doSign(opts: SignOptions): Promise protected doFlat(appPath: string, outFile: string, identity: string, keychain: string | n): Promise } } declare module "electron-builder/out/repositoryInfo" { import { Info } from "hosted-git-info" import { Metadata } from "electron-builder/out/metadata" export interface RepositorySlug { user: string project: string } export function getRepositoryInfo(projectDir: string, metadata?: Metadata, devMetadata?: Metadata): Promise } declare module "electron-builder/out/util/readPackageJson" { import { Config } from "electron-builder/out/metadata" export function readPackageJson(file: string): Promise export function doLoadConfig(configFile: string, projectDir: string): Promise export function loadConfig(projectDir: string): Promise export function getElectronVersion(config: Config | null | undefined, projectDir: string, projectMetadata?: any | null): Promise export function validateConfig(config: Config): Promise } declare module "electron-builder/out/windowsCodeSign" { import { WinBuildOptions } from "electron-builder/out/options/winOptions" export function getSignVendorPath(): Promise export interface FileCodeSigningInfo { readonly file?: string | null readonly password?: string | null readonly subjectName?: string | null readonly certificateSha1?: string | null } export interface SignOptions { readonly path: string readonly cert?: string | null readonly name?: string | null readonly password?: string | null readonly site?: string | null readonly options: WinBuildOptions } export function sign(options: SignOptions): Promise export function getToolPath(): Promise } declare module "electron-builder/out/targets/appx" { import { Arch, Target } from "electron-builder-core" import { AppXOptions } from "electron-builder/out/options/winOptions" import { WinPackager } from "electron-builder/out/winPackager" export default class AppXTarget extends Target { private readonly packager readonly outDir: string readonly options: AppXOptions constructor(packager: WinPackager, outDir: string) build(appOutDir: string, arch: Arch): Promise private writeManifest(templatePath, preAppx, safeName, arch, publisher) } } declare module "electron-builder/out/targets/nsis" { import { Arch, Target } from "electron-builder-core" import { NsisOptions } from "electron-builder/out/options/winOptions" import { WinPackager } from "electron-builder/out/winPackager" export class AppPackageHelper { private readonly archToFileInfo private readonly infoToIsDelete /** @private */ refCount: number packArch(arch: Arch, target: NsisTarget): Promise finishBuild(): Promise } export class NsisTarget extends Target { protected readonly packager: WinPackager readonly outDir: string protected readonly packageHelper: AppPackageHelper readonly options: NsisOptions /** @private */ readonly archs: Map private readonly nsisTemplatesDir constructor(packager: WinPackager, outDir: string, targetName: string, packageHelper: AppPackageHelper) build(appOutDir: string, arch: Arch): Promise /** @private */ buildAppPackage(appOutDir: string, arch: Arch): Promise finishBuild(): Promise protected readonly installerFilenamePattern: string private readonly isPortable private buildInstaller() protected generateGitHubInstallerName(): string private readonly isUnicodeEnabled readonly isWebInstaller: boolean private computeScriptAndSignUninstaller(defines, commands, installerPath) private computeVersionKey() protected configureDefines(oneClick: boolean, defines: any): Promise private configureDefinesForAllTypeOfInstaller(defines) private executeMakensis(defines, commands, script) private writeCustomLangFile(data) private computeFinalScript(originalScript, isInstaller) private computeLicensePage() } } declare module "electron-builder/out/publish/PublishManager" { import { Arch, PlatformSpecificBuildOptions } from "electron-builder-core" import { CancellationToken } from "electron-builder-http/out/CancellationToken" import { PublishConfiguration } from "electron-builder-http/out/publishOptions" import { PublishContext, Publisher, PublishOptions } from "electron-publish" import { MultiProgress } from "electron-publish/out/multiProgress" import { Packager } from "electron-builder/out/packager" import { BuildInfo } from "electron-builder/out/packagerApi" import { PlatformPackager } from "electron-builder/out/platformPackager" export class PublishManager implements PublishContext { private readonly publishOptions readonly cancellationToken: CancellationToken private readonly nameToPublisher readonly publishTasks: Array> private readonly errors private isPublish readonly progress: MultiProgress | null constructor(packager: Packager, publishOptions: PublishOptions, cancellationToken: CancellationToken) private artifactCreated(event) private addTask(promise) getOrCreatePublisher(publishConfig: PublishConfiguration, buildInfo: BuildInfo): Publisher | null cancelTasks(): void awaitTasks(): Promise } export function getPublishConfigsForUpdateInfo(packager: PlatformPackager, publishConfigs: Array | null, arch: Arch | null): Promise | null> export function createPublisher(context: PublishContext, version: string, publishConfig: PublishConfiguration, options: PublishOptions): Publisher | null export function computeDownloadUrl(publishConfig: PublishConfiguration, fileName: string | null, packager: PlatformPackager): string export function getPublishConfigs(packager: PlatformPackager, targetSpecificOptions: PlatformSpecificBuildOptions | null | undefined, arch: Arch | null): Promise | null> } declare module "electron-builder/out/targets/WebInstallerTarget" { import { WinPackager } from "electron-builder/out/winPackager" import { AppPackageHelper, NsisTarget } from "electron-builder/out/targets/nsis" export class WebInstallerTarget extends NsisTarget { constructor(packager: WinPackager, outDir: string, targetName: string, packageHelper: AppPackageHelper) readonly isWebInstaller: boolean protected configureDefines(oneClick: boolean, defines: any): Promise protected readonly installerFilenamePattern: string protected generateGitHubInstallerName(): string } } declare module "electron-builder/out/winPackager" { import { Platform, Target } from "electron-builder-core" import { Lazy } from "electron-builder-util" import { WinBuildOptions } from "electron-builder/out/options/winOptions" import { BuildInfo } from "electron-builder/out/packagerApi" import { PlatformPackager } from "electron-builder/out/platformPackager" import { FileCodeSigningInfo, SignOptions } from "electron-builder/out/windowsCodeSign" export class WinPackager extends PlatformPackager { readonly cscInfo: Lazy private iconPath readonly computedPublisherName: Lazy constructor(info: BuildInfo) readonly defaultTarget: Array protected doGetCscPassword(): string createTargets(targets: Array, mapper: (name: string, factory: (outDir: string) => Target) => void, cleanupTasks: Array<() => Promise>): void readonly platform: Platform getIconPath(): Promise private getValidIconPath() sign(file: string, logMessagePrefix?: string): Promise protected doSign(options: SignOptions): Promise signAndEditResources(file: string): Promise protected postInitApp(appOutDir: string): Promise } } declare module "electron-builder/out/yarn" { import { Config } from "electron-builder/out/metadata" export function installOrRebuild(config: Config, appDir: string, frameworkInfo: DesktopFrameworkInfo, platform: string, arch: string, forceInstall?: boolean): Promise export interface DesktopFrameworkInfo { version: string useCustomDist: boolean } export function getGypEnv(frameworkInfo: DesktopFrameworkInfo, platform: string, arch: string, buildFromSource: boolean): any export function rebuild(appDir: string, frameworkInfo: DesktopFrameworkInfo, platform: string | undefined, arch: string | undefined, additionalArgs: Array, buildFromSource: boolean): Promise } declare module "electron-builder/out/packager" { /// import { Platform, SourceRepositoryInfo, Target } from "electron-builder-core" import { CancellationToken } from "electron-builder-http/out/CancellationToken" import { TmpDir } from "electron-builder-util/out/tmp" import { EventEmitter } from "events" import { AppInfo } from "electron-builder/out/appInfo" import { AfterPackContext, Config, Metadata } from "electron-builder/out/metadata" import { ArtifactCreated, BuildInfo, PackagerOptions } from "electron-builder/out/packagerApi" export class Packager implements BuildInfo { readonly options: PackagerOptions readonly cancellationToken: CancellationToken readonly projectDir: string appDir: string metadata: Metadata private _isPrepackedAppAsar readonly isPrepackedAppAsar: boolean devMetadata: Metadata private _config readonly config: Config isTwoPackageJsonProjectLayoutUsed: boolean electronVersion: string muonVersion?: string | null readonly eventEmitter: EventEmitter appInfo: AppInfo readonly tempDirManager: TmpDir private _repositoryInfo private readonly afterPackHandlers readonly repositoryInfo: Promise readonly prepackaged?: string | null constructor(options: PackagerOptions, cancellationToken: CancellationToken) addAfterPackHandler(handler: (context: AfterPackContext) => Promise | null): void artifactCreated(handler: (event: ArtifactCreated) => void): Packager dispatchArtifactCreated(event: ArtifactCreated): void build(): Promise private readProjectMetadata(appPackageFile, extraMetadata) private doBuild(outDir, cleanupTasks) private createHelper(platform, cleanupTasks) private checkMetadata(appPackageFile, devAppPackageFile) private installAppDependencies(platform, arch) afterPack(context: AfterPackContext): Promise } export function normalizePlatforms(rawPlatforms: Array | string | Platform | n): Array /** * @private */ export function checkWineVersion(checkPromise: Promise): Promise export interface BuildResult { readonly outDir: string readonly platformToTargets: Map> } } declare module "electron-builder/out/builder" { import { Arch, Platform } from "electron-builder-core" import { PublishOptions } from "electron-publish" import { PackagerOptions } from "electron-builder/out/packagerApi" export interface BuildOptions extends PackagerOptions, PublishOptions { } export interface CliOptions extends PackagerOptions, PublishOptions { mac?: Array linux?: Array win?: Array arch?: string x64?: boolean ia32?: boolean armv7l?: boolean dir?: boolean platform?: string project?: string } export function normalizeOptions(args: CliOptions): BuildOptions export function createTargets(platforms: Array, type?: string | null, arch?: string | null): Map>> export function build(rawOptions?: CliOptions): Promise> } declare module "electron-builder/out/errorMessages" { export const authorEmailIsMissed: string } declare module "electron-builder/out/forge/forge-maker" { import { CliOptions } from "electron-builder/out/builder" export function buildForge(appDir: string, options: CliOptions): Promise } declare module "electron-builder" { export { Packager, BuildResult } from "electron-builder/out/packager" export { PackagerOptions, ArtifactCreated, BuildInfo } from "electron-builder/out/packagerApi" export { getArchSuffix, Platform, Arch, archFromString, Target, DIR_TARGET } from "electron-builder-core" export { BuildOptions, build, CliOptions, createTargets } from "electron-builder/out/builder" export { Metadata, Config, AfterPackContext } from "electron-builder/out/metadata" export { MacOptions, DmgOptions, MasBuildOptions, MacOsTargetName, PkgOptions, DmgContent, DmgWindow } from "electron-builder/out/options/macOptions" export { WinBuildOptions, NsisOptions, SquirrelWindowsOptions, AppXOptions, NsisWebOptions, PortableOptions } from "electron-builder/out/options/winOptions" export { LinuxBuildOptions, DebOptions, SnapOptions } from "electron-builder/out/options/linuxOptions" export { buildForge } from "electron-builder/out/forge/forge-maker" } declare module "electron-builder/out/targets/LinuxTargetHelper" { import { LinuxPackager } from "electron-builder/out/linuxPackager" import { LinuxBuildOptions, LinuxTargetSpecificOptions } from "electron-builder/out/options/linuxOptions" export const installPrefix = "/opt" export class LinuxTargetHelper { private packager readonly icons: Promise>> maxIconPath: string | null constructor(packager: LinuxPackager) private computeDesktopIcons() private iconsFromDir(iconDir) private getIcns() getDescription(options: LinuxBuildOptions): string computeDesktopEntry(targetSpecificOptions: LinuxTargetSpecificOptions, exec?: string, destination?: string | null, extra?: { [key: string]: string }): Promise private createFromIcns(tempDir) private createMappings(tempDir) } } declare module "electron-builder/out/targets/appImage" { import { Arch, Target } from "electron-builder-core" import { LinuxPackager } from "electron-builder/out/linuxPackager" import { LinuxBuildOptions } from "electron-builder/out/options/linuxOptions" import { LinuxTargetHelper } from "electron-builder/out/targets/LinuxTargetHelper" export default class AppImageTarget extends Target { private readonly packager private readonly helper readonly outDir: string readonly options: LinuxBuildOptions private readonly desktopEntry constructor(ignored: string, packager: LinuxPackager, helper: LinuxTargetHelper, outDir: string) build(appOutDir: string, arch: Arch): Promise } } declare module "electron-builder/out/targets/fpm" { import { Arch, Target } from "electron-builder-core" import { LinuxPackager } from "electron-builder/out/linuxPackager" import { LinuxTargetSpecificOptions } from "electron-builder/out/options/linuxOptions" import { LinuxTargetHelper } from "electron-builder/out/targets/LinuxTargetHelper" export default class FpmTarget extends Target { private readonly packager private readonly helper readonly outDir: string readonly options: LinuxTargetSpecificOptions private readonly scriptFiles constructor(name: string, packager: LinuxPackager, helper: LinuxTargetHelper, outDir: string) private createScripts() build(appOutDir: string, arch: Arch): Promise } } declare module "electron-builder/out/targets/snap" { import { Arch, Target } from "electron-builder-core" import { LinuxPackager } from "electron-builder/out/linuxPackager" import { SnapOptions } from "electron-builder/out/options/linuxOptions" import { LinuxTargetHelper } from "electron-builder/out/targets/LinuxTargetHelper" export default class SnapTarget extends Target { private readonly packager private readonly helper readonly outDir: string readonly options: SnapOptions constructor(name: string, packager: LinuxPackager, helper: LinuxTargetHelper, outDir: string) build(appOutDir: string, arch: Arch): Promise } } declare module "electron-builder/out/linuxPackager" { import { Platform, Target } from "electron-builder-core" import { LinuxBuildOptions } from "electron-builder/out/options/linuxOptions" import { BuildInfo } from "electron-builder/out/packagerApi" import { PlatformPackager } from "electron-builder/out/platformPackager" export class LinuxPackager extends PlatformPackager { readonly executableName: string constructor(info: BuildInfo) readonly defaultTarget: Array createTargets(targets: Array, mapper: (name: string, factory: (outDir: string) => Target) => void, cleanupTasks: Array<() => Promise>): void readonly platform: Platform protected postInitApp(appOutDir: string): Promise } } declare module "electron-builder/out/cli/cliOptions" { export function createYargs(): any }