@oro-dxeco/playwright-aws-lambda 119.0.5 → 133.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/bin/al2.tar.br +0 -0
- package/dist/src/bin/al2023.tar.br +0 -0
- package/dist/src/bin/chromium.br +0 -0
- package/dist/src/bin/fonts.tar.br +0 -0
- package/dist/src/bin/swiftshader.tar.br +0 -0
- package/dist/src/chromium.js +5 -1
- package/dist/src/util/getEnvironmentVariables.js +2 -1
- package/dist/src/util/isLambdaRuntimeEnvironment.js +0 -2
- package/dist/src/util/isLambdaRuntimeEnvironmentNode20.d.ts +1 -0
- package/dist/src/util/isLambdaRuntimeEnvironmentNode20.js +6 -0
- package/package.json +3 -2
- package/dist/src/bin/aws.tar.br +0 -0
|
Binary file
|
|
Binary file
|
package/dist/src/bin/chromium.br
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/src/chromium.js
CHANGED
|
@@ -11,6 +11,7 @@ const isLambdaRuntimeEnvironment_1 = require("./util/isLambdaRuntimeEnvironment"
|
|
|
11
11
|
const isHeadlessModeEnabled_1 = require("./util/isHeadlessModeEnabled");
|
|
12
12
|
const fileExists_1 = require("./util/fileExists");
|
|
13
13
|
const getEnvironmentVariables_1 = require("./util/getEnvironmentVariables");
|
|
14
|
+
const isLambdaRuntimeEnvironmentNode20_1 = require("./util/isLambdaRuntimeEnvironmentNode20");
|
|
14
15
|
const { inflate } = require('lambdafs');
|
|
15
16
|
/**
|
|
16
17
|
* Returns a list of recommended additional Chromium flags.
|
|
@@ -81,7 +82,10 @@ async function getChromiumExecutablePath(headless) {
|
|
|
81
82
|
inflate(`${input}/swiftshader.tar.br`),
|
|
82
83
|
];
|
|
83
84
|
if (isLambdaRuntimeEnvironment_1.default()) {
|
|
84
|
-
promises.push(inflate(`${input}/
|
|
85
|
+
promises.push(inflate(`${input}/al2.tar.br`));
|
|
86
|
+
}
|
|
87
|
+
if (isLambdaRuntimeEnvironmentNode20_1.default()) {
|
|
88
|
+
promises.push(inflate(`${input}/al2023.tar.br`));
|
|
85
89
|
}
|
|
86
90
|
const result = await Promise.all(promises);
|
|
87
91
|
return result.shift();
|
|
@@ -4,11 +4,12 @@ exports.AWS_FONT_DIR = exports.AWS_TMP_DIR = void 0;
|
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const isLambdaRuntimeEnvironment_1 = require("./isLambdaRuntimeEnvironment");
|
|
7
|
+
const isLambdaRuntimeEnvironmentNode20_1 = require("./isLambdaRuntimeEnvironmentNode20");
|
|
7
8
|
exports.AWS_TMP_DIR = '/tmp/aws';
|
|
8
9
|
exports.AWS_FONT_DIR = '/tmp/fonts';
|
|
9
10
|
const AWS_LIB_DIR = `${exports.AWS_TMP_DIR}/lib`;
|
|
10
11
|
async function getEnvironmentVariables() {
|
|
11
|
-
if (!isLambdaRuntimeEnvironment_1.default()) {
|
|
12
|
+
if (!isLambdaRuntimeEnvironment_1.default() && !isLambdaRuntimeEnvironmentNode20_1.default()) {
|
|
12
13
|
return {};
|
|
13
14
|
}
|
|
14
15
|
const env = {};
|
|
@@ -7,8 +7,6 @@ function isLambdaRuntimeEnvironment() {
|
|
|
7
7
|
'AWS_Lambda_nodejs14.x',
|
|
8
8
|
'AWS_Lambda_nodejs16.x',
|
|
9
9
|
'AWS_Lambda_nodejs18.x',
|
|
10
|
-
'AWS_Lambda_nodejs20.x',
|
|
11
|
-
'AWS_Lambda_nodejs22.x',
|
|
12
10
|
].includes(process.env.AWS_EXECUTION_ENV);
|
|
13
11
|
}
|
|
14
12
|
exports.default = isLambdaRuntimeEnvironment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isLambdaRuntimeEnvironmentNode20(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function isLambdaRuntimeEnvironmentNode20() {
|
|
4
|
+
return ['AWS_Lambda_nodejs20.x', 'AWS_Lambda_nodejs22.x'].includes(process.env.AWS_EXECUTION_ENV);
|
|
5
|
+
}
|
|
6
|
+
exports.default = isLambdaRuntimeEnvironmentNode20;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oro-dxeco/playwright-aws-lambda",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "133.0.0-alpha.1",
|
|
4
4
|
"description": "Support for running Microsoft's Playwrite on AWS Lambda and Google Cloud functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"format-code": "prettier --write '**/*.[jt]s'"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sparticuz/chromium": "^
|
|
29
|
+
"@sparticuz/chromium": "^133.0.0",
|
|
30
|
+
"@sparticuz/chromium-min": "^133.0.0",
|
|
30
31
|
"lambdafs": "^2.1.1"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
package/dist/src/bin/aws.tar.br
DELETED
|
Binary file
|