import { a as ProvisionProvider, c as HostCliRun, i as ViteHubCliProvision, n as ViteHubCliCommandNamespace, t as ViteHubCliCommand } from "./provision-bhi-xnCG.js"; //#region src/index.d.ts interface ViteHubCliSpawnResult { exitCode: number | null; signal?: NodeJS.Signals | null; stdout?: string; } interface ViteHubCliSpawnOptions { cwd?: string; env?: NodeJS.ProcessEnv; stderr?: "inherit" | "pipe"; stdin?: "ignore" | "inherit"; stdout?: "inherit" | "pipe" | "stderr"; } type ViteHubCliSpawn = (command: string, args: string[], options?: ViteHubCliSpawnOptions) => Promise; interface ViteHubCliStreams { stderr: ViteHubCliStream; stdout: ViteHubCliStream; } interface ViteHubCliStream { flush?: () => unknown; write: (chunk: string | Uint8Array, encoding?: BufferEncoding | ((error?: Error | null) => void), callback?: (error?: Error | null) => void) => unknown; } type ViteHubCliEntrypointStream = { flush: () => unknown; write: (chunk: string | Uint8Array) => unknown; } | { flush?: never; write: (chunk: string | Uint8Array) => void | PromiseLike; }; interface ViteHubCliLoadedConfig { nitro?: unknown; plugins: readonly unknown[]; root: string; vitehubConfigResolved?: true; } export interface RunViteHubCliOptions { args?: string[]; /** Top-level commands that run before the project config loads, such as `vitehub status`. Defaults to the setup commands and `drain`. */ commands?: readonly ViteHubCliCommand[]; cwd?: string; env?: NodeJS.ProcessEnv; /** Namespaces that run without loading the project config, for example inside a deployed container. */ runtimeNamespaces?: ViteHubCliCommandNamespace[]; /** * Features that run without loading the project config, for example commands that only talk to a server. * Other features of a project namespace with the same name still load the config. */ runtimeFeatures?: ViteHubCliCommandNamespace[]; /** * Project namespaces whose help needs no project, by name. `vitehub --help` and * `vitehub --help` answer from them without loading the config, which takes seconds in a Nuxt * app. Every feature of such a namespace must print its help for `-h` or `--help` before it reads the project. */ helpNamespaces?: Record Promise>; /** Optional guard for runtime features that have a project-level opt-out. */ runtimeFeatureGuard?: (namespace: string, feature: string, cwd: string) => boolean | Promise; /** Replaces `fetch` in commands that call a running app or a host API. */ fetch?: typeof fetch; /** Replaces the host CLI runner of setup and provision commands, such as for `wrangler auth token`. */ runHostCli?: HostCliRun; /** Replaces how `vitehub deploy` loads the Provision Steps of the project config for a host. */ loadProvision?: (host: ProvisionProvider) => Promise; loadConfig?: (rootDir: string, command: "build" | "serve", mode?: string) => Promise; loadNuxtViteConfig?: (rootDir: string, command: "build" | "serve", mode?: string) => Promise<{ nitro?: unknown; plugins: readonly unknown[]; root?: string; } | undefined>; spawn?: ViteHubCliSpawn; stderr?: ViteHubCliStreams["stderr"]; stdout?: ViteHubCliStreams["stdout"]; } export interface RunViteHubCliEntrypointOptions extends Omit { stderr?: ViteHubCliEntrypointStream; stdout?: ViteHubCliEntrypointStream; } export declare function runViteHubCli(options?: RunViteHubCliOptions): Promise; export declare function runViteHubCliEntrypoint(options?: RunViteHubCliEntrypointOptions): void; //#endregion