Merge pull request #224 from Sparticuz/chromium/121
This commit is contained in:
commit
857ae08500
2
Makefile
2
Makefile
|
|
@ -14,7 +14,7 @@ test:
|
|||
npm install --fund=false --package-lock=false
|
||||
npm run build
|
||||
mkdir -p nodejs
|
||||
npm install --prefix nodejs/ tar-fs@3.0.4 follow-redirects@1.15.3 --bin-links=false --fund=false --omit=optional --omit=dev --package-lock=false --save=false
|
||||
npm install --prefix nodejs/ tar-fs@3.0.4 follow-redirects@1.15.5 --bin-links=false --fund=false --omit=optional --omit=dev --package-lock=false --save=false
|
||||
npm pack
|
||||
mkdir -p nodejs/node_modules/@sparticuz/chromium/
|
||||
tar --directory nodejs/node_modules/@sparticuz/chromium/ --extract --file sparticuz-chromium-*.tgz --strip-components=1
|
||||
|
|
|
|||
|
|
@ -232,10 +232,10 @@ This method should be invoked _before_ launching Chromium.
|
|||
|
||||
Alternatively, it's also possible to provision fonts via AWS Lambda Layers.
|
||||
|
||||
Simply create a directory named `fonts` and place any font faces you want there:
|
||||
Simply create a directory named `.fonts` or `fonts` and place any font faces you want there:
|
||||
|
||||
```
|
||||
fonts
|
||||
.fonts
|
||||
├── NotoColorEmoji.ttf
|
||||
└── Roboto.ttf
|
||||
```
|
||||
|
|
|
|||
|
|
@ -3,21 +3,21 @@
|
|||
"url": "https://example.com",
|
||||
"expected": {
|
||||
"title": "Example Domain",
|
||||
"screenshot": "cf91d541795c36da2e8733ed389e9a7951d5fe7f"
|
||||
"screenshot": "3f1863ac017614ce6a389cf719da28b774595abe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "https://example.com",
|
||||
"expected": {
|
||||
"title": "Example Domain",
|
||||
"screenshot": "cf91d541795c36da2e8733ed389e9a7951d5fe7f"
|
||||
"screenshot": "3f1863ac017614ce6a389cf719da28b774595abe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "https://get.webgl.org",
|
||||
"expected": {
|
||||
"remove": "logo-container",
|
||||
"screenshot": "2ca647063ec0be49a6191a7716c6a125e0a5b31b"
|
||||
"screenshot": "bf35ed6405670c506b549906f6b467421bc8b430"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ exports.handler = async (event, context) => {
|
|||
ignoreHTTPSErrors: true,
|
||||
});
|
||||
|
||||
console.log("Chromium verion", await browser.version());
|
||||
console.log("Chromium version", await browser.version());
|
||||
|
||||
const contexts = [browser.defaultBrowserContext()];
|
||||
|
||||
|
|
@ -46,7 +46,14 @@ exports.handler = async (event, context) => {
|
|||
}, job.expected.remove);
|
||||
}
|
||||
const screenshot = await page.screenshot();
|
||||
// console.log(screenshot.toString('base64'), createHash('sha1').update(screenshot.toString('base64')).digest('hex'));
|
||||
/*
|
||||
console.log(
|
||||
`data:image/png;base64,${screenshot.toString("base64")}`,
|
||||
createHash("sha1")
|
||||
.update(screenshot.toString("base64"))
|
||||
.digest("hex")
|
||||
);
|
||||
*/
|
||||
ok(
|
||||
createHash("sha1")
|
||||
.update(screenshot.toString("base64"))
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ instance_size=c6i.12xlarge
|
|||
ansible_connection=ssh
|
||||
ansible_python_interpreter=auto_silent
|
||||
ansible_ssh_private_key_file=ansible.pem
|
||||
chromium_revision=1204232
|
||||
chromium_revision=1233107
|
||||
|
|
|
|||
BIN
bin/chromium.br
BIN
bin/chromium.br
Binary file not shown.
BIN
bin/fonts.tar.br
BIN
bin/fonts.tar.br
Binary file not shown.
Binary file not shown.
|
|
@ -9,14 +9,14 @@
|
|||
"version": "119.0.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.3",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"tar-fs": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node16": "^16.1.1",
|
||||
"@tsconfig/strictest": "^2.0.2",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/node": "^18.19.3",
|
||||
"@types/node": "^20.11.10",
|
||||
"@types/tar-fs": "^2.0.4",
|
||||
"clean-modules": "^3.0.4",
|
||||
"typescript": "^5.3.3"
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.19.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.3.tgz",
|
||||
"integrity": "sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==",
|
||||
"version": "20.11.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.10.tgz",
|
||||
"integrity": "sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
|
|
@ -124,9 +124,9 @@
|
|||
"integrity": "sha512-IgfweLvEpwyA4WgiQe9Nx6VV2QkML2NkvZnk1oKnIzXgXdWxuhF7zw4DvLTPZJn6PIUneiAXPF24QmoEqHTjyw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
||||
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@
|
|||
"test": "make clean && make && make pretest && make test"
|
||||
},
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.3",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"tar-fs": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node16": "^16.1.1",
|
||||
"@tsconfig/strictest": "^2.0.2",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/node": "^18.19.3",
|
||||
"@types/node": "^20.11.10",
|
||||
"@types/tar-fs": "^2.0.4",
|
||||
"clean-modules": "^3.0.4",
|
||||
"typescript": "^5.3.3"
|
||||
|
|
|
|||
Loading…
Reference in New Issue