import { AfterPackContext } from 'electron-builder'; import { Privileges } from 'electron'; declare type UserConfigExport = UserConfig; declare interface UserConfig { /** * encryption key */ key?: string; /** * renderer protocol scheme * @default 'myclient' */ protocol?: string; /** * electron custom schemes to be registered with options. * @default * {standard: true, secure: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true} */ privileges?: Privileges; /** * Don't call registerSchemesAsPrivileged * @default false */ noRegisterSchemes?: boolean; /** * preload.js directory, with the program execution directory as the root node * @default preload.js */ preload?: string | string[]; renderer?: { /** * renderer entry directory, with the program execution directory as the root node * @default 'renderer' */ entry: string; /** * The encrypted storage path of the rendering process, with the program execution directory as the root node * @default 'resources/renderer.pkg' */ output: string; }; /** * Synchronously detect whether the program has been tampered with when starting the app */ syncValidationChanges?: boolean; /** * Automatically run the renderer process after the main process is started * @default true */ autoRunRenderer?: boolean; } declare function defineConfig(arg: UserConfigExport): Required; declare function export_default(context: AfterPackContext): Promise; interface BeforeRePackAsarContext { tempAppDir: string; } interface RunOptions { beforeRePackAsar?: (context: BeforeRePackAsarContext) => Promise; } /** * 在打包成exe之前做点什么 */ declare function run(context: AfterPackContext, options?: RunOptions): Promise; export { type BeforeRePackAsarContext, type RunOptions, export_default as default, defineConfig, run };