stack-analyze 1.1.4
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 +117 -0
- package/LICENSE +21 -0
- package/about/index.js +126 -0
- package/functions/animeInfo.js +79 -0
- package/functions/bitly.js +43 -0
- package/functions/cryptoList.js +80 -0
- package/functions/gitUser.js +41 -0
- package/functions/hardware.js +241 -0
- package/functions/multipleStack.js +77 -0
- package/functions/pageSpeed.js +104 -0
- package/functions/singleStack.js +65 -0
- package/index.js +458 -0
- package/logo-module.png +0 -0
- package/package.json +64 -0
- package/readme.md +32 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# changelog
|
|
2
|
+
|
|
3
|
+
stack-analyze all version and notable changes, fixed, remove and new additions in code.
|
|
4
|
+
|
|
5
|
+
## version 1.1.3
|
|
6
|
+
### Added
|
|
7
|
+
- add new module: coingecko-api
|
|
8
|
+
- add new tool: crypto market
|
|
9
|
+
- add new recomends
|
|
10
|
+
- add new test
|
|
11
|
+
### fixed
|
|
12
|
+
- rewrite some functions
|
|
13
|
+
- update npm modules via manual
|
|
14
|
+
### changed
|
|
15
|
+
- add new const variables for map array functions
|
|
16
|
+
|
|
17
|
+
## version 1.1.2
|
|
18
|
+
### Added
|
|
19
|
+
- add new nonolive streamers Recomend
|
|
20
|
+
### fixed
|
|
21
|
+
- rewrite multiple techstack
|
|
22
|
+
- rewrite test files
|
|
23
|
+
### changed
|
|
24
|
+
- changed the for loop to foreach loop
|
|
25
|
+
|
|
26
|
+
## version 1.1.1
|
|
27
|
+
### Added
|
|
28
|
+
- using console.table only in objects variables
|
|
29
|
+
- using the console-table-printer in arrays in some functions and the about sectiond
|
|
30
|
+
- add the new module: console-table-printer
|
|
31
|
+
- add the new nonolive streamers and youtube dev recommedation
|
|
32
|
+
### fixed
|
|
33
|
+
- rewrite some funcions
|
|
34
|
+
- fragment about section
|
|
35
|
+
### changed
|
|
36
|
+
- using console.table only in objects variables
|
|
37
|
+
- using the console-table-printer in arrays in some functions and the about section
|
|
38
|
+
|
|
39
|
+
## version 1.1.0
|
|
40
|
+
### Added
|
|
41
|
+
- add the new modules:
|
|
42
|
+
- systeminformation the main module
|
|
43
|
+
- jsdoc + the template minami the dev modules
|
|
44
|
+
- add the hardware information
|
|
45
|
+
- add new recomendations for about section
|
|
46
|
+
### fixed
|
|
47
|
+
- rewrite the code the functions singlestack and multiple
|
|
48
|
+
- add the name app to question function
|
|
49
|
+
### Changed
|
|
50
|
+
- changed the node style color to using colors
|
|
51
|
+
|
|
52
|
+
## version 1.0.9
|
|
53
|
+
### Added
|
|
54
|
+
- add the new modules:
|
|
55
|
+
- timeago.js for the github user
|
|
56
|
+
- add the options github info and anime search the main options
|
|
57
|
+
- add new recomendations for the about section
|
|
58
|
+
### Fixed
|
|
59
|
+
- return the peformance now for pagespeed
|
|
60
|
+
### Changed
|
|
61
|
+
- add new testing
|
|
62
|
+
|
|
63
|
+
## version 1.0.8
|
|
64
|
+
### Added
|
|
65
|
+
- add the new modules:
|
|
66
|
+
- colors
|
|
67
|
+
- cli-progress
|
|
68
|
+
### fixed
|
|
69
|
+
change json print to table print version
|
|
70
|
+
### Changed
|
|
71
|
+
- change console.dir about to console.table
|
|
72
|
+
- change from text to bar for pagespeed results
|
|
73
|
+
- add the badge tech stack project
|
|
74
|
+
### patch version 1.0.85
|
|
75
|
+
notes:
|
|
76
|
+
- fixed the cli run
|
|
77
|
+
- remove performance.now for the defined time in pagespeed
|
|
78
|
+
- add recomendations sections
|
|
79
|
+
|
|
80
|
+
## version 1.0.7
|
|
81
|
+
### Added
|
|
82
|
+
- add the new modules:
|
|
83
|
+
- figlet the main module
|
|
84
|
+
- jest dev module and testing functions
|
|
85
|
+
- add the options page speed and about the main options
|
|
86
|
+
- add return in a option select except about and exit
|
|
87
|
+
### Fixed
|
|
88
|
+
- the website in blank or website without http:// or https:// return the main options
|
|
89
|
+
- eslint custom rules without style guide
|
|
90
|
+
### Changed
|
|
91
|
+
- changed the inquirer list to inquirer rawlist
|
|
92
|
+
- rewirte jsdoc in all project except test files
|
|
93
|
+
- the tech stack using other console methods console.log only in exit cli
|
|
94
|
+
|
|
95
|
+
## version 1.0.6
|
|
96
|
+
### Added
|
|
97
|
+
- add the new options: multiple (analyze many sites) and exit (exit cli).
|
|
98
|
+
- the code was testing with eslint to avoid errors to execute
|
|
99
|
+
- rewrite the module docs.
|
|
100
|
+
### Changed
|
|
101
|
+
- the list options with inquirer
|
|
102
|
+
- welcome message modified
|
|
103
|
+
|
|
104
|
+
## version 1.0.5
|
|
105
|
+
### Changed
|
|
106
|
+
- modify the code and module structure
|
|
107
|
+
### remove
|
|
108
|
+
- remove the commander module
|
|
109
|
+
|
|
110
|
+
## version 1.0.4
|
|
111
|
+
- fisrt official version in npm with the modules:
|
|
112
|
+
- wappalyzer
|
|
113
|
+
- inquirer
|
|
114
|
+
- commander
|
|
115
|
+
|
|
116
|
+
## version 1.0.1 to 1.0.3
|
|
117
|
+
test version modules without wappalyzer module (only testing)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 julian david cordoba torres
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/about/index.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// version module
|
|
2
|
+
const { version, license } = require("../package.json");
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type { { mainDeveloper: string, version: string, license: string } }
|
|
6
|
+
*/
|
|
7
|
+
const aboutApp = {
|
|
8
|
+
mainDeveloper: "omega5300",
|
|
9
|
+
license,
|
|
10
|
+
version
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {Object[]} ideas
|
|
15
|
+
* @property {string} ideas.author
|
|
16
|
+
* @property {string} ideas.tool
|
|
17
|
+
*/
|
|
18
|
+
const ideas = [
|
|
19
|
+
{
|
|
20
|
+
author: "verguiskarime",
|
|
21
|
+
tool: "bitly info"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
/** @type { string[] } */
|
|
26
|
+
const developers = [
|
|
27
|
+
"omega5300"
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {Object[]} youtubeDev
|
|
32
|
+
* @property {string} youtubeDev.youtubeChannel
|
|
33
|
+
* @property {string} youtubeDev.recomendation
|
|
34
|
+
*/
|
|
35
|
+
const youtubeDev = [
|
|
36
|
+
{
|
|
37
|
+
youtubeChannel: "fazt",
|
|
38
|
+
recomendation: "recommend"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
youtubeChannel: "doriandesings",
|
|
42
|
+
recomendation: "recommend"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
youtubeChannel: "bluuweb",
|
|
46
|
+
recomendation: "recommend"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
youtubeChannel: "leonidas esteban",
|
|
50
|
+
recomendation: "neutral recommend"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
youtubeChannel: "fernando herrera",
|
|
54
|
+
recomendation: "recommend"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
youtubeChannel: "soy dalto",
|
|
58
|
+
recomendation: "neutral recommend"
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @typedef {Object[]} nonolive
|
|
64
|
+
* @property {string} nonolive.youtubeChannel
|
|
65
|
+
* @property {string} nonolive.recomendation
|
|
66
|
+
*/
|
|
67
|
+
const nonolive = [
|
|
68
|
+
{
|
|
69
|
+
nonoID: 14278329,
|
|
70
|
+
name: "⚔️GothspiceChann💰"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
nonoID: 28525468,
|
|
74
|
+
name: "Seyyahi Solist"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
nonoID: 41145492,
|
|
78
|
+
name: "ᴹᴰToniDAle"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
nonoID: 41135433,
|
|
82
|
+
name: "ᴹᴰ🐰CELI69🦄🦎"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
nonoID: 17342980,
|
|
86
|
+
name: "🎬Sailormoon🌙"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
nonoID: 31655138,
|
|
90
|
+
name: "🦎🌟Aidee💋🦜"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
nonoID: 18539967,
|
|
94
|
+
name: "💋🧉Narki🐺Lili"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
nonoID: 28480328,
|
|
98
|
+
name: "🌼PAPATYA❣SS🌼"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
nonoID: 9330839,
|
|
102
|
+
name: "🦎🌟GUANI🌻🍦"
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
/** @type { string[] } */
|
|
107
|
+
const twitch = [
|
|
108
|
+
"lunanny",
|
|
109
|
+
"lamua_",
|
|
110
|
+
"dannyaegyo"
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
/** @type { string[] } */
|
|
114
|
+
const projects = [
|
|
115
|
+
"Doofy's Projects"
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
module.exports = {
|
|
119
|
+
aboutApp,
|
|
120
|
+
developers,
|
|
121
|
+
youtubeDev,
|
|
122
|
+
nonolive,
|
|
123
|
+
twitch,
|
|
124
|
+
projects,
|
|
125
|
+
ideas
|
|
126
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// modules
|
|
2
|
+
const axios = require("axios").default;
|
|
3
|
+
const { format } = require("timeago.js");
|
|
4
|
+
const { red } = require("colors");
|
|
5
|
+
const { Table } = require("console-table-printer");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @description call the anime serach info
|
|
10
|
+
* @param { string } query - get query results
|
|
11
|
+
* @returns { Promise<void> } - return results serach
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
const animeSearch = async (query) => {
|
|
15
|
+
/* error manager */
|
|
16
|
+
try {
|
|
17
|
+
// call api
|
|
18
|
+
const { data } = await axios.get("https://api.jikan.moe/v3/search/anime", {
|
|
19
|
+
params: {
|
|
20
|
+
q: query,
|
|
21
|
+
limit: 10
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const animeList = new Table({
|
|
26
|
+
columns: [
|
|
27
|
+
{
|
|
28
|
+
name: "title",
|
|
29
|
+
alignment: "left",
|
|
30
|
+
color: "green"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "type",
|
|
34
|
+
alignment: "left",
|
|
35
|
+
color: "magenta"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "episodes",
|
|
39
|
+
alignment: "left",
|
|
40
|
+
color: "magenta"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "debutDate",
|
|
44
|
+
alignment: "left",
|
|
45
|
+
color: "magenta"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "finalDate",
|
|
49
|
+
alignment: "left",
|
|
50
|
+
color: "green"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const animeData = data.results.map(({
|
|
56
|
+
title,
|
|
57
|
+
episodes,
|
|
58
|
+
start_date,
|
|
59
|
+
end_date,
|
|
60
|
+
type }) => ({
|
|
61
|
+
title,
|
|
62
|
+
type,
|
|
63
|
+
episodes,
|
|
64
|
+
debutDate: format(start_date),
|
|
65
|
+
finalDate: end_date !== null
|
|
66
|
+
? format(end_date)
|
|
67
|
+
: "current date"
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
animeList.addRows(animeData);
|
|
72
|
+
|
|
73
|
+
animeList.printTable();
|
|
74
|
+
|
|
75
|
+
} catch (err) { console.error(red(err.message)); }
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// exports module
|
|
79
|
+
module.exports = animeSearch;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// modules
|
|
2
|
+
const axios = require("axios").default;
|
|
3
|
+
const { format } = require("timeago.js");
|
|
4
|
+
const { red } = require("colors");
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @description call the bitly info data
|
|
9
|
+
* @param { string } link - link for search info
|
|
10
|
+
* @param { string } token - token for using tool
|
|
11
|
+
* @returns { Promise<void> } - return results serach
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
const bitlyInfo = async (link, token) => {
|
|
15
|
+
try {
|
|
16
|
+
const { data, status } = await axios.post(
|
|
17
|
+
"https://api-ssl.bitly.com/v4/expand",
|
|
18
|
+
{
|
|
19
|
+
bitlink_id: link
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: `Bearer ${token}`,
|
|
24
|
+
"Content-Type": "application/json"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
status === 404
|
|
30
|
+
? console.info("no found link".green)
|
|
31
|
+
: console.table({
|
|
32
|
+
created_link: format(data.created_at),
|
|
33
|
+
bitly_link: data.link,
|
|
34
|
+
link: data.long_url
|
|
35
|
+
});
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.error(red(err.message));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// export
|
|
42
|
+
module.exports = bitlyInfo;
|
|
43
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// modules
|
|
2
|
+
const CoinGecko = require("coingecko-api");
|
|
3
|
+
const { format } = require("timeago.js");
|
|
4
|
+
const { red, green } = require("colors");
|
|
5
|
+
const { Table } = require("console-table-printer");
|
|
6
|
+
|
|
7
|
+
// init coingecko api
|
|
8
|
+
const CoinGeckoClient = new CoinGecko();
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
*
|
|
12
|
+
* @descripiton call the crypto market list
|
|
13
|
+
* @returns { Promise<void> } - return results search
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
const cryptoMarket = async () => {
|
|
17
|
+
try {
|
|
18
|
+
// start crypto
|
|
19
|
+
const coinData = await CoinGeckoClient.coins.markets({
|
|
20
|
+
per_page: 10
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// map coinData
|
|
24
|
+
const coinList = coinData.data.map(({
|
|
25
|
+
symbol,
|
|
26
|
+
name,
|
|
27
|
+
current_price,
|
|
28
|
+
price_change_percentage_24h,
|
|
29
|
+
last_updated
|
|
30
|
+
}) => ({
|
|
31
|
+
symbol,
|
|
32
|
+
name,
|
|
33
|
+
price: current_price,
|
|
34
|
+
priceChanged: price_change_percentage_24h > 0
|
|
35
|
+
? green(price_change_percentage_24h)
|
|
36
|
+
: red(price_change_percentage_24h),
|
|
37
|
+
lastUpdated: format(last_updated)
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
// init table
|
|
41
|
+
const coinTable = new Table({
|
|
42
|
+
columns: [
|
|
43
|
+
{
|
|
44
|
+
name: "symbol",
|
|
45
|
+
alignment: "left",
|
|
46
|
+
color: "green"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "name",
|
|
50
|
+
alignment: "left",
|
|
51
|
+
color: "white_bold"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "price",
|
|
55
|
+
alignment: "left",
|
|
56
|
+
color: "yellow"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "priceChanged",
|
|
60
|
+
alignment: "left"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "lastUpdated",
|
|
64
|
+
alignment: "left",
|
|
65
|
+
color: "magenta"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
coinTable.addRows(coinList);
|
|
71
|
+
|
|
72
|
+
// print table
|
|
73
|
+
coinTable.printTable();
|
|
74
|
+
} catch (err) {
|
|
75
|
+
// print err message
|
|
76
|
+
console.error(red(err.message));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
module.exports = cryptoMarket;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// modules
|
|
2
|
+
const axios = require("axios").default;
|
|
3
|
+
const { format } = require("timeago.js");
|
|
4
|
+
const { red, yellow } = require("colors");
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @description call github info user
|
|
9
|
+
* @param { string } user - get github user info
|
|
10
|
+
* @returns { Promise<void> } - return results info
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
async function githubInfo(user) {
|
|
14
|
+
try {
|
|
15
|
+
const res = await axios.get(`https://api.github.com/users/${user}`);
|
|
16
|
+
|
|
17
|
+
if (res.status !== 404){
|
|
18
|
+
const info = {
|
|
19
|
+
username: res.data.login,
|
|
20
|
+
fullName: res.data.name === null ? "no info": res.data.name,
|
|
21
|
+
Email: res.data.email === null ? "no info": res.data.email,
|
|
22
|
+
userFollowers: res.data.followers,
|
|
23
|
+
userFollowing: res.data.following,
|
|
24
|
+
accountAge: format(res.data.created_at),
|
|
25
|
+
updated_info: format(res.data.updated_at),
|
|
26
|
+
twitter: res.data.twitter_username === null ? "no info": res.data.twitter_username,
|
|
27
|
+
repos: res.data.public_repos,
|
|
28
|
+
gists: res.data.public_gists
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
console.table(info);
|
|
32
|
+
} else {
|
|
33
|
+
console.info(yellow(res.status.toString()));
|
|
34
|
+
}
|
|
35
|
+
} catch(err) {
|
|
36
|
+
console.error(red(err.message));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = githubInfo;
|
|
41
|
+
|