import type { RsbuildConfig, Context, OnAfterStartDevServerFn, OnBeforeStartDevServerFn, CompilerTapFn, DevConfig, RsbuildEntry, Routes } from './types';
import { Logger } from './logger';
import { createAsyncHook } from './createHook';
import type { Compiler } from '@rspack/core';
export declare const formatRoutes: (entry: RsbuildEntry, prefix?: string) => 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 getDevOptions: ({
  rsbuildConfig,
  strictPort,
  getPortSilently
}: {
  rsbuildConfig: RsbuildConfig;
  strictPort?: boolean | undefined;
  getPortSilently?: boolean | undefined;
}) => Promise<{
  devServerConfig: DevConfig;
  port: number;
  host: string;
  https: boolean;
}>;
/** The context used by startDevServer. */
export type DevServerContext = Context & {
  hooks: {
    onBeforeStartDevServerHook: ReturnType<typeof createAsyncHook<OnBeforeStartDevServerFn>>;
    onAfterStartDevServerHook: ReturnType<typeof createAsyncHook<OnAfterStartDevServerFn>>;
  };
  config: Readonly<RsbuildConfig>;
};
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 {};