import { n as StartOptions } from "./cli-commands-DxfGmgQ3.js"; import { CreateInteractiveAuthOptions } from "devframe/recipes/interactive-auth"; import { McpSetting } from "devframe/types"; //#region src/node/plugin-options.d.ts type DevToolsBrandingLogo = string | { light: string; dark: string; }; interface DevToolsBranding { productName?: string; logo?: DevToolsBrandingLogo; wordmark?: DevToolsBrandingLogo; primaryColor?: string; background?: DevToolsBrandingLogo | { standalone: DevToolsBrandingLogo; iframe?: DevToolsBrandingLogo; }; tagline?: string; favicon?: string; windowTitle?: string; } interface DevToolsDockPreferences { categoryOrder?: Record; maxVisibleItems?: number; defaultMode?: 'float' | 'edge'; defaultPosition?: 'left' | 'right' | 'top' | 'bottom'; } interface DevToolsDockRendererRegistration { type: string; file: string; importName?: string; } type DevToolsEmbeddedVisibility = 'normal' | 'passive' | 'hidden'; interface ViteDevToolsUiOptions { branding?: DevToolsBranding; embeddedVisibility?: DevToolsEmbeddedVisibility; dockPreferences?: DevToolsDockPreferences; } interface DevToolsUserOptions { /** * Include the Vite builtin devtools UI. * * @default true */ builtinDevTools?: boolean; /** Dock renderer modules, replacing built-ins with the same type and appending new types. */ renderers?: readonly DevToolsDockRendererRegistration[]; /** Override the branding handed to the DevTools client. */ branding?: ViteDevToolsUiOptions['branding']; /** Control how the embedded floating dock reveals itself. */ embeddedVisibility?: ViteDevToolsUiOptions['embeddedVisibility']; /** Configure the initial dock layout. */ dockPreferences?: ViteDevToolsUiOptions['dockPreferences']; /** Options for building static DevTools output alongside `vite build`. */ build?: { /** * Automatically build DevTools when running `vite build`. * @default false */ withApp?: boolean; /** * Inject the dock into the built app. Requires `withApp: true`. * Ensure the DevTools assets are served under Vite's `base` when deployed. * @default false */ injection?: boolean; /** Output directory relative to root. Defaults to Vite's `build.outDir`. */ outDir?: string; }; } interface DevToolsOptions extends Omit { /** Directory to search for installed integrations. */ cwd?: string; } //#endregion //#region src/node/config.d.ts type DevToolsApply = 'serve' | 'build' | 'all'; interface DevToolsConfig extends Partial, DevToolsUserOptions { /** * Enable Vite DevTools. * * @default true */ enabled?: boolean; /** * Limit Vite DevTools to a specific Vite command. * By default, Vite DevTools applies to both serve and build. */ apply?: DevToolsApply; /** * Vite environments to enable DevTools for. Defaults to all environments. */ environments?: string[]; /** * Disable client authentication. * * Beware that if you disable client authentication, * any browsers can connect to the devtools and access to your server and filesystem. * (including other devices, if you open server `host` option to LAN or WAN) * * @default true */ clientAuth?: boolean; /** * Pre-configured auth tokens that are automatically trusted. * * Clients connecting with an auth token matching one of these * will be auto-approved without a terminal prompt. */ clientAuthTokens?: string[]; /** * Print the one-time code and magic-link URL somewhere other than stdout. * * The default banner is a boxed `console.log` from inside the dev server. * Supply this to surface the code in the host's own chrome instead. */ banner?: (info: { code: string; url: string; }) => void; /** * Called once a code exchange succeeds, so a host rendering its own * `banner` can retract it. Not called for connect-time trust from a * static `clientAuthTokens` entry, since no code exchange happens. */ onTrusted?: CreateInteractiveAuthOptions['onTrusted']; /** * Origins allowed to open the DevTools WebSocket connection, in addition to the built-in * loopback allowlist (`localhost`, `127.0.0.1`, etc). * * The loopback check is a plain string match against the `Origin` header, not a DNS/hosts-file * resolution — a custom dev hostname that resolves to loopback via `/etc/hosts` or a local DNS * override (e.g. `dev-my-app.example.com`) is invisible to it and gets rejected. List such * hostnames here explicitly. */ allowedOrigins?: string[]; /** * Expose the aggregate MCP endpoint at `__mcp`, a Streamable-HTTP * server over the whole tool registry of every mounted devframe. * * Defaults to `'auto'`: the route mounts once any agent-flagged surface * exists. Pass `false` to keep it off (e.g. when MCP is bridged elsewhere), * `true` to mount it unconditionally behind the loopback origin gate, or an * object to opt into an identity check. */ mcp?: McpSetting; } interface ResolvedDevToolsConfig { config: Omit & { host: string; }; enabled: boolean; apply: DevToolsApply; } declare function resolveHost(host: string | boolean | undefined): string; declare function normalizeDevToolsConfig(config: DevToolsConfig | boolean | undefined, host: string | boolean | undefined): ResolvedDevToolsConfig; declare function isDevToolsEnabled(config: ResolvedDevToolsConfig, command: 'serve' | 'build'): boolean; //#endregion export { normalizeDevToolsConfig as a, ViteDevToolsUiOptions as c, isDevToolsEnabled as i, DevToolsConfig as n, resolveHost as o, ResolvedDevToolsConfig as r, DevToolsOptions as s, DevToolsApply as t };