UNPKG

2.37 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Arch } from "builder-util";
3import { CancellationToken, PublishConfiguration, PublishProvider } from "builder-util-runtime";
4import { PublishContext, Publisher, PublishOptions } from "electron-publish";
5import { MultiProgress } from "electron-publish/out/multiProgress";
6import { PlatformSpecificBuildOptions } from "../index";
7import { Packager } from "../packager";
8import { PlatformPackager } from "../platformPackager";
9export declare class PublishManager implements PublishContext {
10 private readonly packager;
11 private readonly publishOptions;
12 readonly cancellationToken: CancellationToken;
13 private readonly nameToPublisher;
14 private readonly taskManager;
15 readonly isPublish: boolean;
16 readonly progress: MultiProgress | null;
17 private readonly updateFileWriteTask;
18 constructor(packager: Packager, publishOptions: PublishOptions, cancellationToken?: CancellationToken);
19 private getAppInfo;
20 getGlobalPublishConfigurations(): Promise<Array<PublishConfiguration> | null>;
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?: string[] | null | undefined;
30 publishAutoUpdate?: boolean | undefined;
31 requestHeaders?: import("http").OutgoingHttpHeaders | undefined;
32} | null>;
33export declare function getPublishConfigsForUpdateInfo(packager: PlatformPackager<any>, publishConfigs: Array<PublishConfiguration> | null, arch: Arch | null): Promise<Array<PublishConfiguration> | null>;
34export declare function createPublisher(context: PublishContext, version: string, publishConfig: PublishConfiguration, options: PublishOptions, packager: Packager): Publisher | null;
35export declare function computeDownloadUrl(publishConfiguration: PublishConfiguration, fileName: string | null, packager: PlatformPackager<any>): string;
36export declare function getPublishConfigs(platformPackager: PlatformPackager<any>, targetSpecificOptions: PlatformSpecificBuildOptions | null | undefined, arch: Arch | null, errorIfCannot: boolean): Promise<Array<PublishConfiguration> | null>;