UNPKG

2.45 kBTypeScriptView Raw
1import { Arch } from "builder-util";
2import { CancellationToken, PublishConfiguration, PublishProvider } from "builder-util-runtime";
3import { PublishContext, Publisher, PublishOptions, UploadTask } from "electron-publish";
4import { MultiProgress } from "electron-publish/out/multiProgress";
5import { AppInfo, PlatformSpecificBuildOptions } from "../index";
6import { Packager } from "../packager";
7import { PlatformPackager } from "../platformPackager";
8export declare class PublishManager implements PublishContext {
9 private readonly packager;
10 private readonly publishOptions;
11 readonly cancellationToken: CancellationToken;
12 private readonly nameToPublisher;
13 private readonly taskManager;
14 readonly isPublish: boolean;
15 readonly progress: MultiProgress | null;
16 private readonly updateFileWriteTask;
17 constructor(packager: Packager, publishOptions: PublishOptions, cancellationToken?: CancellationToken);
18 private getAppInfo;
19 getGlobalPublishConfigurations(): Promise<Array<PublishConfiguration> | null>;
20 scheduleUpload(publishConfig: PublishConfiguration, event: UploadTask, appInfo: AppInfo): void;
21 private artifactCreatedWithoutExplicitPublishConfig;
22 private getOrCreatePublisher;
23 cancelTasks(): void;
24 awaitTasks(): Promise<void>;
25}
26export declare function getAppUpdatePublishConfiguration(packager: PlatformPackager<any>, arch: Arch, errorIfCannot: boolean): Promise<{
27 updaterCacheDirName: string;
28 provider: PublishProvider;
29 publisherName?: Array<string> | null;
30 publishAutoUpdate?: boolean;
31 requestHeaders?: import("http").OutgoingHttpHeaders;
32 timeout?: number | null;
33} | null>;
34export declare function getPublishConfigsForUpdateInfo(packager: PlatformPackager<any>, publishConfigs: Array<PublishConfiguration> | null, arch: Arch | null): Promise<Array<PublishConfiguration> | null>;
35export declare function createPublisher(context: PublishContext, version: string, publishConfig: PublishConfiguration, options: PublishOptions, packager: Packager): Publisher | null;
36export declare function computeDownloadUrl(publishConfiguration: PublishConfiguration, fileName: string | null, packager: PlatformPackager<any>): string;
37export declare function getPublishConfigs(platformPackager: PlatformPackager<any>, targetSpecificOptions: PlatformSpecificBuildOptions | null | undefined, arch: Arch | null, errorIfCannot: boolean): Promise<Array<PublishConfiguration> | null>;