UNPKG

1.61 kBTypeScriptView Raw
1import { FileTransformer } from "builder-util/out/fs";
2import { AsarIntegrity } from "./asar/integrity";
3import { Platform, PlatformPackager, ElectronPlatformName, AfterPackContext } from "./index";
4export interface Framework {
5 readonly name: string;
6 readonly version: string;
7 readonly distMacOsAppName: string;
8 readonly macOsDefaultTargets: Array<string>;
9 readonly defaultAppIdPrefix: string;
10 readonly isNpmRebuildRequired: boolean;
11 readonly isCopyElevateHelper: boolean;
12 getDefaultIcon?(platform: Platform): string | null;
13 getMainFile?(platform: Platform): string | null;
14 getExcludedDependencies?(platform: Platform): Array<string> | null;
15 prepareApplicationStageDirectory(options: PrepareApplicationStageDirectoryOptions): Promise<any>;
16 beforeCopyExtraFiles?(options: BeforeCopyExtraFilesOptions): Promise<any>;
17 afterPack?(context: AfterPackContext): Promise<any>;
18 createTransformer?(): FileTransformer | null;
19}
20export interface BeforeCopyExtraFilesOptions {
21 packager: PlatformPackager<any>;
22 appOutDir: string;
23 asarIntegrity: AsarIntegrity | null;
24 platformName: string;
25}
26export interface PrepareApplicationStageDirectoryOptions {
27 readonly packager: PlatformPackager<any>;
28 /**
29 * Platform doesn't process application output directory in any way. Unpack implementation must create or empty dir if need.
30 */
31 readonly appOutDir: string;
32 readonly platformName: ElectronPlatformName;
33 readonly arch: string;
34 readonly version: string;
35}
36export declare function isElectronBased(framework: Framework): boolean;