/// <reference types="node" />
import type { Routes, DevConfig, RsbuildEntry, RsbuildConfig, CompilerTapFn, OutputStructure } from './types';
import { Logger } from './logger';
import type { Compiler } from '@rspack/core';
export declare const formatRoutes: (entry: RsbuildEntry, prefix: string | undefined, outputStructure: OutputStructure | undefined) => Routes;
export declare function printServerURLs(urls: Array<{
    url: string;
    label: string;
}>, routes: Routes, logger?: Logger): void;
/**
 * hmr socket connect path
 */
export declare const HMR_SOCK_PATH = "/rsbuild-hmr";
export declare const mergeDevOptions: ({ rsbuildConfig, port, }: {
    rsbuildConfig: RsbuildConfig;
    port: number;
}) => DevConfig;
export declare const getServerOptions: ({ rsbuildConfig, getPortSilently, }: {
    rsbuildConfig: RsbuildConfig;
    getPortSilently?: boolean | undefined;
}) => Promise<{
    port: number;
    host: string;
    https: boolean;
    serverConfig: import("./types").ServerConfig;
}>;
export declare const getDevOptions: ({ rsbuildConfig, getPortSilently, }: {
    rsbuildConfig: RsbuildConfig;
    getPortSilently?: boolean | undefined;
}) => Promise<{
    devServerConfig: {
        hmr?: boolean | undefined;
        startUrl?: string | boolean | string[] | undefined;
        beforeStartUrl?: import("./types").ArrayOrNot<() => void | Promise<void>> | undefined;
        assetPrefix?: string | boolean | undefined;
        progressBar?: boolean | import("./types").ProgressBarConfig | undefined;
        client?: {
            path?: string | undefined;
            port?: string | undefined;
            host?: string | undefined;
            protocol?: string | undefined;
        } | undefined;
        setupMiddlewares?: ((middlewares: {
            unshift: (...handlers: import("./types").RequestHandler[]) => void;
            push: (...handlers: import("./types").RequestHandler[]) => void;
        }, server: import("./types").ServerAPIs) => void)[] | undefined;
        writeToDisk?: boolean | ((filename: string) => boolean) | undefined;
        compress?: boolean | undefined;
        publicDir?: import("./types").PublicDir | undefined;
        port?: number | undefined;
        https?: import("https").ServerOptions | undefined;
        host?: string | undefined;
        headers?: Record<string, string | string[]> | undefined;
        htmlFallback?: import("./types").HtmlFallback | undefined;
        historyApiFallback?: boolean | import("./types").HistoryApiFallbackOptions | undefined;
        proxy?: import("./types").ProxyOptions | undefined;
        strictPort?: boolean | undefined;
    };
    port: number;
    host: string;
    https: boolean;
}>;
type ServerCallbacks = {
    onInvalid: () => void;
    onDone: (stats: any) => void;
};
export declare const setupServerHooks: (compiler: {
    name?: Compiler['name'];
    hooks: {
        compile: CompilerTapFn<ServerCallbacks['onInvalid']>;
        invalid: CompilerTapFn<ServerCallbacks['onInvalid']>;
        done: CompilerTapFn<ServerCallbacks['onDone']>;
    };
}, hookCallbacks: ServerCallbacks) => void;
export declare const isClientCompiler: (compiler: {
    options: {
        target?: Compiler['options']['target'];
    };
}) => boolean;
export {};
