stack-analyze 1.3.1 → 1.3.3
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/CHANGELOG.md +10 -0
- package/cli.js +12 -0
- package/eslint.config.js +44 -0
- package/functions/deezer.js +23 -25
- package/functions/potterSearch.js +27 -0
- package/hash/queryTools.js +14 -2
- package/package.json +15 -13
- package/utils.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ stack-analyze all version and notable changes, fixed, remove and new additions i
|
|
|
4
4
|
|
|
5
5
|
## generation 4 (ver. 1.3.0 - )
|
|
6
6
|
|
|
7
|
+
### version 1.3.3
|
|
8
|
+
#### Added
|
|
9
|
+
- add potter search (harry potter npx characters)
|
|
10
|
+
#### changed
|
|
11
|
+
- update linter
|
|
12
|
+
|
|
13
|
+
### version 1.3.2
|
|
14
|
+
#### Added
|
|
15
|
+
- title for stack menu tools
|
|
16
|
+
|
|
7
17
|
### version 1.3.1
|
|
8
18
|
#### Added
|
|
9
19
|
- seyyahi2 wallpapers (this pack is from album app)
|
package/cli.js
CHANGED
|
@@ -34,6 +34,8 @@ const exitCli = () => {
|
|
|
34
34
|
* @returns {Promise<void>}
|
|
35
35
|
*/
|
|
36
36
|
async function webOpts() {
|
|
37
|
+
console.info(colors.yellow(figlet.textSync("web options")));
|
|
38
|
+
|
|
37
39
|
const { web } = await inquirer.prompt({
|
|
38
40
|
type: "list",
|
|
39
41
|
pageSize,
|
|
@@ -52,6 +54,8 @@ async function webOpts() {
|
|
|
52
54
|
* @returns {Promise<void>}
|
|
53
55
|
*/
|
|
54
56
|
async function infoOpts() {
|
|
57
|
+
console.info(colors.yellow(figlet.textSync("info options")));
|
|
58
|
+
|
|
55
59
|
const { info } = await inquirer.prompt({
|
|
56
60
|
type: "list",
|
|
57
61
|
pageSize,
|
|
@@ -70,6 +74,8 @@ async function infoOpts() {
|
|
|
70
74
|
* @returns {Promise<void>}
|
|
71
75
|
*/
|
|
72
76
|
async function queryOpts() {
|
|
77
|
+
console.info(colors.yellow(figlet.textSync("query options")));
|
|
78
|
+
|
|
73
79
|
const { query } = await inquirer.prompt({
|
|
74
80
|
type: "list",
|
|
75
81
|
pageSize,
|
|
@@ -88,6 +94,8 @@ async function queryOpts() {
|
|
|
88
94
|
* @returns {void}
|
|
89
95
|
*/
|
|
90
96
|
async function wallpapersOpts() {
|
|
97
|
+
console.info(colors.yellow(figlet.textSync("wallpapers")));
|
|
98
|
+
|
|
91
99
|
const { wallpaper } = await inquirer.prompt({
|
|
92
100
|
type: "list",
|
|
93
101
|
pageSize,
|
|
@@ -106,6 +114,8 @@ async function wallpapersOpts() {
|
|
|
106
114
|
* @returns {Promise<void>}
|
|
107
115
|
*/
|
|
108
116
|
async function utilityOpts() {
|
|
117
|
+
console.info(colors.yellow(figlet.textSync("utility options")));
|
|
118
|
+
|
|
109
119
|
const { utility } = await inquirer.prompt({
|
|
110
120
|
type: "list",
|
|
111
121
|
pageSize,
|
|
@@ -124,6 +134,8 @@ async function utilityOpts() {
|
|
|
124
134
|
* @returns {Promise<void>}
|
|
125
135
|
*/
|
|
126
136
|
async function aboutOpts() {
|
|
137
|
+
console.info(colors.yellow(figlet.textSync("About Menu")));
|
|
138
|
+
|
|
127
139
|
const { about } = await inquirer.prompt({
|
|
128
140
|
type: "list",
|
|
129
141
|
pageSize,
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import globals from "globals";
|
|
4
|
+
import js from "@eslint/js";
|
|
5
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
const compat = new FlatCompat({
|
|
10
|
+
baseDirectory: __dirname,
|
|
11
|
+
recommendedConfig: js.configs.recommended,
|
|
12
|
+
allConfig: js.configs.all
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export default [{
|
|
16
|
+
ignores: ["node_modules", "test", "docs", "eslint.config.js"],
|
|
17
|
+
}, ...compat.extends("eslint:recommended"), {
|
|
18
|
+
languageOptions: {
|
|
19
|
+
globals: {
|
|
20
|
+
...globals.commonjs,
|
|
21
|
+
...globals.node,
|
|
22
|
+
},
|
|
23
|
+
ecmaVersion: "latest",
|
|
24
|
+
sourceType: "module",
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
rules: {
|
|
28
|
+
"no-var": "error",
|
|
29
|
+
eqeqeq: "warn",
|
|
30
|
+
"default-case": "error",
|
|
31
|
+
"eol-last": "error",
|
|
32
|
+
"spaced-comment": "error",
|
|
33
|
+
"comma-spacing": "error",
|
|
34
|
+
quotes: "error",
|
|
35
|
+
"block-spacing": "error",
|
|
36
|
+
"prefer-const": "error",
|
|
37
|
+
|
|
38
|
+
indent: ["error", 2, {
|
|
39
|
+
SwitchCase: 1,
|
|
40
|
+
}],
|
|
41
|
+
|
|
42
|
+
semi: "error",
|
|
43
|
+
},
|
|
44
|
+
}];
|
package/functions/deezer.js
CHANGED
|
@@ -11,29 +11,27 @@ import { stackSave } from "../utils.js";
|
|
|
11
11
|
* @returns {Promise<void>}
|
|
12
12
|
*/
|
|
13
13
|
export default async function deezer(q) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
console.error(colors.red(err.message));
|
|
38
|
-
}
|
|
14
|
+
try {
|
|
15
|
+
const { data } = await axios.get("https://api.deezer.com/search/album", {
|
|
16
|
+
params: { q }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const results = data.data.map(({
|
|
20
|
+
id, title, record_type,
|
|
21
|
+
explicit_lyrics, artist, nb_tracks
|
|
22
|
+
}) => ({
|
|
23
|
+
id,
|
|
24
|
+
artist: artist.name,
|
|
25
|
+
title,
|
|
26
|
+
type: record_type,
|
|
27
|
+
num_tracks: nb_tracks,
|
|
28
|
+
lyrics_content: explicit_lyrics ? "explicit" : "clean"
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
printTable(results.slice(0, 15));
|
|
32
|
+
|
|
33
|
+
stackSave("album-search.json", JSON.stringify(data.data, null, 2));
|
|
34
|
+
} catch(err) {
|
|
35
|
+
console.error(colors.red(err.message));
|
|
36
|
+
}
|
|
39
37
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import colors from "colors";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description search harry potter characters using keyword or name
|
|
6
|
+
* @async
|
|
7
|
+
* @param { string } search - get results of harry potter characters
|
|
8
|
+
* @returns { Promise<void>}
|
|
9
|
+
*/
|
|
10
|
+
export default async function potterSearch(search) {
|
|
11
|
+
try {
|
|
12
|
+
const { data } = await axios.get("https://potterapi-fedeperin.vercel.app/en/characters", {
|
|
13
|
+
params: { search }
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const characterList = data.map(({
|
|
17
|
+
nickname, fullName, hogwartsHouse, birthdate
|
|
18
|
+
}) => ({
|
|
19
|
+
nickname, fullName, birthdate,
|
|
20
|
+
house: hogwartsHouse,
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
console.table(characterList);
|
|
24
|
+
} catch(err) {
|
|
25
|
+
console.error(colors.red(err.message));
|
|
26
|
+
}
|
|
27
|
+
}
|
package/hash/queryTools.js
CHANGED
|
@@ -7,6 +7,7 @@ import movieDB from "../functions/moviesInfo.js";
|
|
|
7
7
|
import pokemonInfo from "../functions/pokemon.js";
|
|
8
8
|
import twitchInfo from "../functions/twitch.js";
|
|
9
9
|
import deezer from "../functions/deezer.js";
|
|
10
|
+
import potterSearch from "../functions/potterSearch.js";
|
|
10
11
|
|
|
11
12
|
// fields
|
|
12
13
|
import {
|
|
@@ -98,9 +99,20 @@ const queryTools = {
|
|
|
98
99
|
promptParams("query", "enter a query for search")
|
|
99
100
|
])
|
|
100
101
|
.then(({ query }) => {
|
|
101
|
-
deezer(query)
|
|
102
|
+
deezer(query);
|
|
102
103
|
setTimeout(refreshCallback, 5e3);
|
|
103
|
-
})
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
potter_search(refreshCallback) {
|
|
107
|
+
console.clear();
|
|
108
|
+
|
|
109
|
+
inquirer.prompt([
|
|
110
|
+
promptParams("search", "enter a keyword or name for search")
|
|
111
|
+
])
|
|
112
|
+
.then(({ search }) => {
|
|
113
|
+
potterSearch(search);
|
|
114
|
+
setTimeout(refreshCallback, 5e3);
|
|
115
|
+
});
|
|
104
116
|
}
|
|
105
117
|
};
|
|
106
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stack-analyze",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "cli tech stack analyze and pagespeed with node.js using the wappalyzer module. with google pagespeed api, hardware and crypto market",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -8,29 +8,31 @@
|
|
|
8
8
|
"stack-analyze": "cli.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"axios": "^1.
|
|
12
|
-
"boxen": "^
|
|
13
|
-
"cheerio": "^1.0.0
|
|
11
|
+
"axios": "^1.7.7",
|
|
12
|
+
"boxen": "^8.0.1",
|
|
13
|
+
"cheerio": "^1.0.0",
|
|
14
14
|
"cli-progress": "^3.12.0",
|
|
15
15
|
"colors": "^1.4.0",
|
|
16
|
-
"console-table-printer": "^2.12.
|
|
17
|
-
"figlet": "^1.
|
|
18
|
-
"gauge": "^5.0.
|
|
19
|
-
"inquirer": "^
|
|
20
|
-
"systeminformation": "^5.
|
|
16
|
+
"console-table-printer": "^2.12.1",
|
|
17
|
+
"figlet": "^1.8.0",
|
|
18
|
+
"gauge": "^5.0.2",
|
|
19
|
+
"inquirer": "^12.0.1",
|
|
20
|
+
"systeminformation": "^5.23.5",
|
|
21
21
|
"timeago.js": "^4.0.2",
|
|
22
22
|
"w3c-css-validator": "^1.3.2",
|
|
23
23
|
"wapalyzer": "^6.10.65"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"
|
|
26
|
+
"@eslint/js": "^9.14.0",
|
|
27
|
+
"eslint": "^9.14.0",
|
|
28
|
+
"globals": "^15.12.0",
|
|
29
|
+
"jsdoc": "^4.0.4"
|
|
28
30
|
},
|
|
29
31
|
"scripts": {
|
|
30
32
|
"start": "node cli.js",
|
|
31
33
|
"test": "node --test test/index.test.js",
|
|
32
|
-
"lint:test": "eslint
|
|
33
|
-
"lint:fix": "eslint
|
|
34
|
+
"lint:test": "eslint -c eslint.config.js",
|
|
35
|
+
"lint:fix": "eslint -c eslint.config.js",
|
|
34
36
|
"docs": "jsdoc -c jsdoc.json"
|
|
35
37
|
},
|
|
36
38
|
"repository": {
|
package/utils.js
CHANGED