import { type StatsCompilation } from 'webpack'; type ExcludeAssetsPatternFn = (assetName: string) => boolean; type ExcludeAssetsPattern = string | RegExp | ExcludeAssetsPatternFn; interface AddressInfo { address: string; family: string; port: number; } /** * Options for serving and analyzing a project. */ export type AnalyzeServeOptions = { /** * The port number to listen on. * @default 0 (auto-assign a port) */ port?: number; /** * The host address to bind to. * @default '127.0.0.1' */ host?: string; /** * Whether to automatically open the browser. * @default true */ openBrowser?: boolean; /** * The directory where the bundled files are located. */ bundleDir?: string; /** * Module sizes to show in the report by default. * Should be one of "parsed", "stat", or "gzip". * @default 'parsed' */ defaultSizes?: 'parsed' | 'stat' | 'gzip' | undefined; /** * Patterns that will be used to match against asset names to exclude them from the report. * If the pattern is a string, it will be converted to a regular expression via `new RegExp(str)`. * If the pattern is a function, it should have the following signature: `(assetName: string) => boolean` * and should return true to exclude the matching asset. * If multiple patterns are provided, an asset should match at least one of them to be excluded. * @default null */ excludeAssets?: null | ExcludeAssetsPattern | ExcludeAssetsPattern[] | undefined; /** * Content of the HTML title element; or a function of the form `() => string` that provides the content. * @default A function that returns the pretty printed current date and time. */ reportTitle?: string | (() => string) | undefined; /** * The URL printed to the console with server mode. * @default 'http://${listenHost}:${boundAddress.port}' */ analyzerUrl?: (options: { listenPort: string; listenHost: string; boundAddress: AddressInfo; }) => string; }; export type BundleStatsMapping = { [statsFilename: string]: StatsCompilation; }; export type PromptsOptionValue = { value: string; label: string; hint?: string; }; export {};