import pkgDir from"pkg-dir";import{PuppeteerNode}from"./node/Puppeteer.js";import{PUPPETEER_REVISIONS}from"./revisions.js";export const initializePuppeteerNode=e=>{const p=pkgDir.sync(__dirname);let r=PUPPETEER_REVISIONS.chromium;const o="puppeteer-core"===e,t=o?void 0:process.env.PUPPETEER_PRODUCT||process.env.npm_config_puppeteer_product||process.env.npm_package_config_puppeteer_product;return o||"firefox"!==t||(r=PUPPETEER_REVISIONS.firefox),new PuppeteerNode({projectRoot:p,preferredRevision:r,isPuppeteerCore:o,productName:t})};