stack-analyze 1.1.7 → 1.1.8

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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "docwriter.progress.trackFunctions": true,
3
+ "docwriter.progress.trackMethods": false
4
+ }
package/CHANGELOG.md CHANGED
@@ -20,7 +20,6 @@ stack-analyze all version and notable changes, fixed, remove and new additions i
20
20
  - module stack-analyze mode
21
21
  ### fixed
22
22
  - rewrite code
23
- - renove nonolive recommends
24
23
  ### changed
25
24
  - menu renove
26
25
  - renove jsdocs in some function or variables
package/cli.js CHANGED
@@ -7,10 +7,18 @@ import figlet from "figlet";
7
7
  import colors from "colors";
8
8
 
9
9
  // hash tables
10
- import mainTools from "./hash/mainTools.js";
11
10
  import hardwareTools from "./hash/hardwareTools.js";
12
11
  import aboutTool from "./hash/aboutOpts.js";
13
- import infoTools from "./hash/infoTools.js";
12
+
13
+ import singleStack from "./functions/singleStack.js";
14
+ import multipleStack from "./functions/multipleStack.js";
15
+ import pageSpeed from "./functions/pageSpeed.js";
16
+ import githubInfo from "./functions/gitUser.js";
17
+ import animeSearch from "./functions/animeInfo.js";
18
+ import cryptoMarket from "./functions/cryptoList.js";
19
+ import bitlyInfo from "./functions/bitly.js";
20
+ import movieDB from "./functions/moviesInfo.js";
21
+ import twitchInfo from "./functions/twitch.js";
14
22
 
15
23
  /**
16
24
  * @description about menu
@@ -38,7 +46,7 @@ async function aboutOpts() {
38
46
  setTimeout(aboutOpts, 1000);
39
47
  } else {
40
48
  question();
41
- }
49
+ }
42
50
  }
43
51
 
44
52
  /**
@@ -47,7 +55,7 @@ async function aboutOpts() {
47
55
  * @return { Promise<void> } - return in boolean a result question list
48
56
  *
49
57
  */
50
- async function returnWebQuestion() {
58
+ async function returnQuestion() {
51
59
  try {
52
60
  const anw = await inquirer.prompt([
53
61
  {
@@ -59,9 +67,10 @@ async function returnWebQuestion() {
59
67
 
60
68
  if (anw.return) {
61
69
  console.clear();
62
- mainOptions();
63
- } else {
64
70
  question();
71
+ } else {
72
+ console.clear();
73
+ console.info("thanks for use stack-analyze".green);
65
74
  }
66
75
  } catch (err) {
67
76
  console.error(colors.red(err.message));
@@ -69,31 +78,168 @@ async function returnWebQuestion() {
69
78
  }
70
79
 
71
80
  /**
72
- *
73
- * @description call the async function return list to question list
74
- * @return { Promise<void> } - return in boolean a result question list
75
- *
76
- */
77
- async function returnInfoQuestion() {
78
- try {
79
- const anw = await inquirer.prompt([
80
- {
81
- type: "confirm",
82
- name: "return",
83
- message: "do you want go to the tools menu?",
81
+ @description This is a hash table with the options of the tools menu.
82
+ @type {{ single(): void, multiple(): void, pagespeed(): void, github_info(): void, anime_search(): void, crypto_market(): void, bitly_info(): void, movie_info(): void, twitch_info(): void }}
83
+ */
84
+ const toolsOpts = {
85
+ single() {
86
+ console.clear();
87
+ inquirer.prompt({
88
+ name: "url",
89
+ message: "enter url for analyze the tech stack:"
90
+ }).then(({ url }) => {
91
+ if (url.indexOf("http") === 0) {
92
+ singleStack(url);
93
+ const timeEnd = performance.now();
94
+ setTimeout(returnQuestion, timeEnd);
95
+ } else {
96
+ console.error("please insert a URL with parameter http:// or https://".red);
84
97
  }
85
- ]);
98
+ });
99
+ },
100
+ multiple() {
101
+ console.clear();
102
+ inquirer.prompt({
103
+ name: "urls",
104
+ message: "enter URLs for analyze the tech stacks with whitespace without quotes example 'http://example.com https://nodejs.org': \n"
105
+ }).then(({ urls }) => {
86
106
 
87
- if (anw.return) {
107
+ if (
108
+ urls.match(/(http|https)/g) !== null ||
109
+ urls.match(/(http|https)/g) >= 2
110
+ ) {
111
+ const websites = urls.split(" ");
112
+ console.clear();
113
+ multipleStack(websites);
114
+ const timeEnd = performance.now();
115
+ setTimeout(returnQuestion, timeEnd);
116
+ } else {
117
+ console.error("please in each URL insert a website the parameter https:// or http://".red);
118
+ }
119
+ });
120
+ },
121
+ pagespeed() {
122
+ console.clear();
123
+ inquirer.prompt({
124
+ name: "speedWeb",
125
+ message: "insert URL for page speed analyze:"
126
+ }).then(({ speedWeb }) => {
127
+ if (speedWeb.indexOf("http") === 0) {
128
+ console.clear();
129
+
130
+ // start pagespeed results mobile
131
+ figlet.textSync(speedWeb, "Small");
132
+ pageSpeed(speedWeb);
133
+ const timeEnd = performance.now();
134
+ setTimeout(returnQuestion, timeEnd);
135
+ } else {
136
+ console.error("please insert a URL with parameter https;// or http://".red);
137
+ }
138
+ });
139
+ },
140
+ github_info() {
141
+ console.clear();
142
+ inquirer.prompt({
143
+ name: "user",
144
+ message: "enter a github user"
145
+ }).then(({ user }) => {
146
+ if (user !== "") {
147
+ console.clear();
148
+ githubInfo(user);
149
+ setTimeout(returnQuestion, 2000);
150
+ } else {
151
+ console.error("please the github username is required".red);
152
+ }
153
+ });
154
+ },
155
+ anime_search() {
156
+ console.clear();
157
+ inquirer.prompt({
158
+ name: "anime",
159
+ message: "enter a anime, movie or ova search"
160
+ }).then(({ anime }) => {
161
+ if (anime !== "") {
162
+ console.clear();
163
+ animeSearch(anime);
164
+ setTimeout(returnQuestion, 2000);
165
+ } else {
166
+ console.error("please the anime is required".red);
167
+ }
168
+ });
169
+ },
170
+ crypto_market() {
171
+ console.clear();
172
+ cryptoMarket();
173
+ setTimeout(returnQuestion, 5000);
174
+ },
175
+ bitly_info() {
176
+ console.clear();
177
+ inquirer.prompt([
178
+ {
179
+ name: "link",
180
+ message: "enter a bitly link without http|https",
181
+ },
182
+ {
183
+ name: "token",
184
+ message: "enter a bitly token",
185
+ type: "password",
186
+ mask: "?"
187
+ }
188
+ ])
189
+ .then(({ link, token }) => {
190
+ bitlyInfo(link, token);
191
+ setTimeout(returnQuestion, 3000);
192
+ });
193
+ },
194
+ movie_info() {
195
+ console.clear();
196
+ inquirer.prompt([
197
+ {
198
+ name: "api_key",
199
+ message: "insert api key",
200
+ type: "password",
201
+ mask: "?"
202
+ },
203
+ {
204
+ name: "query",
205
+ message: "please search a movie search",
206
+ }
207
+ ]).then(({ api_key, query }) => {
88
208
  console.clear();
89
- infoOpts();
90
- } else {
91
- question();
92
- }
93
- } catch (err) {
94
- console.error(colors.red(err.message));
209
+ movieDB(api_key, query);
210
+ setTimeout(returnQuestion, 3000);
211
+ });
212
+ },
213
+ twitch_info() {
214
+ console.clear();
215
+ inquirer.prompt([
216
+ {
217
+ name: "user",
218
+ message: "get twitch user"
219
+ },
220
+ {
221
+ name: "twitch_client",
222
+ message: "enter a twitch token client",
223
+ type: "password",
224
+ mask: "*"
225
+ },
226
+ {
227
+ name: "twitch_token",
228
+ message: "enter a twitch token without the key Bearer",
229
+ type: "password",
230
+ mask: "?"
231
+ }
232
+ ]).then(({ user, twitch_client, twitch_token }) => {
233
+ if (user !== "" && twitch_client !== "" && twitch_token !== "") {
234
+ console.clear();
235
+ twitchInfo(user, twitch_client, twitch_token);
236
+ setTimeout(returnQuestion, 3000);
237
+ } else {
238
+ console.error("twitch info fields is required".red);
239
+ }
240
+ });
95
241
  }
96
- }
242
+ };
97
243
 
98
244
  /**
99
245
  * @description call hardware information options
@@ -117,7 +263,7 @@ async function hardwareOpts() {
117
263
  ]
118
264
  });
119
265
 
120
- if(hardware !== "exit to main menu") {
266
+ if (hardware !== "exit to main menu") {
121
267
  hardwareTools[hardware]();
122
268
  setTimeout(hardwareOpts, 1000);
123
269
  } else {
@@ -127,102 +273,50 @@ async function hardwareOpts() {
127
273
 
128
274
  /**
129
275
  *
130
- * @description call the function question web tools options
131
- * @returns { Promise<void> } return main tools options
276
+ * @description call the function question raw list options
277
+ * @returns { Promise<void> } return exit question
132
278
  *
133
279
  */
134
- async function mainOptions() {
135
- const { main } = await inquirer.prompt({
280
+ async function question() {
281
+ console.clear();
282
+ console.info(colors.yellow(figlet.textSync("stack-analyze")));
283
+ const { analyze } = await inquirer.prompt({
136
284
  type: "list",
137
- pageSize: 9,
138
- name: "main",
139
- message: "",
285
+ pageSize: 15,
286
+ name: "analyze",
287
+ message: "what option do you want to analyze stack",
140
288
  choices: [
141
289
  "single",
142
290
  "multiple",
143
291
  "pagespeed",
144
- "return main menu"
145
- ]
146
- });
147
-
148
- if (main !== "return main menu") {
149
- mainTools[main]();
150
- const timeEnd = performance.now();
151
- setTimeout(returnWebQuestion, timeEnd);
152
- } else {
153
- question();
154
- }
155
- }
156
-
157
- /**
158
- *
159
- * @description call the function question info tools options
160
- * @returns { Promise<void> } return main tools options
161
- *
162
- */
163
- async function infoOpts() {
164
- const { info } = await inquirer.prompt({
165
- type: "list",
166
- pageSize: 9,
167
- name: "info",
168
- message: "enter a info tools option",
169
- choices: [
170
292
  "github_info",
171
293
  "anime_search",
172
294
  "crypto_market",
173
295
  "bitly_info",
174
296
  "movie_info",
175
297
  "twitch_info",
176
- "return main menu"
298
+ "hardware tools",
299
+ "about",
300
+ "exit"
177
301
  ]
178
302
  });
179
303
 
180
- if (info !== "return main menu") {
181
- infoTools[info]();
182
- const timeEnd = performance.now();
183
- setTimeout(returnInfoQuestion, timeEnd);
184
- } else {
185
- question();
186
- }
187
- }
188
-
189
-
190
- /**
191
- *
192
- * @description call the function question raw list options
193
- * @returns { Promise<void> } return exit question
194
- *
195
- */
196
- async function question() {
197
- console.clear();
198
- console.info(colors.yellow(figlet.textSync("stack-analyze")));
199
- const { analyze } = await inquirer.prompt({
200
- type: "list",
201
- name: "analyze",
202
- message: "what option do you want to analyze stack",
203
- choices: ["web tools", "info tools", "hardware tools", "about", "exit"]
204
- });
205
-
206
304
  switch (analyze) {
207
- case "web tools":
208
- mainOptions();
209
- break;
210
- case "info tools":
211
- infoOpts();
212
- break;
213
305
  case "hardware tools":
214
306
  hardwareOpts();
215
307
  break;
216
308
  case "about":
217
309
  aboutOpts();
218
310
  break;
219
- default:
311
+ case "exit":
220
312
  console.clear();
221
313
  console.info("thanks for use stack-analyze".green);
222
314
  break;
315
+ default:
316
+ toolsOpts[analyze]();
317
+ break;
223
318
  }
224
319
  }
225
320
 
226
321
  // call the message title and question list
227
322
  question();
228
-
@@ -1,5 +1,4 @@
1
1
  // modules
2
- import "../env/bitly.env.js";
3
2
  import axios from "axios";
4
3
  import { format } from "timeago.js";
5
4
  import colors from "colors";
@@ -11,7 +10,7 @@ import colors from "colors";
11
10
  * @returns { Promise<void> } - return results serach
12
11
  *
13
12
  */
14
- const bitlyInfo = async (link) => {
13
+ const bitlyInfo = async (link, token) => {
15
14
  try {
16
15
  const { data, status } = await axios.post(
17
16
  "https://api-ssl.bitly.com/v4/expand",
@@ -20,7 +19,7 @@ const bitlyInfo = async (link) => {
20
19
  },
21
20
  {
22
21
  headers: {
23
- Authorization: `Bearer ${process.env.BITLY_TOKEN}`,
22
+ Authorization: `Bearer ${token}`,
24
23
  "Content-Type": "application/json"
25
24
  }
26
25
  }
@@ -1,13 +1,10 @@
1
1
  // modules
2
- import CoinGecko from "coingecko-api";
2
+ import axios from "axios";
3
3
  import { format } from "timeago.js";
4
4
  import colors from "colors";
5
5
 
6
6
  import coinTable from "../models/cryptoTables.js";
7
7
 
8
- // init coingecko api
9
- const CoinGeckoClient = new CoinGecko();
10
-
11
8
  /*
12
9
  *
13
10
  * @descripiton call the crypto market list
@@ -17,12 +14,17 @@ const CoinGeckoClient = new CoinGecko();
17
14
  const cryptoMarket = async () => {
18
15
  try {
19
16
  // start crypto
20
- const coinData = await CoinGeckoClient.coins.markets({
21
- per_page: 10
22
- });
17
+ const { data } = await axios.get(
18
+ "https://api.coingecko.com/api/v3/coins/markets",{
19
+ params: {
20
+ vs_currency: "usd",
21
+ per_page: 10
22
+ }
23
+ }
24
+ );
23
25
 
24
26
  // map coinData
25
- const coinList = coinData.data.map(({
27
+ const coinList = data.map(({
26
28
  symbol,
27
29
  name,
28
30
  current_price,
@@ -1,5 +1,4 @@
1
1
  // modules
2
- import "../env/movie.env.js";
3
2
  import axios from "axios";
4
3
  import colors from "colors";
5
4
 
@@ -11,11 +10,11 @@ import movieList from "../models/movieTables.js";
11
10
  * @param { string } query - search any movie
12
11
  * @returns { Promise<void> } - return movie lisy
13
12
  */
14
- const movieDB = async (query) => {
13
+ const movieDB = async (query, token) => {
15
14
  try {
16
15
  const { data } = await axios.get("https://api.themoviedb.org/3/search/movie", {
17
16
  params: {
18
- api_key: process.env.MOVIE_CODE,
17
+ api_key: token,
19
18
  query,
20
19
  page: 1
21
20
  }
@@ -1,5 +1,4 @@
1
1
  // modules
2
- import "../env/twitchID.env.js";
3
2
  import axios from "axios";
4
3
  import { format } from "timeago.js";
5
4
  import colors from "colors";
@@ -14,13 +13,13 @@ import twitchTable from "../models/twitchTables.js";
14
13
  * @param {string} apiToken - twitch api token
15
14
  * @returns { Promise<void> } - return twitch results
16
15
  */
17
- const twitchInfo = async (twitchUser, apiToken) => {
16
+ const twitchInfo = async (twitchUser, twitchClient, apiToken) => {
18
17
 
19
18
  try {
20
19
  const { data: twitchData } = await axios.get(`https://api.twitch.tv/helix/users?login=${twitchUser}`, {
21
20
  headers: {
22
21
  Authorization: `Bearer ${apiToken}`,
23
- "Client-Id": process.env.CLIENT_ID
22
+ "Client-Id": twitchClient
24
23
  }
25
24
  });
26
25
 
package/index.cjs CHANGED
@@ -471,4 +471,4 @@ module.exports = {
471
471
  pageSpeed,
472
472
  singleStack,
473
473
  twitchInfo
474
- };
474
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stack-analyze",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "description": "cli tech stack analyze and pagespeed with node.js using the wappalyzer module. with google pagespeed api, hardware and crypto market",
6
6
  "main": "index.mjs",
@@ -14,21 +14,20 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "axios": "^0.26.0",
18
- "cli-progress": "^3.10.0",
19
- "coingecko-api": "^1.0.10",
17
+ "axios": "^0.27.2",
18
+ "cli-progress": "^3.11.0",
20
19
  "colors": "^1.4.0",
21
- "console-table-printer": "^2.10.0",
20
+ "console-table-printer": "^2.11.0",
22
21
  "figlet": "^1.5.2",
23
- "inquirer": "^8.2.0",
24
- "systeminformation": "^5.11.6",
22
+ "inquirer": "^8.2.4",
23
+ "systeminformation": "^5.11.14",
25
24
  "timeago.js": "^4.0.2",
26
- "wappalyzer": "^6.10.17"
25
+ "wappalyzer": "^6.10.26"
27
26
  },
28
27
  "devDependencies": {
29
- "eslint": "^8.10.0",
28
+ "eslint": "^8.15.0",
30
29
  "gh-pages": "^3.2.3",
31
- "jest": "^27.5.1",
30
+ "jest": "^28.1.0",
32
31
  "jsdoc": "^3.6.10",
33
32
  "minami": "^1.2.3"
34
33
  },
@@ -42,7 +41,7 @@
42
41
  },
43
42
  "repository": {
44
43
  "type": "git",
45
- "url": "git+https://github.com/intermachine-developers/stack-analyze.git"
44
+ "url": "git+https://github.com/stack-analyze/stack-analyze.git"
46
45
  },
47
46
  "keywords": [
48
47
  "cli",
@@ -58,12 +57,12 @@
58
57
  "crypto market info",
59
58
  "movie info"
60
59
  ],
61
- "author": "Intermachine Developers",
60
+ "author": "stack-analyze",
62
61
  "license": "MIT",
63
62
  "bugs": {
64
- "url": "https://github.com/intermachine-developers/stack-analyze/issues"
63
+ "url": "https://github.com/stack-analyze/stack-analyze/issues"
65
64
  },
66
- "homepage": "https://intermachine-developers.github.io/stack-analyze/",
65
+ "homepage": "https://stack-analyze.github.io/stack-analyze/",
67
66
  "directories": {
68
67
  "doc": "docs",
69
68
  "test": "test"
package/readme.md CHANGED
@@ -19,9 +19,9 @@ use the cli program install
19
19
  >npm i -g stack-analyze "global install"<br>
20
20
  >note: if global install fail using npx
21
21
 
22
- [github repo](https://github.com/intermachine-developers/stack-analyze.git)
22
+ [github repo](https://github.com/stack-analyze/stack-analyze.git)
23
23
 
24
- [docs](https://intermachine-developers.github.io/stack-analyze)
24
+ [docs](https://stack-analyze.github.io/stack-analyze/)
25
25
 
26
26
  [gitlab repo](https://gitlab.com/Intermachine-dev/stack-analyze)
27
27
 
package/env/bitly.env.js DELETED
@@ -1 +0,0 @@
1
- process.env.BITLY_TOKEN = "efeac58916c768e4ae6ad22fe31b601361f71886";
package/env/movie.env.js DELETED
@@ -1 +0,0 @@
1
- process.env.MOVIE_CODE= "6bd534c04a4246666a68080da99bb105";
@@ -1 +0,0 @@
1
- process.env.CLIENT_ID = "am096eog80r416605ka34uzq8b5614";
package/hash/infoTools.js DELETED
@@ -1,112 +0,0 @@
1
- // modules
2
- import inquirer from "inquirer";
3
-
4
- // github info
5
- import githubInfo from "../functions/gitUser.js";
6
-
7
- // anime search
8
- import animeSearch from "../functions/animeInfo.js";
9
-
10
- // crypto market
11
- import cryptoMarket from "../functions/cryptoList.js";
12
-
13
- // bitly
14
- import bitlyInfo from "../functions/bitly.js";
15
-
16
- // movies
17
- import movieDB from "../functions/moviesInfo.js";
18
-
19
- // twitch
20
- import twitchInfo from "../functions/twitch.js";
21
-
22
-
23
- /**
24
- * @type {{ github_info(): Promise<void>, anime_search(): Promise<void>, crypto_market(): void, bitly_info(): Promise<void>, movie_info(): Promise<void>, twitch_info(): Promise<void>}}
25
- */
26
- const infoTools = {
27
- async github_info() {
28
- const { user } = await inquirer.prompt({
29
- name: "user",
30
- message: "enter a github user"
31
- });
32
-
33
- if (user !== "") {
34
- console.clear();
35
- githubInfo(user);
36
- } else {
37
- console.error("please the github username is required".red);
38
- }
39
- },
40
- async anime_search() {
41
- const { anime } = await inquirer.prompt({
42
- name: "anime",
43
- message: "enter a anime, movie or ova search"
44
- });
45
-
46
- if (anime !== "") {
47
- console.clear();
48
- animeSearch(anime);
49
- } else {
50
- console.error("please the anime is required".red);
51
- }
52
- },
53
- crypto_market() {
54
- console.clear();
55
- cryptoMarket();
56
- },
57
- async bitly_info() {
58
- console.clear();
59
- const { link } = await inquirer.prompt([
60
- {
61
- name: "link",
62
- message: "enter a bitly link without http|https",
63
- }
64
- ]);
65
-
66
- if (link !== "") {
67
- console.clear();
68
- bitlyInfo(link);
69
- } else {
70
- console.error("bitly link is required".red);
71
- }
72
- },
73
- async movie_info() {
74
- const { query } = await inquirer.prompt([
75
- {
76
- name: "query",
77
- message: "please search a movie search",
78
- }
79
- ]);
80
-
81
- if (query !== "") {
82
- console.clear();
83
- movieDB(query);
84
- } else {
85
- console.error("please the movie is required".red);
86
- }
87
- },
88
- async twitch_info() {
89
- const { user, twitch_token } = await inquirer.prompt([
90
- {
91
- name: "user",
92
- message: "get twitch user"
93
- },
94
- {
95
- name: "twitch_token",
96
- message: "enter a twitch token without the key Bearer",
97
- type: "password",
98
- mask: "?"
99
- }
100
- ]);
101
-
102
- if (user !== "" && twitch_token !== "") {
103
- console.clear();
104
- twitchInfo(user, twitch_token);
105
- } else {
106
- console.error("twitch info fields is required".red);
107
- }
108
- }
109
- };
110
-
111
- // exports
112
- export default infoTools;
package/hash/mainTools.js DELETED
@@ -1,67 +0,0 @@
1
- // modules
2
- import inquirer from "inquirer";
3
- import figlet from "figlet";
4
- import colors from "colors";
5
-
6
- // analyze web
7
- import singleStack from "../functions/singleStack.js";
8
- import multipleStack from "../functions/multipleStack.js";
9
-
10
- // pagespeed web
11
- import pageSpeed from "../functions/pageSpeed.js";
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(colors.green(figlet.textSync(speedWeb)));
56
-
57
- // start pagespeed results mobile
58
- figlet.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
- export default mainTools;