UNPKG

tdpw

Version:

CLI tool for uploading Playwright test reports to TestDino platform with Azure storage support

54 lines 2.04 kB
import type { SasTokenResponse } from './sas'; /** * Upload progress callback type */ type ProgressCallback = (uploadedFiles: number, totalFiles: number, currentFile: string) => void; /** * Azure storage client configured with SAS-based authentication */ export declare class AzureStorageClient { private readonly sasResponse; constructor(sasResponse: SasTokenResponse); /** * Upload a single file using the SAS token response format */ uploadFile(filePath: string, blobPath: string): Promise<string>; } /** * Service to upload files to Azure Blob Storage using SAS credentials with optimal concurrency */ export declare class AzureUploadService { private readonly storageClient; private readonly maxConcurrentUploads; constructor(storageClient: AzureStorageClient); /** * Upload an entire directory of files with concurrent uploads and progress tracking * @param localDir Local directory path * @param prefix Additional prefix for blob paths (optional) * @param onProgress Progress callback (optional) * @param preFilteredPaths Optional pre-filtered file paths (if not provided, will collect all files) */ uploadDirectory(localDir: string, prefix?: string, onProgress?: ProgressCallback, preFilteredPaths?: string[]): Promise<string[]>; /** * Get relative path from a local directory, ensuring proper path handling */ private getRelativePath; /** * Create batches of files for concurrent upload */ private createBatches; /** * Upload with progress reporting and detailed feedback */ uploadDirectoryWithProgress(localDir: string, prefix?: string): Promise<string[]>; /** * Upload HTML directory with filtering based on upload configuration */ uploadHtmlDirectoryWithProgress(localDir: string, prefix?: string, config?: { uploadImages: boolean; uploadVideos: boolean; uploadHtml: boolean; }): Promise<string[]>; } export {}; //# sourceMappingURL=azure.d.ts.map