/** * @fileoverview LAN hostname detection. * * Returns the first non-internal IPv4 address from `os.networkInterfaces()`, * suitable for printing in the startup banner so operators can open the * visualization page from another device on the same LAN without having to * know the host's IP. Falls back to `127.0.0.1` if no such address is * available (e.g. CI runner, sandbox). * * The function takes an optional `interfaces` map purely for testability — * production callers pass nothing and get the live `os.networkInterfaces()` * snapshot. */ import { type NetworkInterfaceInfo } from "os"; /** * The IPv4 loopback string used when no LAN address can be resolved. * * Keeping this as an exported constant lets both production callers and * tests refer to the same fallback value without hard-coding literals. */ export declare const LAN_HOST_FALLBACK = "127.0.0.1"; /** * Map of network interface name → list of addresses for that interface. * Matches the shape returned by Node's `os.networkInterfaces()`. */ export type NetworkInterfacesMap = Record; /** * Pick the first non-internal IPv4 address from `os.networkInterfaces()`. * * Iteration order follows `Object.values(interfaces)` which is insertion * order for string keys in modern V8, making the result deterministic * across calls within the same process (Node 20+). The function never * throws: on empty input or when no IPv4 address is found it returns * `LAN_HOST_FALLBACK`. */ export declare function getLanHostname(interfaces?: NetworkInterfacesMap): string; //# sourceMappingURL=lan-host.d.ts.map