UNPKG

1.37 kBTypeScriptView Raw
1import { Route } from '@vercel/routing-utils';
2import { PackageJson, Builder, BuilderFunctions } from './types';
3interface ErrorResponse {
4 code: string;
5 message: string;
6 action?: string;
7 link?: string;
8}
9interface Options {
10 tag?: 'canary' | 'latest' | string;
11 functions?: BuilderFunctions;
12 ignoreBuildScript?: boolean;
13 projectSettings?: {
14 framework?: string | null;
15 devCommand?: string | null;
16 installCommand?: string | null;
17 buildCommand?: string | null;
18 outputDirectory?: string | null;
19 createdAt?: number;
20 };
21 cleanUrls?: boolean;
22 trailingSlash?: boolean;
23 featHandleMiss?: boolean;
24}
25export declare function sortFiles(fileA: string, fileB: string): number;
26export declare function detectApiExtensions(builders: Builder[]): Set<string>;
27export declare function detectApiDirectory(builders: Builder[]): string | null;
28export declare function detectOutputDirectory(builders: Builder[]): string | null;
29export declare function detectBuilders(files: string[], pkg?: PackageJson | undefined | null, options?: Options): Promise<{
30 builders: Builder[] | null;
31 errors: ErrorResponse[] | null;
32 warnings: ErrorResponse[];
33 defaultRoutes: Route[] | null;
34 redirectRoutes: Route[] | null;
35 rewriteRoutes: Route[] | null;
36 errorRoutes: Route[] | null;
37}>;
38export {};