UNPKG

1.09 kBTypeScriptView Raw
1export type UrlRewriteExpression = {
2 pattern: RegExp;
3 replacement: string;
4};
5export type CheckOptions = {
6 concurrency?: number;
7 port?: number;
8 path: string | string[];
9 recurse?: boolean;
10 timeout?: number;
11 markdown?: boolean;
12 linksToSkip?: string[] | ((link: string) => Promise<boolean>);
13 serverRoot?: string;
14 directoryListing?: boolean;
15 retry?: boolean;
16 retryErrors?: boolean;
17 retryErrorsCount?: number;
18 retryErrorsJitter?: number;
19 urlRewriteExpressions?: UrlRewriteExpression[];
20 userAgent?: string;
21};
22export type InternalCheckOptions = {
23 syntheticServerRoot?: string;
24 staticHttpServerHost?: string;
25} & CheckOptions;
26export declare const DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36";
27/**
28 * Validate the provided flags all work with each other.
29 * @param options CheckOptions passed in from the CLI (or API)
30 */
31export declare function processOptions(options_: CheckOptions): Promise<InternalCheckOptions>;
32
\No newline at end of file