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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  stack-analyze all version and notable changes, fixed, remove and new additions in code.
4
4
 
5
+ ## generation 4 (ver. 1.3.0 - )
6
+ ### version 1.3.0
7
+ #### Added
8
+ - deezer search tool
9
+
5
10
  ## generation 3 (ver. 1.2.0 - 1.2.9)
6
11
 
7
12
  ### version 1.2.9
package/about.cjs CHANGED
@@ -106,6 +106,10 @@ const aboutTool = {
106
106
  name: "black metal catalog",
107
107
  desc: "promos albums and community"
108
108
  },
109
+ {
110
+ name: "slithering black records",
111
+ desc: "record label & community"
112
+ }
109
113
  ];
110
114
 
111
115
  console.clear();
@@ -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
+ }
@@ -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.2.9",
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.7",
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.15",
20
- "systeminformation": "^5.22.0",
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": "^8.57.0",
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", "twitch_info", returnMainOpts
28
+ "anime_Search", "movie_info", "pokemon_info",
29
+ "twitch_info", "deezer", returnMainOpts
29
30
  ];
30
31
 
31
32
  const menuUtilityOpts = [