stack-analyze 1.1.6 → 1.1.9
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 +37 -3
- package/about.js +110 -0
- package/cli.js +318 -114
- package/demo.js +20 -0
- package/functions/animeInfo.js +9 -42
- package/functions/bitly.js +5 -7
- package/functions/cryptoList.js +23 -49
- package/functions/gitUser.js +6 -9
- package/functions/hardware.js +191 -231
- package/functions/moviesInfo.js +8 -41
- package/functions/multipleStack.js +19 -34
- package/functions/pageSpeed.js +13 -13
- package/functions/scraping.js +153 -0
- package/functions/singleStack.js +19 -37
- package/functions/twitch.js +44 -0
- package/{index.js → index.cjs} +202 -60
- package/index.mjs +496 -0
- package/package.json +24 -17
- package/readme.md +13 -5
- package/utils.js +15 -0
- package/about/index.js +0 -56
- package/hash/aboutOpts.js +0 -55
- package/hash/hardwareTools.js +0 -47
- package/hash/infoTools.js +0 -90
- package/hash/mainTools.js +0 -67
- package/models/aboutTables.js +0 -40
package/hash/aboutOpts.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// print table
|
|
2
|
-
const { printTable } = require("console-table-printer");
|
|
3
|
-
|
|
4
|
-
// tables models
|
|
5
|
-
const {
|
|
6
|
-
youtubeDevTable,
|
|
7
|
-
nonoliveTable,
|
|
8
|
-
ideasTable
|
|
9
|
-
} = require("../models/aboutTables");
|
|
10
|
-
|
|
11
|
-
// about sections
|
|
12
|
-
const {
|
|
13
|
-
aboutApp,
|
|
14
|
-
developers,
|
|
15
|
-
youtubeDev,
|
|
16
|
-
nonolive,
|
|
17
|
-
twitch,
|
|
18
|
-
projects,
|
|
19
|
-
ideas
|
|
20
|
-
} = require("../about");
|
|
21
|
-
|
|
22
|
-
/** @type {{ main_info(): void, lineup(): void, youtube_recomendation(): void, nonolive_recomendation(): void, twitch_recomendation(): void, projects_recomendation(): void, tools_ideas(): void }} */
|
|
23
|
-
const aboutTool = {
|
|
24
|
-
main_info() {
|
|
25
|
-
console.clear();
|
|
26
|
-
console.table(aboutApp);
|
|
27
|
-
},
|
|
28
|
-
lineup() {
|
|
29
|
-
console.clear();
|
|
30
|
-
printTable(developers.map((dev, i) => ({ index: i + 1, dev })));
|
|
31
|
-
},
|
|
32
|
-
youtube_recomendation() {
|
|
33
|
-
console.clear();
|
|
34
|
-
youtubeDevTable.addRows(youtubeDev);
|
|
35
|
-
youtubeDevTable.printTable();
|
|
36
|
-
},
|
|
37
|
-
twitch_recomendation() {
|
|
38
|
-
console.clear();
|
|
39
|
-
const streamers = twitch.map((streamer, i) => ({ index: i + 1, streamer }));
|
|
40
|
-
printTable(streamers);
|
|
41
|
-
},
|
|
42
|
-
projects_recomendation() {
|
|
43
|
-
console.clear();
|
|
44
|
-
const proyectsReccomend = projects.map((project, i) => ({ index: i + 1, project }));
|
|
45
|
-
printTable(proyectsReccomend);
|
|
46
|
-
},
|
|
47
|
-
tools_ideas() {
|
|
48
|
-
console.clear();
|
|
49
|
-
ideasTable.addRows(ideas);
|
|
50
|
-
ideasTable.printTable();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// export hash
|
|
55
|
-
module.exports = aboutTool;
|
package/hash/hardwareTools.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// hardware modules
|
|
2
|
-
const {
|
|
3
|
-
cpuInfo,
|
|
4
|
-
ramMemInfo,
|
|
5
|
-
osDetail,
|
|
6
|
-
diskInfo,
|
|
7
|
-
controllerInfo,
|
|
8
|
-
displayInfo,
|
|
9
|
-
biosInfo
|
|
10
|
-
} = require("../functions/hardware");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @type {{ cpu(): void, ram_memory(): void, os(): void, disk(): void, controller(): void, display(): void, bios(): void }}
|
|
14
|
-
*/
|
|
15
|
-
const hardwareTools = {
|
|
16
|
-
cpu() {
|
|
17
|
-
console.clear();
|
|
18
|
-
cpuInfo();
|
|
19
|
-
},
|
|
20
|
-
ram_memory() {
|
|
21
|
-
console.clear();
|
|
22
|
-
ramMemInfo();
|
|
23
|
-
},
|
|
24
|
-
os() {
|
|
25
|
-
console.clear();
|
|
26
|
-
osDetail();
|
|
27
|
-
},
|
|
28
|
-
disk() {
|
|
29
|
-
console.clear();
|
|
30
|
-
diskInfo();
|
|
31
|
-
},
|
|
32
|
-
controller() {
|
|
33
|
-
console.clear();
|
|
34
|
-
controllerInfo();
|
|
35
|
-
},
|
|
36
|
-
display() {
|
|
37
|
-
console.clear();
|
|
38
|
-
displayInfo();
|
|
39
|
-
},
|
|
40
|
-
bios() {
|
|
41
|
-
console.clear();
|
|
42
|
-
biosInfo();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// exports
|
|
47
|
-
module.exports = hardwareTools;
|
package/hash/infoTools.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
const inquirer = require("inquirer");
|
|
3
|
-
|
|
4
|
-
// github info
|
|
5
|
-
const githubInfo = require("../functions/gitUser");
|
|
6
|
-
|
|
7
|
-
// anime search
|
|
8
|
-
const animeSearch = require("../functions/animeInfo");
|
|
9
|
-
|
|
10
|
-
// crypto market
|
|
11
|
-
const cryptoMarket = require("../functions/cryptoList");
|
|
12
|
-
|
|
13
|
-
// bitly
|
|
14
|
-
const bitlyInfo = require("../functions/bitly");
|
|
15
|
-
|
|
16
|
-
// movies
|
|
17
|
-
const movieDB = require("../functions/moviesInfo");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @type {{ github_info(): Promise<void>, anime_search(): Promise<void>, crypto_market(): void, bitly_info(): Promise<void>, movie_info(): Promise<void> }}
|
|
22
|
-
*/
|
|
23
|
-
const infoTools = {
|
|
24
|
-
async github_info() {
|
|
25
|
-
const { user } = await inquirer.prompt({
|
|
26
|
-
name: "user",
|
|
27
|
-
message: "enter a github user"
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
if (user !== "") {
|
|
31
|
-
console.clear();
|
|
32
|
-
githubInfo(user);
|
|
33
|
-
} else {
|
|
34
|
-
console.error("please the github username is required".red);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
async anime_search() {
|
|
38
|
-
const { anime } = await inquirer.prompt({
|
|
39
|
-
name: "anime",
|
|
40
|
-
message: "enter a anime, movie or ova search"
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
if (anime !== "") {
|
|
44
|
-
console.clear();
|
|
45
|
-
animeSearch(anime);
|
|
46
|
-
} else {
|
|
47
|
-
console.error("please the anime is required".red);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
crypto_market() {
|
|
51
|
-
console.clear();
|
|
52
|
-
cryptoMarket();
|
|
53
|
-
},
|
|
54
|
-
async bitly_info() {
|
|
55
|
-
console.clear();
|
|
56
|
-
const { link, token } = await inquirer.prompt([
|
|
57
|
-
{
|
|
58
|
-
name: "link",
|
|
59
|
-
message: "enter a bitly link without http|https",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "token",
|
|
63
|
-
message: "enter a bitly token",
|
|
64
|
-
type: "password",
|
|
65
|
-
mask: "?"
|
|
66
|
-
}
|
|
67
|
-
]);
|
|
68
|
-
|
|
69
|
-
bitlyInfo(link, token);
|
|
70
|
-
},
|
|
71
|
-
async movie_info() {
|
|
72
|
-
const { api_key, query } = await inquirer.prompt([
|
|
73
|
-
{
|
|
74
|
-
name: "api_key",
|
|
75
|
-
message: "insert api key",
|
|
76
|
-
type: "password",
|
|
77
|
-
mask: "?"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "query",
|
|
81
|
-
message: "please search a movie search",
|
|
82
|
-
}
|
|
83
|
-
]);
|
|
84
|
-
|
|
85
|
-
movieDB(api_key, query);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// exports
|
|
90
|
-
module.exports = infoTools;
|
package/hash/mainTools.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
const inquirer = require("inquirer");
|
|
3
|
-
const { textSync } = require("figlet");
|
|
4
|
-
const { green } = require("colors");
|
|
5
|
-
|
|
6
|
-
// analyze web
|
|
7
|
-
const singleStack = require("../functions/singleStack");
|
|
8
|
-
const multipleStack = require("../functions/multipleStack");
|
|
9
|
-
|
|
10
|
-
// pagespeed web
|
|
11
|
-
const pageSpeed = require("../functions/pageSpeed");
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @type {{ single(): Promise<void>, multiple(): Promise<void>, pagespeed(): Promise<void> }}
|
|
15
|
-
*/
|
|
16
|
-
const mainTools = {
|
|
17
|
-
async single() {
|
|
18
|
-
console.clear();
|
|
19
|
-
const { url } = await inquirer.prompt({
|
|
20
|
-
name: "url",
|
|
21
|
-
message: "enter url for analyze the tech stack:"
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
url.indexOf("http") === 0
|
|
25
|
-
? singleStack(url)
|
|
26
|
-
: console.error("please insert a URL with parameter http:// or https://".red);
|
|
27
|
-
},
|
|
28
|
-
async multiple() {
|
|
29
|
-
console.clear();
|
|
30
|
-
const { urls } = await inquirer.prompt({
|
|
31
|
-
name: "urls",
|
|
32
|
-
message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n"
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
urls.match(/(http|https)/g) !== null ||
|
|
37
|
-
urls.match(/(http|https)/g) >= 2
|
|
38
|
-
) {
|
|
39
|
-
const websites = urls.split(" ");
|
|
40
|
-
console.clear();
|
|
41
|
-
multipleStack(websites);
|
|
42
|
-
} else {
|
|
43
|
-
console.error("please in each URL insert a website the parameter https:// or http://".red);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
async pagespeed() {
|
|
47
|
-
console.clear();
|
|
48
|
-
const { speedWeb } = await inquirer.prompt({
|
|
49
|
-
name: "speedWeb",
|
|
50
|
-
message: "insert URL for page speed analyze:"
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
if (speedWeb.indexOf("http") === 0) {
|
|
54
|
-
console.clear();
|
|
55
|
-
console.info(green(textSync(speedWeb)));
|
|
56
|
-
|
|
57
|
-
// start pagespeed results mobile
|
|
58
|
-
textSync(speedWeb, "Small");
|
|
59
|
-
pageSpeed(speedWeb);
|
|
60
|
-
} else {
|
|
61
|
-
console.error("please insert a URL with parameter https;// or http://".red);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// export
|
|
67
|
-
module.exports = mainTools;
|
package/models/aboutTables.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// table model module
|
|
2
|
-
const { Table } = require("console-table-printer");
|
|
3
|
-
|
|
4
|
-
// youtube model
|
|
5
|
-
const youtubeDevTable = new Table({
|
|
6
|
-
columns: [
|
|
7
|
-
{
|
|
8
|
-
name: "youtubeChannel",
|
|
9
|
-
alignment: "left",
|
|
10
|
-
color: "green"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: "recomendation",
|
|
14
|
-
alignment: "left",
|
|
15
|
-
color: "cyan"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// ideas model
|
|
21
|
-
const ideasTable = new Table({
|
|
22
|
-
columns: [
|
|
23
|
-
{
|
|
24
|
-
name: "author",
|
|
25
|
-
alignment: "left",
|
|
26
|
-
color: "green"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: "tool",
|
|
30
|
-
alignment: "left",
|
|
31
|
-
color: "green"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// exports tables
|
|
37
|
-
module.exports = {
|
|
38
|
-
youtubeDevTable,
|
|
39
|
-
ideasTable
|
|
40
|
-
};
|