import { ChildProcess } from 'child_process'; /** * Default timeout (ms) to wait for cloudflared to output the quick tunnel URL. * Cloudflared prints the URL to stdout when the tunnel is ready. */ export declare const DEFAULT_TUNNEL_URL_TIMEOUT_MS = 15000; /** * Regex to extract the quick tunnel HTTPS URL from cloudflared output. * Quick tunnels use trycloudflare.com (e.g. https://random-subdomain.trycloudflare.com). * Documented: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/ */ export declare const TUNNEL_URL_REGEX: RegExp; export interface StartTunnelResult { url: string; process: ChildProcess; } /** * Spawns cloudflared in quick-tunnel mode and returns a promise that resolves * with the public HTTPS URL when it appears in stdout/stderr, or rejects on * timeout or parse failure. * * Requires cloudflared on PATH (e.g. brew install cloudflare/cloudflare/cloudflared). * No Cloudflare account or login required for quick tunnels. * * @param localPort - Port where the local service is listening (e.g. Lambda on 3001) * @param timeoutMs - Max time to wait for the URL (default DEFAULT_TUNNEL_URL_TIMEOUT_MS) * @returns Promise resolving with { url, process }. Caller must kill process on shutdown. */ export declare function startCloudflaredTunnel(localPort: number, timeoutMs?: number): Promise;