stack-analyze 1.3.5 → 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 -311
- package/LICENSE +21 -21
- package/about.js +121 -121
- package/api/pokerApi.js +5 -5
- package/api/wallpapersURL.js +7 -5
- package/api/webApis.js +21 -21
- package/cli.js +213 -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/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 +116 -116
- package/hash/utilityTools.js +32 -32
- package/hash/wallpaperSelect.js +89 -59
- package/hash/webTools.js +92 -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/utils.js +104 -101
- package/validations/infoValidations.js +37 -37
- package/validations/webValidations.js +33 -33
package/hash/infoTools.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
// inquirer
|
|
2
|
-
import { input, password } from "@inquirer/prompts";
|
|
3
|
-
|
|
4
|
-
// functions
|
|
5
|
-
import bitlyInfo from "../functions/bitly.js";
|
|
6
|
-
import cryptoMarket from "../functions/cryptoList.js";
|
|
7
|
-
import githubInfo from "../functions/gitUser.js";
|
|
8
|
-
import bundlephobia from "../functions/bundlephobia.js";
|
|
9
|
-
|
|
10
|
-
// bitly regexp
|
|
11
|
-
const bitlyRegexp = /bit\.ly\//g;
|
|
12
|
-
|
|
13
|
-
const infoTools = {
|
|
14
|
-
async github_info(refreshCallback) {
|
|
15
|
-
console.clear();
|
|
16
|
-
|
|
17
|
-
const gitUser = await input({
|
|
18
|
-
message: "enter a github user for search",
|
|
19
|
-
required: true
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
githubInfo(gitUser);
|
|
23
|
-
setTimeout(refreshCallback, 2e3);
|
|
24
|
-
},
|
|
25
|
-
async bitly_info(refreshCallback) {
|
|
26
|
-
console.clear();
|
|
27
|
-
|
|
28
|
-
const { bitlyLink, token } = {
|
|
29
|
-
bitlyLink: await input({
|
|
30
|
-
message: "enter a short link:",
|
|
31
|
-
validate: input => bitlyRegexp.test(input) || "only bitly link".yellow
|
|
32
|
-
}),
|
|
33
|
-
token: await password({
|
|
34
|
-
message: "enter a bitly token",
|
|
35
|
-
required: true,
|
|
36
|
-
mask: true
|
|
37
|
-
})
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
bitlyInfo(bitlyLink, token);
|
|
41
|
-
setTimeout(refreshCallback, 2e3);
|
|
42
|
-
},
|
|
43
|
-
crypto_market(refreshCallback) {
|
|
44
|
-
console.clear();
|
|
45
|
-
cryptoMarket();
|
|
46
|
-
setTimeout(refreshCallback, 5e3);
|
|
47
|
-
},
|
|
48
|
-
async bundlephobia_info(refreshCallback) {
|
|
49
|
-
console.clear();
|
|
50
|
-
|
|
51
|
-
const pkgName = await input({
|
|
52
|
-
message: "enter a npm package name for search info size"
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
console.info(pkgName);
|
|
56
|
-
bundlephobia(pkgName);
|
|
57
|
-
setTimeout(refreshCallback, 5e3);
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default infoTools;
|
|
1
|
+
// inquirer
|
|
2
|
+
import { input, password } from "@inquirer/prompts";
|
|
3
|
+
|
|
4
|
+
// functions
|
|
5
|
+
import bitlyInfo from "../functions/bitly.js";
|
|
6
|
+
import cryptoMarket from "../functions/cryptoList.js";
|
|
7
|
+
import githubInfo from "../functions/gitUser.js";
|
|
8
|
+
import bundlephobia from "../functions/bundlephobia.js";
|
|
9
|
+
|
|
10
|
+
// bitly regexp
|
|
11
|
+
const bitlyRegexp = /bit\.ly\//g;
|
|
12
|
+
|
|
13
|
+
const infoTools = {
|
|
14
|
+
async github_info(refreshCallback) {
|
|
15
|
+
console.clear();
|
|
16
|
+
|
|
17
|
+
const gitUser = await input({
|
|
18
|
+
message: "enter a github user for search",
|
|
19
|
+
required: true
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
githubInfo(gitUser);
|
|
23
|
+
setTimeout(refreshCallback, 2e3);
|
|
24
|
+
},
|
|
25
|
+
async bitly_info(refreshCallback) {
|
|
26
|
+
console.clear();
|
|
27
|
+
|
|
28
|
+
const { bitlyLink, token } = {
|
|
29
|
+
bitlyLink: await input({
|
|
30
|
+
message: "enter a short link:",
|
|
31
|
+
validate: input => bitlyRegexp.test(input) || "only bitly link".yellow
|
|
32
|
+
}),
|
|
33
|
+
token: await password({
|
|
34
|
+
message: "enter a bitly token",
|
|
35
|
+
required: true,
|
|
36
|
+
mask: true
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
bitlyInfo(bitlyLink, token);
|
|
41
|
+
setTimeout(refreshCallback, 2e3);
|
|
42
|
+
},
|
|
43
|
+
crypto_market(refreshCallback) {
|
|
44
|
+
console.clear();
|
|
45
|
+
cryptoMarket();
|
|
46
|
+
setTimeout(refreshCallback, 5e3);
|
|
47
|
+
},
|
|
48
|
+
async bundlephobia_info(refreshCallback) {
|
|
49
|
+
console.clear();
|
|
50
|
+
|
|
51
|
+
const pkgName = await input({
|
|
52
|
+
message: "enter a npm package name for search info size"
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
console.info(pkgName);
|
|
56
|
+
bundlephobia(pkgName);
|
|
57
|
+
setTimeout(refreshCallback, 5e3);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default infoTools;
|
package/hash/queryTools.js
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
// inquirer
|
|
2
|
-
import { input, password, select, number } from "@inquirer/prompts";
|
|
3
|
-
|
|
4
|
-
// functions
|
|
5
|
-
import animeSearch from "../functions/animeInfo.js";
|
|
6
|
-
import movieDB from "../functions/moviesInfo.js";
|
|
7
|
-
import pokemonInfo from "../functions/pokemon.js";
|
|
8
|
-
import twitchInfo from "../functions/twitch.js";
|
|
9
|
-
import deezer from "../functions/deezer.js";
|
|
10
|
-
import potterSearch from "../functions/potterSearch.js";
|
|
11
|
-
|
|
12
|
-
/** query tools */
|
|
13
|
-
const queryTools = {
|
|
14
|
-
async anime_Search(refreshCallback) {
|
|
15
|
-
console.clear();
|
|
16
|
-
|
|
17
|
-
const query = await input({
|
|
18
|
-
message: "enter a anime keyword for search",
|
|
19
|
-
required: true
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
animeSearch(query);
|
|
23
|
-
setTimeout(refreshCallback, 2e3);
|
|
24
|
-
},
|
|
25
|
-
async movie_info(refreshCallback) {
|
|
26
|
-
console.clear();
|
|
27
|
-
|
|
28
|
-
const { query, token } = {
|
|
29
|
-
query: await input({
|
|
30
|
-
message: "enter movie for search DB",
|
|
31
|
-
required: true
|
|
32
|
-
}),
|
|
33
|
-
token: await password({
|
|
34
|
-
message: "enter a token key",
|
|
35
|
-
required: true,
|
|
36
|
-
mask: true
|
|
37
|
-
})
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
movieDB(query, token);
|
|
41
|
-
setTimeout(refreshCallback, 2e3);
|
|
42
|
-
},
|
|
43
|
-
async pokemon_info(refreshCallback) {
|
|
44
|
-
console.clear();
|
|
45
|
-
|
|
46
|
-
const pokeSelect = await select({
|
|
47
|
-
message: "enter a opt for start search",
|
|
48
|
-
choices: ["id", "name"],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const opt = pokeSelect === "id"
|
|
52
|
-
? await number({
|
|
53
|
-
message: "enter a poekmon ID:",
|
|
54
|
-
min: 1,
|
|
55
|
-
required: true
|
|
56
|
-
}) : await input({
|
|
57
|
-
message: "enter a poekmon name:",
|
|
58
|
-
required: true,
|
|
59
|
-
validate: input => /[^0-9]/.test(input) || "the pokemon name is required"
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
pokemonInfo(opt);
|
|
63
|
-
setTimeout(refreshCallback, 6e3);
|
|
64
|
-
},
|
|
65
|
-
async twitch_info(refreshCallback) {
|
|
66
|
-
console.clear();
|
|
67
|
-
|
|
68
|
-
const { twitchSeparator, twitchUsers, twitchClient, twitchToken } = {
|
|
69
|
-
twitchSeparator: await input({
|
|
70
|
-
message: "enter a separator for split example ',':",
|
|
71
|
-
required: true
|
|
72
|
-
}),
|
|
73
|
-
twitchUsers: await input({
|
|
74
|
-
message: "enter a twitch users example 'a,b,c'",
|
|
75
|
-
required: true
|
|
76
|
-
}),
|
|
77
|
-
twitchClient: await password({
|
|
78
|
-
message: "enter a twitch client ID:",
|
|
79
|
-
required: true,
|
|
80
|
-
mask: true
|
|
81
|
-
}),
|
|
82
|
-
twitchToken: await password({
|
|
83
|
-
message: "enter a twitch token:",
|
|
84
|
-
required: true,
|
|
85
|
-
mask: true
|
|
86
|
-
})
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
twitchInfo({ twitchSeparator, twitchUsers, twitchClient, twitchToken });
|
|
90
|
-
setTimeout(refreshCallback, 2e3);
|
|
91
|
-
},
|
|
92
|
-
async deezer(refreshCallback) {
|
|
93
|
-
console.clear();
|
|
94
|
-
|
|
95
|
-
const query = await input({
|
|
96
|
-
message: "enter a query for search",
|
|
97
|
-
required: true
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
setTimeout(refreshCallback, 5e3);
|
|
101
|
-
deezer(query);
|
|
102
|
-
},
|
|
103
|
-
async potter_search(refreshCallback) {
|
|
104
|
-
console.clear();
|
|
105
|
-
|
|
106
|
-
const search = await input({
|
|
107
|
-
message: "enter a keyword or name for search",
|
|
108
|
-
required: true
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
potterSearch(search);
|
|
112
|
-
setTimeout(refreshCallback, 5e3);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export default queryTools;
|
|
1
|
+
// inquirer
|
|
2
|
+
import { input, password, select, number } from "@inquirer/prompts";
|
|
3
|
+
|
|
4
|
+
// functions
|
|
5
|
+
import animeSearch from "../functions/animeInfo.js";
|
|
6
|
+
import movieDB from "../functions/moviesInfo.js";
|
|
7
|
+
import pokemonInfo from "../functions/pokemon.js";
|
|
8
|
+
import twitchInfo from "../functions/twitch.js";
|
|
9
|
+
import deezer from "../functions/deezer.js";
|
|
10
|
+
import potterSearch from "../functions/potterSearch.js";
|
|
11
|
+
|
|
12
|
+
/** query tools */
|
|
13
|
+
const queryTools = {
|
|
14
|
+
async anime_Search(refreshCallback) {
|
|
15
|
+
console.clear();
|
|
16
|
+
|
|
17
|
+
const query = await input({
|
|
18
|
+
message: "enter a anime keyword for search",
|
|
19
|
+
required: true
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
animeSearch(query);
|
|
23
|
+
setTimeout(refreshCallback, 2e3);
|
|
24
|
+
},
|
|
25
|
+
async movie_info(refreshCallback) {
|
|
26
|
+
console.clear();
|
|
27
|
+
|
|
28
|
+
const { query, token } = {
|
|
29
|
+
query: await input({
|
|
30
|
+
message: "enter movie for search DB",
|
|
31
|
+
required: true
|
|
32
|
+
}),
|
|
33
|
+
token: await password({
|
|
34
|
+
message: "enter a token key",
|
|
35
|
+
required: true,
|
|
36
|
+
mask: true
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
movieDB(query, token);
|
|
41
|
+
setTimeout(refreshCallback, 2e3);
|
|
42
|
+
},
|
|
43
|
+
async pokemon_info(refreshCallback) {
|
|
44
|
+
console.clear();
|
|
45
|
+
|
|
46
|
+
const pokeSelect = await select({
|
|
47
|
+
message: "enter a opt for start search",
|
|
48
|
+
choices: ["id", "name"],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const opt = pokeSelect === "id"
|
|
52
|
+
? await number({
|
|
53
|
+
message: "enter a poekmon ID:",
|
|
54
|
+
min: 1,
|
|
55
|
+
required: true
|
|
56
|
+
}) : await input({
|
|
57
|
+
message: "enter a poekmon name:",
|
|
58
|
+
required: true,
|
|
59
|
+
validate: input => /[^0-9]/.test(input) || "the pokemon name is required"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
pokemonInfo(opt);
|
|
63
|
+
setTimeout(refreshCallback, 6e3);
|
|
64
|
+
},
|
|
65
|
+
async twitch_info(refreshCallback) {
|
|
66
|
+
console.clear();
|
|
67
|
+
|
|
68
|
+
const { twitchSeparator, twitchUsers, twitchClient, twitchToken } = {
|
|
69
|
+
twitchSeparator: await input({
|
|
70
|
+
message: "enter a separator for split example ',':",
|
|
71
|
+
required: true
|
|
72
|
+
}),
|
|
73
|
+
twitchUsers: await input({
|
|
74
|
+
message: "enter a twitch users example 'a,b,c'",
|
|
75
|
+
required: true
|
|
76
|
+
}),
|
|
77
|
+
twitchClient: await password({
|
|
78
|
+
message: "enter a twitch client ID:",
|
|
79
|
+
required: true,
|
|
80
|
+
mask: true
|
|
81
|
+
}),
|
|
82
|
+
twitchToken: await password({
|
|
83
|
+
message: "enter a twitch token:",
|
|
84
|
+
required: true,
|
|
85
|
+
mask: true
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
twitchInfo({ twitchSeparator, twitchUsers, twitchClient, twitchToken });
|
|
90
|
+
setTimeout(refreshCallback, 2e3);
|
|
91
|
+
},
|
|
92
|
+
async deezer(refreshCallback) {
|
|
93
|
+
console.clear();
|
|
94
|
+
|
|
95
|
+
const query = await input({
|
|
96
|
+
message: "enter a query for search",
|
|
97
|
+
required: true
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
setTimeout(refreshCallback, 5e3);
|
|
101
|
+
deezer(query);
|
|
102
|
+
},
|
|
103
|
+
async potter_search(refreshCallback) {
|
|
104
|
+
console.clear();
|
|
105
|
+
|
|
106
|
+
const search = await input({
|
|
107
|
+
message: "enter a keyword or name for search",
|
|
108
|
+
required: true
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
potterSearch(search);
|
|
112
|
+
setTimeout(refreshCallback, 5e3);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default queryTools;
|
package/hash/utilityTools.js
CHANGED
|
@@ -1,32 +1,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
|
-
const utilityTools = {
|
|
11
|
-
password(refreshCallback) {
|
|
12
|
-
console.clear();
|
|
13
|
-
genPassword();
|
|
14
|
-
setTimeout(refreshCallback, 3e3);
|
|
15
|
-
},
|
|
16
|
-
async hardware(refreshCallback) {
|
|
17
|
-
console.clear();
|
|
18
|
-
hardware();
|
|
19
|
-
setTimeout(refreshCallback, 3e3);
|
|
20
|
-
},
|
|
21
|
-
async poker_game(refreshCallback) {
|
|
22
|
-
const pokeOpt = await stackMenu({
|
|
23
|
-
message: "select a poker game for view instructions:",
|
|
24
|
-
choices: pokerGameOpts
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
pokerGame(pokeOpt);
|
|
28
|
-
setTimeout(refreshCallback, 5e3);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default utilityTools;
|
|
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
|
+
const utilityTools = {
|
|
11
|
+
password(refreshCallback) {
|
|
12
|
+
console.clear();
|
|
13
|
+
genPassword();
|
|
14
|
+
setTimeout(refreshCallback, 3e3);
|
|
15
|
+
},
|
|
16
|
+
async hardware(refreshCallback) {
|
|
17
|
+
console.clear();
|
|
18
|
+
hardware();
|
|
19
|
+
setTimeout(refreshCallback, 3e3);
|
|
20
|
+
},
|
|
21
|
+
async poker_game(refreshCallback) {
|
|
22
|
+
const pokeOpt = await stackMenu({
|
|
23
|
+
message: "select a poker game for view instructions:",
|
|
24
|
+
choices: pokerGameOpts
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
pokerGame(pokeOpt);
|
|
28
|
+
setTimeout(refreshCallback, 5e3);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default utilityTools;
|
package/hash/wallpaperSelect.js
CHANGED
|
@@ -1,59 +1,89 @@
|
|
|
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
|
-
const wallpaperSelect = {
|
|
10
|
-
async solMoon(refreshCallback, alternativeCallback) {
|
|
11
|
-
const solMoonWallpapers = [...Array(20).keys()]
|
|
12
|
-
.map(i => `sol-moon${i + 1}.jpeg`);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const solMoon = await select({
|
|
16
|
-
message, choices: [...solMoonWallpapers, backMenu]
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
if (solMoon === backMenu) {
|
|
20
|
-
alternativeCallback();
|
|
21
|
-
} else {
|
|
22
|
-
wallpaperDownload("sol-moon", solMoon);
|
|
23
|
-
setTimeout(refreshCallback, 5000);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
async dimensions(refreshCallback, alternativeCallback) {
|
|
27
|
-
const dimensionsWallpapers = [...Array(12).keys()]
|
|
28
|
-
.map(i => `dimensions-${i + 1}.jpeg`);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const dimensions = await select({
|
|
32
|
-
message, choices: [...dimensionsWallpapers, backMenu]
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
if(dimensions === backMenu) {
|
|
36
|
-
alternativeCallback();
|
|
37
|
-
} else {
|
|
38
|
-
wallpaperDownload("dimensions", dimensions);
|
|
39
|
-
setTimeout(refreshCallback, 5000);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
async seyyahi2(refreshCallback, alternativeCallback) {
|
|
43
|
-
const seyyahiWallpapers = [...Array(14).keys()]
|
|
44
|
-
.map(i => `seyyahi2-wallpaper${i + 1}.jpg`);
|
|
45
|
-
|
|
46
|
-
const seyyahi2 = await select({
|
|
47
|
-
message, choices: [...seyyahiWallpapers, backMenu]
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
if(seyyahi2 === backMenu) {
|
|
51
|
-
alternativeCallback();
|
|
52
|
-
} else {
|
|
53
|
-
wallpaperDownload("seyyahi2", seyyahi2);
|
|
54
|
-
setTimeout(refreshCallback, 5000);
|
|
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
|
+
const wallpaperSelect = {
|
|
10
|
+
async solMoon(refreshCallback, alternativeCallback) {
|
|
11
|
+
const solMoonWallpapers = [...Array(20).keys()]
|
|
12
|
+
.map(i => `sol-moon${i + 1}.jpeg`);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const solMoon = await select({
|
|
16
|
+
message, choices: [...solMoonWallpapers, backMenu]
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
if (solMoon === backMenu) {
|
|
20
|
+
alternativeCallback();
|
|
21
|
+
} else {
|
|
22
|
+
wallpaperDownload("sol-moon", solMoon);
|
|
23
|
+
setTimeout(refreshCallback, 5000);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
async dimensions(refreshCallback, alternativeCallback) {
|
|
27
|
+
const dimensionsWallpapers = [...Array(12).keys()]
|
|
28
|
+
.map(i => `dimensions-${i + 1}.jpeg`);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const dimensions = await select({
|
|
32
|
+
message, choices: [...dimensionsWallpapers, backMenu]
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if(dimensions === backMenu) {
|
|
36
|
+
alternativeCallback();
|
|
37
|
+
} else {
|
|
38
|
+
wallpaperDownload("dimensions", dimensions);
|
|
39
|
+
setTimeout(refreshCallback, 5000);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
async seyyahi2(refreshCallback, alternativeCallback) {
|
|
43
|
+
const seyyahiWallpapers = [...Array(14).keys()]
|
|
44
|
+
.map(i => `seyyahi2-wallpaper${i + 1}.jpg`);
|
|
45
|
+
|
|
46
|
+
const seyyahi2 = await select({
|
|
47
|
+
message, choices: [...seyyahiWallpapers, backMenu]
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if(seyyahi2 === backMenu) {
|
|
51
|
+
alternativeCallback();
|
|
52
|
+
} else {
|
|
53
|
+
wallpaperDownload("seyyahi2", seyyahi2);
|
|
54
|
+
setTimeout(refreshCallback, 5000);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
async ancientMistery(refreshCallback, alternativeCallback) {
|
|
58
|
+
const ancientMisteryWallpapers = [...Array(6).keys()]
|
|
59
|
+
.map(i => `ancient-mistery${i + 1}.jpeg`);
|
|
60
|
+
|
|
61
|
+
const ancientMistery = await select({
|
|
62
|
+
message, choices: [...ancientMisteryWallpapers, backMenu]
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
if(ancientMistery === backMenu) {
|
|
66
|
+
alternativeCallback();
|
|
67
|
+
} else {
|
|
68
|
+
wallpaperDownload("ancient-mistery", ancientMistery);
|
|
69
|
+
setTimeout(refreshCallback, 5000);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
async tsukyNoEmily(refreshCallback, alternativeCallback) {
|
|
73
|
+
const tsukyNoEmilyWallpapers = [...Array(6).keys()]
|
|
74
|
+
.map(i => `tsuky-no-emily${i + 1}.jpeg`);
|
|
75
|
+
|
|
76
|
+
const tsukyNoEmily = await select({
|
|
77
|
+
message, choices: [...tsukyNoEmilyWallpapers, backMenu]
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
if(tsukyNoEmily === backMenu) {
|
|
81
|
+
alternativeCallback();
|
|
82
|
+
} else {
|
|
83
|
+
wallpaperDownload("tsuky-no-emily", tsukyNoEmily);
|
|
84
|
+
setTimeout(refreshCallback, 5000);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default wallpaperSelect;
|