puppeteer/assets/js/9b7d7cc7.a12c042c.js
release-please[bot] c1d0c3b3b2 deploy: f00a94a809
2024-02-17 10:21:49 +00:00

2 lines
9.0 KiB
JavaScript

/*! For license information please see 9b7d7cc7.a12c042c.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[41784],{840:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var t=n(85893),i=n(11151);const s={sidebar_label:"Configuration"},d="Configuration interface",o={id:"api/puppeteer.configuration",title:"Configuration interface",description:"Defines options to configure Puppeteer's behavior during installation and runtime.",source:"@site/../docs/api/puppeteer.configuration.md",sourceDirName:"api",slug:"/api/puppeteer.configuration",permalink:"/next/api/puppeteer.configuration",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Configuration"},sidebar:"api",previous:{title:"CommonEventEmitter.removeAllListeners",permalink:"/next/api/puppeteer.commoneventemitter.removealllisteners"},next:{title:"connect",permalink:"/next/api/puppeteer.connect"}},l={},c=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"configuration-interface",children:"Configuration interface"}),"\n",(0,t.jsx)(r.p,{children:"Defines options to configure Puppeteer's behavior during installation and runtime."}),"\n",(0,t.jsx)(r.p,{children:"See individual properties for more information."}),"\n",(0,t.jsx)(r.h4,{id:"signature",children:"Signature:"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-typescript",children:"export interface Configuration\n"})}),"\n",(0,t.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Property"}),(0,t.jsx)(r.th,{children:"Modifiers"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Default"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"browserRevision"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies a certain version of the browser you'd like Puppeteer to use."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_BROWSER_REVISION"}),"."]}),(0,t.jsxs)("p",{children:["See ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.puppeteernode.launch",children:"puppeteer.launch"})," on how executable path is inferred."]}),(0,t.jsxs)("p",{children:["Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such ",(0,t.jsx)("code",{children:"stable"})," or ",(0,t.jsx)("code",{children:"canary"})," it will only work during the installation of Puppeteer and it will fail when launching the browser."]})]}),(0,t.jsx)(r.td,{children:"The pinned browser version supported by the current Puppeteer version."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"cacheDirectory"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Defines the directory to be used by Puppeteer for caching."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_CACHE_DIR"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"path.join(os.homedir(), '.cache', 'puppeteer')"})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"defaultProduct"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:(0,t.jsx)(r.a,{href:"/next/api/puppeteer.product",children:"Product"})}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies which browser you'd like Puppeteer to use."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_PRODUCT"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"chrome"})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"downloadBaseUrl"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies the URL prefix that is used to download the browser."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_DOWNLOAD_BASE_URL"}),"."]})]}),(0,t.jsxs)(r.td,{children:["Either ",(0,t.jsx)(r.a,{href:"https://storage.googleapis.com/chrome-for-testing-public",children:"https://storage.googleapis.com/chrome-for-testing-public"})," or ",(0,t.jsx)(r.a,{href:"https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central",children:"https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central"}),", depending on the product."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"executablePath"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsxs)("p",{children:["Specifies an executable path to be used in ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.puppeteernode.launch",children:"puppeteer.launch"}),"."]}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_EXECUTABLE_PATH"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)(r.strong,{children:"Auto-computed."})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"experiments"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:(0,t.jsx)(r.a,{href:"/next/api/puppeteer.experimentsconfiguration",children:"ExperimentsConfiguration"})}),(0,t.jsx)(r.td,{children:"Defines experimental options for Puppeteer."}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"logLevel"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"'silent' | 'error' | 'warn'"}),(0,t.jsx)(r.td,{children:"Tells Puppeteer to log at the given level."}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"warn"})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"skipChromeDownload"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"boolean"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Tells Puppeteer to not Chrome download during installation."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_SKIP_CHROME_DOWNLOAD"}),"."]})]}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"skipChromeHeadlessShellDownload"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"boolean"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Tells Puppeteer to not chrome-headless-shell download during installation."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_SKIP_CHROME_HEADLESSS_HELL_DOWNLOAD"}),"."]})]}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"skipDownload"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"boolean"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Tells Puppeteer to not download during installation."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_SKIP_DOWNLOAD"}),"."]})]}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"temporaryDirectory"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Defines the directory to be used by Puppeteer for creating temporary files."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_TMP_DIR"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"os.tmpdir()"})})]})]})]})]})}function p(e={}){const{wrapper:r}={...(0,i.a)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},75251:(e,r,n)=>{var t=n(67294),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,n){var t,s={},c=null,h=null;for(t in void 0!==n&&(c=""+n),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(h=r.ref),r)d.call(r,t)&&!l.hasOwnProperty(t)&&(s[t]=r[t]);if(e&&e.defaultProps)for(t in r=e.defaultProps)void 0===s[t]&&(s[t]=r[t]);return{$$typeof:i,type:e,key:c,ref:h,props:s,_owner:o.current}}r.Fragment=s,r.jsx=c,r.jsxs=c},85893:(e,r,n)=>{e.exports=n(75251)},11151:(e,r,n)=>{n.d(r,{Z:()=>o,a:()=>d});var t=n(67294);const i={},s=t.createContext(i);function d(e){const r=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:d(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]);