Fix "requires"

main
Elbert Alias 3 years ago
parent 89dad504d8
commit ac3973bf7c

@ -1113,9 +1113,7 @@ class Site {
) )
await Promise.all( await Promise.all(
Object.keys(requires).map(async (name) => { requires.map(async ({ name, technologies }) => {
const technologies = Wappalyzer.requires[name].technologies
this.analyzedRequires[url.href] = this.analyzedRequires[url.href] =
this.analyzedRequires[url.href] || [] this.analyzedRequires[url.href] || []

@ -351,12 +351,10 @@ const Content = {
async analyzeRequires(url, requires) { async analyzeRequires(url, requires) {
await Promise.all( await Promise.all(
Object.keys(requires).map(async (name) => { requires.map(async ({ name, technologies }) => {
if (!Content.analyzedRequires.includes(name)) { if (!Content.analyzedRequires.includes(name)) {
Content.analyzedRequires.push(name) Content.analyzedRequires.push(name)
const technologies = requires[name].technologies
await Promise.all([ await Promise.all([
Content.onGetTechnologies(technologies, name), Content.onGetTechnologies(technologies, name),
Content.driver('onContentLoad', [ Content.driver('onContentLoad', [

@ -200,7 +200,7 @@ const Driver = {
*/ */
async analyzeJs(url, js, requires) { async analyzeJs(url, js, requires) {
const technologies = requires const technologies = requires
? Wappalyzer.requires[requires].technologies ? Wappalyzer.requires.find(({ name }) => name === requires).technologies
: Wappalyzer.technologies : Wappalyzer.technologies
return Driver.onDetect( return Driver.onDetect(
@ -533,6 +533,10 @@ const Driver = {
return return
} }
Driver.log([
...new Set(detections.map(({ technology }) => technology.name)),
])
url = url.split('#')[0] url = url.split('#')[0]
const { hostname } = new URL(url) const { hostname } = new URL(url)

@ -3036,7 +3036,7 @@
], ],
"description": "SpurIT is a team of certified Shopify experts which provide ecommerce software solutions.", "description": "SpurIT is a team of certified Shopify experts which provide ecommerce software solutions.",
"icon": "SpurIT.svg", "icon": "SpurIT.svg",
"implies": "Shopify", "requires": "Shopify",
"js": { "js": {
"Spurit.global.version": "(.+)\\;version:\\1" "Spurit.global.version": "(.+)\\;version:\\1"
}, },
@ -3055,7 +3055,7 @@
], ],
"description": "SpurIT Abandoned Cart Reminder bring back your Shopify store visitors who moved to another tab by blinking your store tab.", "description": "SpurIT Abandoned Cart Reminder bring back your Shopify store visitors who moved to another tab by blinking your store tab.",
"icon": "SpurIT.svg", "icon": "SpurIT.svg",
"implies": "Shopify", "requires": "Shopify",
"js": { "js": {
"ACR_SPURIT_Params.folderCss": "cdn-spurit\\.com/shopify-apps/abandoned-cart-reminder/" "ACR_SPURIT_Params.folderCss": "cdn-spurit\\.com/shopify-apps/abandoned-cart-reminder/"
}, },
@ -3073,7 +3073,7 @@
], ],
"description": "SpurIT Recurring Payments App is a simple way to create a system of bill payment,subscriptions and invoicing.", "description": "SpurIT Recurring Payments App is a simple way to create a system of bill payment,subscriptions and invoicing.",
"icon": "SpurIT.svg", "icon": "SpurIT.svg",
"implies": "Shopify", "requires": "Shopify",
"js": { "js": {
"Spurit.recurringInvoices": "" "Spurit.recurringInvoices": ""
}, },
@ -3091,7 +3091,7 @@
], ],
"description": "SpurIT Partial Payments App allow your customers to pay for the order in several ways or to share a payment with other people.", "description": "SpurIT Partial Payments App allow your customers to pay for the order in several ways or to share a payment with other people.",
"icon": "SpurIT.svg", "icon": "SpurIT.svg",
"implies": "Shopify", "requires": "Shopify",
"scriptSrc": "cdn-spurit\\.com/shopify-apps/split-payments/", "scriptSrc": "cdn-spurit\\.com/shopify-apps/split-payments/",
"saas": true, "saas": true,
"pricing": [ "pricing": [
@ -3107,7 +3107,7 @@
], ],
"description": "SpurIT Loyalty App is a turnkey solution allowing you to reward existing customers in a number of ways.", "description": "SpurIT Loyalty App is a turnkey solution allowing you to reward existing customers in a number of ways.",
"icon": "SpurIT.svg", "icon": "SpurIT.svg",
"implies": "Shopify", "requires": "Shopify",
"js": { "js": {
"Spurit.Loyaltypoints": "" "Spurit.Loyaltypoints": ""
}, },