import type { InvocationMode } from './function.js'; import type { TrafficRules } from './rate_limit.js'; import type { ServerResult, ServerScale } from './server.js'; import type { FunctionResult } from './utils/format_result.js'; import type { ExtendedRoute, Route } from './utils/routes.js'; interface ManifestFunction { buildData?: Record; bundler?: string; displayName?: string; eventSubscriptions?: string[]; excludedRoutes?: Route[]; generator?: string; invocationMode?: InvocationMode; mainFile: string; memory?: number; name: string; path: string; priority?: number; region?: string; routes?: ExtendedRoute[]; runtime: string; runtimeVersion?: string; schedule?: string; timeout?: number; trafficRules?: TrafficRules; vcpu?: number; } interface ManifestServer { bundler?: string; excludedRoutes?: Route[]; instanceSize?: string; mainFile: string; path: string; region?: string; routes?: ExtendedRoute[]; runtime: string; runtimeVersion?: string; scale?: ServerScale; } interface ManifestBase { system: { arch: string; platform: string; }; timestamp: number; version: number; } export interface FunctionsManifest extends ManifestBase { functions: ManifestFunction[]; /** * A server is described by its own manifest now. Nothing writes this any * more; it is kept so that readers of manifests written before the split * still compile. */ server?: ManifestServer; } export interface ServerManifest extends ManifestBase { server: ManifestServer; } /** * The functions manifest, under the name it had before the server manifest was * introduced, for backwards compatibility. */ export type Manifest = FunctionsManifest; export declare const createFunctionsManifest: ({ functions, path }: { functions: FunctionResult[]; path: string; }) => Promise; export declare const createServerManifest: ({ path, server }: { path: string; server: ServerResult; }) => Promise; export {};