UNPKG

dt-app

Version:

The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.

19 lines (18 loc) 894 B
import type { IncomingMessage, ServerResponse } from 'http'; import type { Plugin } from 'vite'; /** * Vite plugin that ports packages/cli/src/dev/fastify/router.ts to Connect middleware. * * - /ui/* routes are intentionally NOT handled here; they are covered by dtHtmlPlugin. * - /widgets/* routes are intentionally NOT handled here; they are covered by dtWidgetVitePlugin. * - /* catch-all proxies requests to the Dynatrace platform. */ export declare function dtRouterVitePlugin(): Plugin; /** * Connect-compatible handler that mirrors the three Fastify routes in router.ts: * 1. ALL /* catch-all — fileMap lookup or platform proxy * * Vite handles /@vite/*, /src/* etc. before reaching this middleware because * Vite's own internal middleware runs first. */ export declare function routerMiddleware(req: IncomingMessage, res: ServerResponse, next: () => void): Promise<void>;