
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
octoper-lighthouse-viewer
Advanced tools
Package with the lighthouse-viewer files from the official repositories of Lighthouse
This is the code extracted from the lighthouse original repository and packaged as an ES Modules for convenience and tree shaking.
The code for this repository is automatically generated every time is built, copying the files, adding the imports
and exports
for every file.
This is only for convenience, and it would be cool if some day the people from Lighthouse could export this code as well.
npm i lighthouse-viewer
import { DOM, ReportRenderer, ReportUIFeatures, Logger, template } from 'lighthouse-viewer';
import reportJson from './report.json';
const generateReport = (lighthouseReport) => {
const dom = new DOM(document);
const renderer = new ReportRenderer(dom);
const container = document.querySelector('main.lighthouse-viewer');
renderer.renderReport(lighthouseReport, container);
const features = new ReportUIFeatures(dom);
features.initFeatures(lighthouseReport);
};
const mountViewer = () => {
const htmlTemplate = document.createElement('div');
htmlTemplate.innerHTML = template;
const htmlTemplateElement = document.getElementById('html-template');
if (htmlTemplateElement) {
htmlTemplateElement.appendChild(htmlTemplate);
document.addEventListener('lh-log', (e) => {
const lhLogElement = document.querySelector('#lh-log');
if (lhLogElement) {
const logger = new Logger(lhLogElement);
switch (e.detail.cmd) {
case 'log':
logger.log(e.detail.msg);
break;
case 'warn':
logger.warn(e.detail.msg);
break;
case 'error':
logger.error(e.detail.msg);
break;
case 'hide':
logger.hide();
break;
default:
}
}
});
}
generateReport(reportJson);
};
mountViewer();
<div>
<div class="lh-root lh-vars">
<div id="html-template"></div>
<main class="lighthouse-viewer"></main>
<div id="lh-log"></div>
</div>
</div>
If there is any issue with the license or the copyrights, please let me know. There is no other intentions behind this besides making it easy to find.
FAQs
Package with the lighthouse-viewer files from the official repositories of Lighthouse
The npm package octoper-lighthouse-viewer receives a total of 0 weekly downloads. As such, octoper-lighthouse-viewer popularity was classified as not popular.
We found that octoper-lighthouse-viewer 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 RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.