
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
lighthouse-keeper
Advanced tools
A wrapper tool of lighthouse to collect multiple web-site performance data.
$ npm i -g lighthouse-keeper
$ lhk --config [path to config]
$ npm i lighthouse-keeper
const lhk = require("lighthouse-keeper");
const config = require("./path/to/config");
lhk.exec(config)
.then((context) => {
console.log(context.getResults());
})
.catch((err) => {
console.error(err);
});
{
targets: [{ url: "https://google.com" }...],
reporters: [Reporter...],
chromeNum: 2,
puppeteerConfig: {puppeteerConfig},
lighthouseConfig: {lighthouseConfig}
}
Array of target to perform audits by lighthouse.
The target object must contains url
property as follows:
{ url: "https://google.com" }
url
https://google.com
const {readCsvTargetList} = require("lighthouse-keeper").config;
module.exports = {
targets: readCsvTargetList("/path/to/*.csv"),
...
}
Array of Reporter instance.
There are two built-in reporters; JsonReporter
and CsvReporter
.
const {JsonReporter,CsvReporter} = require("lighthouse-keeper").reporter;
module.exports = {
targets: [{ url: "https://google.com" }...],
reporters: [
new JsonReporter("path/to/output.json"),
new CsvReporter("path/to/output.csv")
],
...
}
const {Reporter} = require("lighthouse-keeper").reporter;
class MyReporter extends Reporter{
constructor(){
super();
}
open(){...}
write(){...}
close(){...}
}
const MyReporter = require("path/to/my-reporter");
{
targets: [{ url: "https://google.com" }...],
reporters: [
new MyReporter()
],
...
}
Number of chromes to launch for running lighthouse.
This parameter is optional. Default value is 1
;
Object of options to launch chrome via puppeteer. See launch config of puppeteer
This parameter is optional. Default value is follows:
{
headless: true
}
Object of options to run lighthouse. See config of LightHouse
This parameter is optional. Default value is follows:
{
extends: 'lighthouse:default',
settings: {
onlyCategories: ['performance'],
}
}
FAQs
collecting multiple web-site performances by using lighthouse
We found that lighthouse-keeper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.