import type { SentryCliOptions, SentryCliCommitsOptions, SentryCliUploadSourceMapsOptions, SentryCliNewDeployOptions } from '@sentry/cli'; import type { Plugin } from 'vite'; export interface VitePluginSentryCliSourcemap extends Omit { /** * sourcemap paths * @default [`./${vite.build.outDir}/${vite.build.assetsDir}`] */ include?: SentryCliUploadSourceMapsOptions['include']; /** * !IMPORTANT!: MUST START WITH `~/` * @default `~${vite.env.BASE_URL}assets/` */ urlPrefix?: SentryCliUploadSourceMapsOptions['urlPrefix']; } export interface VitePluginSentryCliDeploy extends Omit { /** * environment * @default `vite.mode` */ env?: SentryCliNewDeployOptions['env']; } /** options for plugin */ export interface VitePluginSentryCliOptions extends SentryCliOptions { /** * The URL of the Sentry */ url: string; /** * Orgination name in Sentry */ org: string; /** * Project name in Senrty */ project: string; /** * Auth token */ authToken: string; /** * Release version, * auto generated by git commit hash, * you can also config it by yourself */ release?: string; /** * sourcemap configs */ sourcemap?: VitePluginSentryCliSourcemap; /** * deploy configs */ deploy?: VitePluginSentryCliDeploy; /** * if delete local sourcemap after uploaded, * @default true */ clean?: boolean; /** * if delete remote previous sourcemap in Sentry under the same `release` * @default true */ delete?: boolean; /** * if finalize a release after uploaded * @default true */ finalize?: boolean; /** * path of config file */ configFile?: string; /** * commits configs */ commits?: SentryCliCommitsOptions; } /** * 默认配置 */ export declare const defaultOptions: Partial; /** plugin factory */ export declare function vitePluginSentryCli(options: VitePluginSentryCliOptions): Plugin; /** * delete files * @param path file path */ export declare function deleteFile(path: any): Promise;