Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pagexray

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagexray - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

5

CHANGELOG.md
# CHANGELOG - PageXray
version 2.3.1 2018-05-15
------------------------
### Fixed
* If one of the WebPageTest runs failed, PageXray was broken.
version 2.3.0 2018-05-12

@@ -4,0 +9,0 @@ ------------------------

61

lib/webpagetest.js

@@ -8,32 +8,37 @@ 'use strict';

const pageXrayPage = pages[i];
pageXrayPage.visualMetrics = {};
if (harPage._lastVisualChange) {
pageXrayPage.visualMetrics.LastVisualChange = harPage._lastVisualChange;
}
if (harPage._SpeedIndex) {
pageXrayPage.visualMetrics.SpeedIndex = harPage._SpeedIndex;
}
if (harPage.pageTimings._startRender) {
pageXrayPage.visualMetrics.FirstVisualChange =
harPage.pageTimings._startRender;
}
if (harPage._visualComplete85) {
pageXrayPage.visualMetrics.VisualComplete85 = harPage._visualComplete85;
}
// sometimes we WebPageTest doesn't send data for that page, if the run failed
if (pageXrayPage) {
pageXrayPage.visualMetrics = {};
if (harPage._lastVisualChange) {
pageXrayPage.visualMetrics.LastVisualChange =
harPage._lastVisualChange;
}
if (harPage._SpeedIndex) {
pageXrayPage.visualMetrics.SpeedIndex = harPage._SpeedIndex;
}
if (harPage.pageTimings._startRender) {
pageXrayPage.visualMetrics.FirstVisualChange =
harPage.pageTimings._startRender;
}
if (harPage._visualComplete85) {
pageXrayPage.visualMetrics.VisualComplete85 =
harPage._visualComplete85;
}
pageXrayPage.meta.title = harPage.title;
pageXrayPage.meta.title = harPage.title;
// take the CPU data that starts with _cpu and remove
// the _cpu part
const cpu = Object.keys(harPage)
.filter(metricName => {
return metricName.indexOf('_cpu') === 0;
})
.reduce((cpuData, name) => {
cpuData[name.split('.')[1]] = harPage[name];
return cpuData;
}, {});
if (Object.keys(cpu).length > 0) {
pageXrayPage.cpu = {};
pageXrayPage.cpu.events = cpu;
// take the CPU data that starts with _cpu and remove
// the _cpu part
const cpu = Object.keys(harPage)
.filter(metricName => {
return metricName.indexOf('_cpu') === 0;
})
.reduce((cpuData, name) => {
cpuData[name.split('.')[1]] = harPage[name];
return cpuData;
}, {});
if (Object.keys(cpu).length > 0) {
pageXrayPage.cpu = {};
pageXrayPage.cpu.events = cpu;
}
}

@@ -40,0 +45,0 @@ }

{
"name": "pagexray",
"version": "2.3.0",
"version": "2.3.1",
"description": "Xray your HAR file and know all about the page",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc