import { PluginAPiFunc } from "./plugin-api"; import { GlobalContext } from "./context-util"; import { DB } from "./db-util"; import { AxiosRequestConfig, AxiosResponse } from "axios"; export interface StoredRequest { path: string; status: number; data: any; headers: Headers; } export interface ProxyConfig { cwd?: string; target: string; workDir: string; workPort: number; matchRegexp: RegExp; cacheStatic: boolean; pathIgnore: { query: string[]; body: string[]; }; plugins: PluginAPiFunc[]; } export declare class FileUtil { private ctx; private config; constructor(ctx: GlobalContext); getFileName(url: string): string; getUniqueKeyFromRequest(config: AxiosRequestConfig, currentPath: string): string; loadConfig(): ProxyConfig; addRequestLog(path: string, req: AxiosRequestConfig, res: StoredRequest): Promise; getRequestLog(path: string, req: AxiosRequestConfig): Promise; getFilePath(url: string, asset?: boolean, customize?: boolean): string; getOneHistory(api: string, intercept?: boolean): any; deleteOneLog(api: string): void; updateRequestLog(data: any): Promise; storageStatic(_path: string, res: AxiosResponse): Promise; initFolder(): void; getSettings(): DB; setSettings(json: any): void; }