UNPKG

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