1 | import { KeyValueCache } from 'fetchache';
|
2 | import { fetch } from 'cross-fetch';
|
3 | import isUrl from 'is-url';
|
4 | export { isUrl };
|
5 | interface ReadFileOrUrlOptions extends RequestInit {
|
6 | allowUnknownExtensions?: boolean;
|
7 | fallbackFormat?: 'json' | 'yaml';
|
8 | cwd?: string;
|
9 | fetch?: typeof fetch;
|
10 | }
|
11 | export declare function getCachedFetch(cache: KeyValueCache): typeof fetch;
|
12 | export declare function readFileOrUrlWithCache<T>(filePathOrUrl: string, cache: KeyValueCache, config?: ReadFileOrUrlOptions): Promise<T>;
|
13 | export declare function readFileWithCache<T>(filePath: string, cache: KeyValueCache, config?: ReadFileOrUrlOptions): Promise<T>;
|
14 | export declare function readUrlWithCache<T>(path: string, cache: KeyValueCache, config?: ReadFileOrUrlOptions): Promise<T>;
|