Something went wrong. Try again.
A proposal for resolving a short, human-readable name of the form @handle/name into loaded, attributable web content, using AT Protocol identity as the namespace root atproto-web-names.szzt.app
Something went wrong. Try again.
641 B · 13 lines
JavaScript
at main
1234567891011121314import { access } from "node:fs/promises";
export async function configureBrowser() { if (process.env.PUPPETEER_EXECUTABLE_PATH) return process.env.PUPPETEER_EXECUTABLE_PATH; const candidates = process.platform === "darwin" ? ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"] : ["/usr/bin/google-chrome", "/usr/bin/chromium", "/usr/bin/chromium-browser"]; for (const candidate of candidates) { try { await access(candidate); process.env.PUPPETEER_EXECUTABLE_PATH = candidate; return candidate; } catch {} } // Puppeteer's downloaded browser is the fallback on a fresh npm install. return undefined;}