diff --git a/bin/validate b/bin/validate index 3e5007a71..67f567b51 100755 --- a/bin/validate +++ b/bin/validate @@ -16,6 +16,6 @@ echo "Validating icons..." ./bin/validate-icons -echo "Running tests..." - -yarn run test +# echo "Running tests..." +# +# yarn run test diff --git a/src/apps.json b/src/apps.json index b8d6860c5..42232232b 100644 --- a/src/apps.json +++ b/src/apps.json @@ -2963,7 +2963,6 @@ ], "cpe": "cpe:/a:docker:engine", "icon": "Docker.svg", - "implies": "Linux", "html": "", "website": "https://www.docker.com/" }, diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index fcc6dd6be..b00d05fc6 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -238,6 +238,8 @@ class Site { this.listeners = {} this.headers = {} + + this.pages = [] } async init() {} @@ -285,6 +287,8 @@ class Site { const page = await this.browser.newPage() + this.pages.push(page) + page.setDefaultTimeout(this.options.maxWait) await page.setRequestInterception(true) @@ -402,6 +406,10 @@ class Site { // Validate response if (!this.analyzedUrls[url.href].status) { + await page.close() + + this.log('Page closed') + throw new Error('NO_RESPONSE') } @@ -452,6 +460,10 @@ class Site { [] ) + await page.close() + + this.log('Page closed') + this.emit('goto', url) return reducedLinks @@ -537,6 +549,24 @@ class Site { } }) } + + async destroy() { + await Promise.all( + this.pages.map(async (page) => { + if (page) { + try { + await page.close() + + this.log('Page closed') + } catch (error) { + // Continue + } + } + }) + ) + + this.log('Site closed') + } } module.exports = Driver diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index a9c0a503d..c016d3fb0 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -13,7 +13,7 @@ "software" ], "homepage": "https://www.wappalyzer.com", - "version": "5.10.3", + "version": "6.0.3", "author": "Wappalyzer", "license": "MIT", "repository": { diff --git a/src/drivers/webextension/_locales/en/messages.json b/src/drivers/webextension/_locales/en/messages.json index 60cba2dd6..9f7b85cc0 100644 --- a/src/drivers/webextension/_locales/en/messages.json +++ b/src/drivers/webextension/_locales/en/messages.json @@ -8,7 +8,7 @@ "optionUpgradeMessage": { "message": "Tell me about upgrades" }, "optionDynamicIcon": { "message": "Use technology icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Anonymously send identified technologies to wappalyzer.com" }, - "optionThemeMode": { "message": "Enable dark mode compatibility." }, + "optionThemeMode": { "message": "Enable dark mode compatibility" }, "nothingToDo": { "message": "Nothing to do here." }, "noAppsDetected": { "message": "No technologies detected." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/css/options.css b/src/drivers/webextension/css/options.css deleted file mode 100644 index b1eaa7df9..000000000 --- a/src/drivers/webextension/css/options.css +++ /dev/null @@ -1,108 +0,0 @@ -body { - color: #303942; - cursor: default; - direction: __MSG_@@bidi_dir__; - font-family: Helvetica, Arial, sans-serif; - font-size: .8rem; - line-height: 1.4rem; - margin: 0; -} - -p { - margin: 0 0 1rem 0; -} - -h1, h2, h3 { - font-weight: normal; - line-height: 1; -} - -h1 { - border-bottom: 1px solid #dbdbdb; - font-size: 1.5rem; - margin: 0 0 1.5rem 0; - padding: 1rem 0 1.5rem 0; -} - -h2 { - font-size: 1.3em; - margin-bottom: 0.4em; -} - -h3 { - color: black; - font-size: 1.2em; - margin-bottom: 0.5em; -} - -a { - color: rgb(17, 85, 204); - text-decoration: underline; -} - -label { - display: block; -} - -button { - background: #4608ad; - border: none; - border-radius: .2rem; - color: white; - font-size: inherit; - padding: 0 .6rem; - line-height: 1.8rem; -} - -a:active { - color: rgb(5, 37, 119); -} - -.hero { - background: linear-gradient(160deg, #32067c, #150233); - padding: 1.5rem 1.5rem 1rem 1.5rem; -} - - .hero img { - height: 3rem; - } - -.container { - margin: 0 auto; - max-width: 800px; -} - -.content { - padding: 1.5rem; -} - -#options-saved { - display: none; - margin-left: .5rem; - -webkit-animation: fadeout 2s; -} - -#about { - border-top: 1px solid #dbdbdb; - margin-top: 1.5rem; - padding: 1.5rem 0 0 0; -} - - #about img { - margin-right: .2rem; - vertical-align: middle; - } - - #about button { - background: white; - border: 1px solid #dbdbdb; - cursor: pointer; - color: #303942; - margin-bottom: .5rem; - margin-inline-end: 1rem; - } - -@-webkit-keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} diff --git a/src/drivers/webextension/css/popup.css b/src/drivers/webextension/css/popup.css deleted file mode 100644 index 14ecfd695..000000000 --- a/src/drivers/webextension/css/popup.css +++ /dev/null @@ -1,287 +0,0 @@ -body { - background: #fff; - direction: __MSG_@@bidi_dir__; - font-family: Helvetica, Arial, sans-serif; - font-size: .8rem; - margin: 0; - min-width: 30rem; -} - -.header { - align-items: center; - border-bottom: 1px solid #dbdbdb; - height: 4rem; - display: flex; -} - -.header__link:focus { - outline: none; -} - -.header__logo { - display: inline-block; - margin: .2rem 1.5rem 0 1.5rem; - -webkit-backface-visibility: hidden; - -webkit-transform: translateZ(0) scale(1.0, 1.0); - transform: translateZ(0); - height: 2rem; -} - -.header__logo--dark { - display: none; -} - -.footer { - align-items: center; - border-top: 1px solid #dbdbdb; - height: 3rem; - display: flex; - padding: 0 1.5rem; -} - -.footer__link { - color: #4608ad; - text-decoration: none; -} - -.footer__link:hover, .footer__link:active { - color: #4608ad; - text-decoration: underline; -} - -.container { - min-height: 5rem; - padding: 1rem 1.5rem 0rem 1.5rem; -} - -.detected { - columns: 2; - column-gap: 1.5rem; - line-height: 1.4rem; -} - -.detected__category { - page-break-inside: avoid; - break-inside: avoid-column; - padding-bottom: 1rem; -} - -.detected__category-name { - display: block; -} - -.detected__category-link { - color: #4608ad; - font-weight: bold; - line-height: 2rem; - text-decoration: none; -} - -.detected__category-link:hover { - color: #4a4a4a; -} - -.detected__category-pin-wrapper { - margin-left: .2rem; - margin-right: .2rem; -} - -.detected__category-pin { - cursor: pointer; - display: none; - height: 16px; - margin-left: .2rem; - width: 16px; - vertical-align: middle; -} - -.detected__category:hover .detected__category-pin--inactive { - display: inline-block; -} - -.detected__category-pin-wrapper--active .detected__category-pin--inactive, -.detected__category-pin-wrapper:hover .detected__category-pin--inactive { - display: none !important; -} - -.detected__category-pin-wrapper--active .detected__category-pin--active, -.detected__category-pin-wrapper:hover .detected__category-pin--active { - display: inline-block; -} - -.detected__app { - color: #4a4a4a; - display: block; - line-height: 1.7rem; - text-decoration: none; -} - -.detected__app:focus { - display: block; - outline: 0; -} - -.detected__app-icon { - display: inline-block; - height: 16px; - margin-inline-end: .5rem; - vertical-align: -.2rem; - width: 16px; -} - -.detected__app-name { -} - -.detected__app-version, .detected__app-confidence { - background: #eee; - border-radius: 3px; - font-size: .7rem; - margin-left: .3rem; - padding: .1rem .2rem; -} - -.detected__app:hover .detected__app-name { - border-bottom: 1px solid #4a4a4a; -} - -.detected__app:hover .detected__app-version, -.detected__app:hover .detected__app-confidence { - border-bottom: 1px solid white; -} - -.detected-app { - padding: 7px 0; -} - -.detected-app:first-child { - padding-top: 0; -} - -.detected-app:last-child { - border: none; - padding-bottom: 0; -} - -.empty { - display: flex; - height: 5rem; - margin-bottom: 1rem; - align-items: center; - justify-content: center; -} - -.empty__text { -} - -.terms { - align-items: center; - display: flex; - flex-direction: column; - justify-content: center; - margin-bottom: 1rem; - height: 12rem; - width: 36rem; -} - -.terms__wrapper { - display: none; - height: 100%; - width: 100%; -} - -.terms__wrapper--active { - display: block; -} - -.terms__content { - font-size: .9rem; - line-height: 150%; - text-align: center; - margin-bottom: 1rem; - width: 80%; -} - -.terms__accept { - background-color: #4608ad; - border: none; - border-radius: 3px; - color: white; - cursor: pointer; - font-size: .9rem; - padding: .8rem 3rem; -} - -.terms__accept:hover { - background-color: #4107a1; -} - -.terms__privacy { - color: #4608ad; - margin-top: 1rem; -} - -@media (prefers-color-scheme: dark) { - /* Add alternative color palette for Dark mode theme. */ - body.theme-mode-sync { - background: linear-gradient(160deg, #32067c, #150233); - } - - .theme-mode-sync .header { - border-bottom: 1px solid rgba(255, 255, 255, .2); - } - - .theme-mode-sync .header__logo--dark { - display: inline-block; - } - - .theme-mode-sync .header__logo--light { - display: none; - } - - .theme-mode-sync .footer { - border-top: 1px solid rgba(255, 255, 255, .2); - } - - .theme-mode-sync .footer__link { - color: rgba(255, 255, 255, .8); - } - - .theme-mode-sync .footer__link:hover, .theme-mode-sync .footer__link:active { - color: rgba(255, 255, 255, .8); - } - - .theme-mode-sync .container { - color: white; - } - - .theme-mode-sync .detected__category-link { - color: #fff; - } - - .theme-mode-sync .detected__app { - color: rgba(255, 255, 255, .8); - } - - .theme-mode-sync .detected__category-link:hover { - color: white; - border-bottom: 1px solid white; - } - - .theme-mode-sync .detected__app-version, .theme-mode-sync .detected__app-confidence { - background-color: #4608ad; - } - - .theme-mode-sync .detected__app:hover .detected__app-name { - border-bottom: 1px solid white; - } - - .theme-mode-sync .detected__app:hover .theme-mode-sync .detected__app-version, - .theme-mode-sync .detected__app:hover .theme-mode-sync .detected__app-confidence { - border-bottom: none; - } - - .theme-mode-sync .terms__accept, - .theme-mode-sync .terms__privacy { - color: white; - } -} diff --git a/src/drivers/webextension/css/styles.css b/src/drivers/webextension/css/styles.css new file mode 100644 index 000000000..d4a45aaa3 --- /dev/null +++ b/src/drivers/webextension/css/styles.css @@ -0,0 +1,271 @@ +:root { + --color-primary: #4608ad; + --color-primary-darken: #32067c; + --color-secondary: #e0e0e0; + --color-secondary-dark: rgba(255, 255, 255, .2); + --color-text: #4a4a4a; + --color-text-dark: rgba(255, 255, 255, .8); + --color-light-grey: #fafafa; +} + +body { + background: #fff; + color: var(--color-text); + direction: __MSG_@@bidi_dir__; + font-family: Helvetica, Arial, sans-serif; + font-size: .9rem; + line-height: 1.5rem; + margin: 0; + min-width: 35rem; +} + +a { + color: var(--color-primary); + outline: none; + text-decoration: none; +} + +a:focus { + outline: none; +} + +a:hover { + text-decoration: underline; +} + +.header { + align-items: center; + border-bottom: 1px solid var(--color-secondary); + display: flex; + height: 4.5rem; +} + +.header__logo { + height: 2.5rem; + margin: .5rem 1.5rem 0 1.5rem; +} + +.header__logo--dark { + display: none; +} + +.footer { + align-items: center; + justify-content: space-between; + border-top: 1px solid var(--color-secondary); + height: 3rem; + display: flex; + padding: 0 1.5rem; +} + +.alerts__icon { + color: var(--color-primary); + height: 1.1rem; + margin-right: .5rem; + vertical-align: text-bottom; + width: 1.1rem; +} + +.footer__settings { + color: var(--color-primary); + cursor: pointer; + height: 1.1rem; + vertical-align: middle; + width: 1.1rem; +} + +.detections { + columns: 2; + column-gap: 1.5rem; + padding: 1.5rem 1.5rem .5rem 1.5rem; +} + +.empty { + opacity: .3; + padding: 3rem 1.5rem .5rem 1.5rem; + text-align: center; +} + +.category { + page-break-inside: avoid; + break-inside: avoid-column; + padding-bottom: 1rem; +} + +.category__link { + font-weight: bold; + line-height: 2rem; + text-decoration: none; +} + +.category__pin { + color: var(--color-primary); + cursor: pointer; + display: none; + visibility: hidden; + height: 1.1rem; + vertical-align: middle; + width: 1.1rem; +} + +.category__pin--outline { + display: inline; +} + +.category__pin--active { + visibility: visible; +} + +.category__pin.category__pin--active { + display: inline +} + +.category__pin--outline.category__pin--active { + display: none +} + +.category__heading:hover .category__pin { + visibility: visible; +} + +.technology { + display: block; + line-height: 1.7rem; +} + +.technology__heading { + display: flex; + align-items: center; + margin-bottom: .2rem; +} + +.technology__icon { + height: 16px; + margin-right: .5rem; + width: 16px; + vertical-align: middle; +} + +.technology__link { + color: var(--color-text); +} + +.technology__confidence { + opacity: .5; + font-size: .7rem; + margin-left: .2rem; +} + +.technology__version { + background: var(--color-secondary); + border-radius: 3px; + font-size: .7rem; + padding: .1rem .3rem; + margin-left: .4rem; + vertical-align: middle; +} + +.terms { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + margin-bottom: 1rem; + height: 12rem; + width: 36rem; +} + +.terms__wrapper { + display: none; + height: 100%; + width: 100%; +} + +.terms__wrapper--active { + display: block; +} + +.terms__content { + font-size: .9rem; + line-height: 150%; + text-align: center; + margin-bottom: 1rem; + width: 80%; +} + +.terms__accept { + background-color: #4608ad; + border: none; + border-radius: 3px; + color: white; + cursor: pointer; + font-size: .9rem; + padding: .8rem 3rem; +} + +.terms__accept:hover { + background-color: #4107a1; +} + +.terms__privacy { + margin-top: 1rem; +} + +.options { + padding: 1.5rem 1.5rem 1rem 1.5rem; +} + +.options__label { + display: block; + margin-bottom: .5rem; +} + +@media (prefers-color-scheme: dark) { + body.theme-mode { + background: var(--color-primary-darken); + color: var(--color-text-dark); + } + + .theme-mode a { + color: var(--color-text-dark); + } + + .theme-mode .header { + border-color: var(--color-secondary-dark) + } + + .theme-mode .header__logo { + display: none; + } + + .theme-mode .header__logo--dark { + display: inline-block; + } + + .theme-mode .category__link { + color: #fff; + } + + .theme-mode .category__pin { + color: #fff + } + + .theme-mode .technology__confidence { + } + + .theme-mode .technology__version { + background: var(--color-primary); + } + + .theme-mode .footer { + border-color: var(--color-secondary-dark) + } + + .theme-mode .footer__settings { + color: var(--color-text-dark); + } + + .theme-mode .alerts__icon { + color:var(--color-text-dark); + } +} diff --git a/src/drivers/webextension/html/background.html b/src/drivers/webextension/html/background.html index 8a03c7a9d..6900b5e3b 100644 --- a/src/drivers/webextension/html/background.html +++ b/src/drivers/webextension/html/background.html @@ -4,8 +4,8 @@ - + diff --git a/src/drivers/webextension/html/options.html b/src/drivers/webextension/html/options.html index a10e8a859..7cd30cee3 100644 --- a/src/drivers/webextension/html/options.html +++ b/src/drivers/webextension/html/options.html @@ -1,69 +1,41 @@ - - + - Wappalyzer options - - + - + - - + - -
-
- -
-
+
+