electron-publish

  • Version 26.15.3
  • Published
  • 223 kB
  • 9 dependencies
  • MIT license

Install

npm i electron-publish
yarn add electron-publish
pnpm add electron-publish

Overview

Overview not available.

Index

Functions

function getCiTag

getCiTag: () => string | null;

    function resolveSnapCredentials

    resolveSnapCredentials: (
    cscLink: string | undefined,
    resourcesDir: string | undefined
    ) => Promise<Record<string, string>>;

      Classes

      class BitbucketPublisher

      class BitbucketPublisher extends HttpPublisher {}

        constructor

        constructor(context: PublishContext, info: BitbucketOptions);

          property hostname

          readonly hostname: string;

            property providerName

            readonly providerName: string;

              method convertAppPassword

              static convertAppPassword: (username: string, token: string) => string;

                method deleteRelease

                deleteRelease: (filename: string) => Promise<void>;

                  method doUpload

                  protected doUpload: (
                  fileName: string,
                  _arch: Arch,
                  _dataLength: number,
                  _requestProcessor: (
                  request: ClientRequest,
                  reject: (error: Error) => void
                  ) => void,
                  file: string
                  ) => Promise<any>;

                    method toString

                    toString: () => string;

                      class GitHubPublisher

                      class GitHubPublisher extends HttpPublisher {}

                        constructor

                        constructor(
                        context: PublishContext,
                        info: GithubOptions,
                        version: string,
                        options?: PublishOptions,
                        releaseBody?: string,
                        releaseName?: string
                        );

                          property providerName

                          readonly providerName: string;

                            method deleteRelease

                            deleteRelease: () => Promise<any>;

                              method doUpload

                              protected doUpload: (
                              fileName: string,
                              arch: Arch,
                              dataLength: number,
                              requestProcessor: (
                              request: ClientRequest,
                              reject: (error: Error) => void
                              ) => void
                              ) => Promise<any>;

                                method getRelease

                                getRelease: () => Promise<any>;

                                  method toString

                                  toString: () => string;

                                    class GitlabPublisher

                                    class GitlabPublisher extends HttpPublisher {}

                                      constructor

                                      constructor(
                                      context: PublishContext,
                                      info: GitlabOptions,
                                      version: string,
                                      releaseBody?: string,
                                      releaseName?: string
                                      );

                                        property providerName

                                        readonly providerName: string;

                                          method doUpload

                                          protected doUpload: (
                                          fileName: string,
                                          arch: Arch,
                                          dataLength: number,
                                          requestProcessor: RequestProcessor,
                                          filePath: string
                                          ) => Promise<any>;

                                            method toString

                                            toString: () => string;

                                              class HttpPublisher

                                              abstract class HttpPublisher extends Publisher {}

                                                constructor

                                                protected constructor(context: PublishContext, useSafeArtifactName?: boolean);

                                                  property context

                                                  protected readonly context: PublishContext;

                                                    method doUpload

                                                    protected abstract doUpload: (
                                                    fileName: string,
                                                    arch: Arch,
                                                    dataLength: number,
                                                    requestProcessor: (
                                                    request: ClientRequest,
                                                    reject: (error: Error) => void
                                                    ) => void,
                                                    file: string
                                                    ) => Promise<any>;

                                                      method upload

                                                      upload: (task: UploadTask) => Promise<any>;

                                                        class KeygenPublisher

                                                        class KeygenPublisher extends HttpPublisher {}

                                                          constructor

                                                          constructor(context: PublishContext, info: KeygenOptions, version: string);

                                                            property defaultHostname

                                                            readonly defaultHostname: string;

                                                              property hostname

                                                              readonly hostname: string;

                                                                property providerName

                                                                readonly providerName: string;

                                                                  method deleteRelease

                                                                  deleteRelease: (releaseId: string) => Promise<void>;

                                                                    method doUpload

                                                                    protected doUpload: (
                                                                    fileName: string,
                                                                    _arch: Arch,
                                                                    dataLength: number,
                                                                    requestProcessor: (
                                                                    request: ClientRequest,
                                                                    reject: (error: Error) => void
                                                                    ) => void,
                                                                    _file: string
                                                                    ) => Promise<string>;

                                                                      method toString

                                                                      toString: () => string;

                                                                        class MultiProgress

                                                                        class MultiProgress {}

                                                                          method createBar

                                                                          createBar: (format: string, options: any) => ProgressBar;

                                                                            method terminate

                                                                            terminate: () => void;

                                                                              class ProgressBar

                                                                              abstract class ProgressBar {}

                                                                                constructor

                                                                                constructor(format: string, options?: any);
                                                                                • Initialize a ProgressBar with the given fmt string and options ortotal.

                                                                                  Options: - curr current completed index - total total number of ticks to complete - width the displayed width of the progress bar defaulting to total - stream the output stream defaulting to stderr - head head character defaulting to complete character - complete completion character defaulting to "=" - incomplete incomplete character defaulting to "-" - renderThrottle minimum time between updates in milliseconds defaulting to 16 - callback optional function to call when the progress bar completes - clear will clear the progress bar upon termination

                                                                                  Tokens: - :bar the progress bar itself - :current current tick number - :total total ticks - :elapsed time elapsed in seconds - :percent completion percentage - :eta eta in seconds - :rate rate of ticks per second

                                                                                property total

                                                                                total: number;

                                                                                  method interrupt

                                                                                  interrupt: (message: string) => void;
                                                                                  • "interrupt" the progress bar and write a message above it.

                                                                                  method render

                                                                                  render: () => void;

                                                                                    method terminate

                                                                                    abstract terminate: () => void;

                                                                                      method tick

                                                                                      tick: (delta: number) => void;
                                                                                      • "tick" the progress bar with optional len and optional tokens.

                                                                                      method update

                                                                                      update: (ratio: number) => void;
                                                                                      • "update" the progress bar to represent an exact percentage. The ratio (between 0 and 1) specified will be multiplied by total and floored, representing the closest available "tick." For example, if a progress bar has a length of 3 and update(0.5) is called, the progress will be set to 1.

                                                                                        A ratio of 0.5 will attempt to set the progress to halfway.

                                                                                      class ProgressCallback

                                                                                      class ProgressCallback {}

                                                                                        constructor

                                                                                        constructor(progressBar: ProgressBar);

                                                                                          method update

                                                                                          update: (transferred: number, total: number) => void;

                                                                                            class Publisher

                                                                                            abstract class Publisher {}

                                                                                              constructor

                                                                                              protected constructor(context: PublishContext);

                                                                                                property context

                                                                                                protected readonly context: PublishContext;

                                                                                                  property providerName

                                                                                                  readonly providerName: PublishProvider;

                                                                                                    method createProgressBar

                                                                                                    protected createProgressBar: (
                                                                                                    fileName: string,
                                                                                                    size: number
                                                                                                    ) => ProgressBar | null;

                                                                                                      method createReadStreamAndProgressBar

                                                                                                      protected createReadStreamAndProgressBar: (
                                                                                                      file: string,
                                                                                                      fileStat: Stats,
                                                                                                      progressBar: ProgressBar | null,
                                                                                                      reject: (error: Error) => void
                                                                                                      ) => NodeJS.ReadableStream;

                                                                                                        method toString

                                                                                                        abstract toString: () => string;

                                                                                                          method upload

                                                                                                          abstract upload: (task: UploadTask) => Promise<any>;

                                                                                                            class S3Publisher

                                                                                                            class S3Publisher extends BaseS3Publisher {}

                                                                                                              constructor

                                                                                                              constructor(context: PublishContext, info: S3Options);

                                                                                                                property providerName

                                                                                                                readonly providerName: string;

                                                                                                                  method checkAndResolveOptions

                                                                                                                  static checkAndResolveOptions: (
                                                                                                                  options: S3Options,
                                                                                                                  channelFromAppVersion: string | null,
                                                                                                                  errorIfCannot: boolean
                                                                                                                  ) => Promise<void>;

                                                                                                                    method getBucketName

                                                                                                                    protected getBucketName: () => string;

                                                                                                                      method getS3UploadConfig

                                                                                                                      getS3UploadConfig: () => S3UploadConfig;

                                                                                                                        method getUploadExtraParams

                                                                                                                        getUploadExtraParams: () => S3UploadExtraParams;

                                                                                                                          method toString

                                                                                                                          toString: () => string;

                                                                                                                            class SnapStorePublisher

                                                                                                                            class SnapStorePublisher extends Publisher {}

                                                                                                                              constructor

                                                                                                                              constructor(
                                                                                                                              context: PublishContext,
                                                                                                                              options: SnapStoreOptions,
                                                                                                                              credentials: { cscLink: string | undefined; resourcesDir: string }
                                                                                                                              );

                                                                                                                                property context

                                                                                                                                readonly context: PublishContext;

                                                                                                                                  property providerName

                                                                                                                                  readonly providerName: string;

                                                                                                                                    method toString

                                                                                                                                    toString: () => string;

                                                                                                                                      method upload

                                                                                                                                      upload: (task: UploadTask) => Promise<any>;

                                                                                                                                        class SpacesPublisher

                                                                                                                                        class SpacesPublisher extends BaseS3Publisher {}

                                                                                                                                          constructor

                                                                                                                                          constructor(context: PublishContext, info: SpacesOptions);

                                                                                                                                            property providerName

                                                                                                                                            readonly providerName: string;

                                                                                                                                              method checkAndResolveOptions

                                                                                                                                              static checkAndResolveOptions: (
                                                                                                                                              options: SpacesOptions,
                                                                                                                                              channelFromAppVersion: string | null,
                                                                                                                                              _errorIfCannot: boolean
                                                                                                                                              ) => Promise<void>;

                                                                                                                                                method getBucketName

                                                                                                                                                protected getBucketName: () => string;

                                                                                                                                                  method getS3UploadConfig

                                                                                                                                                  getS3UploadConfig: () => S3UploadConfig;

                                                                                                                                                    Interfaces

                                                                                                                                                    interface PublishContext

                                                                                                                                                    interface PublishContext {}

                                                                                                                                                      property cancellationToken

                                                                                                                                                      readonly cancellationToken: CancellationToken;

                                                                                                                                                        property progress

                                                                                                                                                        readonly progress: MultiProgress | null;

                                                                                                                                                          interface PublishOptions

                                                                                                                                                          interface PublishOptions {}

                                                                                                                                                            property publish

                                                                                                                                                            publish?: PublishPolicy | null;

                                                                                                                                                              interface UploadTask

                                                                                                                                                              interface UploadTask {}

                                                                                                                                                                property arch

                                                                                                                                                                arch: Arch | null;

                                                                                                                                                                  property file

                                                                                                                                                                  file: string;

                                                                                                                                                                    property fileContent

                                                                                                                                                                    fileContent?: Buffer | null;

                                                                                                                                                                      property safeArtifactName

                                                                                                                                                                      safeArtifactName?: string | null;

                                                                                                                                                                        property timeout

                                                                                                                                                                        timeout?: number | null;

                                                                                                                                                                          Type Aliases

                                                                                                                                                                          type PublishPolicy

                                                                                                                                                                          type PublishPolicy = 'onTag' | 'onTagOrDraft' | 'always' | 'never';

                                                                                                                                                                            Package Files (12)

                                                                                                                                                                            Dependencies (9)

                                                                                                                                                                            Dev Dependencies (2)

                                                                                                                                                                            Peer Dependencies (0)

                                                                                                                                                                            No peer dependencies.

                                                                                                                                                                            Badge

                                                                                                                                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/electron-publish.

                                                                                                                                                                            • Markdown
                                                                                                                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/electron-publish)
                                                                                                                                                                            • HTML
                                                                                                                                                                              <a href="https://www.jsdocs.io/package/electron-publish"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>