stack-analyze 1.2.9 → 1.3.0
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 +5 -0
- package/about.cjs +4 -0
- package/functions/deezer.js +36 -0
- package/hash/queryTools.js +13 -0
- package/package.json +5 -5
- package/utils.js +2 -1
package/CHANGELOG.md
CHANGED
package/about.cjs
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { printTable } from "console-table-printer";
|
|
3
|
+
import colors from "colors";
|
|
4
|
+
|
|
5
|
+
// save data search
|
|
6
|
+
import { stackSave } from "../utils.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @async
|
|
10
|
+
* @params { string } query
|
|
11
|
+
* @returns {Promise<void>}
|
|
12
|
+
*/
|
|
13
|
+
export default async function deezer(q) {
|
|
14
|
+
try {
|
|
15
|
+
const { data } = await axios.get(
|
|
16
|
+
"https://api.deezer.com/search/album", {
|
|
17
|
+
params: { q }
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const results = data.data.map(({
|
|
22
|
+
title, record_type, explicit_lyrics, artist
|
|
23
|
+
}) => ({
|
|
24
|
+
artist: artist.name,
|
|
25
|
+
title,
|
|
26
|
+
record_type,
|
|
27
|
+
lyrics_content: explicit_lyrics ? "explicit" : "clean"
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
printTable(results.slice(0, 15));
|
|
31
|
+
|
|
32
|
+
stackSave("album-search.json", JSON.stringify(data.data, null, 2));
|
|
33
|
+
} catch(err) {
|
|
34
|
+
console.error(colors.red(err.message));
|
|
35
|
+
}
|
|
36
|
+
}
|
package/hash/queryTools.js
CHANGED
|
@@ -6,6 +6,7 @@ import animeSearch from "../functions/animeInfo.js";
|
|
|
6
6
|
import movieDB from "../functions/moviesInfo.js";
|
|
7
7
|
import pokemonInfo from "../functions/pokemon.js";
|
|
8
8
|
import twitchInfo from "../functions/twitch.js";
|
|
9
|
+
import deezer from "../functions/deezer.js";
|
|
9
10
|
|
|
10
11
|
// fields
|
|
11
12
|
import {
|
|
@@ -78,6 +79,7 @@ const queryTools = {
|
|
|
78
79
|
},
|
|
79
80
|
twitch_info(refreshCallback) {
|
|
80
81
|
console.clear();
|
|
82
|
+
|
|
81
83
|
inquirer.prompt([
|
|
82
84
|
promptParams("twitchSeparator", "enter a separator for split example ',':"),
|
|
83
85
|
promptParams("twitchUsers", "enter a twitch users example 'a,b,c'"),
|
|
@@ -88,6 +90,17 @@ const queryTools = {
|
|
|
88
90
|
twitchInfo({ twitchSeparator, twitchUsers, twitchClient, twitchToken });
|
|
89
91
|
setTimeout(refreshCallback, 2e3);
|
|
90
92
|
});
|
|
93
|
+
},
|
|
94
|
+
deezer(refreshCallback) {
|
|
95
|
+
console.clear();
|
|
96
|
+
|
|
97
|
+
inquirer.prompt([
|
|
98
|
+
promptParams("query", "enter a query for search")
|
|
99
|
+
])
|
|
100
|
+
.then(({ query }) => {
|
|
101
|
+
deezer(query)
|
|
102
|
+
setTimeout(refreshCallback, 5e3);
|
|
103
|
+
})
|
|
91
104
|
}
|
|
92
105
|
};
|
|
93
106
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stack-analyze",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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,7 +8,7 @@
|
|
|
8
8
|
"stack-analyze": "cli.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"axios": "^1.6.
|
|
11
|
+
"axios": "^1.6.8",
|
|
12
12
|
"boxen": "^7.1.1",
|
|
13
13
|
"cheerio": "^1.0.0-rc.12",
|
|
14
14
|
"cli-progress": "^3.12.0",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"console-table-printer": "^2.12.0",
|
|
17
17
|
"figlet": "^1.7.0",
|
|
18
18
|
"gauge": "^5.0.1",
|
|
19
|
-
"inquirer": "^9.2.
|
|
20
|
-
"systeminformation": "^5.22.
|
|
19
|
+
"inquirer": "^9.2.20",
|
|
20
|
+
"systeminformation": "^5.22.7",
|
|
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": "^
|
|
26
|
+
"eslint": "^9.1.1",
|
|
27
27
|
"jsdoc": "^4.0.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
package/utils.js
CHANGED
|
@@ -25,7 +25,8 @@ const menuInfoOpts = [
|
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
const menuQueryOpts = [
|
|
28
|
-
"anime_Search", "movie_info", "pokemon_info",
|
|
28
|
+
"anime_Search", "movie_info", "pokemon_info",
|
|
29
|
+
"twitch_info", "deezer", returnMainOpts
|
|
29
30
|
];
|
|
30
31
|
|
|
31
32
|
const menuUtilityOpts = [
|