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/hash/utilityTools.js
CHANGED
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
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;
|
package/hash/wallpaperSelect.js
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
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.
|
|
12
|
-
"axios": "^1.
|
|
13
|
-
"boxen": "^8.0.1",
|
|
14
|
-
"cheerio": "^1.
|
|
15
|
-
"cli-progress": "^3.12.0",
|
|
16
|
-
"colors": "^1.4.0",
|
|
17
|
-
"console-table-printer": "^2.
|
|
18
|
-
"figlet": "^1.8.
|
|
19
|
-
"gauge": "^5.0.2",
|
|
20
|
-
"inquirer": "^12.0
|
|
21
|
-
"systeminformation": "^5.
|
|
22
|
-
"timeago.js": "^4.0.2",
|
|
23
|
-
"w3c-css-validator": "^1.
|
|
24
|
-
"wapalyzer": "^6.10.65"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@eslint/js": "^9.
|
|
28
|
-
"eslint": "^9.
|
|
29
|
-
"globals": "^
|
|
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
|
+
}
|
package/prompts/webPrompts.js
CHANGED
|
@@ -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 };
|