ali-skills 0.0.13 → 0.0.14
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.
|
@@ -7,9 +7,7 @@ var import_src = require_src();
|
|
|
7
7
|
function ce() {
|
|
8
8
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
9
9
|
}
|
|
10
|
-
const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]")
|
|
11
|
-
u("▪", "•");
|
|
12
|
-
const _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
|
|
10
|
+
const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), $e = u("▪", "•"), _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
|
|
13
11
|
switch (t) {
|
|
14
12
|
case "initial":
|
|
15
13
|
case "active": return import_picocolors.default.cyan(le);
|
|
@@ -26,7 +24,27 @@ const _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "
|
|
|
26
24
|
const j = v === 0 && $, E = v === f.length - 1 && g;
|
|
27
25
|
return j || E ? import_picocolors.default.dim("...") : i(p, v + l === n);
|
|
28
26
|
});
|
|
29
|
-
},
|
|
27
|
+
}, ge = (t) => new MD({
|
|
28
|
+
validate: t.validate,
|
|
29
|
+
mask: t.mask ?? $e,
|
|
30
|
+
render() {
|
|
31
|
+
const n = `${import_picocolors.default.gray(o)}
|
|
32
|
+
${b(this.state)} ${t.message}
|
|
33
|
+
`, r = this.valueWithCursor, i = this.masked;
|
|
34
|
+
switch (this.state) {
|
|
35
|
+
case "error": return `${n.trim()}
|
|
36
|
+
${import_picocolors.default.yellow(o)} ${i}
|
|
37
|
+
${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
|
|
38
|
+
`;
|
|
39
|
+
case "submit": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(i)}`;
|
|
40
|
+
case "cancel": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i ?? ""))}${i ? `
|
|
41
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
42
|
+
default: return `${n}${import_picocolors.default.cyan(o)} ${r}
|
|
43
|
+
${import_picocolors.default.cyan(d)}
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}).prompt(), ye = (t) => {
|
|
30
48
|
const n = t.active ?? "Yes", r = t.inactive ?? "No";
|
|
31
49
|
return new dD({
|
|
32
50
|
active: n,
|
|
@@ -331,4 +349,4 @@ ${J}${i.trimStart()}`), r = 3 + stripVTControlCharacters(i.trimStart()).length);
|
|
|
331
349
|
}
|
|
332
350
|
};
|
|
333
351
|
};
|
|
334
|
-
export { Y as a,
|
|
352
|
+
export { Y as a, ge as c, ye as d, Se as i, ve as l, M as n, be as o, Me as r, fe as s, Ie as t, xe as u };
|