stack-analyze 1.3.5 → 1.3.7

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +335 -311
  2. package/LICENSE +21 -21
  3. package/about.js +98 -121
  4. package/api/pokerApi.js +5 -5
  5. package/api/wallpapersURL.js +7 -5
  6. package/api/webApis.js +21 -21
  7. package/cli.js +204 -213
  8. package/eslint.config.js +44 -44
  9. package/functions/animeInfo.js +45 -45
  10. package/functions/bitly.js +41 -41
  11. package/functions/bundlephobia.js +36 -36
  12. package/functions/cryptoList.js +48 -48
  13. package/functions/cssValidator.js +25 -25
  14. package/functions/deezer.js +37 -37
  15. package/functions/download.js +25 -24
  16. package/functions/gitUser.js +37 -37
  17. package/functions/hardware.js +109 -109
  18. package/functions/moviesInfo.js +55 -55
  19. package/functions/multipleStack.js +53 -53
  20. package/functions/pageSpeed.js +82 -82
  21. package/functions/password.js +24 -24
  22. package/functions/pokemon.js +106 -106
  23. package/functions/poker.js +40 -42
  24. package/functions/potterSearch.js +32 -32
  25. package/functions/quotes.js +33 -0
  26. package/functions/scraping.js +132 -132
  27. package/functions/singleStack.js +48 -48
  28. package/functions/twitch.js +72 -72
  29. package/hash/infoTools.js +61 -61
  30. package/hash/queryTools.js +113 -116
  31. package/hash/quotesSelect.js +16 -0
  32. package/hash/utilityTools.js +33 -32
  33. package/hash/wallpaperSelect.js +90 -59
  34. package/hash/webTools.js +93 -92
  35. package/logo-module.webp +0 -0
  36. package/menu.js +13 -13
  37. package/package.json +67 -67
  38. package/prompts/webPrompts.js +31 -31
  39. package/readme.md +44 -44
  40. package/types.js +51 -0
  41. package/utils.js +96 -101
  42. package/validations/infoValidations.js +37 -37
  43. package/validations/webValidations.js +33 -33
@@ -1,32 +1,33 @@
1
- // menu
2
- import { stackMenu } from "../menu.js";
3
- import { pokerGameOpts } from "../utils.js";
4
-
5
- // functions
6
- import genPassword from "../functions/password.js";
7
- import hardware from "../functions/hardware.js";
8
- import pokerGame from "../functions/poker.js";
9
-
10
- const utilityTools = {
11
- password(refreshCallback) {
12
- console.clear();
13
- genPassword();
14
- setTimeout(refreshCallback, 3e3);
15
- },
16
- async hardware(refreshCallback) {
17
- console.clear();
18
- hardware();
19
- setTimeout(refreshCallback, 3e3);
20
- },
21
- async poker_game(refreshCallback) {
22
- const pokeOpt = await stackMenu({
23
- message: "select a poker game for view instructions:",
24
- choices: pokerGameOpts
25
- });
26
-
27
- pokerGame(pokeOpt);
28
- setTimeout(refreshCallback, 5e3);
29
- }
30
- };
31
-
32
- export default utilityTools;
1
+ // menu
2
+ import { stackMenu } from "../menu.js";
3
+ import { pokerGameOpts } from "../utils.js";
4
+
5
+ // functions
6
+ import genPassword from "../functions/password.js";
7
+ import hardware from "../functions/hardware.js";
8
+ import pokerGame from "../functions/poker.js";
9
+
10
+ /** @type {import("../types.js").Select}*/
11
+ const utilityTools = {
12
+ password(refreshCallback) {
13
+ console.clear();
14
+ genPassword();
15
+ setTimeout(refreshCallback, 3e3);
16
+ },
17
+ async hardware(refreshCallback) {
18
+ console.clear();
19
+ hardware();
20
+ setTimeout(refreshCallback, 12e3);
21
+ },
22
+ async poker_game(refreshCallback) {
23
+ const pokeOpt = await stackMenu({
24
+ message: "select a poker game for view instructions:",
25
+ choices: pokerGameOpts
26
+ });
27
+
28
+ pokerGame(pokeOpt);
29
+ setTimeout(refreshCallback, 5e3);
30
+ }
31
+ };
32
+
33
+ export default utilityTools;
@@ -1,59 +1,90 @@
1
- // inquirer
2
- import { select } from "@inquirer/prompts";
3
-
4
- import { wallpaperDownload } from "../functions/download.js";
5
-
6
- const message = "select a wallpaper for download:";
7
- const backMenu = "back to menu";
8
-
9
- const wallpaperSelect = {
10
- async solMoon(refreshCallback, alternativeCallback) {
11
- const solMoonWallpapers = [...Array(20).keys()]
12
- .map(i => `sol-moon${i + 1}.jpeg`);
13
-
14
-
15
- const solMoon = await select({
16
- message, choices: [...solMoonWallpapers, backMenu]
17
- });
18
-
19
- if (solMoon === backMenu) {
20
- alternativeCallback();
21
- } else {
22
- wallpaperDownload("sol-moon", solMoon);
23
- setTimeout(refreshCallback, 5000);
24
- }
25
- },
26
- async dimensions(refreshCallback, alternativeCallback) {
27
- const dimensionsWallpapers = [...Array(12).keys()]
28
- .map(i => `dimensions-${i + 1}.jpeg`);
29
-
30
-
31
- const dimensions = await select({
32
- message, choices: [...dimensionsWallpapers, backMenu]
33
- });
34
-
35
- if(dimensions === backMenu) {
36
- alternativeCallback();
37
- } else {
38
- wallpaperDownload("dimensions", dimensions);
39
- setTimeout(refreshCallback, 5000);
40
- }
41
- },
42
- async seyyahi2(refreshCallback, alternativeCallback) {
43
- const seyyahiWallpapers = [...Array(14).keys()]
44
- .map(i => `seyyahi2-wallpaper${i + 1}.jpg`);
45
-
46
- const seyyahi2 = await select({
47
- message, choices: [...seyyahiWallpapers, backMenu]
48
- });
49
-
50
- if(seyyahi2 === backMenu) {
51
- alternativeCallback();
52
- } else {
53
- wallpaperDownload("seyyahi2", seyyahi2);
54
- setTimeout(refreshCallback, 5000);
55
- }
56
- }
57
- };
58
-
59
- export default wallpaperSelect;
1
+ // inquirer
2
+ import { select } from "@inquirer/prompts";
3
+
4
+ import { wallpaperDownload } from "../functions/download.js";
5
+
6
+ const message = "select a wallpaper for download:";
7
+ const backMenu = "back to menu";
8
+
9
+ /** @type {import("../types.js").Select}*/
10
+ const wallpaperSelect = {
11
+ solMoon: async (refreshCallback, alternativeCallback) => {
12
+ const solMoonWallpapers = [...Array(20).keys()]
13
+ .map(i => `sol-moon${i + 1}.jpeg`);
14
+
15
+
16
+ const solMoon = await select({
17
+ message, choices: [...solMoonWallpapers, backMenu]
18
+ });
19
+
20
+ if (solMoon === backMenu) {
21
+ alternativeCallback();
22
+ } else {
23
+ wallpaperDownload("sol-moon", solMoon);
24
+ setTimeout(refreshCallback, 5000);
25
+ }
26
+ },
27
+ dimensions: async (refreshCallback, alternativeCallback) => {
28
+ const dimensionsWallpapers = [...Array(12).keys()]
29
+ .map(i => `dimensions-${i + 1}.jpeg`);
30
+
31
+
32
+ const dimensions = await select({
33
+ message, choices: [...dimensionsWallpapers, backMenu]
34
+ });
35
+
36
+ if(dimensions === backMenu) {
37
+ alternativeCallback();
38
+ } else {
39
+ wallpaperDownload("dimensions", dimensions);
40
+ setTimeout(refreshCallback, 5000);
41
+ }
42
+ },
43
+ seyyahi2: async (refreshCallback, alternativeCallback) => {
44
+ const seyyahiWallpapers = [...Array(14).keys()]
45
+ .map(i => `seyyahi2-wallpaper${i + 1}.jpg`);
46
+
47
+ const seyyahi2 = await select({
48
+ message, choices: [...seyyahiWallpapers, backMenu]
49
+ });
50
+
51
+ if(seyyahi2 === backMenu) {
52
+ alternativeCallback();
53
+ } else {
54
+ wallpaperDownload("seyyahi2", seyyahi2);
55
+ setTimeout(refreshCallback, 5000);
56
+ }
57
+ },
58
+ ancientMistery: async (refreshCallback, alternativeCallback) => {
59
+ const ancientMisteryWallpapers = [...Array(6).keys()]
60
+ .map(i => `ancient-mistery${i + 1}.jpeg`);
61
+
62
+ const ancientMistery = await select({
63
+ message, choices: [...ancientMisteryWallpapers, backMenu]
64
+ });
65
+
66
+ if(ancientMistery === backMenu) {
67
+ alternativeCallback();
68
+ } else {
69
+ wallpaperDownload("ancient-mistery", ancientMistery);
70
+ setTimeout(refreshCallback, 5000);
71
+ }
72
+ },
73
+ tsukyNoEmily: async (refreshCallback, alternativeCallback) => {
74
+ const tsukyNoEmilyWallpapers = [...Array(6).keys()]
75
+ .map(i => `tsuky-no-emily${i + 1}.jpeg`);
76
+
77
+ const tsukyNoEmily = await select({
78
+ message, choices: [...tsukyNoEmilyWallpapers, backMenu]
79
+ });
80
+
81
+ if(tsukyNoEmily === backMenu) {
82
+ alternativeCallback();
83
+ } else {
84
+ wallpaperDownload("tsuky-no-emily", tsukyNoEmily);
85
+ setTimeout(refreshCallback, 5000);
86
+ }
87
+ },
88
+ };
89
+
90
+ export default wallpaperSelect;
package/hash/webTools.js CHANGED
@@ -1,92 +1,93 @@
1
- // stock module
2
- import { performance } from "node:perf_hooks";
3
-
4
- // inquirer
5
- import { input } from "@inquirer/prompts";
6
-
7
- // functions
8
- import singleStack from "../functions/singleStack.js";
9
- import multipleStack from "../functions/multipleStack.js";
10
- import pageSpeed from "../functions/pageSpeed.js";
11
- import scrape from "../functions/scraping.js";
12
- import cssValidate from "../functions/cssValidator.js";
13
-
14
- import { stackMenu } from "../menu.js";
15
- import { scrapingOpts } from "../utils.js";
16
-
17
- // regex
18
- const webRegex = /https?:\/\//g;
19
-
20
- const webTools = {
21
- async single(refreshCallback) {
22
- console.clear();
23
-
24
- const url = await input({
25
- message: "enter a url:",
26
- validate: input => webRegex.test(input) || "enter a url valid".yellow
27
- });
28
-
29
- singleStack(url);
30
- const timeEnd = performance.now();
31
- setTimeout(refreshCallback, timeEnd);
32
- },
33
- async multiple(refreshCallback) {
34
- console.clear();
35
-
36
- const webList = await input({
37
- message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
38
- validate(input) {
39
- const pass = input.match(webRegex);
40
-
41
- return pass && pass.length === 2 || "must be 2 sites";
42
- }
43
- });
44
-
45
- multipleStack(webList.split(" "));
46
- const timeEnd = performance.now();
47
- setTimeout(refreshCallback, timeEnd);
48
- },
49
- async pagespeed(refreshCallback) {
50
- console.clear();
51
-
52
- const url = await input({
53
- message: "enter a url:",
54
- validate: input => webRegex.test(input) || "enter a url valid".yellow
55
- });
56
-
57
- pageSpeed(url);
58
- const timeEnd = performance.now();
59
- setTimeout(refreshCallback, timeEnd);
60
- },
61
- async scraping(refreshCallback) {
62
- console.clear();
63
-
64
- const { url, option } = {
65
- option: await stackMenu({
66
- pageSize: 9,
67
- message: "select a web scraping option:",
68
- choices: scrapingOpts
69
- }),
70
- url: await input({
71
- message: "enter a url:",
72
- validate: input => webRegex.test(input) || "enter a url valid".yellow
73
- })
74
- };
75
-
76
- scrape(url, option);
77
- setTimeout(refreshCallback, 3000);
78
- },
79
- async css_validate(refreshCallback) {
80
- console.clear();
81
- const url = await input({
82
- message: "enter a url:",
83
- validate: input => webRegex.test(input) || "enter a url valid".yellow
84
- });
85
-
86
- cssValidate(url);
87
- const timeEnd = performance.now();
88
- setTimeout(refreshCallback, timeEnd);
89
- }
90
- };
91
-
92
- export default webTools;
1
+ // stock module
2
+ import { performance } from "node:perf_hooks";
3
+
4
+ // inquirer
5
+ import { input } from "@inquirer/prompts";
6
+
7
+ // functions
8
+ import singleStack from "../functions/singleStack.js";
9
+ import multipleStack from "../functions/multipleStack.js";
10
+ import pageSpeed from "../functions/pageSpeed.js";
11
+ import scrape from "../functions/scraping.js";
12
+ import cssValidate from "../functions/cssValidator.js";
13
+
14
+ import { stackMenu } from "../menu.js";
15
+ import { scrapingOpts } from "../utils.js";
16
+
17
+ // regex
18
+ const webRegex = /https?:\/\//g;
19
+
20
+ /** @type {import("../types.js").Select}*/
21
+ const webTools = {
22
+ async single(refreshCallback) {
23
+ console.clear();
24
+
25
+ const url = await input({
26
+ message: "enter a url:",
27
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
28
+ });
29
+
30
+ singleStack(url);
31
+ const timeEnd = performance.now();
32
+ setTimeout(refreshCallback, timeEnd);
33
+ },
34
+ async multiple(refreshCallback) {
35
+ console.clear();
36
+
37
+ const webList = await input({
38
+ message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
39
+ validate(input) {
40
+ const pass = input.match(webRegex);
41
+
42
+ return pass && pass.length === 2 || "must be 2 sites";
43
+ }
44
+ });
45
+
46
+ multipleStack(webList.split(" "));
47
+ const timeEnd = performance.now();
48
+ setTimeout(refreshCallback, timeEnd);
49
+ },
50
+ async pagespeed(refreshCallback) {
51
+ console.clear();
52
+
53
+ const url = await input({
54
+ message: "enter a url:",
55
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
56
+ });
57
+
58
+ pageSpeed(url);
59
+ const timeEnd = performance.now();
60
+ setTimeout(refreshCallback, timeEnd);
61
+ },
62
+ async scraping(refreshCallback) {
63
+ console.clear();
64
+
65
+ const { url, option } = {
66
+ option: await stackMenu({
67
+ pageSize: 9,
68
+ message: "select a web scraping option:",
69
+ choices: scrapingOpts
70
+ }),
71
+ url: await input({
72
+ message: "enter a url:",
73
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
74
+ })
75
+ };
76
+
77
+ scrape(url, option);
78
+ setTimeout(refreshCallback, 3000);
79
+ },
80
+ async css_validate(refreshCallback) {
81
+ console.clear();
82
+ const url = await input({
83
+ message: "enter a url:",
84
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
85
+ });
86
+
87
+ cssValidate(url);
88
+ const timeEnd = performance.now();
89
+ setTimeout(refreshCallback, timeEnd);
90
+ }
91
+ };
92
+
93
+ export default webTools;
package/logo-module.webp CHANGED
File without changes
package/menu.js CHANGED
@@ -1,13 +1,13 @@
1
- import { select } from "@inquirer/prompts";
2
-
3
- /**
4
- * @typedef {Object} Menu
5
- * @property {string} message
6
- * @property {string[]} choices
7
- * @property {number} [pageSize]
8
- * @param {Menu}
9
- * @returns {Promise<any>}
10
- */
11
- export const stackMenu = async ({message, choices, pageSize}) => await select({
12
- message, choices, pageSize
13
- });
1
+ import { select } from "@inquirer/prompts";
2
+
3
+ /**
4
+ * @typedef {Object} Menu
5
+ * @property {string} message
6
+ * @property {string[]} choices
7
+ * @property {number} [pageSize]
8
+ * @param {Menu}
9
+ * @returns {Promise<any>}
10
+ */
11
+ export const stackMenu = async ({message, choices, pageSize}) => await select({
12
+ message, choices, pageSize
13
+ });
package/package.json CHANGED
@@ -1,67 +1,67 @@
1
- {
2
- "name": "stack-analyze",
3
- "version": "1.3.5",
4
- "type": "module",
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": "cli.js",
7
- "bin": {
8
- "stack-analyze": "cli.js"
9
- },
10
- "dependencies": {
11
- "@inquirer/prompts": "^7.3.2",
12
- "axios": "^1.7.7",
13
- "boxen": "^8.0.1",
14
- "cheerio": "^1.0.0",
15
- "cli-progress": "^3.12.0",
16
- "colors": "^1.4.0",
17
- "console-table-printer": "^2.12.1",
18
- "figlet": "^1.8.0",
19
- "gauge": "^5.0.2",
20
- "inquirer": "^12.0.1",
21
- "systeminformation": "^5.23.5",
22
- "timeago.js": "^4.0.2",
23
- "w3c-css-validator": "^1.3.2",
24
- "wapalyzer": "^6.10.65"
25
- },
26
- "devDependencies": {
27
- "@eslint/js": "^9.14.0",
28
- "eslint": "^9.14.0",
29
- "globals": "^15.12.0",
30
- "jsdoc": "^4.0.4"
31
- },
32
- "scripts": {
33
- "start": "node cli.js",
34
- "test": "node --test test/index.test.js",
35
- "lint:test": "eslint -c eslint.config.js",
36
- "lint:fix": "eslint -c eslint.config.js",
37
- "docs": "jsdoc -c jsdoc.json"
38
- },
39
- "repository": {
40
- "type": "git",
41
- "url": "git+https://github.com/stack-analyze/stack-analyze.git"
42
- },
43
- "keywords": [
44
- "cli",
45
- "tech stack",
46
- "intermachine",
47
- "stack-analyze",
48
- "stack analyzer",
49
- "pagespeed analyze",
50
- "ascii art",
51
- "github user info",
52
- "anime search",
53
- "hardware information",
54
- "crypto market info",
55
- "movie info"
56
- ],
57
- "author": "stack-analyze",
58
- "license": "MIT",
59
- "bugs": {
60
- "url": "https://github.com/stack-analyze/stack-analyze/issues"
61
- },
62
- "homepage": "https://stack-analyze.github.io/stack-analyze/",
63
- "directories": {
64
- "doc": "docs",
65
- "test": "test"
66
- }
67
- }
1
+ {
2
+ "name": "stack-analyze",
3
+ "version": "1.3.7",
4
+ "type": "module",
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": "cli.js",
7
+ "bin": {
8
+ "stack-analyze": "cli.js"
9
+ },
10
+ "dependencies": {
11
+ "@inquirer/prompts": "^7.6.0",
12
+ "axios": "^1.10.0",
13
+ "boxen": "^8.0.1",
14
+ "cheerio": "^1.1.0",
15
+ "cli-progress": "^3.12.0",
16
+ "colors": "^1.4.0",
17
+ "console-table-printer": "^2.14.6",
18
+ "figlet": "^1.8.1",
19
+ "gauge": "^5.0.2",
20
+ "inquirer": "^12.7.0",
21
+ "systeminformation": "^5.27.7",
22
+ "timeago.js": "^4.0.2",
23
+ "w3c-css-validator": "^1.4.0",
24
+ "wapalyzer": "^6.10.65"
25
+ },
26
+ "devDependencies": {
27
+ "@eslint/js": "^9.30.1",
28
+ "eslint": "^9.30.1",
29
+ "globals": "^16.3.0",
30
+ "jsdoc": "^4.0.4"
31
+ },
32
+ "scripts": {
33
+ "start": "node cli.js",
34
+ "test": "node --test test/index.test.js",
35
+ "lint:test": "eslint -c eslint.config.js",
36
+ "lint:fix": "eslint -c eslint.config.js",
37
+ "docs": "jsdoc -c jsdoc.json"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/stack-analyze/stack-analyze.git"
42
+ },
43
+ "keywords": [
44
+ "cli",
45
+ "tech stack",
46
+ "intermachine",
47
+ "stack-analyze",
48
+ "stack analyzer",
49
+ "pagespeed analyze",
50
+ "ascii art",
51
+ "github user info",
52
+ "anime search",
53
+ "hardware information",
54
+ "crypto market info",
55
+ "movie info"
56
+ ],
57
+ "author": "stack-analyze",
58
+ "license": "MIT",
59
+ "bugs": {
60
+ "url": "https://github.com/stack-analyze/stack-analyze/issues"
61
+ },
62
+ "homepage": "https://stack-analyze.github.io/stack-analyze/",
63
+ "directories": {
64
+ "doc": "docs",
65
+ "test": "test"
66
+ }
67
+ }
@@ -1,31 +1,31 @@
1
- import { input} from "@inquirer/prompts";
2
-
3
- import { scrapingOpts } from "../utils.js";
4
-
5
- import { stackMenu } from "../menu.js";
6
-
7
- // regex
8
- const webRegex = /https?:\/\//g;
9
-
10
- // inputs
11
- const url = await input({
12
- message: "enter a url:",
13
- validate: input => webRegex.test(input) || "enter a url valid".yellow
14
- });
15
-
16
- const webList = await input({
17
- message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
18
- validate(input) {
19
- const pass = input.match(webRegex);
20
-
21
- return pass && pass.length === 2 || "must be 2 sites";
22
- }
23
- });
24
-
25
- const webScrapingQuery = await stackMenu({
26
- pageSize: 9,
27
- message: "select a web scraping option:",
28
- choices: scrapingOpts
29
- });
30
-
31
- export { url, webList, webScrapingQuery };
1
+ import { input} from "@inquirer/prompts";
2
+
3
+ import { scrapingOpts } from "../utils.js";
4
+
5
+ import { stackMenu } from "../menu.js";
6
+
7
+ // regex
8
+ const webRegex = /https?:\/\//g;
9
+
10
+ // inputs
11
+ const url = await input({
12
+ message: "enter a url:",
13
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
14
+ });
15
+
16
+ const webList = await input({
17
+ message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
18
+ validate(input) {
19
+ const pass = input.match(webRegex);
20
+
21
+ return pass && pass.length === 2 || "must be 2 sites";
22
+ }
23
+ });
24
+
25
+ const webScrapingQuery = await stackMenu({
26
+ pageSize: 9,
27
+ message: "select a web scraping option:",
28
+ choices: scrapingOpts
29
+ });
30
+
31
+ export { url, webList, webScrapingQuery };