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
package/readme.md CHANGED
@@ -1,44 +1,44 @@
1
- # stack analyze
2
-
3
- ![logo](logo-module.webp)
4
-
5
- ***
6
- [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/intermachine-developers/stack-analyze-cli)
7
- [![npm version](https://badge.fury.io/js/stack-analyze.svg)](https://badge.fury.io/js/stack-analyze)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
-
10
- <a href="https://www.buymeacoffee.com/omega5300" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
11
-
12
-
13
- cli tech stack analyze with **node.js** using the wappalyzer and google pagespeed api the module this node external module or install.
14
-
15
- ## use the cli program install
16
-
17
- ## cli module
18
- ``` sh
19
- # npm mode a
20
- npm i -g stack-analyze
21
-
22
- # npm mode b
23
- npm i --location=global stack-analyze
24
-
25
- # if using global install
26
- stack-analyze
27
-
28
- # portable
29
- npx stack-analyze
30
- ```
31
-
32
- >note: if global install fail using npx
33
-
34
- [github repo](https://github.com/stack-analyze/stack-analyze.git)
35
-
36
- [docs](https://stack-analyze.github.io/stack-analyze/)
37
-
38
- [gitlab repo](https://gitlab.com/Intermachine-dev/stack-analyze)
39
-
40
- ### extras
41
- - [changelog module](/CHANGELOG.md)
42
- ## author this project Julian David Cordoba Torres as omega5300
43
-
44
- **stack-analyze LICENSE MIT**
1
+ # stack analyze
2
+
3
+ ![logo](logo-module.webp)
4
+
5
+ ***
6
+ [![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/intermachine-developers/stack-analyze-cli)
7
+ [![npm version](https://badge.fury.io/js/stack-analyze.svg)](https://badge.fury.io/js/stack-analyze)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+
10
+ <a href="https://www.buymeacoffee.com/omega5300" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
11
+
12
+
13
+ cli tech stack analyze with **node.js** using the wappalyzer and google pagespeed api the module this node external module or install.
14
+
15
+ ## use the cli program install
16
+
17
+ ## cli module
18
+ ``` sh
19
+ # npm mode a
20
+ npm i -g stack-analyze
21
+
22
+ # npm mode b
23
+ npm i --location=global stack-analyze
24
+
25
+ # if using global install
26
+ stack-analyze
27
+
28
+ # portable
29
+ npx stack-analyze
30
+ ```
31
+
32
+ >note: if global install fail using npx
33
+
34
+ [github repo](https://github.com/stack-analyze/stack-analyze.git)
35
+
36
+ [docs](https://stack-analyze.github.io/stack-analyze/)
37
+
38
+ [gitlab repo](https://gitlab.com/Intermachine-dev/stack-analyze)
39
+
40
+ ### extras
41
+ - [changelog module](/CHANGELOG.md)
42
+ ## author this project Julian David Cordoba Torres as omega5300
43
+
44
+ **stack-analyze LICENSE MIT**
package/types.js ADDED
@@ -0,0 +1,51 @@
1
+ /**
2
+ * general functions
3
+ * @typedef {() => Promise<void>} Menu
4
+ *
5
+ * types for about tools
6
+ *
7
+ * @typedef {Object} Info
8
+ * @property {string} Info.mainDeveloper
9
+ * @property {string} Info.version
10
+ * @property {string} Info.license
11
+ *
12
+ * @typedef {Object} DeveloperList
13
+ * @property {string} DeveloperList.name
14
+ * @property {string} DeveloperList.roles
15
+ *
16
+ * @typedef {Object} Youtube
17
+ * @property {string} Youtube.youtubeChannel
18
+ * @property {string} Youtube.recomendation
19
+ *
20
+ * @typedef {Object} Twitch
21
+ * @property {string} Twitch.user
22
+ * @property {string} [Twitch.details]
23
+ *
24
+ * @typedef {Object} Project
25
+ * @property {string} Project.name
26
+ * @property {string} Project.desc
27
+ *
28
+ * anime quote types
29
+ * @typedef {Object} Anime
30
+ * @property {number} id
31
+ * @property {string} name
32
+ * @property {string} altName
33
+ *
34
+ * @typedef {Object} Data
35
+ * @property {string} content
36
+ * @property {Anime} anime
37
+ * @property {Omit<Anime, 'altName'>} character
38
+ *
39
+ * @typedef {Object} AnimeQuoute
40
+ * @property {string} status
41
+ * @property {Data} data
42
+ *
43
+ * select types
44
+ * @typedef {({
45
+ * [x: string]: (
46
+ * refreshCallback: () => Promise<void>,
47
+ * alternativeCallback?: () => Promise<void>
48
+ * ) => Promise<void> | void
49
+ * })} Select
50
+ *
51
+ */
package/utils.js CHANGED
@@ -1,101 +1,96 @@
1
- import { writeFile } from "node:fs/promises";
2
-
3
- const listFormat = new Intl.ListFormat("en", {
4
- style: "short",
5
- type: "conjunction"
6
- });
7
-
8
- const currency = new Intl.NumberFormat("en-us", {
9
- style: "currency", currency: "USD"
10
- });
11
-
12
- const returnMainOpts = "return main menu";
13
-
14
- const menuOpts = [
15
- "web", "info", "query", "utility", "wallpapers",
16
- "about", "exit"
17
- ];
18
-
19
- const menuWebOpts = [
20
- "single", "multiple", "pagespeed", "scraping", "css_validate",
21
- returnMainOpts
22
- ];
23
-
24
- const menuInfoOpts = [
25
- "github_info", "crypto_market", "bitly_info", "bundlephobia_info", returnMainOpts
26
- ];
27
-
28
- const menuQueryOpts = [
29
- "anime_Search", "movie_info", "pokemon_info",
30
- "twitch_info", "deezer", "potter_search", returnMainOpts
31
- ];
32
-
33
- const menuUtilityOpts = [
34
- "hardware", "password", "poker_game", returnMainOpts
35
- ];
36
-
37
- const menuWallpaperOpts = ["solMoon", "dimensions", "seyyahi2", returnMainOpts];
38
-
39
- const menuHardwareOpts = [
40
- "cpuInfo", "ramMemInfo", "osDetail", "diskInfo",
41
- "controllerInfo", "displayInfo", "biosInfo", returnMainOpts
42
- ];
43
-
44
- const menuAboutOpts = [
45
- "mainInfo", "lineup", "youtubeRecomendation",
46
- "twitchRecomendation", "projectsRecomendation", returnMainOpts
47
- ];
48
-
49
- const scrapingOpts = [
50
- "title", "images", "metadata", "headings",
51
- "tableHead", "tableData", "links", "cites"
52
- ];
53
-
54
- const pokerGameOpts = [
55
- "go-fish", "gin-rummy", "blackjack", "slapjack",
56
- "basics-of-poker", "texas-holdem-poker"
57
- ];
58
-
59
- /**
60
- *
61
- * @param {string} filename
62
- * @param {any} data
63
- * @returns {Promise<void>}
64
- */
65
- const stackSave = async (filename, data) => {
66
- if (!data) {
67
- console.error("stackSave no using falsy values");
68
- return;
69
- }
70
-
71
- if(typeof data === "boolean") {
72
- console.info("stackSave no using boolean types");
73
- return;
74
- }
75
-
76
- try {
77
- await writeFile(filename, data);
78
- } catch (err) {
79
- console.info(err.message);
80
- }
81
- };
82
-
83
- const exitCli = "thanks for use stack-analyze";
84
-
85
- export {
86
- listFormat,
87
- currency,
88
- menuOpts,
89
- menuWebOpts,
90
- menuInfoOpts,
91
- menuQueryOpts,
92
- menuUtilityOpts,
93
- menuHardwareOpts,
94
- menuWallpaperOpts,
95
- menuAboutOpts,
96
- scrapingOpts,
97
- stackSave,
98
- pokerGameOpts,
99
- exitCli
100
- };
101
-
1
+ import { writeFile } from "node:fs/promises";
2
+
3
+ const listFormat = new Intl.ListFormat("en", {
4
+ style: "short",
5
+ type: "conjunction"
6
+ });
7
+
8
+ const currency = new Intl.NumberFormat("en-us", {
9
+ style: "currency", currency: "USD"
10
+ });
11
+
12
+ const returnMainOpts = "return main menu";
13
+
14
+ const menuOpts = [
15
+ "web", "info", "query", "utility", "wallpapers", "quotes",
16
+ "about", "exit"
17
+ ];
18
+
19
+ const menuWebOpts = [
20
+ "single", "multiple", "pagespeed", "scraping", "css_validate",
21
+ returnMainOpts
22
+ ];
23
+
24
+ const menuInfoOpts = [
25
+ "github_info", "crypto_market", "bitly_info", "bundlephobia_info", returnMainOpts
26
+ ];
27
+
28
+ const menuQueryOpts = [
29
+ "anime_Search", "movie_info", "pokemon_info",
30
+ "twitch_info", "deezer", "potter_search", returnMainOpts
31
+ ];
32
+
33
+ const menuUtilityOpts = [
34
+ "hardware", "password", "poker_game", returnMainOpts
35
+ ];
36
+
37
+ const menuWallpaperOpts = [
38
+ "solMoon", "dimensions", "seyyahi2", "ancientMistery",
39
+ "tsukyNoEmily", returnMainOpts
40
+ ];
41
+
42
+ const menuQuoteOpts = ["animeQuote", returnMainOpts];
43
+
44
+ const menuHardwareOpts = [
45
+ "cpuInfo", "ramMemInfo", "osDetail", "diskInfo",
46
+ "controllerInfo", "displayInfo", "biosInfo", returnMainOpts
47
+ ];
48
+
49
+ const menuAboutOpts = [
50
+ "mainInfo", "lineup", "youtubeRecomendation",
51
+ "twitchRecomendation", "projectsRecomendation", returnMainOpts
52
+ ];
53
+
54
+ const scrapingOpts = [
55
+ "title", "images", "metadata", "headings",
56
+ "tableHead", "tableData", "links", "cites"
57
+ ];
58
+
59
+ const pokerGameOpts = [
60
+ "go-fish", "gin-rummy", "blackjack", "slapjack",
61
+ "basics-of-poker", "texas-holdem-poker"
62
+ ];
63
+
64
+ /**
65
+ *
66
+ * @param {string} filename
67
+ * @param {any} data
68
+ * @returns {Promise<void>}
69
+ */
70
+ const stackSave = async (filename, data) => {
71
+ if (!data) {
72
+ console.error("stackSave no using falsy values");
73
+ return;
74
+ }
75
+
76
+ if(typeof data === "boolean") {
77
+ console.info("stackSave no using boolean types");
78
+ return;
79
+ }
80
+
81
+ try {
82
+ await writeFile(filename, data);
83
+ } catch (err) {
84
+ console.info(err.message);
85
+ }
86
+ };
87
+
88
+ const exitCli = "thanks for use stack-analyze";
89
+
90
+ export {
91
+ listFormat, currency, menuOpts, menuWebOpts,
92
+ menuInfoOpts, menuQueryOpts, menuUtilityOpts, menuHardwareOpts,
93
+ menuWallpaperOpts, menuAboutOpts, scrapingOpts, menuQuoteOpts,
94
+ stackSave, pokerGameOpts, exitCli
95
+ };
96
+
@@ -1,37 +1,37 @@
1
- // bitly regexp
2
- const bitlyRegexp = /bit\.ly\//g;
3
-
4
- const bitlyQuery = {
5
- name: "bitlyLink",
6
- message: "enter a short link:",
7
- validate: input => bitlyRegexp.test(input) || "only bitly link".yellow
8
- };
9
-
10
- /**
11
- * @param {string} name
12
- * @param {string} message
13
- */
14
- const promptParams = (name, message) => ({
15
- name,
16
- message,
17
- validate: input => input !== "" || "this field is required".yellow
18
- });
19
-
20
- /**
21
- * @param {string} name
22
- * @param {string} message
23
- */
24
- const promptKey = (name, message) => ({
25
- name,
26
- message,
27
- type: "password",
28
- mask: "?",
29
- validate: input => input !== "" || "token field is required".yellow
30
- });
31
-
32
- export {
33
- bitlyQuery,
34
- promptParams,
35
- promptKey
36
- };
37
-
1
+ // bitly regexp
2
+ const bitlyRegexp = /bit\.ly\//g;
3
+
4
+ const bitlyQuery = {
5
+ name: "bitlyLink",
6
+ message: "enter a short link:",
7
+ validate: input => bitlyRegexp.test(input) || "only bitly link".yellow
8
+ };
9
+
10
+ /**
11
+ * @param {string} name
12
+ * @param {string} message
13
+ */
14
+ const promptParams = (name, message) => ({
15
+ name,
16
+ message,
17
+ validate: input => input !== "" || "this field is required".yellow
18
+ });
19
+
20
+ /**
21
+ * @param {string} name
22
+ * @param {string} message
23
+ */
24
+ const promptKey = (name, message) => ({
25
+ name,
26
+ message,
27
+ type: "password",
28
+ mask: "?",
29
+ validate: input => input !== "" || "token field is required".yellow
30
+ });
31
+
32
+ export {
33
+ bitlyQuery,
34
+ promptParams,
35
+ promptKey
36
+ };
37
+
@@ -1,33 +1,33 @@
1
- import { scrapingOpts } from "../utils.js";
2
-
3
- const webRegex = /https?:\/\//g;
4
-
5
- const singleWebQuery = {
6
- name: "url",
7
- message: "enter a url:",
8
- validate: input => webRegex.test(input) || "enter a url valid".yellow
9
- };
10
-
11
- const multipleWebQuery = {
12
- name: "webList",
13
- message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
14
- validate(input) {
15
- const pass = input.match(webRegex);
16
-
17
- return pass && pass.length === 2 || "must be 2 sites";
18
- }
19
- };
20
-
21
- const webScrapingQuery = {
22
- type: "list",
23
- pageSize: 9,
24
- name: "option",
25
- message: "select a web scraping option:",
26
- choices: scrapingOpts
27
- };
28
-
29
- export {
30
- singleWebQuery,
31
- multipleWebQuery,
32
- webScrapingQuery
33
- };
1
+ import { scrapingOpts } from "../utils.js";
2
+
3
+ const webRegex = /https?:\/\//g;
4
+
5
+ const singleWebQuery = {
6
+ name: "url",
7
+ message: "enter a url:",
8
+ validate: input => webRegex.test(input) || "enter a url valid".yellow
9
+ };
10
+
11
+ const multipleWebQuery = {
12
+ name: "webList",
13
+ message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n",
14
+ validate(input) {
15
+ const pass = input.match(webRegex);
16
+
17
+ return pass && pass.length === 2 || "must be 2 sites";
18
+ }
19
+ };
20
+
21
+ const webScrapingQuery = {
22
+ type: "list",
23
+ pageSize: 9,
24
+ name: "option",
25
+ message: "select a web scraping option:",
26
+ choices: scrapingOpts
27
+ };
28
+
29
+ export {
30
+ singleWebQuery,
31
+ multipleWebQuery,
32
+ webScrapingQuery
33
+ };