From a1079095dd4c46a6771ecf6e56a6b5088cbf9090 Mon Sep 17 00:00:00 2001 From: Camille Barneaud <1693643+gadcam@users.noreply.github.com> Date: Tue, 19 Dec 2017 01:09:41 +0100 Subject: [PATCH] Sync with AliasIO (#1) * Refactoring, allow multiple expressions per js field, remove env detection * Add js field to NPM driver * Port env to js --- bin/validate | 2 +- schema.json | 6 +- src/apps.json | 23549 ++++++++++++----------- src/drivers/npm/driver.js | 95 +- src/drivers/webextension/js/content.js | 84 +- src/drivers/webextension/js/driver.js | 7 +- src/drivers/webextension/js/inject.js | 74 +- src/wappalyzer.js | 42 +- 8 files changed, 12285 insertions(+), 11574 deletions(-) diff --git a/bin/validate b/bin/validate index 1d6587600..dd9b12729 100755 --- a/bin/validate +++ b/bin/validate @@ -6,7 +6,7 @@ set -eu echo "Validating apps.json..." -jsonlint-cli -s schema.json src/apps.json +jsonlint-cli -tps schema.json src/apps.json > /tmp/apps.json && mv /tmp/apps.json src/apps.json echo "Validating regular expressions..." diff --git a/schema.json b/schema.json index ac366218f..0f161fbeb 100644 --- a/schema.json +++ b/schema.json @@ -35,9 +35,9 @@ }, "required": true }, - "env": { - "type": [ "string", "array" ], - "items": { + "js": { + "type": "object", + "additionalProperties": { "type": "string" } }, diff --git a/src/apps.json b/src/apps.json index e7f81c8e4..12176a11a 100644 --- a/src/apps.json +++ b/src/apps.json @@ -1,11441 +1,12120 @@ { - "apps": { - "1&1": { - "cats": [ - "6" - ], - "icon": "1and1.svg", - "implies": "PHP", - "url": "/shop/catalog/browse\\?sessid=", - "website": "http://1and1.com" - }, - "1C-Bitrix": { - "cats": [ - "1" - ], - "headers": { - "Set-Cookie": "^BITRIX_", - "X-Powered-CMS": "^Bitrix Site Manager" - }, - "html": "(?:]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))", - "icon": "1C-Bitrix.png", - "implies": "PHP", - "script": "1c-bitrix", - "website": "http://www.1c-bitrix.ru" - }, - "2z Project": { - "cats": [ - "1" - ], - "icon": "2z Project.png", - "meta": { - "generator": "2z project ([\\d.]+)\\;version:\\1" - }, - "website": "http://2zproject-cms.ru" - }, - "3DM": { - "cats": [ - "19" - ], - "html": "