import type { FeatureFlags } from './feature_flags.js'; import { type RuntimeName } from './runtimes/runtime.js'; import type { RuntimeCache } from './utils/cache.js'; import type { getLogger } from './utils/logger.js'; import type { ExtendedRoute, Route } from './utils/routes.js'; /** * Resolves the server entrypoint inside `directory`, or undefined when there is * none. */ export declare const findServerEntry: (directory: string) => Promise; /** * How many instances the server runs. */ export type ServerScale = { min?: number; max?: number; }; /** * Server configuration from the `[server]` block of the Netlify configuration * file. The server's in-source configuration takes precedence over it. */ export interface NetlifyServerConfig { excludedPath?: string | string[]; includedFiles?: string[]; path?: string | string[]; region?: string; scale?: ServerScale; size?: string; } /** * Returns the routes the server at `entryPath` claims, read from its in-source * configuration and the `config` given, without bundling it. */ export declare const getServerRoutes: (entryPath: string, { config }?: { config?: NetlifyServerConfig; }) => Promise; export type ServerResult = { bundler?: string; excludedRoutes?: Route[]; instanceSize?: string; mainFile: string; path: string; region?: string; routes?: ExtendedRoute[]; runtime: RuntimeName; runtimeVersion?: string; scale?: ServerScale; size?: number; }; /** * The deploy's Netlify Server, and how to bundle it. */ export interface ServerOptions { /** * Server configuration from the Netlify configuration file. */ config?: NetlifyServerConfig; /** * Path of the user's server entry file. */ path: string; } export declare const bundleServer: (server: ServerOptions, destFolder: string, { basePath, cache, featureFlags, logger, repositoryRoot, }: { basePath?: string; cache: RuntimeCache; featureFlags: FeatureFlags; logger: ReturnType; repositoryRoot?: string; }) => Promise;