stack-analyze 1.2.8 → 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,7 +2,18 @@
2
2
 
3
3
  stack-analyze all version and notable changes, fixed, remove and new additions in code.
4
4
 
5
- ## generation 3 (ver. 1.2.0 -)
5
+ ## generation 4 (ver. 1.3.0 - )
6
+ ### version 1.3.0
7
+ #### Added
8
+ - deezer search tool
9
+
10
+ ## generation 3 (ver. 1.2.0 - 1.2.9)
11
+
12
+ ### version 1.2.9
13
+ #### Added
14
+ - css validate
15
+ #### changed
16
+ - changed wappalyzer module
6
17
 
7
18
  ### version 1.2.8
8
19
  #### Added
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();
package/api/webApis.js CHANGED
@@ -1,4 +1,4 @@
1
- import Wappalyzer from "wappalyzer";
1
+ import Wappalyzer from "wapalyzer";
2
2
  import axios from "axios";
3
3
 
4
4
  const wappalyzer = new Wappalyzer();
@@ -0,0 +1,25 @@
1
+ // modules
2
+ import colors from "colors";
3
+ import cssValidator from "w3c-css-validator";
4
+ import { stackSave } from "../utils.js";
5
+
6
+ /**
7
+ * @description css validator tool from w3c service
8
+ * @param {string} url - url analyze all stylesheets
9
+ * @async
10
+ * @returns {Promise<void>}
11
+ */
12
+ export default async function cssValidate(url) {
13
+ try {
14
+ const cssResults = await cssValidator.validateURL(url, {
15
+ warningLevel: 1
16
+ });
17
+
18
+ stackSave("cssErrors.json", JSON.stringify(cssResults.errors, null, 2));
19
+ stackSave("cssWarnings.json", JSON.stringify(cssResults.warnings, null, 2));
20
+
21
+ console.info("finish css results printers".green);
22
+ } catch(err) {
23
+ console.error(colors.red(err.message));
24
+ }
25
+ }
@@ -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/hash/webTools.js CHANGED
@@ -9,6 +9,7 @@ import singleStack from "../functions/singleStack.js";
9
9
  import multipleStack from "../functions/multipleStack.js";
10
10
  import pageSpeed from "../functions/pageSpeed.js";
11
11
  import scrape from "../functions/scraping.js";
12
+ import cssValidate from "../functions/cssValidator.js";
12
13
 
13
14
  // validations
14
15
  import {
@@ -52,6 +53,15 @@ const webTools = {
52
53
  scrape(url, option);
53
54
  setTimeout(refreshCallback, 3000);
54
55
  });
56
+ },
57
+ css_validate(refreshCallback) {
58
+ console.clear();
59
+ inquirer.prompt([singleWebQuery])
60
+ .then(({ url }) => {
61
+ cssValidate(url);
62
+ const timeEnd = performance.now();
63
+ setTimeout(refreshCallback, timeEnd);
64
+ });
55
65
  }
56
66
  };
57
67
 
package/package.json CHANGED
@@ -1,28 +1,29 @@
1
1
  {
2
2
  "name": "stack-analyze",
3
- "version": "1.2.8",
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
- "main": "index.mjs",
6
+ "main": "cli.js",
7
7
  "bin": {
8
8
  "stack-analyze": "cli.js"
9
9
  },
10
10
  "dependencies": {
11
- "axios": "^1.6.0",
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",
15
15
  "colors": "^1.4.0",
16
- "console-table-printer": "^2.11.2",
16
+ "console-table-printer": "^2.12.0",
17
17
  "figlet": "^1.7.0",
18
18
  "gauge": "^5.0.1",
19
- "inquirer": "^9.2.11",
20
- "systeminformation": "^5.21.15",
19
+ "inquirer": "^9.2.20",
20
+ "systeminformation": "^5.22.7",
21
21
  "timeago.js": "^4.0.2",
22
- "wappalyzer": "^6.10.63"
22
+ "w3c-css-validator": "^1.3.2",
23
+ "wapalyzer": "^6.10.65"
23
24
  },
24
25
  "devDependencies": {
25
- "eslint": "^8.53.0",
26
+ "eslint": "^9.1.1",
26
27
  "jsdoc": "^4.0.2"
27
28
  },
28
29
  "scripts": {
package/utils.js CHANGED
@@ -16,7 +16,8 @@ const menuOpts = [
16
16
  ];
17
17
 
18
18
  const menuWebOpts = [
19
- "single", "multiple", "pagespeed", "scraping", returnMainOpts
19
+ "single", "multiple", "pagespeed", "scraping", "css_validate",
20
+ returnMainOpts
20
21
  ];
21
22
 
22
23
  const menuInfoOpts = [
@@ -24,7 +25,8 @@ const menuInfoOpts = [
24
25
  ];
25
26
 
26
27
  const menuQueryOpts = [
27
- "anime_Search", "movie_info", "pokemon_info", "twitch_info", returnMainOpts
28
+ "anime_Search", "movie_info", "pokemon_info",
29
+ "twitch_info", "deezer", returnMainOpts
28
30
  ];
29
31
 
30
32
  const menuUtilityOpts = [