UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

17 lines (16 loc) 860 B
import type { EggContextHttpClient, HttpClientResponse } from 'egg'; export interface DownloadToTempfileOptionalConfig { retries?: number; ignoreDownloadStatuses?: number[]; remoteAuthToken?: string; } export declare function createTempDir(dataDir: string, dirname?: string): Promise<string>; export declare function createTempfile(dataDir: string, filename: string): Promise<string>; export declare function downloadToTempfile(httpclient: EggContextHttpClient, dataDir: string, url: string, optionalConfig?: DownloadToTempfileOptionalConfig): Promise<Tempfile>; export interface Tempfile { tmpfile: string; headers: HttpClientResponse['res']['headers']; timing: HttpClientResponse['res']['timing']; } export declare function ensureContentType(contentType: string): string; export declare function mimeLookup(filepath: string): string;