@tarout/cli 0.2.1 → 0.2.2
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/dist/{api-SHKZO2SZ.js → api-735LN7BA.js} +2 -2
- package/dist/{billing-ENTHZKID.js → billing-WOKNOS4N.js} +4 -4
- package/dist/{chunk-XSJKHLNL.js → chunk-5XBVQICT.js} +113 -14
- package/dist/{chunk-FKX4CRPL.js → chunk-7YS2WBLB.js} +1 -1
- package/dist/chunk-CJMIX35A.js +127 -0
- package/dist/{chunk-FS74WWHV.js → chunk-KL3JNPAY.js} +7 -2
- package/dist/index.js +1220 -303
- package/dist/{prompts-WNFR34TG.js → prompts-QQ2FZKQT.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-J3H7LTFT.js +0 -68
package/package.json
CHANGED
package/dist/chunk-J3H7LTFT.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ExitCode,
|
|
3
|
-
exit,
|
|
4
|
-
isJsonMode,
|
|
5
|
-
outputNeedsInput
|
|
6
|
-
} from "./chunk-FS74WWHV.js";
|
|
7
|
-
|
|
8
|
-
// src/utils/prompts.ts
|
|
9
|
-
import inquirer from "inquirer";
|
|
10
|
-
async function confirm(message, defaultValue = false) {
|
|
11
|
-
const { confirmed } = await inquirer.prompt([
|
|
12
|
-
{
|
|
13
|
-
type: "confirm",
|
|
14
|
-
name: "confirmed",
|
|
15
|
-
message,
|
|
16
|
-
default: defaultValue
|
|
17
|
-
}
|
|
18
|
-
]);
|
|
19
|
-
return confirmed;
|
|
20
|
-
}
|
|
21
|
-
async function input(message, defaultValue) {
|
|
22
|
-
const { value } = await inquirer.prompt([
|
|
23
|
-
{
|
|
24
|
-
type: "input",
|
|
25
|
-
name: "value",
|
|
26
|
-
message,
|
|
27
|
-
default: defaultValue
|
|
28
|
-
}
|
|
29
|
-
]);
|
|
30
|
-
return value;
|
|
31
|
-
}
|
|
32
|
-
async function select(message, choices) {
|
|
33
|
-
const { value } = await inquirer.prompt([
|
|
34
|
-
{
|
|
35
|
-
type: "list",
|
|
36
|
-
name: "value",
|
|
37
|
-
message,
|
|
38
|
-
choices
|
|
39
|
-
}
|
|
40
|
-
]);
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
async function password(message) {
|
|
44
|
-
const { value } = await inquirer.prompt([
|
|
45
|
-
{
|
|
46
|
-
type: "password",
|
|
47
|
-
name: "value",
|
|
48
|
-
message,
|
|
49
|
-
mask: "*"
|
|
50
|
-
}
|
|
51
|
-
]);
|
|
52
|
-
return value;
|
|
53
|
-
}
|
|
54
|
-
async function promptOrEmit(req, fallback) {
|
|
55
|
-
if (isJsonMode()) {
|
|
56
|
-
outputNeedsInput(req);
|
|
57
|
-
exit(ExitCode.NEEDS_INPUT);
|
|
58
|
-
}
|
|
59
|
-
return fallback();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export {
|
|
63
|
-
confirm,
|
|
64
|
-
input,
|
|
65
|
-
select,
|
|
66
|
-
password,
|
|
67
|
-
promptOrEmit
|
|
68
|
-
};
|