UNPKG

netlify-cli

Version:

Netlify command line tool

43 lines 1.54 kB
import build, { type OnPostBuild } from '@netlify/build'; import type { OptionValues } from 'commander'; import type { EnvironmentVariables } from '../utils/types.js'; export interface CachedConfig { env: EnvironmentVariables; siteInfo: { id?: string; account_id?: string; feature_flags?: Record<string, boolean | boolean | number>; }; [k: string]: unknown; } interface DefaultConfig { [k: string]: unknown; } export type BuildConfig = Parameters<typeof build>[0] & { cachedConfig: CachedConfig; defaultConfig: DefaultConfig; accountId?: string; edgeFunctionsBootstrapURL: string; }; interface HandlerResult { newEnvChanges?: Record<string, string>; configMutations?: Record<string, string>; status?: string; } type PatchedHandlerType<T extends (opts: any) => void | Promise<void>> = (opts: Parameters<T>[0]) => HandlerResult | Promise<HandlerResult>; export declare const getBuildOptions: ({ cachedConfig, currentDir, defaultConfig, deployHandler, options: { context, cwd, debug, dry, json, offline, silent }, packagePath, token, }: { cachedConfig: CachedConfig; currentDir: string; defaultConfig?: DefaultConfig; deployHandler?: PatchedHandlerType<OnPostBuild>; options: OptionValues; packagePath?: string; token?: null | string; }) => Promise<BuildConfig>; export declare const runBuild: (options: BuildConfig) => Promise<{ exitCode: number; newConfig: any; configMutations: any; }>; export {}; //# sourceMappingURL=build.d.ts.map