Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codecov/bundler-plugin-core

Package Overview
Dependencies
Maintainers
5
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codecov/bundler-plugin-core - npm Package Compare versions

Comparing version 0.0.1-beta.12 to 1.0.0

129

dist/index.d.ts

@@ -5,2 +5,4 @@ import { UnpluginOptions, UnpluginContextMeta } from 'unplugin';

type NormalizedOptions = z.infer<ReturnType<typeof optionsSchemaFactory>> & Options;
type ValidGitService = z.infer<typeof ValidGitServiceSchema>;
declare const ValidGitServiceSchema: z.ZodUnion<[z.ZodLiteral<"github">, z.ZodLiteral<"gitlab">, z.ZodLiteral<"bitbucket">, z.ZodLiteral<"github_enterprise">, z.ZodLiteral<"gitlab_enterprise">, z.ZodLiteral<"bitbucket_server">]>;
declare const optionsSchemaFactory: (options: Options) => z.ZodObject<{

@@ -36,2 +38,23 @@ apiUrl: z.ZodDefault<z.ZodString>;

debug: z.ZodDefault<z.ZodBoolean>;
/**
* Using an enum here, as custom error messages for union types seem to be broken currently.
*
* Issue: https://github.com/colinhacks/zod/issues/3675
*/
gitService: z.ZodOptional<z.ZodEnum<["github", "gitlab", "bitbucket", "github_enterprise", "gitlab_enterprise", "bitbucket_server"]>>;
oidc: z.ZodOptional<z.ZodObject<{
useGitHubOIDC: z.ZodDefault<z.ZodBoolean>;
/**
* Following along with how we handle this in our GH Action.
*
* See: https://github.com/codecov/codecov-action/blob/main/src/buildExec.ts#L53-L58
*/
gitHubOIDCTokenAudience: z.ZodDefault<z.ZodOptional<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
useGitHubOIDC: boolean;
gitHubOIDCTokenAudience: string;
}, {
useGitHubOIDC?: boolean | undefined;
gitHubOIDCTokenAudience?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {

@@ -53,2 +76,7 @@ retryCount: number;

} | undefined;
gitService?: "github" | "gitlab" | "bitbucket" | "github_enterprise" | "gitlab_enterprise" | "bitbucket_server" | undefined;
oidc?: {
useGitHubOIDC: boolean;
gitHubOIDCTokenAudience: string;
} | undefined;
}, {

@@ -70,2 +98,7 @@ bundleName: string;

debug?: boolean | undefined;
gitService?: "github" | "gitlab" | "bitbucket" | "github_enterprise" | "gitlab_enterprise" | "bitbucket_server" | undefined;
oidc?: {
useGitHubOIDC?: boolean | undefined;
gitHubOIDCTokenAudience?: string | undefined;
} | undefined;
}>;

@@ -112,3 +145,8 @@ interface NormalizedOptionsFailure {

uploadToken?: string;
oidc?: {
useGitHubOIDC: boolean;
gitHubOIDCTokenAudience: string;
};
debug: boolean;
gitService?: ValidGitService;
originalBundleName: string;

@@ -174,13 +212,8 @@ branch?: string;

}
/** Configuration ptions for the Codcove bundler plugin. */
interface ExtendedBAUploadArgs<TArgs extends object> extends BundleAnalysisUploadPluginArgs {
options: TArgs;
}
/** Configuration options for the Codecov bundler plugin. */
interface Options {
/**
* The upload token to use for uploading the bundle analysis information.
*
* This value can either be an 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.
*/
uploadToken?: string;
/**
* The api url used to fetch the upload url.

@@ -190,2 +223,4 @@ *

*
* Example: `apiUrl: 'https://api.codecov.io'`
*
* Defaults to `https://api.codecov.io`.

@@ -195,2 +230,31 @@ */

/**
* 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'`
*/
gitService?: ValidGitService;
/**
* 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.
*/
uploadToken?: string;
/**
* The amount of times the upload function will retry to upload bundle analysis information.

@@ -202,8 +266,2 @@ *

/**
* When enabled information will not be uploaded to Codecov.
*
* Defaults to `false`
*/
dryRun?: boolean;
/**
* The name for the bundle being built.

@@ -215,3 +273,3 @@ *

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

@@ -222,2 +280,4 @@ bundleName?: string;

*
* Example: `enableBundleAnalysis: true`
*
* Defaults to `false`

@@ -230,2 +290,33 @@ */

debug?: boolean;
/**
* When enabled information will not be uploaded to Codecov.
*
* Example: `dryRun: true`
*
* Defaults to `false`
*/
dryRun?: boolean;
/** Options for OIDC authentication. */
oidc?: {
/**
* When using GitHub Actions this option can be enabled to use OIDC authentication, which
* removes the requirement for an upload token.
*
* [OpenID Connect
* (OIDC)](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
* is **required** to be configured in order to use GitHub OIDC.
*
* Defaults to `false`
*/
useGitHubOIDC: boolean;
/**
* 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`
*/
gitHubOIDCTokenAudience?: string;
};
}

@@ -236,2 +327,6 @@ type BundleAnalysisUploadPlugin = (args: BundleAnalysisUploadPluginArgs) => UnpluginOptions & {

};
type ExtendedBAUploadPlugin<TArgs extends object> = (args: ExtendedBAUploadArgs<TArgs>) => UnpluginOptions & {
pluginVersion: string;
version: string;
};
/** A set of overrides that are passed to Codecov. */

@@ -282,2 +377,2 @@ interface UploadOverrides {

export { type Asset, type BundleAnalysisUploadPlugin, type Chunk, type Module, type Options, Output, type ProviderUtilInputs, type UploadOverrides, checkNodeVersion, createRollupAsset, getCompressedSize, handleErrors, normalizeOptions, normalizePath, red };
export { type Asset, type BundleAnalysisUploadPlugin, type BundleAnalysisUploadPluginArgs, type Chunk, type ExtendedBAUploadArgs, type ExtendedBAUploadPlugin, type Module, type Options, Output, type ProviderUtilInputs, type UploadOverrides, checkNodeVersion, createRollupAsset, getCompressedSize, handleErrors, normalizeOptions, normalizePath, red };

5

package.json
{
"name": "@codecov/bundler-plugin-core",
"version": "0.0.1-beta.12",
"version": "1.0.0",
"description": "Official Codecov Bundler Plugin Core",

@@ -27,2 +27,4 @@ "author": "Codecov",

"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"chalk": "4.1.2",

@@ -34,2 +36,3 @@ "semver": "^7.5.4",

"devDependencies": {
"@octokit/webhooks-definitions": "^3.67.3",
"@types/node": "^20.11.15",

@@ -36,0 +39,0 @@ "@types/semver": "^7.5.6",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc