/** * file uploadFilesTots * Copyright (c) Microsoft Corporation. All rights reserved. * * Uploads a list of files to an Azure Blob Service instance */ /// /// import { type BlobHTTPHeaders } from '@azure/storage-blob'; import type { ITerminal } from '@rushstack/terminal'; /** * Represents a file's local path and container-root-relative path in Azure Storage destination * @internal */ export interface IUploadableFile { /** * A container-root-relative path to the file's Azure Storage destination * * For example, if the account name is "example" the container's name is "files", * and this property is "foo/bar/baz.json", the fully-qualified URL of the uploaded * file will be: * https://example.blob.core.windows.net/files/foo/bar/baz.json */ azurePath: string; /** * A fully-qualified filesystem path to a file. */ localPath: string; blobHeaders?: BlobHTTPHeaders; } /** * @internal */ export interface IAzureUploaderOptions { storageAccountName: string; containerName: string; } /** * @internal */ export interface IAzureUploaderOptionsForSas extends IAzureUploaderOptions { sas: string; } /** * @internal */ export interface IAzureUploaderOptionsForKey extends IAzureUploaderOptions { storageKey: string; } /** * @internal */ export declare class AzureUploader { static readonly DEFAULT_AZURE_MAX_PARALLELISM: number; static readonly DEFAULT_AZURE_RETRY_DELAY_MILLISECONDS: number; static readonly DEFAULT_AZURE_MAX_NUMBER_OF_RETRIES: number; private readonly _containerClient; constructor(options: IAzureUploaderOptionsForSas | IAzureUploaderOptionsForKey); /** * Upload file to Azure */ uploadFileToAzureAsync(terminal: ITerminal | undefined, localFilename: string, serverFilename: string, blobHeaders?: BlobHTTPHeaders): Promise; uploadToAzureAsync(terminal: ITerminal, contents: string | Buffer, serverFilename: string, blobMetadata?: { [name: string]: string; }): Promise; /** * Upload files to Azure */ uploadFilesToAzureAsync(terminal: ITerminal, files: IUploadableFile[], maxParallelism?: number, maxRetries?: number, retryDelayMs?: number, onFileUploaded?: (serverPath: string) => void): Promise; ensureContainerExistsAsync(terminal: ITerminal): Promise; private _getBlockBlobClient; } //# sourceMappingURL=AzureUploader.d.ts.map