import { FastifyServerOptions } from 'fastify'; import { ViteDevServer } from 'vite'; import { RouteConfig } from '../types'; /** * Mounts mock routes on the Vite dev server via a fastify instance. * * fastify is embedded as a connect middleware by emitting `request` on its * internal server (`app.server.emit('request', req, res)`), so the plugin keeps * the exact middleware semantics of the previous find-my-way based implementation: * - matched mock routes are answered by fastify; * - unmatched requests fall through to the next middleware via * `setNotFoundHandler` + `reply.hijack()` + `next()`. * * Route config contract (unchanged from before): * key = "METHOD /path", supports `METHOD1/METHOD2 /path` and `:param`. */ export declare function configureServer(server: ViteDevServer, fastifyOptions: FastifyServerOptions, routes: RouteConfig[], cwd: string, base: string | undefined): Promise;