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.
@foo-software/lighthouse-trigger
Advanced tools
An NPM module to trigger Lighthouse audits to be saved in the cloud.
This project is a work in progress - a pre-release version. Please do not attempt to use yet. The projected release date is middle of October, 2019.
@foo-software/lighthouse-trigger
An NPM module to trigger Lighthouse audits to be saved in the cloud. Triggers audits for URLs associated with a lighthouse-check.com account. Utilizing this module within a release or integration workflow would be a standard use case.
npm install @foo-software/lighthouse-trigger
or
yarn add @foo-software/lighthouse-trigger
Calling lighthouseTrigger
in the example below will trigger Lighthouse audits for all URLs associated with the account having an API token of abc123
.
const { lighthouseTrigger } = require('@foo-software/lighthouse-trigger');
const init = async () => {
const response = await lighthouseTrigger({
apiToken: 'abc123'
});
console.log('response', response);
};
init();
To run Lighthouse audits on a subset of URLs, you can specify an array of URLs denoted by their respective API tokens. Example below.
lighthouseTrigger({
apiToken: 'abc123',
urls: ['cde456', 'fgh789']
});
lighthouseTrigger
accepts a single configuration object with the below properties we can think of as parameters.
Name | Description | Type | Required |
---|---|---|---|
apiToken | The lighthouse-check account API token found in the dashboard. | string | yes |
urls | An optional list of URLs represented by their respective API token. URL API tokens can be found in the dashboard. | array | no |
tag | An optional tag or name (example: build #2 or v0.0.2 ). | string | no |
It's important to note that lighthouseTrigger()
function is encapsulated by a try / catch, so an object should always be returned. Errors are caught, but populated in the return object below.
Name | Description | Type |
---|---|---|
code | A code to signify failure or succes. | oneOf(["SUCCESS", "ERROR_GENERIC", ...]) see errorCodes.js for all error codes. |
data | An array of results returned by the API. | array |
error | If there was a problem, this property will typically be populated with an error object. This field is only populated when an error was caught or the params didn't pass validation. | object (typically an error object) |
message | A message to elaborate on the code. This field isn't always populated. | string |
This package was brought to you by Foo - a website performance monitoring tool. Create a free account with standard performance testing. Automatic website performance testing, uptime checks, charts showing performance metrics by day, month, and year. Foo also provides real time notifications when performance and uptime notifications when changes are detected. Users can integrate email, Slack and PagerDuty notifications.
FAQs
An NPM module to trigger Lighthouse audits to be saved in the cloud.
We found that @foo-software/lighthouse-trigger 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.
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.