Configuration options for the Codecov bundler plugin.

interface Options {
    apiUrl?: string;
    bundleName?: string;
    debug?: boolean;
    dryRun?: boolean;
    enableBundleAnalysis?: boolean;
    gitService?: "github" | "gitlab" | "bitbucket" | "github_enterprise" | "gitlab_enterprise" | "bitbucket_server";
    oidc?: {
        gitHubOIDCTokenAudience?: string;
        useGitHubOIDC: boolean;
    };
    retryCount?: number;
    uploadOverrides?: UploadOverrides;
    uploadToken?: string;
}

Properties

apiUrl?: string

The api url used to fetch the upload url.

Only required if self-hosting codecov.

Example: apiUrl: 'https://api.codecov.io'

Defaults to https://api.codecov.io.

bundleName?: string

The name for the bundle being built.

Required for uploading bundle analysis information.

The name must match the pattern /^[\w\d_:/@\.{}\[\]$-]+$/.

Example: bundleName: '@codecov/rollup-plugin'

debug?: boolean

Option to enable debug logs for the plugin.

dryRun?: boolean

When enabled information will not be uploaded to Codecov.

Example: dryRun: true

Defaults to false

enableBundleAnalysis?: boolean

Whether you would like bundle analysis to be enabled. *

Example: enableBundleAnalysis: true

Defaults to false

gitService?: "github" | "gitlab" | "bitbucket" | "github_enterprise" | "gitlab_enterprise" | "bitbucket_server"

Override value for git service used for tokenless uploads. Using tokenless uploads is only supported for public repositories.

Note: If an uploadToken is provided you do not need to provide a gitService.

The value must be one of the following:

  • github
  • gitlab
  • bitbucket
  • github_enterprise
  • gitlab_enterprise
  • bitbucket_server

Example gitService: 'github'

oidc?: {
    gitHubOIDCTokenAudience?: string;
    useGitHubOIDC: boolean;
}

Options for OIDC authentication.

Type declaration

  • Optional gitHubOIDCTokenAudience?: string

    The OIDC audience to use for authentication.

    If you're using a self hosted version of Codecov, you will need to provide the audience for the OIDC token.

    Defaults to https://codecov.io

  • useGitHubOIDC: boolean

    When using GitHub Actions this option can be enabled to use OIDC authentication, which removes the requirement for an upload token.

    OpenID Connect (OIDC) is required to be configured in order to use GitHub OIDC.

    Defaults to false

retryCount?: number

The amount of times the upload function will retry to upload bundle analysis information.

Defaults to 3

uploadOverrides?: UploadOverrides

Override values for passing custom information to API.

uploadToken?: string

The upload token to use for uploading the bundle analysis information.

This field is required for uploading bundle analysis information in private repositories. Alternatively if you're using GitHub Actions and have configured OIDC authentication you can omit this field, and enable the oidc.useGitHubOIDC option.

This value can either be a global upload token or a repo token.

  • The global upload token can be found under the organization settings page.
  • The repo token can be found under the repo settings page under the general tab.

Generated using TypeDoc