stack-analyze 1.3.4 → 1.3.6
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 +326 -296
- package/LICENSE +21 -21
- package/{about.cjs → about.js} +121 -121
- package/api/pokerApi.js +5 -0
- package/api/wallpapersURL.js +7 -6
- package/api/webApis.js +21 -21
- package/cli.js +213 -227
- 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 -0
- package/functions/potterSearch.js +32 -32
- package/functions/scraping.js +132 -132
- package/functions/singleStack.js +48 -48
- package/functions/twitch.js +72 -72
- package/hash/infoTools.js +61 -57
- package/hash/queryTools.js +116 -119
- package/hash/utilityTools.js +32 -19
- package/hash/wallpaperSelect.js +89 -76
- package/hash/webTools.js +92 -68
- package/logo-module.webp +0 -0
- package/menu.js +13 -0
- package/package.json +67 -66
- package/prompts/webPrompts.js +31 -0
- package/readme.md +44 -44
- package/utils.js +104 -94
- package/validations/infoValidations.js +37 -37
- package/validations/webValidations.js +33 -33
package/functions/bitly.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
import { format } from "timeago.js";
|
|
4
|
-
import colors from "colors";
|
|
5
|
-
|
|
6
|
-
// save bitly
|
|
7
|
-
import { stackSave } from "../utils.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @description call the bitly info data
|
|
12
|
-
* @async
|
|
13
|
-
* @param { string } link - link for search info
|
|
14
|
-
* @param { string } token - bitly api token is required
|
|
15
|
-
* @returns { Promise<void> } - return results serach
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export default async function bitlyInfo(link, token) {
|
|
19
|
-
try {
|
|
20
|
-
const { data } = await axios.post(
|
|
21
|
-
"https://api-ssl.bitly.com/v4/expand",
|
|
22
|
-
{ bitlink_id: link },
|
|
23
|
-
{
|
|
24
|
-
headers: {
|
|
25
|
-
Authorization: `Bearer ${token}`,
|
|
26
|
-
"Content-Type": "application/json"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
console.table({
|
|
32
|
-
created_link: format(data.created_at),
|
|
33
|
-
bitly_link: data.link,
|
|
34
|
-
link: data.long_url
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
stackSave("bitly.json", JSON.stringify(data, null, 2));
|
|
38
|
-
} catch (err) {
|
|
39
|
-
console.error(colors.red(err.message));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
// modules
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { format } from "timeago.js";
|
|
4
|
+
import colors from "colors";
|
|
5
|
+
|
|
6
|
+
// save bitly
|
|
7
|
+
import { stackSave } from "../utils.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @description call the bitly info data
|
|
12
|
+
* @async
|
|
13
|
+
* @param { string } link - link for search info
|
|
14
|
+
* @param { string } token - bitly api token is required
|
|
15
|
+
* @returns { Promise<void> } - return results serach
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export default async function bitlyInfo(link, token) {
|
|
19
|
+
try {
|
|
20
|
+
const { data } = await axios.post(
|
|
21
|
+
"https://api-ssl.bitly.com/v4/expand",
|
|
22
|
+
{ bitlink_id: link },
|
|
23
|
+
{
|
|
24
|
+
headers: {
|
|
25
|
+
Authorization: `Bearer ${token}`,
|
|
26
|
+
"Content-Type": "application/json"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
console.table({
|
|
32
|
+
created_link: format(data.created_at),
|
|
33
|
+
bitly_link: data.link,
|
|
34
|
+
link: data.long_url
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
stackSave("bitly.json", JSON.stringify(data, null, 2));
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.error(colors.red(err.message));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import colors from "colors";
|
|
3
|
-
import { stackSave } from "../utils.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @description kilobyte convert for bundlephobia pkg info
|
|
7
|
-
* @param {number} size - pkg sixe
|
|
8
|
-
* @returns {string} - result converter
|
|
9
|
-
*/
|
|
10
|
-
const kilobyteConvert = (size) => (size < 1024 ? `${size} B` : `${size / 1024} KB`);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description get info of npm package
|
|
14
|
-
* @param {string} pkg
|
|
15
|
-
* @async
|
|
16
|
-
* @returns { Promise<void> } - return result bundlephobia info
|
|
17
|
-
*/
|
|
18
|
-
export default async function bundlephobia (pkg) {
|
|
19
|
-
try {
|
|
20
|
-
const { data } = await axios.get("https://bundlephobia.com/api/size", {
|
|
21
|
-
params: { package: pkg }
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
console.table({
|
|
25
|
-
module_name: data.name,
|
|
26
|
-
module_version: data.version,
|
|
27
|
-
module_repo: data.repository,
|
|
28
|
-
module_size: kilobyteConvert(data.size),
|
|
29
|
-
module_gzip: kilobyteConvert(data.gzip),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
stackSave(`${pkg}-pkg-info.json`, JSON.stringify(data, null, 2));
|
|
33
|
-
} catch (err) {
|
|
34
|
-
console.error(colors.red(err.message));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import colors from "colors";
|
|
3
|
+
import { stackSave } from "../utils.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description kilobyte convert for bundlephobia pkg info
|
|
7
|
+
* @param {number} size - pkg sixe
|
|
8
|
+
* @returns {string} - result converter
|
|
9
|
+
*/
|
|
10
|
+
const kilobyteConvert = (size) => (size < 1024 ? `${size} B` : `${size / 1024} KB`);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description get info of npm package
|
|
14
|
+
* @param {string} pkg
|
|
15
|
+
* @async
|
|
16
|
+
* @returns { Promise<void> } - return result bundlephobia info
|
|
17
|
+
*/
|
|
18
|
+
export default async function bundlephobia (pkg) {
|
|
19
|
+
try {
|
|
20
|
+
const { data } = await axios.get("https://bundlephobia.com/api/size", {
|
|
21
|
+
params: { package: pkg }
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
console.table({
|
|
25
|
+
module_name: data.name,
|
|
26
|
+
module_version: data.version,
|
|
27
|
+
module_repo: data.repository,
|
|
28
|
+
module_size: kilobyteConvert(data.size),
|
|
29
|
+
module_gzip: kilobyteConvert(data.gzip),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
stackSave(`${pkg}-pkg-info.json`, JSON.stringify(data, null, 2));
|
|
33
|
+
} catch (err) {
|
|
34
|
+
console.error(colors.red(err.message));
|
|
35
|
+
}
|
|
36
|
+
}
|
package/functions/cryptoList.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
import { format } from "timeago.js";
|
|
4
|
-
import colors from "colors";
|
|
5
|
-
|
|
6
|
-
import { printTable } from "console-table-printer";
|
|
7
|
-
|
|
8
|
-
// currency format
|
|
9
|
-
import { currency, stackSave } from "../utils.js";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @descripiton call the crypto market list
|
|
13
|
-
* @async
|
|
14
|
-
* @returns { Promise<void> } - return results search
|
|
15
|
-
*/
|
|
16
|
-
export default async function cryptoMarket() {
|
|
17
|
-
try {
|
|
18
|
-
// start crypto
|
|
19
|
-
const { data } = await axios.get(
|
|
20
|
-
"https://api.coingecko.com/api/v3/coins/markets", {
|
|
21
|
-
params: { vs_currency: "usd" }
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
// map coinData
|
|
26
|
-
const coinList = data.map(({
|
|
27
|
-
symbol,
|
|
28
|
-
name,
|
|
29
|
-
current_price,
|
|
30
|
-
price_change_percentage_24h,
|
|
31
|
-
last_updated
|
|
32
|
-
}) => ({
|
|
33
|
-
symbol,
|
|
34
|
-
name,
|
|
35
|
-
price: currency.format(current_price),
|
|
36
|
-
priceChanged: `${price_change_percentage_24h.toFixed(2)} %`,
|
|
37
|
-
lastUpdated: format(last_updated)
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
|
-
// print table
|
|
41
|
-
printTable(coinList.slice(0, 10));
|
|
42
|
-
|
|
43
|
-
stackSave("crypto-list.json", JSON.stringify(coinList, null, 2));
|
|
44
|
-
} catch (err) {
|
|
45
|
-
// print err message
|
|
46
|
-
console.error(colors.red(err.message));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
// modules
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { format } from "timeago.js";
|
|
4
|
+
import colors from "colors";
|
|
5
|
+
|
|
6
|
+
import { printTable } from "console-table-printer";
|
|
7
|
+
|
|
8
|
+
// currency format
|
|
9
|
+
import { currency, stackSave } from "../utils.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @descripiton call the crypto market list
|
|
13
|
+
* @async
|
|
14
|
+
* @returns { Promise<void> } - return results search
|
|
15
|
+
*/
|
|
16
|
+
export default async function cryptoMarket() {
|
|
17
|
+
try {
|
|
18
|
+
// start crypto
|
|
19
|
+
const { data } = await axios.get(
|
|
20
|
+
"https://api.coingecko.com/api/v3/coins/markets", {
|
|
21
|
+
params: { vs_currency: "usd" }
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// map coinData
|
|
26
|
+
const coinList = data.map(({
|
|
27
|
+
symbol,
|
|
28
|
+
name,
|
|
29
|
+
current_price,
|
|
30
|
+
price_change_percentage_24h,
|
|
31
|
+
last_updated
|
|
32
|
+
}) => ({
|
|
33
|
+
symbol,
|
|
34
|
+
name,
|
|
35
|
+
price: currency.format(current_price),
|
|
36
|
+
priceChanged: `${price_change_percentage_24h.toFixed(2)} %`,
|
|
37
|
+
lastUpdated: format(last_updated)
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
// print table
|
|
41
|
+
printTable(coinList.slice(0, 10));
|
|
42
|
+
|
|
43
|
+
stackSave("crypto-list.json", JSON.stringify(coinList, null, 2));
|
|
44
|
+
} catch (err) {
|
|
45
|
+
// print err message
|
|
46
|
+
console.error(colors.red(err.message));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
import colors from "colors";
|
|
3
|
-
import cssValidator from "w3c-css-validator";
|
|
4
|
-
import { stackSave } from "../utils.js";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @description css validator tool from w3c service
|
|
8
|
-
* @param {string} url - url analyze all stylesheets
|
|
9
|
-
* @async
|
|
10
|
-
* @returns {Promise<void>}
|
|
11
|
-
*/
|
|
12
|
-
export default async function cssValidate(url) {
|
|
13
|
-
try {
|
|
14
|
-
const cssResults = await cssValidator.validateURL(url, {
|
|
15
|
-
warningLevel: 1
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
stackSave("cssErrors.json", JSON.stringify(cssResults.errors, null, 2));
|
|
19
|
-
stackSave("cssWarnings.json", JSON.stringify(cssResults.warnings, null, 2));
|
|
20
|
-
|
|
21
|
-
console.info("finish css results printers".green);
|
|
22
|
-
} catch(err) {
|
|
23
|
-
console.error(colors.red(err.message));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
// modules
|
|
2
|
+
import colors from "colors";
|
|
3
|
+
import cssValidator from "w3c-css-validator";
|
|
4
|
+
import { stackSave } from "../utils.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @description css validator tool from w3c service
|
|
8
|
+
* @param {string} url - url analyze all stylesheets
|
|
9
|
+
* @async
|
|
10
|
+
* @returns {Promise<void>}
|
|
11
|
+
*/
|
|
12
|
+
export default async function cssValidate(url) {
|
|
13
|
+
try {
|
|
14
|
+
const cssResults = await cssValidator.validateURL(url, {
|
|
15
|
+
warningLevel: 1
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
stackSave("cssErrors.json", JSON.stringify(cssResults.errors, null, 2));
|
|
19
|
+
stackSave("cssWarnings.json", JSON.stringify(cssResults.warnings, null, 2));
|
|
20
|
+
|
|
21
|
+
console.info("finish css results printers".green);
|
|
22
|
+
} catch(err) {
|
|
23
|
+
console.error(colors.red(err.message));
|
|
24
|
+
}
|
|
25
|
+
}
|
package/functions/deezer.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import { printTable } from "console-table-printer";
|
|
3
|
-
import colors from "colors";
|
|
4
|
-
|
|
5
|
-
// save data search
|
|
6
|
-
import { stackSave } from "../utils.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @async
|
|
10
|
-
* @params { string } query
|
|
11
|
-
* @returns {Promise<void>}
|
|
12
|
-
*/
|
|
13
|
-
export default async function deezer(q) {
|
|
14
|
-
try {
|
|
15
|
-
const { data } = await axios.get("https://api.deezer.com/search/album", {
|
|
16
|
-
params: { q }
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const results = data.data.map(({
|
|
20
|
-
id, title, record_type,
|
|
21
|
-
explicit_lyrics, artist, nb_tracks
|
|
22
|
-
}) => ({
|
|
23
|
-
id,
|
|
24
|
-
artist: artist.name,
|
|
25
|
-
title,
|
|
26
|
-
type: record_type,
|
|
27
|
-
num_tracks: nb_tracks,
|
|
28
|
-
lyrics_content: explicit_lyrics ? "explicit" : "clean"
|
|
29
|
-
}));
|
|
30
|
-
|
|
31
|
-
printTable(results.slice(0, 15));
|
|
32
|
-
|
|
33
|
-
stackSave("album-search.json", JSON.stringify(data.data, null, 2));
|
|
34
|
-
} catch(err) {
|
|
35
|
-
console.error(colors.red(err.message));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { printTable } from "console-table-printer";
|
|
3
|
+
import colors from "colors";
|
|
4
|
+
|
|
5
|
+
// save data search
|
|
6
|
+
import { stackSave } from "../utils.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @async
|
|
10
|
+
* @params { string } query
|
|
11
|
+
* @returns {Promise<void>}
|
|
12
|
+
*/
|
|
13
|
+
export default async function deezer(q) {
|
|
14
|
+
try {
|
|
15
|
+
const { data } = await axios.get("https://api.deezer.com/search/album", {
|
|
16
|
+
params: { q }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const results = data.data.map(({
|
|
20
|
+
id, title, record_type,
|
|
21
|
+
explicit_lyrics, artist, nb_tracks
|
|
22
|
+
}) => ({
|
|
23
|
+
id,
|
|
24
|
+
artist: artist.name,
|
|
25
|
+
title,
|
|
26
|
+
type: record_type,
|
|
27
|
+
num_tracks: nb_tracks,
|
|
28
|
+
lyrics_content: explicit_lyrics ? "explicit" : "clean"
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
printTable(results.slice(0, 15));
|
|
32
|
+
|
|
33
|
+
stackSave("album-search.json", JSON.stringify(data.data, null, 2));
|
|
34
|
+
} catch(err) {
|
|
35
|
+
console.error(colors.red(err.message));
|
|
36
|
+
}
|
|
37
|
+
}
|
package/functions/download.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
//
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
//
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* sol, moon wallpapers downloader
|
|
12
|
-
* @async
|
|
13
|
-
* @param {"sol-moon" | "dimensions" | "
|
|
14
|
-
* @param {string} filename
|
|
15
|
-
* @returns {Promise<void>}
|
|
16
|
-
*/
|
|
17
|
-
export const wallpaperDownload = async (opt, filename) => {
|
|
18
|
-
try {
|
|
19
|
-
const { data } = await wallpapersURL.get(`/${opt}/download/${filename}`);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
// core modules
|
|
2
|
+
import { writeFile } from "node:fs/promises";
|
|
3
|
+
|
|
4
|
+
// colors module
|
|
5
|
+
import colors from "colors";
|
|
6
|
+
|
|
7
|
+
// url api
|
|
8
|
+
import { wallpapersURL } from "../api/wallpapersURL.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* sol, moon wallpapers downloader
|
|
12
|
+
* @async
|
|
13
|
+
* @param {"sol-moon" | "dimensions" | "seyyahi2" | "ancient-mistery" | "tsuky-no-emily"} opt
|
|
14
|
+
* @param {string} filename
|
|
15
|
+
* @returns {Promise<void>}
|
|
16
|
+
*/
|
|
17
|
+
export const wallpaperDownload = async (opt, filename) => {
|
|
18
|
+
try {
|
|
19
|
+
const { data } = await wallpapersURL.get(`/${opt}/download/${filename}`);
|
|
20
|
+
|
|
21
|
+
writeFile(filename, data, {encoding: "base64"});
|
|
22
|
+
} catch (err) {
|
|
23
|
+
console.error(colors.red(err.message));
|
|
24
|
+
}
|
|
25
|
+
};
|
package/functions/gitUser.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
// modules
|
|
2
|
-
import { format } from "timeago.js";
|
|
3
|
-
import colors from "colors";
|
|
4
|
-
|
|
5
|
-
// save git user
|
|
6
|
-
import { stackSave } from "../utils.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @description call github info user
|
|
11
|
-
* @async
|
|
12
|
-
* @param { string } user - get github user info
|
|
13
|
-
* @returns { Promise<void> } - return results info
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
export default async function githubInfo(user) {
|
|
17
|
-
try {
|
|
18
|
-
const data = await (await fetch(`https://api.github.com/users/${user}`)).json();
|
|
19
|
-
|
|
20
|
-
const info = {
|
|
21
|
-
username: data.login,
|
|
22
|
-
fullName: data?.name ?? "no info",
|
|
23
|
-
userFollowers: data.followers,
|
|
24
|
-
userFollowing: data.following,
|
|
25
|
-
accountAge: format(data.created_at),
|
|
26
|
-
twitter: data?.twitter_username ?? "no info",
|
|
27
|
-
repos: data.public_repos,
|
|
28
|
-
gists: data.public_gists
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
console.table(info);
|
|
32
|
-
|
|
33
|
-
stackSave(`${user}-info.json`, JSON.stringify(info, null, 2));
|
|
34
|
-
} catch(err) {
|
|
35
|
-
console.error(colors.red(err.message));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
// modules
|
|
2
|
+
import { format } from "timeago.js";
|
|
3
|
+
import colors from "colors";
|
|
4
|
+
|
|
5
|
+
// save git user
|
|
6
|
+
import { stackSave } from "../utils.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @description call github info user
|
|
11
|
+
* @async
|
|
12
|
+
* @param { string } user - get github user info
|
|
13
|
+
* @returns { Promise<void> } - return results info
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export default async function githubInfo(user) {
|
|
17
|
+
try {
|
|
18
|
+
const data = await (await fetch(`https://api.github.com/users/${user}`)).json();
|
|
19
|
+
|
|
20
|
+
const info = {
|
|
21
|
+
username: data.login,
|
|
22
|
+
fullName: data?.name ?? "no info",
|
|
23
|
+
userFollowers: data.followers,
|
|
24
|
+
userFollowing: data.following,
|
|
25
|
+
accountAge: format(data.created_at),
|
|
26
|
+
twitter: data?.twitter_username ?? "no info",
|
|
27
|
+
repos: data.public_repos,
|
|
28
|
+
gists: data.public_gists
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
console.table(info);
|
|
32
|
+
|
|
33
|
+
stackSave(`${user}-info.json`, JSON.stringify(info, null, 2));
|
|
34
|
+
} catch(err) {
|
|
35
|
+
console.error(colors.red(err.message));
|
|
36
|
+
}
|
|
37
|
+
}
|