UNPKG

2.08 kBTypeScriptView Raw
1import { Arch, AsyncTaskManager } from "builder-util";
2import { SignOptions } from "@electron/osx-sign/dist/cjs/types";
3import { AppInfo } from "./appInfo";
4import { CodeSigningInfo, CreateKeychainOptions, Identity } from "./codeSign/macCodeSign";
5import { Target } from "./core";
6import { AfterPackContext, ElectronPlatformName } from "./index";
7import { MacConfiguration } from "./options/macOptions";
8import { Packager } from "./packager";
9import { PlatformPackager } from "./platformPackager";
10import { MemoLazy } from "builder-util-runtime";
11export type CustomMacSignOptions = SignOptions;
12export type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>;
13export declare class MacPackager extends PlatformPackager<MacConfiguration> {
14 readonly codeSigningInfo: MemoLazy<CreateKeychainOptions | null, CodeSigningInfo>;
15 private _iconPath;
16 constructor(info: Packager);
17 get defaultTarget(): Array<string>;
18 protected prepareAppInfo(appInfo: AppInfo): AppInfo;
19 getIconPath(): Promise<string | null>;
20 createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void;
21 protected doPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: MacConfiguration, targets: Array<Target>): Promise<any>;
22 pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void>;
23 private sign;
24 private getOptionsForFile;
25 protected doSign(opts: SignOptions, customSignOptions: MacConfiguration): Promise<void>;
26 protected doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | null | undefined): Promise<any>;
27 getElectronSrcDir(dist: string): string;
28 getElectronDestinationDir(appOutDir: string): string;
29 applyCommonInfo(appPlist: any, contentsPath: string): Promise<void>;
30 protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean>;
31 private notarizeIfProvided;
32 private getNotarizeOptions;
33}