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.
- package/CHANGELOG.md +335 -311
- package/LICENSE +21 -21
- package/about.js +98 -121
- package/api/pokerApi.js +5 -5
- package/api/wallpapersURL.js +7 -5
- package/api/webApis.js +21 -21
- package/cli.js +204 -213
- package/eslint.config.js +44 -44
- package/functions/animeInfo.js +45 -45
- package/functions/bitly.js +41 -41
- package/functions/bundlephobia.js +36 -36
- package/functions/cryptoList.js +48 -48
- package/functions/cssValidator.js +25 -25
- package/functions/deezer.js +37 -37
- package/functions/download.js +25 -24
- package/functions/gitUser.js +37 -37
- package/functions/hardware.js +109 -109
- package/functions/moviesInfo.js +55 -55
- package/functions/multipleStack.js +53 -53
- package/functions/pageSpeed.js +82 -82
- package/functions/password.js +24 -24
- package/functions/pokemon.js +106 -106
- package/functions/poker.js +40 -42
- package/functions/potterSearch.js +32 -32
- package/functions/quotes.js +33 -0
- package/functions/scraping.js +132 -132
- package/functions/singleStack.js +48 -48
- package/functions/twitch.js +72 -72
- package/hash/infoTools.js +61 -61
- package/hash/queryTools.js +113 -116
- package/hash/quotesSelect.js +16 -0
- package/hash/utilityTools.js +33 -32
- package/hash/wallpaperSelect.js +90 -59
- package/hash/webTools.js +93 -92
- package/logo-module.webp +0 -0
- package/menu.js +13 -13
- package/package.json +67 -67
- package/prompts/webPrompts.js +31 -31
- package/readme.md +44 -44
- package/types.js +51 -0
- package/utils.js +96 -101
- package/validations/infoValidations.js +37 -37
- package/validations/webValidations.js +33 -33
package/readme.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# stack analyze
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
***
|
|
6
|
-
[](https://stackshare.io/intermachine-developers/stack-analyze-cli)
|
|
7
|
-
[](https://badge.fury.io/js/stack-analyze)
|
|
8
|
-
[](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
|
+

|
|
4
|
+
|
|
5
|
+
***
|
|
6
|
+
[](https://stackshare.io/intermachine-developers/stack-analyze-cli)
|
|
7
|
+
[](https://badge.fury.io/js/stack-analyze)
|
|
8
|
+
[](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 = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if(
|
|
72
|
-
console.
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
menuUtilityOpts,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
+
};
|