Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
playwright-aws-lambda
Advanced tools
Support for running Microsoft's Playwrite on AWS Lambda and Google Cloud functions
Support for Playwright running on AWS Lambda and Google Cloud Functions.
NOTE: Currently only Chromium is supported.
npm install playwright-core playwright-aws-lambda --save
This package works with the nodejs10.x
, nodejs12.x
, nodejs14.x
, nodejs16.x
, nodejs18.x
and nodejs20.x
AWS Lambda runtimes
out of the box.
const playwright = require('playwright-aws-lambda');
exports.handler = async (event, context) => {
let browser = null;
try {
browser = await playwright.launchChromium();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto(event.url || 'https://example.com');
console.log('Page title: ', await page.title());
} catch (error) {
throw error;
} finally {
if (browser) {
await browser.close();
}
}
};
Method / Property | Returns | Description |
---|---|---|
launchChromium | {!Promise<playwright.ChromiumBrowser>} | Launches the Chromium browser. |
loadFont(url) | {Promise<void>} | Downloads and activates a custom font |
If you need custom font support by e.g. emojicons in your browser, you have to
load it by using the loadFont(url: string)
function before you launch the
browser.
await loadFont(
'https://raw.githack.com/googlei18n/noto-emoji/master/fonts/NotoColorEmoji.ttf'
);
This project is based on the work of chrome-aws-lambda.
FAQs
Support for running Microsoft's Playwrite on AWS Lambda and Google Cloud functions
We found that playwright-aws-lambda demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.