import { Credential } from "./types"; import type { IsomorphicRollupFs } from "../fs-iface"; /** * Creates dev server plugins for Rollup with live reload and optional proxy support. * Returns an array of [devServer, livereload] plugins, or undefined if no watch paths are provided. * @param config Configuration object for the dev server * @param config.watchPaths Array of directories to serve and watch for live reload * @param config.proxyPaths Array of paths to proxy to the ServiceNow instance * @param config.credential ServiceNow authentication credentials, or undefined * @param config.httpProxy Optional HTTP proxy server URL for tunnelling upstream requests (e.g. `http://proxy.corp:8080`) * @returns Array of Rollup plugins [devServer, livereload], or undefined if watchPaths is empty * * Note: auth headers are fetched once via `credential.getHeaders()` at call time (before * the dev server starts). They are reused for the lifetime of the session. If the credential * token expires during a long dev session, proxied requests will silently fail with auth * errors from the instance. Restart the dev server to refresh credentials. */ export declare function devServerPlugins(config: { watchPaths: string[]; proxyPaths: string[]; credential: Credential | undefined; httpProxy?: string; fs?: IsomorphicRollupFs; }): Promise;