import type { BundleAction, FileAsset, LocationUri, MimeTypeAction } from './squared'; import type { IHost, IModule } from './index'; import type { IAbortComponent } from './core'; import type { FetchType } from './filemanager'; import type { HttpHeaders } from './http'; interface ProcessInit { threadCount: number; startTime: number; timeout: number; } export interface BinaryAction { binOpts?: string[]; shellExpansion?: boolean; } export interface StreamAction { minStreamSize?: number | string; } export interface FileData extends MimeTypeAction { file: T; } export interface FileCommand extends FileData { command?: string; outputType?: string; } export interface IFileThread extends IAbortComponent, Required> { threadCount: number; readonly startTime: number; openThread(instance: IModule, timeout?: number): boolean; closeThread(instance: IModule, callback?: FunctionType): boolean; getObject>(data?: PlainObject): V; get host(): T; get queuedTasks(): FunctionType[]; get localUri(): string | undefined; set mimeType(value); get mimeType(): string; } export interface FileThreadConstructor { readonly prototype: IFileThread; new(host: T, file: U, threadCount: number): IFileThread; } export interface OutputFinalize extends FileCommand { output: string; baseDirectory?: string; } export interface InitialValue extends Partial, MimeTypeAction { localUri?: string; buffer?: Buffer; etag?: string; cacheable?: boolean; } export interface ExternalAsset extends FileAsset, BundleAction, BinaryAction, StreamAction { id?: number; url?: URL; socketPath?: string; buffer?: Buffer | null; localUri?: string; fetchType?: FetchType; headers?: HttpHeaders; sourceUTF8?: string; transforms?: string[]; descendants?: string[]; torrentFiles?: string[]; sourceFiles?: string[]; initialValue?: InitialValue; processModule?: ObjectMap; etag?: string; lastModified?: string; contentLength?: number; invalid?: boolean; } export type HashAlgorithm = "md5" | "sha1" | "sha256" | "sha224" | "sha384" | "sha512" | "ripemd" | "ripemd-160";