vite-plugin-cloud-upload
Version:
A Vite plugin to automatically upload build assets to cloud storage (Tencent Cloud COS & Aliyun OSS).
18 lines (17 loc) • 618 B
TypeScript
import type { UploadTask } from './types.js';
/** 标准化对象键前缀(去掉头尾 /,统一以 / 结尾) */
export declare const normalizePrefix: (raw?: string) => string;
/** MIME 类型推断 */
export declare function getContentType(filePath: string): string;
/**
* 扫描本地目录 → 上传任务列表
* @param args
*/
export declare function scanLocal(args: {
root: string;
recursive: boolean;
include?: RegExp;
prefix: string;
}): UploadTask[];
/** 安全删除单个本地文件(仅文件 & 存在时才删) */
export declare function deleteLocalFile(path: string): void;