@sparticuz/chromium
Advanced tools
Comparing version 122.0.0 to 123.0.0
@@ -67,16 +67,16 @@ /** Viewport taken from https://github.com/puppeteer/puppeteer/blob/main/docs/api/puppeteer.viewport.md */ | ||
* Returns the headless mode. | ||
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* "shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* `true` means the 'new' headless mode. | ||
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless | ||
* @returns true | "chrome-headless-shell" | ||
* @returns true | "shell" | ||
*/ | ||
static get headless(): true | "chrome-headless-shell"; | ||
static get headless(): true | "shell"; | ||
/** | ||
* Sets the headless mode. | ||
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* "shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* `true` means the 'new' headless mode. | ||
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless | ||
* @default "chrome-headless-shell" | ||
* @default "shell" | ||
*/ | ||
static set setHeadlessMode(value: true | "chrome-headless-shell"); | ||
static set setHeadlessMode(value: true | "shell"); | ||
/** | ||
@@ -83,0 +83,0 @@ * Returns whether the graphics stack is enabled or disabled |
@@ -181,3 +181,3 @@ "use strict"; | ||
const headlessFlags = [ | ||
this.headless === "chrome-headless-shell" ? "--headless='chrome-headless-shell'" : "--headless", | ||
this.headless === "shell" ? "--headless='shell'" : "--headless", | ||
]; | ||
@@ -268,6 +268,6 @@ return [ | ||
* Returns the headless mode. | ||
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* "shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* `true` means the 'new' headless mode. | ||
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless | ||
* @returns true | "chrome-headless-shell" | ||
* @returns true | "shell" | ||
*/ | ||
@@ -279,11 +279,11 @@ static get headless() { | ||
* Sets the headless mode. | ||
* "chrome-headless-shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* "shell" means the 'old' (legacy, chromium < 112) headless mode. | ||
* `true` means the 'new' headless mode. | ||
* https://developer.chrome.com/articles/new-headless/#try-out-the-new-headless | ||
* @default "chrome-headless-shell" | ||
* @default "shell" | ||
*/ | ||
static set setHeadlessMode(value) { | ||
if ((typeof value === "string" && value !== "chrome-headless-shell") || | ||
if ((typeof value === "string" && value !== "shell") || | ||
(typeof value === "boolean" && value !== true)) { | ||
throw new Error(`Headless mode must be either \`true\` or 'chrome-headless-shell', you entered '${value}'`); | ||
throw new Error(`Headless mode must be either \`true\` or 'shell', you entered '${value}'`); | ||
} | ||
@@ -318,3 +318,3 @@ this.headlessMode = value; | ||
*/ | ||
Chromium.headlessMode = "chrome-headless-shell"; | ||
Chromium.headlessMode = "shell"; | ||
/** | ||
@@ -321,0 +321,0 @@ * If true, the graphics stack and webgl is enabled, |
{ | ||
"name": "@sparticuz/chromium", | ||
"version": "122.0.0", | ||
"version": "123.0.0", | ||
"description": "Chromium Binary for Serverless Platforms", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
"dependencies": { | ||
"follow-redirects": "^1.15.5", | ||
"follow-redirects": "^1.15.6", | ||
"tar-fs": "^3.0.5" | ||
@@ -47,6 +47,6 @@ }, | ||
"@types/follow-redirects": "^1.14.4", | ||
"@types/node": "^20.11.19", | ||
"@types/node": "^20.11.30", | ||
"@types/tar-fs": "^2.0.4", | ||
"clean-modules": "^3.0.4", | ||
"typescript": "^5.3.3" | ||
"clean-modules": "^3.0.5", | ||
"typescript": "^5.4.2" | ||
}, | ||
@@ -53,0 +53,0 @@ "engines": { |
@@ -53,4 +53,4 @@ # @sparticuz/chromium | ||
// Optional: If you'd like to use the new headless mode. "chrome-headless-shell" is the default. | ||
// NOTE: Because we build the chrome-headless-shell binary, this option does not work. | ||
// Optional: If you'd like to use the new headless mode. "shell" is the default. | ||
// NOTE: Because we build the shell binary, this option does not work. | ||
// However, this option will stay so when we migrate to full chromium it will work. | ||
@@ -264,4 +264,4 @@ chromium.setHeadlessMode = true; | ||
| `executablePath(location?: string)` | `Promise<string>` | Returns the path the Chromium binary was extracted to. | | ||
| `setHeadlessMode` | `void` | Sets the headless mode to either `true` or `"chrome-headless-shell"` | | ||
| `headless` | `true \| "chrome-headless-shell"` | Returns `true` or `"chrome-headless-shell"` depending on what version of chrome's headless you are running | | ||
| `setHeadlessMode` | `void` | Sets the headless mode to either `true` or `"shell"` | | ||
| `headless` | `true \| "shell"` | Returns `true` or `"shell"` depending on what version of chrome's headless you are running | | ||
| `setGraphicsMode` | `void` | Sets the graphics mode to either `true` or `false` | | ||
@@ -268,0 +268,0 @@ | `graphics` | `boolean` | Returns a boolean depending on whether webgl is enabled or disabled | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63702476
Updatedfollow-redirects@^1.15.6