@checkly/chrome-aws-lambda
Advanced tools
Comparing version 101.0.495-1.53 to 101.0.495-1.53-2
@@ -72,5 +72,18 @@ "use strict"; | ||
const promises = [ | ||
util_1.inflate(folder, `${input}/chromium.br`), | ||
util_1.inflate(folder, `${input}/swiftshader.tar.br`), | ||
util_1.inflate(folder, `${input}/aws.tar.br`), | ||
util_1.inflate({ | ||
folder, | ||
file: `${input}/chromium.br` | ||
}), | ||
// Swiftshader needs to be extracted at the same level as chromium and not inside a swiftshader director | ||
// https://github.com/alixaxel/chrome-aws-lambda/pull/264#issuecomment-1136311984 | ||
util_1.inflate({ | ||
folder, | ||
file: `${input}/swiftshader.tar.br`, | ||
targetFolder: folder, | ||
checkFileToExists: `${folder}/libGLESv2.so` | ||
}), | ||
util_1.inflate({ | ||
folder, | ||
file: `${input}/aws.tar.br` | ||
}), | ||
]; | ||
@@ -77,0 +90,0 @@ const awsFolder = path_1.join(folder, 'aws'); |
@@ -0,8 +1,13 @@ | ||
interface IInflateProps { | ||
folder: string; | ||
file: string; | ||
targetFolder?: string; | ||
checkFileToExists?: string; | ||
} | ||
export declare function fileExists(filepath: string): Promise<boolean>; | ||
/** | ||
* Decompresses a (tarballed) Brotli or Gzip compressed file and returns the path to the decompressed file/folder. | ||
* | ||
* @param file Path of the file to decompress. | ||
*/ | ||
export declare function inflate(folder: string, file: string): Promise<unknown>; | ||
export declare function inflate({ folder, file, targetFolder, checkFileToExists }: IInflateProps): Promise<unknown>; | ||
export declare function fontConfig(awsFolder: string): string; | ||
export {}; |
@@ -39,8 +39,6 @@ "use strict"; | ||
* Decompresses a (tarballed) Brotli or Gzip compressed file and returns the path to the decompressed file/folder. | ||
* | ||
* @param file Path of the file to decompress. | ||
*/ | ||
async function inflate(folder, file) { | ||
const output = path.join(folder, path.basename(file).replace(/[.](?:t(?:ar(?:[.](?:br|gz))?|br|gz)|br|gz)$/i, '')); | ||
if (await fileExists(output)) { | ||
async function inflate({ folder, file, targetFolder, checkFileToExists }) { | ||
const output = targetFolder !== null && targetFolder !== void 0 ? targetFolder : path.join(folder, path.basename(file).replace(/[.](?:t(?:ar(?:[.](?:br|gz))?|br|gz)|br|gz)$/i, '')); | ||
if (await fileExists(checkFileToExists !== null && checkFileToExists !== void 0 ? checkFileToExists : output)) { | ||
return output; | ||
@@ -51,3 +49,3 @@ } | ||
let target = null; | ||
if (/[.](?:t(?:ar(?:[.](?:br|gz))?|br|gz))$/i.test(file) === true) { | ||
if (/[.](?:t(?:ar(?:[.](?:br|gz))?|br|gz))$/i.test(file)) { | ||
target = tar_fs.extract(output); | ||
@@ -70,3 +68,3 @@ target.once('finish', () => { | ||
}); | ||
if (/(?:br|gz)$/i.test(file) === true) { | ||
if (/(?:br|gz)$/i.test(file)) { | ||
source.pipe(/br$/i.test(file) ? zlib.createBrotliDecompress({ chunkSize: 2 ** 21 }) : zlib.createUnzip({ chunkSize: 2 ** 21 })).pipe(target); | ||
@@ -87,3 +85,3 @@ } | ||
<dir>/opt/.fonts</dir> | ||
<match target="pattern"> | ||
@@ -97,3 +95,3 @@ <test qual="any" name="family"> | ||
</match> | ||
<match target="pattern"> | ||
@@ -107,3 +105,3 @@ <test qual="any" name="family"> | ||
</match> | ||
<match target="pattern"> | ||
@@ -117,3 +115,3 @@ <test qual="any" name="family"> | ||
</match> | ||
<config></config> | ||
@@ -120,0 +118,0 @@ </fontconfig>`; |
{ | ||
"name": "@checkly/chrome-aws-lambda", | ||
"private": false, | ||
"version": "101.0.4951.53", | ||
"version": "101.0.4951.53-2", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Alix Axel" |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
54454822
1833