CodeVetter · Repo Unpack · Data flow
puppeteer/puppeteer
Consumer options and configuration feed executable selection, process launch, and protocol connection setup. Protocol messages carry command identifiers and session identifiers across the transport boundary, with callbacks and session maps owning pending state. Downloads flow through providers into filesystem caches and metadata. Capture results flow back as strings, byte arrays, streams, or caller-selected files.
- getConfiguration searches Puppeteer config locations, overlays PUPPETEER_* variables, defaults the cache to ~/.cache/puppeteer, and defaults Firefox downloads off unless overridden.
- downloadBrowser transforms a configured version or revision into a concrete buildId through resolveBuildId, then passes browser/platform/cache/baseUrl and any alias to install.
- installWithProviders filters providers through supports, asks getDownloadUrl, and attempts installUrl in order; custom baseUrl suppresses the standard-source fallback unless forceFallbackForTesting is enabled.
- installUrl computes archive and installation paths, persists custom executable layouts, unpacks the archive, writes build aliases, runs platform setup, and removes the archive in finally.
- Chrome launch options become browser flags and a profile directory; BrowserLauncher forwards the resolved executable, args, environment, signal options, and process-exit cleanup hook to the browser process launcher.
- Connection._rawSend registers a timed callback and serializes method/params/id/sessionId; onMessage routes session traffic, resolves or rejects command callbacks, and emits unsolicited events.
- NetworkManager owns HTTP credentials and sends them in Fetch.continueWithAuth; repeated challenges for an already attempted request are canceled.
- Page.screenshot receives base64 capture data, returns it directly for base64 encoding, or decodes it to Uint8Array and optionally passes the caller's path to environment.writeFile.