simple-wappalyzer 1.1.34 → 1.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "simple-wappalyzer",
3
3
  "description": "A simple way to interacting with Wappalyzer.",
4
4
  "homepage": "https://nicedoc.io/Kikobeats/simple-wappalyzer",
5
- "version": "1.1.34",
5
+ "version": "1.1.38",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "got": "~11.8.2",
32
- "jsdom": "~18.0.0",
32
+ "jsdom": "~19.0.0",
33
33
  "lodash": "~4.17.21",
34
34
  "tough-cookie": "~4.0.0",
35
35
  "wappalyzer-core": "~6.9.0",
@@ -48,7 +48,7 @@
48
48
  "git-authors-cli": "latest",
49
49
  "html-get": "latest",
50
50
  "humanize-url": "2",
51
- "lint-staged": "latest",
51
+ "nano-staged": "latest",
52
52
  "npm-check-updates": "latest",
53
53
  "nyc": "latest",
54
54
  "prettier-standard": "latest",
@@ -85,19 +85,19 @@
85
85
  "@commitlint/config-conventional"
86
86
  ]
87
87
  },
88
- "lint-staged": {
89
- "package.json": [
90
- "finepack"
91
- ],
88
+ "nano-staged": {
92
89
  "*.js": [
93
90
  "prettier-standard"
94
91
  ],
95
92
  "*.md": [
96
93
  "standard-markdown"
94
+ ],
95
+ "package.json": [
96
+ "finepack"
97
97
  ]
98
98
  },
99
99
  "simple-git-hooks": {
100
100
  "commit-msg": "npx commitlint --edit",
101
- "pre-commit": "npx lint-staged"
101
+ "pre-commit": "npx nano-staged"
102
102
  }
103
103
  }
@@ -3,14 +3,38 @@
3
3
  const writeJsonFile = require('write-json-file')
4
4
  const got = require('got')
5
5
 
6
- const main = async () => {
7
- const technologies = await got(
8
- 'https://cdn.jsdelivr.net/gh/aliasio/wappalyzer@master/src/technologies.json'
6
+ const fetchTechnologies = async () => {
7
+ const chars = Array.from({ length: 27 }, (value, index) =>
8
+ index ? String.fromCharCode(index + 96) : '_'
9
+ )
10
+
11
+ const data = await Promise.all(
12
+ chars.map(char =>
13
+ got(
14
+ `https://cdn.jsdelivr.net/gh/aliasio/wappalyzer@master/src/technologies/${char}.json`
15
+ ).json()
16
+ )
17
+ )
18
+
19
+ const technologies = data.reduce(
20
+ (acc, obj) => ({
21
+ ...acc,
22
+ ...obj
23
+ }),
24
+ {}
25
+ )
26
+
27
+ return writeJsonFile('src/technologies.json', technologies)
28
+ }
29
+
30
+ const fetchCategories = async () => {
31
+ const categories = await got(
32
+ 'https://cdn.jsdelivr.net/gh/aliasio/wappalyzer@master/src/categories.json'
9
33
  ).json()
10
34
 
11
- await writeJsonFile('src/technologies.json', technologies)
35
+ return writeJsonFile('src/categories.json', categories)
12
36
  }
13
37
 
14
- main()
38
+ Promise.all([fetchTechnologies(), fetchCategories()])
15
39
  .catch(err => console.error(err) && process.exit(0))
16
40
  .then(process.exit)