Changes to NPM output

main
Elbert Alias 4 years ago
parent 11a95bc58c
commit f2b0ed4c64

@ -282,7 +282,10 @@ class Site {
await Promise.race([
page.goto(url.href, { waitUntil: 'domcontentloaded' }),
new Promise((resolve, reject) =>
setTimeout(() => reject(new Error('Timeout')), this.options.maxWait)
setTimeout(
() => reject(new Error('The website took too long to respond')),
this.options.maxWait
)
)
])
} catch (error) {
@ -497,21 +500,29 @@ class Site {
return {
urls: this.analyzedUrls,
applications: resolve(this.detections).map(
({ name, confidence, version, icon, website, cpe, categories }) => ({
technologies: resolve(this.detections).map(
({
slug,
name,
confidence,
version,
icon,
website,
cpe,
categories: categories.reduce(
(categories, { id, name }) => ({
...categories,
[id]: name
}),
{}
)
categories
}) => ({
slug,
name,
confidence,
version: version || null,
icon,
website,
cpe,
categories: categories.map(({ id, slug, name }) => ({
id,
slug,
name
}))
})
),
meta: {

@ -13,7 +13,7 @@
"software"
],
"homepage": "https://www.wappalyzer.com",
"version": "6.0.16",
"version": "6.1.1",
"author": "Wappalyzer",
"license": "MIT",
"repository": {
@ -38,4 +38,4 @@
"languagedetect": "^2.0.0",
"puppeteer": "^2.0.0"
}
}
}

@ -13,7 +13,7 @@
"software"
],
"homepage": "https://www.wappalyzer.com",
"version": "6.0.16",
"version": "6.1.1",
"author": "Wappalyzer",
"license": "MIT",
"repository": {
@ -27,4 +27,4 @@
"files": [
"wappalyzer.js"
]
}
}