@kaddo/cli 3.103.0 → 3.105.0
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/chunk-XCTQ5SFK.js +49 -0
- package/dist/core.js +696 -90
- package/dist/index.js +102 -90
- package/dist/ui-4AQHWUC4.js +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/utils/ui.ts
|
|
2
|
+
import * as p from "@clack/prompts";
|
|
3
|
+
var intro2 = (title) => p.intro(title);
|
|
4
|
+
var outro2 = (msg) => p.outro(msg);
|
|
5
|
+
var log2 = p.log;
|
|
6
|
+
var cancel2 = (msg) => p.cancel(msg);
|
|
7
|
+
async function text2(opts) {
|
|
8
|
+
const val = await p.text(opts);
|
|
9
|
+
if (p.isCancel(val)) {
|
|
10
|
+
p.cancel("Operation cancelled.");
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
return val;
|
|
14
|
+
}
|
|
15
|
+
async function confirm2(opts) {
|
|
16
|
+
const val = await p.confirm(opts);
|
|
17
|
+
if (p.isCancel(val)) {
|
|
18
|
+
p.cancel("Operation cancelled.");
|
|
19
|
+
process.exit(0);
|
|
20
|
+
}
|
|
21
|
+
return val;
|
|
22
|
+
}
|
|
23
|
+
async function select2(opts) {
|
|
24
|
+
const val = await p.select(opts);
|
|
25
|
+
if (p.isCancel(val)) {
|
|
26
|
+
p.cancel("Operation cancelled.");
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|
|
29
|
+
return val;
|
|
30
|
+
}
|
|
31
|
+
async function multiselect2(opts) {
|
|
32
|
+
const val = await p.multiselect(opts);
|
|
33
|
+
if (p.isCancel(val)) {
|
|
34
|
+
p.cancel("Operation cancelled.");
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
return val;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
intro2 as intro,
|
|
42
|
+
outro2 as outro,
|
|
43
|
+
log2 as log,
|
|
44
|
+
cancel2 as cancel,
|
|
45
|
+
text2 as text,
|
|
46
|
+
confirm2 as confirm,
|
|
47
|
+
select2 as select,
|
|
48
|
+
multiselect2 as multiselect
|
|
49
|
+
};
|