Comparing version 0.7.0 to 0.8.0
# CHANGELOG - PageXray | ||
version 0.8.0 - 2016-05-15 | ||
------------------------ | ||
### Changed | ||
Even cleaner structure for first party vs third party assets. | ||
version 0.7.0 - 2016-05-15 | ||
@@ -4,0 +9,0 @@ ------------------------ |
@@ -43,11 +43,11 @@ 'use strict'; | ||
*/ | ||
domainInfo: function(asset, domains, config) { | ||
domainInfo: function(asset, domains) { | ||
let domain = util.getHostname(asset.url); | ||
if (domains.domain[domain]) { | ||
domains.domain[domain].transferSize += asset.transferSize; | ||
domains.domain[domain].contentSize += asset.contentSize; | ||
domains.domain[domain].headerSize += asset.headerSize; | ||
domains.domain[domain].requests += 1; | ||
if (domains[domain]) { | ||
domains[domain].transferSize += asset.transferSize; | ||
domains[domain].contentSize += asset.contentSize; | ||
domains[domain].headerSize += asset.headerSize; | ||
domains[domain].requests += 1; | ||
} else { | ||
domains.domain[domain] = { | ||
domains[domain] = { | ||
requests: 1, | ||
@@ -59,21 +59,2 @@ transferSize: asset.transferSize, | ||
} | ||
// add first/third party info | ||
if (config.firstParty) { | ||
// is it a third party asset? | ||
if (asset.url.match(config.firstParty) === null) { | ||
domains.summary.thirdParty.requests = domains.summary.thirdParty.requests + 1 || 1; | ||
domains.summary.thirdParty.transferSize = domains.summary.thirdParty.transferSize + asset.transferSize || asset.transferSize; | ||
domains.summary.thirdParty.contentSize= domains.summary.thirdParty.contentSize + asset.contentSize|| asset.contentSize; | ||
domains.summary.thirdParty.headerSize = domains.summary.thirdParty.headerSize + asset.headerSize || asset.headerSize; | ||
} | ||
else { | ||
domains.summary.firstParty.requests = domains.summary.firstParty.requests + 1 || 1; | ||
domains.summary.firstParty.transferSize = domains.summary.firstParty.transferSize + asset.transferSize || asset.transferSize; | ||
domains.summary.firstParty.contentSize= domains.summary.firstParty.contentSize + asset.contentSize|| asset.contentSize; | ||
domains.summary.firstParty.headerSize = domains.summary.firstParty.headerSize + asset.headerSize || asset.headerSize; | ||
} | ||
} | ||
}, | ||
@@ -80,0 +61,0 @@ |
@@ -47,3 +47,5 @@ 'use strict'; | ||
responseCodes: {}, | ||
domains: {summary: {thirdParty: {}, firstParty: {}}, domain: {}}, | ||
firstParty: {}, | ||
thirdParty: {}, | ||
domains: {}, | ||
expireStats: new Statistics(), | ||
@@ -71,2 +73,19 @@ lastModifiedStats: new Statistics() | ||
// add first/third party info | ||
if (config.firstParty) { | ||
// is it a third party asset? | ||
if (asset.url.match(config.firstParty) === null) { | ||
myPage.thirdParty.requests = myPage.thirdParty.requests + 1 || 1; | ||
myPage.thirdParty.transferSize = myPage.thirdParty.transferSize + asset.transferSize || asset.transferSize; | ||
myPage.thirdParty.contentSize= myPage.thirdParty.contentSize + asset.contentSize|| asset.contentSize; | ||
myPage.thirdParty.headerSize = myPage.thirdParty.headerSize + asset.headerSize || asset.headerSize; | ||
} | ||
else { | ||
myPage.firstParty.requests = myPage.firstParty.requests + 1 || 1; | ||
myPage.firstParty.transferSize = myPage.firstParty.transferSize + asset.transferSize || asset.transferSize; | ||
myPage.firstParty.contentSize= myPage.firstParty.contentSize + asset.contentSize|| asset.contentSize; | ||
myPage.firstParty.headerSize = myPage.firstParty.headerSize + asset.headerSize || asset.headerSize; | ||
} | ||
} | ||
myPage.requests++; | ||
@@ -73,0 +92,0 @@ }); |
{ | ||
"name": "pagexray", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Xray your HAR file and know all about the page", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
400
20187