allagents 0.13.2 → 0.13.3
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/index.js +566 -52
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24342,7 +24342,7 @@ var package_default;
|
|
|
24342
24342
|
var init_package = __esm(() => {
|
|
24343
24343
|
package_default = {
|
|
24344
24344
|
name: "allagents",
|
|
24345
|
-
version: "0.13.
|
|
24345
|
+
version: "0.13.3",
|
|
24346
24346
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
24347
24347
|
type: "module",
|
|
24348
24348
|
bin: {
|
|
@@ -24548,6 +24548,22 @@ function K(t, e, s) {
|
|
|
24548
24548
|
`).map((i2) => Et(i2, e, s)).join(`
|
|
24549
24549
|
`);
|
|
24550
24550
|
}
|
|
24551
|
+
function It(t) {
|
|
24552
|
+
if (t.aliases !== undefined) {
|
|
24553
|
+
const e = t.aliases;
|
|
24554
|
+
for (const s in e) {
|
|
24555
|
+
if (!Object.hasOwn(e, s))
|
|
24556
|
+
continue;
|
|
24557
|
+
const i2 = e[s];
|
|
24558
|
+
_.actions.has(i2) && (_.aliases.has(s) || _.aliases.set(s, i2));
|
|
24559
|
+
}
|
|
24560
|
+
}
|
|
24561
|
+
if (t.messages !== undefined) {
|
|
24562
|
+
const e = t.messages;
|
|
24563
|
+
e.cancel !== undefined && (_.messages.cancel = e.cancel), e.error !== undefined && (_.messages.error = e.error);
|
|
24564
|
+
}
|
|
24565
|
+
t.withGuide !== undefined && (_.withGuide = t.withGuide !== false);
|
|
24566
|
+
}
|
|
24551
24567
|
function H(t, e) {
|
|
24552
24568
|
if (typeof t == "string")
|
|
24553
24569
|
return _.aliases.get(t) === e;
|
|
@@ -24890,7 +24906,7 @@ var import_picocolors, import_sisteransi, at = (t) => t === 161 || t === 164 ||
|
|
|
24890
24906
|
` && (r && f && (i2 += st(r)), n && (i2 += it(n))), V += h.length, m = A, A = g.next();
|
|
24891
24907
|
}
|
|
24892
24908
|
return i2;
|
|
24893
|
-
}, At, _, bt, z, rt = (t) => ("columns" in t) && typeof t.columns == "number" ? t.columns : 80, nt = (t) => ("rows" in t) && typeof t.rows == "number" ? t.rows : 20, Vt, kt, yt, Mt, Wt, $t;
|
|
24909
|
+
}, At, _, bt, z, rt = (t) => ("columns" in t) && typeof t.columns == "number" ? t.columns : 80, nt = (t) => ("rows" in t) && typeof t.rows == "number" ? t.rows : 20, Vt, kt, yt, Mt, Lt, Wt, Tt, $t;
|
|
24894
24910
|
var init_dist = __esm(() => {
|
|
24895
24911
|
import_picocolors = __toESM(require_picocolors(), 1);
|
|
24896
24912
|
import_sisteransi = __toESM(require_src2(), 1);
|
|
@@ -25076,6 +25092,32 @@ var init_dist = __esm(() => {
|
|
|
25076
25092
|
});
|
|
25077
25093
|
}
|
|
25078
25094
|
};
|
|
25095
|
+
Lt = class extends x {
|
|
25096
|
+
_mask = "•";
|
|
25097
|
+
get cursor() {
|
|
25098
|
+
return this._cursor;
|
|
25099
|
+
}
|
|
25100
|
+
get masked() {
|
|
25101
|
+
return this.userInput.replaceAll(/./g, this._mask);
|
|
25102
|
+
}
|
|
25103
|
+
get userInputWithCursor() {
|
|
25104
|
+
if (this.state === "submit" || this.state === "cancel")
|
|
25105
|
+
return this.masked;
|
|
25106
|
+
const e = this.userInput;
|
|
25107
|
+
if (this.cursor >= e.length)
|
|
25108
|
+
return `${this.masked}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
|
|
25109
|
+
const s = this.masked, i2 = s.slice(0, this.cursor), r = s.slice(this.cursor);
|
|
25110
|
+
return `${i2}${import_picocolors.default.inverse(r[0])}${r.slice(1)}`;
|
|
25111
|
+
}
|
|
25112
|
+
clear() {
|
|
25113
|
+
this._clearUserInput();
|
|
25114
|
+
}
|
|
25115
|
+
constructor({ mask: e, ...s }) {
|
|
25116
|
+
super(s), this._mask = e ?? "•", this.on("userInput", (i2) => {
|
|
25117
|
+
this._setValue(i2);
|
|
25118
|
+
});
|
|
25119
|
+
}
|
|
25120
|
+
};
|
|
25079
25121
|
Wt = class Wt extends x {
|
|
25080
25122
|
options;
|
|
25081
25123
|
cursor = 0;
|
|
@@ -25103,6 +25145,23 @@ var init_dist = __esm(() => {
|
|
|
25103
25145
|
});
|
|
25104
25146
|
}
|
|
25105
25147
|
};
|
|
25148
|
+
Tt = class Tt extends x {
|
|
25149
|
+
options;
|
|
25150
|
+
cursor = 0;
|
|
25151
|
+
constructor(e) {
|
|
25152
|
+
super(e, false), this.options = e.options;
|
|
25153
|
+
const s = e.caseSensitive === true, i2 = this.options.map(({ value: [r] }) => s ? r : r?.toLowerCase());
|
|
25154
|
+
this.cursor = Math.max(i2.indexOf(e.initialValue), 0), this.on("key", (r, n) => {
|
|
25155
|
+
if (!r)
|
|
25156
|
+
return;
|
|
25157
|
+
const u = s && n.shift ? r.toUpperCase() : r;
|
|
25158
|
+
if (!i2.includes(u))
|
|
25159
|
+
return;
|
|
25160
|
+
const a = this.options.find(({ value: [l] }) => s ? l === u : l?.toLowerCase() === r);
|
|
25161
|
+
a && (this.value = a.value, this.state = "submit", this.emit("submit"));
|
|
25162
|
+
});
|
|
25163
|
+
}
|
|
25164
|
+
};
|
|
25106
25165
|
$t = class $t extends x {
|
|
25107
25166
|
get userInputWithCursor() {
|
|
25108
25167
|
if (this.state === "submit")
|
|
@@ -25127,7 +25186,70 @@ var init_dist = __esm(() => {
|
|
|
25127
25186
|
});
|
|
25128
25187
|
|
|
25129
25188
|
// node_modules/@clack/prompts/dist/index.mjs
|
|
25189
|
+
var exports_dist = {};
|
|
25190
|
+
__export(exports_dist, {
|
|
25191
|
+
updateSettings: () => It,
|
|
25192
|
+
unicodeOr: () => w2,
|
|
25193
|
+
unicode: () => ee,
|
|
25194
|
+
text: () => Qt,
|
|
25195
|
+
tasks: () => Xt,
|
|
25196
|
+
taskLog: () => zt,
|
|
25197
|
+
symbolBar: () => Ee,
|
|
25198
|
+
symbol: () => N2,
|
|
25199
|
+
stream: () => H2,
|
|
25200
|
+
spinner: () => Ie,
|
|
25201
|
+
settings: () => _,
|
|
25202
|
+
selectKey: () => Jt,
|
|
25203
|
+
select: () => qt,
|
|
25204
|
+
progress: () => Kt,
|
|
25205
|
+
path: () => Ht,
|
|
25206
|
+
password: () => Gt,
|
|
25207
|
+
outro: () => Wt2,
|
|
25208
|
+
note: () => kt2,
|
|
25209
|
+
multiselect: () => Lt2,
|
|
25210
|
+
log: () => R2,
|
|
25211
|
+
limitOptions: () => J2,
|
|
25212
|
+
isTTY: () => Te,
|
|
25213
|
+
isCancel: () => Ct,
|
|
25214
|
+
isCI: () => ue,
|
|
25215
|
+
intro: () => Nt,
|
|
25216
|
+
groupMultiselect: () => Ot,
|
|
25217
|
+
group: () => Rt,
|
|
25218
|
+
confirm: () => Mt2,
|
|
25219
|
+
cancel: () => Pt,
|
|
25220
|
+
box: () => Tt2,
|
|
25221
|
+
autocompleteMultiselect: () => bt2,
|
|
25222
|
+
autocomplete: () => Je,
|
|
25223
|
+
S_WARN: () => Fe,
|
|
25224
|
+
S_SUCCESS: () => fe,
|
|
25225
|
+
S_STEP_SUBMIT: () => k2,
|
|
25226
|
+
S_STEP_ERROR: () => de,
|
|
25227
|
+
S_STEP_CANCEL: () => ce,
|
|
25228
|
+
S_STEP_ACTIVE: () => Me,
|
|
25229
|
+
S_RADIO_INACTIVE: () => K2,
|
|
25230
|
+
S_RADIO_ACTIVE: () => Y,
|
|
25231
|
+
S_PASSWORD_MASK: () => Pe,
|
|
25232
|
+
S_INFO: () => ge,
|
|
25233
|
+
S_ERROR: () => ye,
|
|
25234
|
+
S_CORNER_TOP_RIGHT: () => he,
|
|
25235
|
+
S_CORNER_TOP_LEFT: () => We,
|
|
25236
|
+
S_CORNER_BOTTOM_RIGHT: () => me,
|
|
25237
|
+
S_CORNER_BOTTOM_LEFT: () => pe,
|
|
25238
|
+
S_CONNECT_LEFT: () => Ne,
|
|
25239
|
+
S_CHECKBOX_SELECTED: () => G2,
|
|
25240
|
+
S_CHECKBOX_INACTIVE: () => z2,
|
|
25241
|
+
S_CHECKBOX_ACTIVE: () => te,
|
|
25242
|
+
S_BAR_START_RIGHT: () => Re,
|
|
25243
|
+
S_BAR_START: () => $e,
|
|
25244
|
+
S_BAR_H: () => se,
|
|
25245
|
+
S_BAR_END_RIGHT: () => Oe,
|
|
25246
|
+
S_BAR_END: () => x2,
|
|
25247
|
+
S_BAR: () => h
|
|
25248
|
+
});
|
|
25130
25249
|
import P2 from "node:process";
|
|
25250
|
+
import { readdirSync as ct2, existsSync as dt2, lstatSync as be } from "node:fs";
|
|
25251
|
+
import { dirname as xe, join as $t2 } from "node:path";
|
|
25252
|
+
import { stripVTControlCharacters as le } from "node:util";
|
|
25131
25253
|
function ht2() {
|
|
25132
25254
|
return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
25133
25255
|
}
|
|
@@ -25138,7 +25260,52 @@ function q2(e, r, s) {
|
|
|
25138
25260
|
`).map((i2) => St2(i2, r, s)).join(`
|
|
25139
25261
|
`);
|
|
25140
25262
|
}
|
|
25141
|
-
|
|
25263
|
+
function Ke(e) {
|
|
25264
|
+
return e.label ?? String(e.value ?? "");
|
|
25265
|
+
}
|
|
25266
|
+
function qe(e, r) {
|
|
25267
|
+
if (!e)
|
|
25268
|
+
return true;
|
|
25269
|
+
const s = (r.label ?? String(r.value ?? "")).toLowerCase(), i2 = (r.hint ?? "").toLowerCase(), n = String(r.value).toLowerCase(), o = e.toLowerCase();
|
|
25270
|
+
return s.includes(o) || i2.includes(o) || n.includes(o);
|
|
25271
|
+
}
|
|
25272
|
+
function Bt2(e, r) {
|
|
25273
|
+
const s = [];
|
|
25274
|
+
for (const i2 of r)
|
|
25275
|
+
e.includes(i2.value) && s.push(i2);
|
|
25276
|
+
return s;
|
|
25277
|
+
}
|
|
25278
|
+
function Xe(e, r, s, i2) {
|
|
25279
|
+
let n = s, o = s;
|
|
25280
|
+
return i2 === "center" ? n = Math.floor((r - e) / 2) : i2 === "right" && (n = r - e - s), o = r - n - e, [n, o];
|
|
25281
|
+
}
|
|
25282
|
+
function Kt({ style: e = "heavy", max: r = 100, size: s = 40, ...i2 } = {}) {
|
|
25283
|
+
const n = Ie(i2);
|
|
25284
|
+
let o = 0, u = "";
|
|
25285
|
+
const l = Math.max(1, r), a = Math.max(1, s), d = (y2) => {
|
|
25286
|
+
switch (y2) {
|
|
25287
|
+
case "initial":
|
|
25288
|
+
case "active":
|
|
25289
|
+
return import_picocolors2.default.magenta;
|
|
25290
|
+
case "error":
|
|
25291
|
+
case "cancel":
|
|
25292
|
+
return import_picocolors2.default.red;
|
|
25293
|
+
case "submit":
|
|
25294
|
+
return import_picocolors2.default.green;
|
|
25295
|
+
default:
|
|
25296
|
+
return import_picocolors2.default.magenta;
|
|
25297
|
+
}
|
|
25298
|
+
}, g = (y2, $2) => {
|
|
25299
|
+
const c = Math.floor(o / l * a);
|
|
25300
|
+
return `${d(y2)(Ye[e].repeat(c))}${import_picocolors2.default.dim(Ye[e].repeat(a - c))} ${$2}`;
|
|
25301
|
+
}, E = (y2 = "") => {
|
|
25302
|
+
u = y2, n.start(g("initial", y2));
|
|
25303
|
+
}, p = (y2 = 1, $2) => {
|
|
25304
|
+
o = Math.min(l, y2 + o), n.message(g("active", $2 ?? u)), u = $2 ?? u;
|
|
25305
|
+
};
|
|
25306
|
+
return { start: E, stop: n.stop, cancel: n.cancel, error: n.error, clear: n.clear, advance: p, isCancelled: n.isCancelled, message: (y2) => p(0, y2) };
|
|
25307
|
+
}
|
|
25308
|
+
var import_picocolors2, import_sisteransi2, ee, ue = () => process.env.CI === "true", Te = (e) => e.isTTY === true, w2 = (e, r) => ee ? e : r, Me, ce, de, k2, $e, h, x2, Re, Oe, Y, K2, te, G2, z2, Pe, se, he, Ne, me, pe, We, ge, fe, Fe, ye, N2 = (e) => {
|
|
25142
25309
|
switch (e) {
|
|
25143
25310
|
case "initial":
|
|
25144
25311
|
case "active":
|
|
@@ -25339,6 +25506,91 @@ var import_picocolors2, import_sisteransi2, ee, ue = () => process.env.CI === "t
|
|
|
25339
25506
|
for (const C of A)
|
|
25340
25507
|
b.push(C);
|
|
25341
25508
|
return m && b.push(g), b;
|
|
25509
|
+
}, Je = (e) => new Vt({ options: e.options, initialValue: e.initialValue ? [e.initialValue] : undefined, initialUserInput: e.initialUserInput, filter: e.filter ?? ((r, s) => qe(r, s)), signal: e.signal, input: e.input, output: e.output, validate: e.validate, render() {
|
|
25510
|
+
const r = [`${import_picocolors2.default.gray(h)}`, `${N2(this.state)} ${e.message}`], s = this.userInput, i2 = this.options, n = e.placeholder, o = s === "" && n !== undefined;
|
|
25511
|
+
switch (this.state) {
|
|
25512
|
+
case "submit": {
|
|
25513
|
+
const u = Bt2(this.selectedValues, i2), l = u.length > 0 ? ` ${import_picocolors2.default.dim(u.map(Ke).join(", "))}` : "";
|
|
25514
|
+
return `${r.join(`
|
|
25515
|
+
`)}
|
|
25516
|
+
${import_picocolors2.default.gray(h)}${l}`;
|
|
25517
|
+
}
|
|
25518
|
+
case "cancel": {
|
|
25519
|
+
const u = s ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}` : "";
|
|
25520
|
+
return `${r.join(`
|
|
25521
|
+
`)}
|
|
25522
|
+
${import_picocolors2.default.gray(h)}${u}`;
|
|
25523
|
+
}
|
|
25524
|
+
default: {
|
|
25525
|
+
const u = `${(this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan)(h)} `, l = (this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan)(x2);
|
|
25526
|
+
let a = "";
|
|
25527
|
+
if (this.isNavigating || o) {
|
|
25528
|
+
const c = o ? n : s;
|
|
25529
|
+
a = c !== "" ? ` ${import_picocolors2.default.dim(c)}` : "";
|
|
25530
|
+
} else
|
|
25531
|
+
a = ` ${this.userInputWithCursor}`;
|
|
25532
|
+
const d = this.filteredOptions.length !== i2.length ? import_picocolors2.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "", g = this.filteredOptions.length === 0 && s ? [`${u}${import_picocolors2.default.yellow("No matches found")}`] : [], E = this.state === "error" ? [`${u}${import_picocolors2.default.yellow(this.error)}`] : [];
|
|
25533
|
+
r.push(`${u.trimEnd()}`, `${u}${import_picocolors2.default.dim("Search:")}${a}${d}`, ...g, ...E);
|
|
25534
|
+
const p = [`${import_picocolors2.default.dim("↑/↓")} to select`, `${import_picocolors2.default.dim("Enter:")} confirm`, `${import_picocolors2.default.dim("Type:")} to search`], y2 = [`${u}${import_picocolors2.default.dim(p.join(" • "))}`, `${l}`], $2 = this.filteredOptions.length === 0 ? [] : J2({ cursor: this.cursor, options: this.filteredOptions, columnPadding: 3, rowPadding: r.length + y2.length, style: (c, m) => {
|
|
25535
|
+
const f = Ke(c), F = c.hint && c.value === this.focusedValue ? import_picocolors2.default.dim(` (${c.hint})`) : "";
|
|
25536
|
+
return m ? `${import_picocolors2.default.green(Y)} ${f}${F}` : `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(f)}${F}`;
|
|
25537
|
+
}, maxItems: e.maxItems, output: e.output });
|
|
25538
|
+
return [...r, ...$2.map((c) => `${u}${c}`), ...y2].join(`
|
|
25539
|
+
`);
|
|
25540
|
+
}
|
|
25541
|
+
}
|
|
25542
|
+
} }).prompt(), bt2 = (e) => {
|
|
25543
|
+
const r = (i2, n, o, u) => {
|
|
25544
|
+
const l = o.includes(i2.value), a = i2.label ?? String(i2.value ?? ""), d = i2.hint && u !== undefined && i2.value === u ? import_picocolors2.default.dim(` (${i2.hint})`) : "", g = l ? import_picocolors2.default.green(G2) : import_picocolors2.default.dim(z2);
|
|
25545
|
+
return n ? `${g} ${a}${d}` : `${g} ${import_picocolors2.default.dim(a)}`;
|
|
25546
|
+
}, s = new Vt({ options: e.options, multiple: true, filter: e.filter ?? ((i2, n) => qe(i2, n)), validate: () => {
|
|
25547
|
+
if (e.required && s.selectedValues.length === 0)
|
|
25548
|
+
return "Please select at least one item";
|
|
25549
|
+
}, initialValue: e.initialValues, signal: e.signal, input: e.input, output: e.output, render() {
|
|
25550
|
+
const i2 = `${import_picocolors2.default.gray(h)}
|
|
25551
|
+
${N2(this.state)} ${e.message}
|
|
25552
|
+
`, n = this.userInput, o = e.placeholder, u = n === "" && o !== undefined, l = this.isNavigating || u ? import_picocolors2.default.dim(u ? o : n) : this.userInputWithCursor, a = this.options, d = this.filteredOptions.length !== a.length ? import_picocolors2.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
|
|
25553
|
+
switch (this.state) {
|
|
25554
|
+
case "submit":
|
|
25555
|
+
return `${i2}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.dim(`${this.selectedValues.length} items selected`)}`;
|
|
25556
|
+
case "cancel":
|
|
25557
|
+
return `${i2}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}`;
|
|
25558
|
+
default: {
|
|
25559
|
+
const g = this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan, E = [`${import_picocolors2.default.dim("↑/↓")} to navigate`, `${import_picocolors2.default.dim(this.isNavigating ? "Space/Tab:" : "Tab:")} select`, `${import_picocolors2.default.dim("Enter:")} confirm`, `${import_picocolors2.default.dim("Type:")} to search`], p = this.filteredOptions.length === 0 && n ? [`${g(h)} ${import_picocolors2.default.yellow("No matches found")}`] : [], y2 = this.state === "error" ? [`${g(h)} ${import_picocolors2.default.yellow(this.error)}`] : [], $2 = [...`${i2}${g(h)}`.split(`
|
|
25560
|
+
`), `${g(h)} ${import_picocolors2.default.dim("Search:")} ${l}${d}`, ...p, ...y2], c = [`${g(h)} ${import_picocolors2.default.dim(E.join(" • "))}`, `${g(x2)}`], m = J2({ cursor: this.cursor, options: this.filteredOptions, style: (f, F) => r(f, F, this.selectedValues, this.focusedValue), maxItems: e.maxItems, output: e.output, rowPadding: $2.length + c.length });
|
|
25561
|
+
return [...$2, ...m.map((f) => `${g(h)} ${f}`), ...c].join(`
|
|
25562
|
+
`);
|
|
25563
|
+
}
|
|
25564
|
+
}
|
|
25565
|
+
} });
|
|
25566
|
+
return s.prompt();
|
|
25567
|
+
}, xt2, _t2, Dt2 = (e) => e, Tt2 = (e = "", r = "", s) => {
|
|
25568
|
+
const i2 = s?.output ?? process.stdout, n = rt(i2), o = 2, u = s?.titlePadding ?? 1, l = s?.contentPadding ?? 2, a = s?.width === undefined || s.width === "auto" ? 1 : Math.min(1, s.width), d = (s?.withGuide ?? _.withGuide) !== false ? `${h} ` : "", g = s?.formatBorder ?? Dt2, E = ((s?.rounded) ? xt2 : _t2).map(g), p = g(se), y2 = g(h), $2 = M2(d), c = M2(r), m = n - $2;
|
|
25569
|
+
let f = Math.floor(n * a) - $2;
|
|
25570
|
+
if (s?.width === "auto") {
|
|
25571
|
+
const _2 = e.split(`
|
|
25572
|
+
`);
|
|
25573
|
+
let D2 = c + u * 2;
|
|
25574
|
+
for (const W2 of _2) {
|
|
25575
|
+
const I2 = M2(W2) + l * 2;
|
|
25576
|
+
I2 > D2 && (D2 = I2);
|
|
25577
|
+
}
|
|
25578
|
+
const T2 = D2 + o;
|
|
25579
|
+
T2 < f && (f = T2);
|
|
25580
|
+
}
|
|
25581
|
+
f % 2 !== 0 && (f < m ? f++ : f--);
|
|
25582
|
+
const F = f - o, v = F - u * 2, S2 = c > v ? `${r.slice(0, v - 3)}...` : r, [B, b] = Xe(M2(S2), F, u, s?.titleAlign), A = q2(e, F - l * 2, { hard: true, trim: false });
|
|
25583
|
+
i2.write(`${d}${E[0]}${p.repeat(B)}${S2}${p.repeat(b)}${E[1]}
|
|
25584
|
+
`);
|
|
25585
|
+
const C = A.split(`
|
|
25586
|
+
`);
|
|
25587
|
+
for (const _2 of C) {
|
|
25588
|
+
const [D2, T2] = Xe(M2(_2), F, l, s?.contentAlign);
|
|
25589
|
+
i2.write(`${d}${y2}${" ".repeat(D2)}${_2}${" ".repeat(T2)}${y2}
|
|
25590
|
+
`);
|
|
25591
|
+
}
|
|
25592
|
+
i2.write(`${d}${E[2]}${p.repeat(F)}${E[3]}
|
|
25593
|
+
`);
|
|
25342
25594
|
}, Mt2 = (e) => {
|
|
25343
25595
|
const r = e.active ?? "Yes", s = e.inactive ?? "No";
|
|
25344
25596
|
return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
|
|
@@ -25357,7 +25609,93 @@ ${import_picocolors2.default.cyan(x2)}
|
|
|
25357
25609
|
`;
|
|
25358
25610
|
}
|
|
25359
25611
|
} }).prompt();
|
|
25360
|
-
},
|
|
25612
|
+
}, Rt = async (e, r) => {
|
|
25613
|
+
const s = {}, i2 = Object.keys(e);
|
|
25614
|
+
for (const n of i2) {
|
|
25615
|
+
const o = e[n], u = await o({ results: s })?.catch((l) => {
|
|
25616
|
+
throw l;
|
|
25617
|
+
});
|
|
25618
|
+
if (typeof r?.onCancel == "function" && Ct(u)) {
|
|
25619
|
+
s[n] = "canceled", r.onCancel({ results: s });
|
|
25620
|
+
continue;
|
|
25621
|
+
}
|
|
25622
|
+
s[n] = u;
|
|
25623
|
+
}
|
|
25624
|
+
return s;
|
|
25625
|
+
}, Ot = (e) => {
|
|
25626
|
+
const { selectableGroups: r = true, groupSpacing: s = 0 } = e, i2 = (o, u, l = []) => {
|
|
25627
|
+
const a = o.label ?? String(o.value), d = typeof o.group == "string", g = d && (l[l.indexOf(o) + 1] ?? { group: true }), E = d && g && g.group === true, p = d ? r ? `${E ? x2 : h} ` : " " : "";
|
|
25628
|
+
let y2 = "";
|
|
25629
|
+
if (s > 0 && !d) {
|
|
25630
|
+
const c = `
|
|
25631
|
+
${import_picocolors2.default.cyan(h)}`;
|
|
25632
|
+
y2 = `${c.repeat(s - 1)}${c} `;
|
|
25633
|
+
}
|
|
25634
|
+
if (u === "active")
|
|
25635
|
+
return `${y2}${import_picocolors2.default.dim(p)}${import_picocolors2.default.cyan(te)} ${a}${o.hint ? ` ${import_picocolors2.default.dim(`(${o.hint})`)}` : ""}`;
|
|
25636
|
+
if (u === "group-active")
|
|
25637
|
+
return `${y2}${p}${import_picocolors2.default.cyan(te)} ${import_picocolors2.default.dim(a)}`;
|
|
25638
|
+
if (u === "group-active-selected")
|
|
25639
|
+
return `${y2}${p}${import_picocolors2.default.green(G2)} ${import_picocolors2.default.dim(a)}`;
|
|
25640
|
+
if (u === "selected") {
|
|
25641
|
+
const c = d || r ? import_picocolors2.default.green(G2) : "";
|
|
25642
|
+
return `${y2}${import_picocolors2.default.dim(p)}${c} ${import_picocolors2.default.dim(a)}${o.hint ? ` ${import_picocolors2.default.dim(`(${o.hint})`)}` : ""}`;
|
|
25643
|
+
}
|
|
25644
|
+
if (u === "cancelled")
|
|
25645
|
+
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(a))}`;
|
|
25646
|
+
if (u === "active-selected")
|
|
25647
|
+
return `${y2}${import_picocolors2.default.dim(p)}${import_picocolors2.default.green(G2)} ${a}${o.hint ? ` ${import_picocolors2.default.dim(`(${o.hint})`)}` : ""}`;
|
|
25648
|
+
if (u === "submitted")
|
|
25649
|
+
return `${import_picocolors2.default.dim(a)}`;
|
|
25650
|
+
const $2 = d || r ? import_picocolors2.default.dim(z2) : "";
|
|
25651
|
+
return `${y2}${import_picocolors2.default.dim(p)}${$2} ${import_picocolors2.default.dim(a)}`;
|
|
25652
|
+
}, n = e.required ?? true;
|
|
25653
|
+
return new yt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: n, cursorAt: e.cursorAt, selectableGroups: r, validate(o) {
|
|
25654
|
+
if (n && (o === undefined || o.length === 0))
|
|
25655
|
+
return `Please select at least one option.
|
|
25656
|
+
${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
|
|
25657
|
+
}, render() {
|
|
25658
|
+
const o = `${import_picocolors2.default.gray(h)}
|
|
25659
|
+
${N2(this.state)} ${e.message}
|
|
25660
|
+
`, u = this.value ?? [];
|
|
25661
|
+
switch (this.state) {
|
|
25662
|
+
case "submit": {
|
|
25663
|
+
const l = this.options.filter(({ value: d }) => u.includes(d)).map((d) => i2(d, "submitted")), a = l.length === 0 ? "" : ` ${l.join(import_picocolors2.default.dim(", "))}`;
|
|
25664
|
+
return `${o}${import_picocolors2.default.gray(h)}${a}`;
|
|
25665
|
+
}
|
|
25666
|
+
case "cancel": {
|
|
25667
|
+
const l = this.options.filter(({ value: a }) => u.includes(a)).map((a) => i2(a, "cancelled")).join(import_picocolors2.default.dim(", "));
|
|
25668
|
+
return `${o}${import_picocolors2.default.gray(h)} ${l.trim() ? `${l}
|
|
25669
|
+
${import_picocolors2.default.gray(h)}` : ""}`;
|
|
25670
|
+
}
|
|
25671
|
+
case "error": {
|
|
25672
|
+
const l = this.error.split(`
|
|
25673
|
+
`).map((a, d) => d === 0 ? `${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow(a)}` : ` ${a}`).join(`
|
|
25674
|
+
`);
|
|
25675
|
+
return `${o}${import_picocolors2.default.yellow(h)} ${this.options.map((a, d, g) => {
|
|
25676
|
+
const E = u.includes(a.value) || a.group === true && this.isGroupSelected(`${a.value}`), p = d === this.cursor;
|
|
25677
|
+
return !p && typeof a.group == "string" && this.options[this.cursor].value === a.group ? i2(a, E ? "group-active-selected" : "group-active", g) : p && E ? i2(a, "active-selected", g) : E ? i2(a, "selected", g) : i2(a, p ? "active" : "inactive", g);
|
|
25678
|
+
}).join(`
|
|
25679
|
+
${import_picocolors2.default.yellow(h)} `)}
|
|
25680
|
+
${l}
|
|
25681
|
+
`;
|
|
25682
|
+
}
|
|
25683
|
+
default: {
|
|
25684
|
+
const l = this.options.map((d, g, E) => {
|
|
25685
|
+
const p = u.includes(d.value) || d.group === true && this.isGroupSelected(`${d.value}`), y2 = g === this.cursor, $2 = !y2 && typeof d.group == "string" && this.options[this.cursor].value === d.group;
|
|
25686
|
+
let c = "";
|
|
25687
|
+
return $2 ? c = i2(d, p ? "group-active-selected" : "group-active", E) : y2 && p ? c = i2(d, "active-selected", E) : p ? c = i2(d, "selected", E) : c = i2(d, y2 ? "active" : "inactive", E), `${g !== 0 && !c.startsWith(`
|
|
25688
|
+
`) ? " " : ""}${c}`;
|
|
25689
|
+
}).join(`
|
|
25690
|
+
${import_picocolors2.default.cyan(h)}`), a = l.startsWith(`
|
|
25691
|
+
`) ? "" : " ";
|
|
25692
|
+
return `${o}${import_picocolors2.default.cyan(h)}${a}${l}
|
|
25693
|
+
${import_picocolors2.default.cyan(x2)}
|
|
25694
|
+
`;
|
|
25695
|
+
}
|
|
25696
|
+
}
|
|
25697
|
+
} }).prompt();
|
|
25698
|
+
}, R2, Pt = (e = "", r) => {
|
|
25361
25699
|
(r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(x2)} ${import_picocolors2.default.red(e)}
|
|
25362
25700
|
|
|
25363
25701
|
`);
|
|
@@ -25439,6 +25777,55 @@ ${import_picocolors2.default.cyan(x2)}
|
|
|
25439
25777
|
${d}
|
|
25440
25778
|
${import_picocolors2.default.gray(E + se.repeat(a + 2) + me)}
|
|
25441
25779
|
`);
|
|
25780
|
+
}, Gt = (e) => new Lt({ validate: e.validate, mask: e.mask ?? Pe, signal: e.signal, input: e.input, output: e.output, render() {
|
|
25781
|
+
const r = `${import_picocolors2.default.gray(h)}
|
|
25782
|
+
${N2(this.state)} ${e.message}
|
|
25783
|
+
`, s = this.userInputWithCursor, i2 = this.masked;
|
|
25784
|
+
switch (this.state) {
|
|
25785
|
+
case "error": {
|
|
25786
|
+
const n = i2 ? ` ${i2}` : "";
|
|
25787
|
+
return e.clearOnError && this.clear(), `${r.trim()}
|
|
25788
|
+
${import_picocolors2.default.yellow(h)}${n}
|
|
25789
|
+
${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow(this.error)}
|
|
25790
|
+
`;
|
|
25791
|
+
}
|
|
25792
|
+
case "submit": {
|
|
25793
|
+
const n = i2 ? ` ${import_picocolors2.default.dim(i2)}` : "";
|
|
25794
|
+
return `${r}${import_picocolors2.default.gray(h)}${n}`;
|
|
25795
|
+
}
|
|
25796
|
+
case "cancel": {
|
|
25797
|
+
const n = i2 ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i2))}` : "";
|
|
25798
|
+
return `${r}${import_picocolors2.default.gray(h)}${n}${i2 ? `
|
|
25799
|
+
${import_picocolors2.default.gray(h)}` : ""}`;
|
|
25800
|
+
}
|
|
25801
|
+
default:
|
|
25802
|
+
return `${r}${import_picocolors2.default.cyan(h)} ${s}
|
|
25803
|
+
${import_picocolors2.default.cyan(x2)}
|
|
25804
|
+
`;
|
|
25805
|
+
}
|
|
25806
|
+
} }).prompt(), Ht = (e) => {
|
|
25807
|
+
const r = e.validate;
|
|
25808
|
+
return Je({ ...e, initialUserInput: e.initialValue ?? e.root ?? process.cwd(), maxItems: 5, validate(s) {
|
|
25809
|
+
if (!Array.isArray(s)) {
|
|
25810
|
+
if (!s)
|
|
25811
|
+
return "Please select a path";
|
|
25812
|
+
if (r)
|
|
25813
|
+
return r(s);
|
|
25814
|
+
}
|
|
25815
|
+
}, options() {
|
|
25816
|
+
const s = this.userInput;
|
|
25817
|
+
if (s === "")
|
|
25818
|
+
return [];
|
|
25819
|
+
try {
|
|
25820
|
+
let i2;
|
|
25821
|
+
return dt2(s) ? be(s).isDirectory() ? i2 = s : i2 = xe(s) : i2 = xe(s), ct2(i2).map((n) => {
|
|
25822
|
+
const o = $t2(i2, n), u = be(o);
|
|
25823
|
+
return { name: n, path: o, isDirectory: u.isDirectory() };
|
|
25824
|
+
}).filter(({ path: n, isDirectory: o }) => n.startsWith(s) && (e.directory || !o)).map((n) => ({ value: n.path }));
|
|
25825
|
+
} catch {
|
|
25826
|
+
return [];
|
|
25827
|
+
}
|
|
25828
|
+
} });
|
|
25442
25829
|
}, Ut, Ie = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i2, errorMessage: n, frames: o = ee ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...a } = {}) => {
|
|
25443
25830
|
const d = ue();
|
|
25444
25831
|
let g, E, p = false, y2 = false, $2 = "", c, m = performance.now();
|
|
@@ -25538,7 +25925,119 @@ ${import_picocolors2.default.cyan(x2)}
|
|
|
25538
25925
|
}
|
|
25539
25926
|
}
|
|
25540
25927
|
} }).prompt();
|
|
25541
|
-
},
|
|
25928
|
+
}, Jt = (e) => {
|
|
25929
|
+
const r = (s, i2 = "inactive") => {
|
|
25930
|
+
const n = s.label ?? String(s.value);
|
|
25931
|
+
return i2 === "selected" ? `${import_picocolors2.default.dim(n)}` : i2 === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}` : i2 === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${s.value} `))} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${s.value} `)))} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
|
|
25932
|
+
};
|
|
25933
|
+
return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, caseSensitive: e.caseSensitive, render() {
|
|
25934
|
+
const s = `${import_picocolors2.default.gray(h)}
|
|
25935
|
+
${N2(this.state)} ${e.message}
|
|
25936
|
+
`;
|
|
25937
|
+
switch (this.state) {
|
|
25938
|
+
case "submit": {
|
|
25939
|
+
const i2 = `${import_picocolors2.default.gray(h)} `, n = this.options.find((u) => u.value === this.value) ?? e.options[0], o = Bt(e.output, r(n, "selected"), i2);
|
|
25940
|
+
return `${s}${o}`;
|
|
25941
|
+
}
|
|
25942
|
+
case "cancel": {
|
|
25943
|
+
const i2 = `${import_picocolors2.default.gray(h)} `, n = Bt(e.output, r(this.options[0], "cancelled"), i2);
|
|
25944
|
+
return `${s}${n}
|
|
25945
|
+
${import_picocolors2.default.gray(h)}`;
|
|
25946
|
+
}
|
|
25947
|
+
default: {
|
|
25948
|
+
const i2 = `${import_picocolors2.default.cyan(h)} `, n = this.options.map((o, u) => Bt(e.output, r(o, u === this.cursor ? "active" : "inactive"), i2)).join(`
|
|
25949
|
+
`);
|
|
25950
|
+
return `${s}${n}
|
|
25951
|
+
${import_picocolors2.default.cyan(x2)}
|
|
25952
|
+
`;
|
|
25953
|
+
}
|
|
25954
|
+
}
|
|
25955
|
+
} }).prompt();
|
|
25956
|
+
}, ze, H2, Xt = async (e, r) => {
|
|
25957
|
+
for (const s of e) {
|
|
25958
|
+
if (s.enabled === false)
|
|
25959
|
+
continue;
|
|
25960
|
+
const i2 = Ie(r);
|
|
25961
|
+
i2.start(s.title);
|
|
25962
|
+
const n = await s.task(i2.message);
|
|
25963
|
+
i2.stop(n || s.title);
|
|
25964
|
+
}
|
|
25965
|
+
}, Yt = (e) => e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, ""), zt = (e) => {
|
|
25966
|
+
const r = e.output ?? process.stdout, s = rt(r), i2 = import_picocolors2.default.gray(h), n = e.spacing ?? 1, o = 3, u = e.retainLog === true, l = !ue() && Te(r);
|
|
25967
|
+
r.write(`${i2}
|
|
25968
|
+
`), r.write(`${import_picocolors2.default.green(k2)} ${e.title}
|
|
25969
|
+
`);
|
|
25970
|
+
for (let m = 0;m < n; m++)
|
|
25971
|
+
r.write(`${i2}
|
|
25972
|
+
`);
|
|
25973
|
+
const a = [{ value: "", full: "" }];
|
|
25974
|
+
let d = false;
|
|
25975
|
+
const g = (m) => {
|
|
25976
|
+
if (a.length === 0)
|
|
25977
|
+
return;
|
|
25978
|
+
let f = 0;
|
|
25979
|
+
m && (f += n + 2);
|
|
25980
|
+
for (const F of a) {
|
|
25981
|
+
const { value: v, result: S2 } = F;
|
|
25982
|
+
let B = S2?.message ?? v;
|
|
25983
|
+
if (B.length === 0)
|
|
25984
|
+
continue;
|
|
25985
|
+
S2 === undefined && F.header !== undefined && F.header !== "" && (B += `
|
|
25986
|
+
${F.header}`);
|
|
25987
|
+
const b = B.split(`
|
|
25988
|
+
`).reduce((A, C) => C === "" ? A + 1 : A + Math.ceil((C.length + o) / s), 0);
|
|
25989
|
+
f += b;
|
|
25990
|
+
}
|
|
25991
|
+
f > 0 && (f += 1, r.write(import_sisteransi2.erase.lines(f)));
|
|
25992
|
+
}, E = (m, f, F) => {
|
|
25993
|
+
const v = F ? `${m.full}
|
|
25994
|
+
${m.value}` : m.value;
|
|
25995
|
+
m.header !== undefined && m.header !== "" && R2.message(m.header.split(`
|
|
25996
|
+
`).map(import_picocolors2.default.bold), { output: r, secondarySymbol: i2, symbol: i2, spacing: 0 }), R2.message(v.split(`
|
|
25997
|
+
`).map(import_picocolors2.default.dim), { output: r, secondarySymbol: i2, symbol: i2, spacing: f ?? n });
|
|
25998
|
+
}, p = () => {
|
|
25999
|
+
for (const m of a) {
|
|
26000
|
+
const { header: f, value: F, full: v } = m;
|
|
26001
|
+
(f === undefined || f.length === 0) && F.length === 0 || E(m, undefined, u === true && v.length > 0);
|
|
26002
|
+
}
|
|
26003
|
+
}, y2 = (m, f, F) => {
|
|
26004
|
+
if (g(false), (F?.raw !== true || !d) && m.value !== "" && (m.value += `
|
|
26005
|
+
`), m.value += Yt(f), d = F?.raw === true, e.limit !== undefined) {
|
|
26006
|
+
const v = m.value.split(`
|
|
26007
|
+
`), S2 = v.length - e.limit;
|
|
26008
|
+
if (S2 > 0) {
|
|
26009
|
+
const B = v.splice(0, S2);
|
|
26010
|
+
u && (m.full += (m.full === "" ? "" : `
|
|
26011
|
+
`) + B.join(`
|
|
26012
|
+
`));
|
|
26013
|
+
}
|
|
26014
|
+
m.value = v.join(`
|
|
26015
|
+
`);
|
|
26016
|
+
}
|
|
26017
|
+
l && $2();
|
|
26018
|
+
}, $2 = () => {
|
|
26019
|
+
for (const m of a)
|
|
26020
|
+
m.result ? m.result.status === "error" ? R2.error(m.result.message, { output: r, secondarySymbol: i2, spacing: 0 }) : R2.success(m.result.message, { output: r, secondarySymbol: i2, spacing: 0 }) : m.value !== "" && E(m, 0);
|
|
26021
|
+
}, c = (m, f) => {
|
|
26022
|
+
g(false), m.result = f, l && $2();
|
|
26023
|
+
};
|
|
26024
|
+
return { message(m, f) {
|
|
26025
|
+
y2(a[0], m, f);
|
|
26026
|
+
}, group(m) {
|
|
26027
|
+
const f = { header: m, value: "", full: "" };
|
|
26028
|
+
return a.push(f), { message(F, v) {
|
|
26029
|
+
y2(f, F, v);
|
|
26030
|
+
}, error(F) {
|
|
26031
|
+
c(f, { status: "error", message: F });
|
|
26032
|
+
}, success(F) {
|
|
26033
|
+
c(f, { status: "success", message: F });
|
|
26034
|
+
} };
|
|
26035
|
+
}, error(m, f) {
|
|
26036
|
+
g(true), R2.error(m, { output: r, secondarySymbol: i2, spacing: 1 }), f?.showLog !== false && p(), a.splice(1, a.length - 1), a[0].value = "", a[0].full = "";
|
|
26037
|
+
}, success(m, f) {
|
|
26038
|
+
g(true), R2.success(m, { output: r, secondarySymbol: i2, spacing: 1 }), f?.showLog === true && p(), a.splice(1, a.length - 1), a[0].value = "", a[0].full = "";
|
|
26039
|
+
} };
|
|
26040
|
+
}, Qt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
|
|
25542
26041
|
const r = (e?.withGuide ?? _.withGuide) !== false, s = `${`${r ? `${import_picocolors2.default.gray(h)}
|
|
25543
26042
|
` : ""}${N2(this.state)} `}${e.message}
|
|
25544
26043
|
`, i2 = e.placeholder ? import_picocolors2.default.inverse(e.placeholder[0]) + import_picocolors2.default.dim(e.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), n = this.userInput ? this.userInputWithCursor : i2, o = this.value ?? "";
|
|
@@ -25608,9 +26107,55 @@ var init_dist2 = __esm(() => {
|
|
|
25608
26107
|
yt2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
25609
26108
|
we = `${vt2}8;;`;
|
|
25610
26109
|
Ge = new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${we}(?<uri>.*)${Ce})`, "y");
|
|
26110
|
+
xt2 = [We, he, pe, me];
|
|
26111
|
+
_t2 = [$e, Re, x2, Oe];
|
|
26112
|
+
R2 = { message: (e = [], { symbol: r = import_picocolors2.default.gray(h), secondarySymbol: s = import_picocolors2.default.gray(h), output: i2 = process.stdout, spacing: n = 1, withGuide: o } = {}) => {
|
|
26113
|
+
const u = [], l = (o ?? _.withGuide) !== false, a = l ? s : "", d = l ? `${r} ` : "", g = l ? `${s} ` : "";
|
|
26114
|
+
for (let p = 0;p < n; p++)
|
|
26115
|
+
u.push(a);
|
|
26116
|
+
const E = Array.isArray(e) ? e : e.split(`
|
|
26117
|
+
`);
|
|
26118
|
+
if (E.length > 0) {
|
|
26119
|
+
const [p, ...y2] = E;
|
|
26120
|
+
p.length > 0 ? u.push(`${d}${p}`) : u.push(l ? r : "");
|
|
26121
|
+
for (const $2 of y2)
|
|
26122
|
+
$2.length > 0 ? u.push(`${g}${$2}`) : u.push(l ? s : "");
|
|
26123
|
+
}
|
|
26124
|
+
i2.write(`${u.join(`
|
|
26125
|
+
`)}
|
|
26126
|
+
`);
|
|
26127
|
+
}, info: (e, r) => {
|
|
26128
|
+
R2.message(e, { ...r, symbol: import_picocolors2.default.blue(ge) });
|
|
26129
|
+
}, success: (e, r) => {
|
|
26130
|
+
R2.message(e, { ...r, symbol: import_picocolors2.default.green(fe) });
|
|
26131
|
+
}, step: (e, r) => {
|
|
26132
|
+
R2.message(e, { ...r, symbol: import_picocolors2.default.green(k2) });
|
|
26133
|
+
}, warn: (e, r) => {
|
|
26134
|
+
R2.message(e, { ...r, symbol: import_picocolors2.default.yellow(Fe) });
|
|
26135
|
+
}, warning: (e, r) => {
|
|
26136
|
+
R2.warn(e, r);
|
|
26137
|
+
}, error: (e, r) => {
|
|
26138
|
+
R2.message(e, { ...r, symbol: import_picocolors2.default.red(ye) });
|
|
26139
|
+
} };
|
|
25611
26140
|
Ut = import_picocolors2.default.magenta;
|
|
25612
26141
|
Ye = { light: w2("─", "-"), heavy: w2("━", "="), block: w2("█", "#") };
|
|
25613
26142
|
ze = `${import_picocolors2.default.gray(h)} `;
|
|
26143
|
+
H2 = { message: async (e, { symbol: r = import_picocolors2.default.gray(h) } = {}) => {
|
|
26144
|
+
process.stdout.write(`${import_picocolors2.default.gray(h)}
|
|
26145
|
+
${r} `);
|
|
26146
|
+
let s = 3;
|
|
26147
|
+
for await (let i2 of e) {
|
|
26148
|
+
i2 = i2.replace(/\n/g, `
|
|
26149
|
+
${ze}`), i2.includes(`
|
|
26150
|
+
`) && (s = 3 + le(i2.slice(i2.lastIndexOf(`
|
|
26151
|
+
`))).length);
|
|
26152
|
+
const n = le(i2).length;
|
|
26153
|
+
s + n < process.stdout.columns ? (s += n, process.stdout.write(i2)) : (process.stdout.write(`
|
|
26154
|
+
${ze}${i2.trimStart()}`), s = 3 + le(i2.trimStart()).length);
|
|
26155
|
+
}
|
|
26156
|
+
process.stdout.write(`
|
|
26157
|
+
`);
|
|
26158
|
+
}, info: (e) => H2.message(e, { symbol: import_picocolors2.default.blue(ge) }), success: (e) => H2.message(e, { symbol: import_picocolors2.default.green(fe) }), step: (e) => H2.message(e, { symbol: import_picocolors2.default.green(k2) }), warn: (e) => H2.message(e, { symbol: import_picocolors2.default.yellow(Fe) }), warning: (e) => H2.warn(e), error: (e) => H2.message(e, { symbol: import_picocolors2.default.red(ye) }) };
|
|
25614
26159
|
});
|
|
25615
26160
|
|
|
25616
26161
|
// src/cli/tui/cache.ts
|
|
@@ -25728,44 +26273,6 @@ var init_context = __esm(() => {
|
|
|
25728
26273
|
init_marketplace();
|
|
25729
26274
|
});
|
|
25730
26275
|
|
|
25731
|
-
// src/cli/tui/prompts.ts
|
|
25732
|
-
function eraseCancelledPrompt(lines = 2) {
|
|
25733
|
-
process.stdout.write(import_sisteransi3.cursor.move(0, -lines) + import_sisteransi3.erase.down());
|
|
25734
|
-
}
|
|
25735
|
-
async function select(opts) {
|
|
25736
|
-
const result = await qt(opts);
|
|
25737
|
-
if (Ct(result)) {
|
|
25738
|
-
eraseCancelledPrompt();
|
|
25739
|
-
}
|
|
25740
|
-
return result;
|
|
25741
|
-
}
|
|
25742
|
-
async function multiselect(opts) {
|
|
25743
|
-
const result = await Lt2(opts);
|
|
25744
|
-
if (Ct(result)) {
|
|
25745
|
-
eraseCancelledPrompt();
|
|
25746
|
-
}
|
|
25747
|
-
return result;
|
|
25748
|
-
}
|
|
25749
|
-
async function text(opts) {
|
|
25750
|
-
const result = await Qt(opts);
|
|
25751
|
-
if (Ct(result)) {
|
|
25752
|
-
eraseCancelledPrompt();
|
|
25753
|
-
}
|
|
25754
|
-
return result;
|
|
25755
|
-
}
|
|
25756
|
-
async function confirm(opts) {
|
|
25757
|
-
const result = await Mt2(opts);
|
|
25758
|
-
if (Ct(result)) {
|
|
25759
|
-
eraseCancelledPrompt();
|
|
25760
|
-
}
|
|
25761
|
-
return result;
|
|
25762
|
-
}
|
|
25763
|
-
var import_sisteransi3;
|
|
25764
|
-
var init_prompts = __esm(() => {
|
|
25765
|
-
init_dist2();
|
|
25766
|
-
import_sisteransi3 = __toESM(require_src2(), 1);
|
|
25767
|
-
});
|
|
25768
|
-
|
|
25769
26276
|
// src/cli/tui/actions/init.ts
|
|
25770
26277
|
async function runInit() {
|
|
25771
26278
|
try {
|
|
@@ -25801,10 +26308,11 @@ async function runInit() {
|
|
|
25801
26308
|
kt2(message, "Error");
|
|
25802
26309
|
}
|
|
25803
26310
|
}
|
|
26311
|
+
var text;
|
|
25804
26312
|
var init_init = __esm(() => {
|
|
25805
26313
|
init_dist2();
|
|
25806
26314
|
init_workspace();
|
|
25807
|
-
|
|
26315
|
+
({ text } = exports_dist);
|
|
25808
26316
|
});
|
|
25809
26317
|
|
|
25810
26318
|
// src/cli/tui/actions/sync.ts
|
|
@@ -25984,11 +26492,12 @@ Use "Manage marketplaces" to add one first.`, "Marketplace");
|
|
|
25984
26492
|
kt2("No plugins found in any marketplace.", "Plugins");
|
|
25985
26493
|
return;
|
|
25986
26494
|
}
|
|
26495
|
+
allPlugins.push({ label: "Back", value: "__back__" });
|
|
25987
26496
|
const selected = await select({
|
|
25988
26497
|
message: "Select a plugin to install",
|
|
25989
26498
|
options: allPlugins
|
|
25990
26499
|
});
|
|
25991
|
-
if (Ct(selected)) {
|
|
26500
|
+
if (Ct(selected) || selected === "__back__") {
|
|
25992
26501
|
return;
|
|
25993
26502
|
}
|
|
25994
26503
|
await installSelectedPlugin(selected, context, cache);
|
|
@@ -26013,7 +26522,7 @@ async function runManagePlugins(context, cache) {
|
|
|
26013
26522
|
value: plugin.source
|
|
26014
26523
|
}));
|
|
26015
26524
|
const selected = await multiselect({
|
|
26016
|
-
message: "Select plugins to remove",
|
|
26525
|
+
message: "Select plugins to remove (submit empty to go back)",
|
|
26017
26526
|
options: options2,
|
|
26018
26527
|
required: false
|
|
26019
26528
|
});
|
|
@@ -26087,7 +26596,7 @@ async function runBrowseMarketplaces(context, cache) {
|
|
|
26087
26596
|
return;
|
|
26088
26597
|
}
|
|
26089
26598
|
if (selected === "__add__") {
|
|
26090
|
-
const source = await
|
|
26599
|
+
const source = await text2({
|
|
26091
26600
|
message: "Marketplace source (GitHub URL, owner/repo, or name)",
|
|
26092
26601
|
placeholder: "e.g., anthropics/claude-plugins-official"
|
|
26093
26602
|
});
|
|
@@ -26194,6 +26703,7 @@ async function runMarketplaceDetail(marketplaceName, context, cache) {
|
|
|
26194
26703
|
}
|
|
26195
26704
|
}
|
|
26196
26705
|
}
|
|
26706
|
+
var select, multiselect, text2, confirm;
|
|
26197
26707
|
var init_plugins = __esm(() => {
|
|
26198
26708
|
init_dist2();
|
|
26199
26709
|
init_workspace_modify();
|
|
@@ -26201,13 +26711,13 @@ var init_plugins = __esm(() => {
|
|
|
26201
26711
|
init_sync();
|
|
26202
26712
|
init_marketplace();
|
|
26203
26713
|
init_status();
|
|
26204
|
-
|
|
26714
|
+
({ select, multiselect, text: text2, confirm } = exports_dist);
|
|
26205
26715
|
});
|
|
26206
26716
|
|
|
26207
26717
|
// src/cli/tui/actions/update.ts
|
|
26208
26718
|
async function runUpdate() {
|
|
26209
26719
|
try {
|
|
26210
|
-
const confirmed = await
|
|
26720
|
+
const confirmed = await confirm2({
|
|
26211
26721
|
message: "Check for and install updates?"
|
|
26212
26722
|
});
|
|
26213
26723
|
if (Ct(confirmed) || !confirmed) {
|
|
@@ -26226,10 +26736,11 @@ async function runUpdate() {
|
|
|
26226
26736
|
kt2(message, "Error");
|
|
26227
26737
|
}
|
|
26228
26738
|
}
|
|
26739
|
+
var confirm2;
|
|
26229
26740
|
var init_update = __esm(() => {
|
|
26230
26741
|
init_dist2();
|
|
26231
26742
|
init_execa();
|
|
26232
|
-
|
|
26743
|
+
({ confirm: confirm2 } = exports_dist);
|
|
26233
26744
|
});
|
|
26234
26745
|
|
|
26235
26746
|
// src/cli/tui/wizard.ts
|
|
@@ -26293,7 +26804,7 @@ async function runWizard() {
|
|
|
26293
26804
|
let context = await getTuiContext(process.cwd(), cache);
|
|
26294
26805
|
while (true) {
|
|
26295
26806
|
kt2(buildSummary(context), "Workspace");
|
|
26296
|
-
const action = await
|
|
26807
|
+
const action = await select2({
|
|
26297
26808
|
message: "What would you like to do?",
|
|
26298
26809
|
options: buildMenuOptions(context)
|
|
26299
26810
|
});
|
|
@@ -26333,17 +26844,20 @@ async function runWizard() {
|
|
|
26333
26844
|
context = await getTuiContext(process.cwd(), cache);
|
|
26334
26845
|
}
|
|
26335
26846
|
}
|
|
26847
|
+
var select2;
|
|
26336
26848
|
var init_wizard = __esm(() => {
|
|
26337
26849
|
init_dist2();
|
|
26850
|
+
init_dist();
|
|
26338
26851
|
init_source();
|
|
26339
26852
|
init_package();
|
|
26340
26853
|
init_context();
|
|
26341
|
-
init_prompts();
|
|
26342
26854
|
init_init();
|
|
26343
26855
|
init_sync2();
|
|
26344
26856
|
init_status2();
|
|
26345
26857
|
init_plugins();
|
|
26346
26858
|
init_update();
|
|
26859
|
+
({ select: select2 } = exports_dist);
|
|
26860
|
+
_.aliases.delete("escape");
|
|
26347
26861
|
});
|
|
26348
26862
|
|
|
26349
26863
|
// src/cli/index.ts
|