@sparticuz/chromium
Advanced tools
Comparing version 119.0.1-next.1 to 119.0.1-next.2
@@ -26,7 +26,9 @@ "use strict"; | ||
if (process.env["AWS_EXECUTION_ENV"] && | ||
process.env["AWS_EXECUTION_ENV"].includes("AWS_Lambda_nodejs")) { | ||
process.env["AWS_EXECUTION_ENV"].includes("AWS_Lambda_nodejs") && | ||
!process.env["AWS_EXECUTION_ENV"].includes("20.x")) { | ||
return true; | ||
} | ||
else if (process.env["AWS_LAMBDA_JS_RUNTIME"] && | ||
process.env["AWS_LAMBDA_JS_RUNTIME"].includes("nodejs")) { | ||
process.env["AWS_LAMBDA_JS_RUNTIME"].includes("nodejs") && | ||
!process.env["AWS_LAMBDA_JS_RUNTIME"].includes("20.x")) { | ||
return true; | ||
@@ -42,2 +44,6 @@ } | ||
} | ||
else if (process.env["AWS_LAMBDA_JS_RUNTIME"] && | ||
process.env["AWS_LAMBDA_JS_RUNTIME"].includes("20.x")) { | ||
return true; | ||
} | ||
return false; | ||
@@ -44,0 +50,0 @@ }; |
@@ -13,12 +13,11 @@ "use strict"; | ||
if (process.env["FONTCONFIG_PATH"] === undefined) { | ||
process.env["FONTCONFIG_PATH"] = "/tmp/aws"; | ||
process.env["FONTCONFIG_PATH"] = "/tmp/fonts"; | ||
} | ||
if (process.env["LD_LIBRARY_PATH"] === undefined) { | ||
process.env["LD_LIBRARY_PATH"] = "/tmp/aws/lib"; | ||
process.env["LD_LIBRARY_PATH"] = "/tmp/al2/lib"; | ||
} | ||
else if (process.env["LD_LIBRARY_PATH"].startsWith("/tmp/aws/lib") !== true) { | ||
else if (process.env["LD_LIBRARY_PATH"].startsWith("/tmp/al2/lib") !== true) { | ||
process.env["LD_LIBRARY_PATH"] = [ | ||
...new Set([ | ||
"/tmp/aws/lib", | ||
(0, helper_1.isRunningInAwsLambdaNode20)() ? "/tmp/al2023/lib" : undefined, | ||
"/tmp/al2/lib", | ||
...process.env["LD_LIBRARY_PATH"].split(":"), | ||
@@ -29,2 +28,18 @@ ]), | ||
} | ||
if ((0, helper_1.isRunningInAwsLambdaNode20)()) { | ||
if (process.env["FONTCONFIG_PATH"] === undefined) { | ||
process.env["FONTCONFIG_PATH"] = "/tmp/fonts"; | ||
} | ||
if (process.env["LD_LIBRARY_PATH"] === undefined) { | ||
process.env["LD_LIBRARY_PATH"] = "/tmp/al2023/lib"; | ||
} | ||
else if (process.env["LD_LIBRARY_PATH"].startsWith("/tmp/al2023/lib") !== true) { | ||
process.env["LD_LIBRARY_PATH"] = [ | ||
...new Set([ | ||
"/tmp/al2023/lib", | ||
...process.env["LD_LIBRARY_PATH"].split(":"), | ||
]), | ||
].join(":"); | ||
} | ||
} | ||
class Chromium { | ||
@@ -231,3 +246,6 @@ /** | ||
// Extract the required files | ||
const promises = [lambdafs_1.default.inflate(`${input}/chromium.br`)]; | ||
const promises = [ | ||
lambdafs_1.default.inflate(`${input}/chromium.br`), | ||
lambdafs_1.default.inflate(`${input}/fonts.tar.br`), | ||
]; | ||
if (this.graphics) { | ||
@@ -239,7 +257,7 @@ // Only inflate graphics stack if needed | ||
// If running in AWS Lambda, extract more required files | ||
promises.push(lambdafs_1.default.inflate(`${input}/aws.tar.br`)); | ||
if ((0, helper_1.isRunningInAwsLambdaNode20)()) { | ||
promises.push(lambdafs_1.default.inflate(`${input}/al2023.tar.br`)); | ||
} | ||
promises.push(lambdafs_1.default.inflate(`${input}/al2.tar.br`)); | ||
} | ||
if ((0, helper_1.isRunningInAwsLambdaNode20)()) { | ||
promises.push(lambdafs_1.default.inflate(`${input}/al2023.tar.br`)); | ||
} | ||
// Await all extractions | ||
@@ -246,0 +264,0 @@ const result = await Promise.all(promises); |
{ | ||
"name": "@sparticuz/chromium", | ||
"version": "119.0.1-next.1", | ||
"version": "119.0.1-next.2", | ||
"description": "Chromium Binary for Serverless Platforms", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
61046065
14
564
29
6