spawnpack 0.1.15 → 0.1.17

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/spawnpack.js CHANGED
@@ -160,81 +160,11 @@ var require_picocolors = __commonJS((exports, module) => {
160
160
  module.exports.createColors = createColors;
161
161
  });
162
162
 
163
- // node_modules/picocolors/picocolors.js
164
- var require_picocolors2 = __commonJS((exports, module) => {
165
- var p2 = process || {};
166
- var argv = p2.argv || [];
167
- var env = p2.env || {};
168
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
169
- var formatter = (open, close, replace = open) => (input) => {
170
- let string = "" + input, index = string.indexOf(close, open.length);
171
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
172
- };
173
- var replaceClose = (string, close, replace, index) => {
174
- let result = "", cursor = 0;
175
- do {
176
- result += string.substring(cursor, index) + replace;
177
- cursor = index + close.length;
178
- index = string.indexOf(close, cursor);
179
- } while (~index);
180
- return result + string.substring(cursor);
181
- };
182
- var createColors = (enabled = isColorSupported) => {
183
- let f = enabled ? formatter : () => String;
184
- return {
185
- isColorSupported: enabled,
186
- reset: f("\x1B[0m", "\x1B[0m"),
187
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
188
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
189
- italic: f("\x1B[3m", "\x1B[23m"),
190
- underline: f("\x1B[4m", "\x1B[24m"),
191
- inverse: f("\x1B[7m", "\x1B[27m"),
192
- hidden: f("\x1B[8m", "\x1B[28m"),
193
- strikethrough: f("\x1B[9m", "\x1B[29m"),
194
- black: f("\x1B[30m", "\x1B[39m"),
195
- red: f("\x1B[31m", "\x1B[39m"),
196
- green: f("\x1B[32m", "\x1B[39m"),
197
- yellow: f("\x1B[33m", "\x1B[39m"),
198
- blue: f("\x1B[34m", "\x1B[39m"),
199
- magenta: f("\x1B[35m", "\x1B[39m"),
200
- cyan: f("\x1B[36m", "\x1B[39m"),
201
- white: f("\x1B[37m", "\x1B[39m"),
202
- gray: f("\x1B[90m", "\x1B[39m"),
203
- bgBlack: f("\x1B[40m", "\x1B[49m"),
204
- bgRed: f("\x1B[41m", "\x1B[49m"),
205
- bgGreen: f("\x1B[42m", "\x1B[49m"),
206
- bgYellow: f("\x1B[43m", "\x1B[49m"),
207
- bgBlue: f("\x1B[44m", "\x1B[49m"),
208
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
209
- bgCyan: f("\x1B[46m", "\x1B[49m"),
210
- bgWhite: f("\x1B[47m", "\x1B[49m"),
211
- blackBright: f("\x1B[90m", "\x1B[39m"),
212
- redBright: f("\x1B[91m", "\x1B[39m"),
213
- greenBright: f("\x1B[92m", "\x1B[39m"),
214
- yellowBright: f("\x1B[93m", "\x1B[39m"),
215
- blueBright: f("\x1B[94m", "\x1B[39m"),
216
- magentaBright: f("\x1B[95m", "\x1B[39m"),
217
- cyanBright: f("\x1B[96m", "\x1B[39m"),
218
- whiteBright: f("\x1B[97m", "\x1B[39m"),
219
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
220
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
221
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
222
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
223
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
224
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
225
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
226
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
227
- };
228
- };
229
- module.exports = createColors();
230
- module.exports.createColors = createColors;
231
- });
232
-
233
163
  // node_modules/@clack/core/dist/index.mjs
234
- import { styleText as y } from "node:util";
235
- import { stdout as S, stdin as $ } from "node:process";
236
- import * as _ from "node:readline";
237
- import P from "node:readline";
164
+ import { styleText as y } from "util";
165
+ import { stdout as S, stdin as $ } from "process";
166
+ import * as _ from "readline";
167
+ import P from "readline";
238
168
 
239
169
  // node_modules/fast-string-truncated-width/dist/utils.js
240
170
  var isAmbiguous = (x) => {
@@ -413,7 +343,7 @@ var dist_default2 = fastStringWidth;
413
343
 
414
344
  // node_modules/fast-wrap-ansi/lib/main.js
415
345
  var ESC = "\x1B";
416
- var CSI = "›";
346
+ var CSI = "\x9B";
417
347
  var END_CODE = 39;
418
348
  var ANSI_ESCAPE_BELL = "\x07";
419
349
  var ANSI_CSI = "[";
@@ -622,7 +552,7 @@ function wrapAnsi(string, columns, options) {
622
552
 
623
553
  // node_modules/@clack/core/dist/index.mjs
624
554
  var import_sisteransi = __toESM(require_src(), 1);
625
- import { ReadStream as D } from "node:tty";
555
+ import { ReadStream as D } from "tty";
626
556
  function d(r, t, e) {
627
557
  if (!e.some((o) => !o.disabled))
628
558
  return r;
@@ -847,7 +777,7 @@ var H = class extends p {
847
777
  if (!this.userInput)
848
778
  return y(["inverse", "hidden"], "_");
849
779
  if (this._cursor >= this.userInput.length)
850
- return `${this.userInput}█`;
780
+ return `${this.userInput}\u2588`;
851
781
  const t = this.userInput.slice(0, this._cursor), [e, ...s] = this.userInput.slice(this._cursor);
852
782
  return `${t}${y("inverse", e)}${s.join("")}`;
853
783
  }
@@ -1017,7 +947,7 @@ class et extends p {
1017
947
  }
1018
948
  }
1019
949
  #f(t, e) {
1020
- if (e?.name === "backspace" || e?.sequence === "" || e?.sequence === "\b" || t === "" || t === "\b") {
950
+ if (e?.name === "backspace" || e?.sequence === "\x7F" || e?.sequence === "\b" || t === "\x7F" || t === "\b") {
1021
951
  this.inlineError = "";
1022
952
  const s = this.#u();
1023
953
  if (!s)
@@ -1223,7 +1153,7 @@ class at extends p {
1223
1153
  return this.userInput;
1224
1154
  const t = this.userInput;
1225
1155
  if (this.cursor >= t.length)
1226
- return `${this.userInput}█`;
1156
+ return `${this.userInput}\u2588`;
1227
1157
  const e = t.slice(0, this.cursor), [s, ...i] = t.slice(this.cursor);
1228
1158
  return `${e}${y("inverse", s)}${i.join("")}`;
1229
1159
  }
@@ -1240,8 +1170,8 @@ class at extends p {
1240
1170
  }
1241
1171
 
1242
1172
  // node_modules/@clack/prompts/dist/index.mjs
1243
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
1244
- import P2 from "node:process";
1173
+ import { styleText as t, stripVTControlCharacters as ne } from "util";
1174
+ import P2 from "process";
1245
1175
  var import_sisteransi2 = __toESM(require_src(), 1);
1246
1176
  function Ze() {
1247
1177
  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";
@@ -1249,31 +1179,158 @@ function Ze() {
1249
1179
  var ee = Ze();
1250
1180
  var ae = () => process.env.CI === "true";
1251
1181
  var w2 = (e, i) => ee ? e : i;
1252
- var _e = w2("◆", "*");
1253
- var oe = w2("■", "x");
1254
- var ue = w2("▲", "x");
1255
- var F2 = w2("◇", "o");
1256
- var le = w2("┌", "T");
1257
- var d2 = w2("│", "|");
1258
- var E2 = w2("└", "—");
1259
- var Ie = w2("┐", "T");
1260
- var Ee = w2("┘", "—");
1261
- var z2 = w2("●", ">");
1262
- var H2 = w2("○", " ");
1263
- var te = w2("◻", "[•]");
1264
- var U = w2("◼", "[+]");
1265
- var J2 = w2("◻", "[ ]");
1266
- var xe = w2("▪", "•");
1267
- var se = w2("─", "-");
1268
- var ce = w2("╮", "+");
1269
- var Ge = w2("├", "+");
1270
- var $e = w2("╯", "+");
1271
- var de = w2("╰", "+");
1272
- var Oe = w2("╭", "+");
1273
- var he = w2("●", "•");
1274
- var pe = w2("◆", "*");
1275
- var me = w2("▲", "!");
1276
- var ge = w2("■", "x");
1182
+ var _e = w2("\u25C6", "*");
1183
+ var oe = w2("\u25A0", "x");
1184
+ var ue = w2("\u25B2", "x");
1185
+ var F2 = w2("\u25C7", "o");
1186
+ var le = w2("\u250C", "T");
1187
+ var d2 = w2("\u2502", "|");
1188
+ var E2 = w2("\u2514", "\u2014");
1189
+ var Ie = w2("\u2510", "T");
1190
+ var Ee = w2("\u2518", "\u2014");
1191
+ var z2 = w2("\u25CF", ">");
1192
+ var H2 = w2("\u25CB", " ");
1193
+ var te = w2("\u25FB", "[\u2022]");
1194
+ var U = w2("\u25FC", "[+]");
1195
+ var J2 = w2("\u25FB", "[ ]");
1196
+ var xe = w2("\u25AA", "\u2022");
1197
+ var se = w2("\u2500", "-");
1198
+ var ce = w2("\u256E", "+");
1199
+ var Ge = w2("\u251C", "+");
1200
+ var $e = w2("\u256F", "+");
1201
+ var de = w2("\u2570", "+");
1202
+ var Oe = w2("\u256D", "+");
1203
+ var he = w2("\u25CF", "\u2022");
1204
+ var pe = w2("\u25C6", "*");
1205
+ var me = w2("\u25B2", "!");
1206
+ var ge = w2("\u25A0", "x");
1207
+ var V2 = (e) => {
1208
+ switch (e) {
1209
+ case "initial":
1210
+ case "active":
1211
+ return t("cyan", _e);
1212
+ case "cancel":
1213
+ return t("red", oe);
1214
+ case "error":
1215
+ return t("yellow", ue);
1216
+ case "submit":
1217
+ return t("green", F2);
1218
+ }
1219
+ };
1220
+ var ye = (e) => {
1221
+ switch (e) {
1222
+ case "initial":
1223
+ case "active":
1224
+ return t("cyan", d2);
1225
+ case "cancel":
1226
+ return t("red", d2);
1227
+ case "error":
1228
+ return t("yellow", d2);
1229
+ case "submit":
1230
+ return t("green", d2);
1231
+ }
1232
+ };
1233
+ var et2 = (e, i, s, r, u2) => {
1234
+ let n = i, o = 0;
1235
+ for (let c2 = s;c2 < r; c2++) {
1236
+ const a = e[c2];
1237
+ if (n = n - a.length, o++, n <= u2)
1238
+ break;
1239
+ }
1240
+ return { lineCount: n, removals: o };
1241
+ };
1242
+ var Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
1243
+ const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
1244
+ let p2 = 0;
1245
+ e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
1246
+ let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
1247
+ const S2 = Math.min(p2 + y2, i.length), h = [];
1248
+ let f = 0;
1249
+ m && f++, g && f++;
1250
+ const v = p2 + (m ? 1 : 0), T2 = S2 - (g ? 1 : 0);
1251
+ for (let b = v;b < T2; b++) {
1252
+ const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
1253
+ `);
1254
+ h.push(x), f += x.length;
1255
+ }
1256
+ if (f > $2) {
1257
+ let b = 0, x = 0, G2 = f;
1258
+ const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
1259
+ m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
1260
+ }
1261
+ const C2 = [];
1262
+ m && C2.push(l);
1263
+ for (const b of h)
1264
+ for (const x of b)
1265
+ C2.push(x);
1266
+ return g && C2.push(l), C2;
1267
+ };
1268
+ var ot2 = (e) => {
1269
+ const i = e.active ?? "Yes", s = e.inactive ?? "No";
1270
+ return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
1271
+ const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
1272
+ ` : ""}${o}
1273
+ `, a = this.value ? i : s;
1274
+ switch (this.state) {
1275
+ case "submit": {
1276
+ const l = r ? `${t("gray", d2)} ` : "";
1277
+ return `${c2}${l}${t("dim", a)}`;
1278
+ }
1279
+ case "cancel": {
1280
+ const l = r ? `${t("gray", d2)} ` : "";
1281
+ return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
1282
+ ${t("gray", d2)}` : ""}`;
1283
+ }
1284
+ default: {
1285
+ const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
1286
+ return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
1287
+ ${t("cyan", d2)} ` : `
1288
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
1289
+ ${$2}
1290
+ `;
1291
+ }
1292
+ }
1293
+ } }).prompt();
1294
+ };
1295
+ var O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
1296
+ const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
1297
+ for (let p2 = 0;p2 < u2; p2++)
1298
+ o.push(a);
1299
+ const y2 = Array.isArray(e) ? e : e.split(`
1300
+ `);
1301
+ if (y2.length > 0) {
1302
+ const [p2, ...m] = y2;
1303
+ p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
1304
+ for (const g of m)
1305
+ g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
1306
+ }
1307
+ r.write(`${o.join(`
1308
+ `)}
1309
+ `);
1310
+ }, info: (e, i) => {
1311
+ O2.message(e, { ...i, symbol: t("blue", he) });
1312
+ }, success: (e, i) => {
1313
+ O2.message(e, { ...i, symbol: t("green", pe) });
1314
+ }, step: (e, i) => {
1315
+ O2.message(e, { ...i, symbol: t("green", F2) });
1316
+ }, warn: (e, i) => {
1317
+ O2.message(e, { ...i, symbol: t("yellow", me) });
1318
+ }, warning: (e, i) => {
1319
+ O2.warn(e, i);
1320
+ }, error: (e, i) => {
1321
+ O2.message(e, { ...i, symbol: t("red", ge) });
1322
+ } };
1323
+ var pt = (e = "", i) => {
1324
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
1325
+ s.write(`${r}${t("red", e)}
1326
+
1327
+ `);
1328
+ };
1329
+ var mt = (e = "", i) => {
1330
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
1331
+ s.write(`${r}${e}
1332
+ `);
1333
+ };
1277
1334
  var gt = (e = "", i) => {
1278
1335
  const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
1279
1336
  ${t("gray", E2)} ` : "";
@@ -1281,8 +1338,64 @@ ${t("gray", E2)} ` : "";
1281
1338
 
1282
1339
  `);
1283
1340
  };
1341
+ var Q2 = (e, i) => e.split(`
1342
+ `).map((s) => i(s)).join(`
1343
+ `);
1344
+ var yt = (e) => {
1345
+ const i = (r, u2) => {
1346
+ const n = r.label ?? String(r.value);
1347
+ return u2 === "disabled" ? `${t("gray", J2)} ${Q2(n, (o) => t(["strikethrough", "gray"], o))}${r.hint ? ` ${t("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u2 === "active" ? `${t("cyan", te)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "selected" ? `${t("green", U)} ${Q2(n, (o) => t("dim", o))}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "cancelled" ? `${Q2(n, (o) => t(["strikethrough", "dim"], o))}` : u2 === "active-selected" ? `${t("green", U)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "submitted" ? `${Q2(n, (o) => t("dim", o))}` : `${t("dim", J2)} ${Q2(n, (o) => t("dim", o))}`;
1348
+ }, s = e.required ?? true;
1349
+ return new it({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(r) {
1350
+ if (s && (r === undefined || r.length === 0))
1351
+ return `Please select at least one option.
1352
+ ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
1353
+ }, render() {
1354
+ const r = e.withGuide ?? u.withGuide, u2 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V2(this.state)} `), n = `${r ? `${t("gray", d2)}
1355
+ ` : ""}${u2}
1356
+ `, o = this.value ?? [], c2 = (a, l) => {
1357
+ if (a.disabled)
1358
+ return i(a, "disabled");
1359
+ const $2 = o.includes(a.value);
1360
+ return l && $2 ? i(a, "active-selected") : $2 ? i(a, "selected") : i(a, l ? "active" : "inactive");
1361
+ };
1362
+ switch (this.state) {
1363
+ case "submit": {
1364
+ const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "submitted")).join(t("dim", ", ")) || t("dim", "none"), l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
1365
+ return `${n}${l}`;
1366
+ }
1367
+ case "cancel": {
1368
+ const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "cancelled")).join(t("dim", ", "));
1369
+ if (a.trim() === "")
1370
+ return `${n}${t("gray", d2)}`;
1371
+ const l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
1372
+ return `${n}${l}${r ? `
1373
+ ${t("gray", d2)}` : ""}`;
1374
+ }
1375
+ case "error": {
1376
+ const a = r ? `${t("yellow", d2)} ` : "", l = this.error.split(`
1377
+ `).map((p2, m) => m === 0 ? `${r ? `${t("yellow", E2)} ` : ""}${t("yellow", p2)}` : ` ${p2}`).join(`
1378
+ `), $2 = n.split(`
1379
+ `).length, y2 = l.split(`
1380
+ `).length + 1;
1381
+ return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: $2 + y2, style: c2 }).join(`
1382
+ ${a}`)}
1383
+ ${l}
1384
+ `;
1385
+ }
1386
+ default: {
1387
+ const a = r ? `${t("cyan", d2)} ` : "", l = n.split(`
1388
+ `).length, $2 = r ? 2 : 1;
1389
+ return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: l + $2, style: c2 }).join(`
1390
+ ${a}`)}
1391
+ ${r ? t("cyan", E2) : ""}
1392
+ `;
1393
+ }
1394
+ }
1395
+ } }).prompt();
1396
+ };
1284
1397
  var Ct = (e) => t("magenta", e);
1285
- var fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
1398
+ var fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
1286
1399
  const l = ae();
1287
1400
  let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
1288
1401
  const f = O(s), v = a?.styleFrame ?? Ct, T2 = (_2) => {
@@ -1339,20 +1452,94 @@ var fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, canc
1339
1452
  return m;
1340
1453
  } };
1341
1454
  };
1342
- var Ve = { light: w2("─", "-"), heavy: w2("━", "="), block: w2("█", "#") };
1455
+ var Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1456
+ var re = (e, i) => e.includes(`
1457
+ `) ? e.split(`
1458
+ `).map((s) => i(s)).join(`
1459
+ `) : i(e);
1460
+ var _t = (e) => {
1461
+ const i = (s, r) => {
1462
+ const u2 = s.label ?? String(s.value);
1463
+ switch (r) {
1464
+ case "disabled":
1465
+ return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1466
+ case "selected":
1467
+ return `${re(u2, (n) => t("dim", n))}`;
1468
+ case "active":
1469
+ return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1470
+ case "cancelled":
1471
+ return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1472
+ default:
1473
+ return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1474
+ }
1475
+ };
1476
+ return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1477
+ const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
1478
+ ` : ""}${n}
1479
+ `;
1480
+ switch (this.state) {
1481
+ case "submit": {
1482
+ const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1483
+ return `${o}${a}`;
1484
+ }
1485
+ case "cancel": {
1486
+ const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1487
+ return `${o}${a}${s ? `
1488
+ ${t("gray", d2)}` : ""}`;
1489
+ }
1490
+ default: {
1491
+ const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1492
+ `).length, $2 = s ? 2 : 1;
1493
+ return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1494
+ ${c2}`)}
1495
+ ${a}
1496
+ `;
1497
+ }
1498
+ }
1499
+ } }).prompt();
1500
+ };
1343
1501
  var je = `${t("gray", d2)} `;
1344
-
1345
- // src/index.ts
1346
- var import_picocolors4 = __toESM(require_picocolors(), 1);
1347
-
1348
- // src/engine/generator.ts
1349
- import { mkdir, writeFile } from "node:fs/promises";
1350
- import { join } from "node:path";
1351
-
1352
- // src/config.ts
1353
- var VERSIONS = {
1354
- minEngineVersion: [1, 26, 0],
1355
- manifestFormat: 2,
1502
+ var Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
1503
+ const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t("gray", d2)}
1504
+ ` : ""}${V2(this.state)} `}${e.message}
1505
+ `, r = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
1506
+ switch (this.state) {
1507
+ case "error": {
1508
+ const o = this.error ? ` ${t("yellow", this.error)}` : "", c2 = i ? `${t("yellow", d2)} ` : "", a = i ? t("yellow", E2) : "";
1509
+ return `${s.trim()}
1510
+ ${c2}${u2}
1511
+ ${a}${o}
1512
+ `;
1513
+ }
1514
+ case "submit": {
1515
+ const o = n ? ` ${t("dim", n)}` : "", c2 = i ? t("gray", d2) : "";
1516
+ return `${s}${c2}${o}`;
1517
+ }
1518
+ case "cancel": {
1519
+ const o = n ? ` ${t(["strikethrough", "dim"], n)}` : "", c2 = i ? t("gray", d2) : "";
1520
+ return `${s}${c2}${o}${n.trim() ? `
1521
+ ${c2}` : ""}`;
1522
+ }
1523
+ default: {
1524
+ const o = i ? `${t("cyan", d2)} ` : "", c2 = i ? t("cyan", E2) : "";
1525
+ return `${s}${o}${u2}
1526
+ ${c2}
1527
+ `;
1528
+ }
1529
+ }
1530
+ } }).prompt();
1531
+
1532
+ // src/index.ts
1533
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
1534
+
1535
+ // src/engine/generator.ts
1536
+ import { mkdir, writeFile } from "fs/promises";
1537
+ import { join } from "path";
1538
+
1539
+ // src/config.ts
1540
+ var VERSIONS = {
1541
+ minEngineVersion: [1, 26, 0],
1542
+ manifestFormat: 2,
1356
1543
  rolldown: "^1.0.0-beta.56",
1357
1544
  esToolkit: "^1.43.0",
1358
1545
  jsoncParser: "^3.3.1"
@@ -1830,7 +2017,7 @@ function generateReadme(config) {
1830
2017
  const ponytailAiLine = config.installPonytail ? config.aiSetup === "other" ? "Ponytail is enabled via `opencode.json`.\n\n" : "To enable ponytail in Claude Code, run `/plugin marketplace add DietrichGebert/ponytail` then `/plugin install ponytail@ponytail`.\n\n" : "";
1831
2018
  const aiSection = aiDocFilename !== null ? `## AI Tooling
1832
2019
 
1833
- Spawnpack generated \`${aiDocFilename}\` and \`.mcp.json\` for AI-assisted development. The configured MCP servers work out of the box — no API keys required.
2020
+ Spawnpack generated \`${aiDocFilename}\` and \`.mcp.json\` for AI-assisted development. The configured MCP servers work out of the box \u2014 no API keys required.
1834
2021
 
1835
2022
  Exa's hosted MCP runs on a rate-limited free tier. If you need higher limits, you can add your own Exa API key to \`.mcp.json\` (optional): https://dashboard.exa.ai/api-keys
1836
2023
 
@@ -2057,11 +2244,11 @@ async function generateProject(config) {
2057
2244
  }
2058
2245
 
2059
2246
  // src/provisioning/ai.ts
2060
- import { mkdir as mkdir2 } from "node:fs/promises";
2061
- import { join as join3 } from "node:path";
2247
+ import { mkdir as mkdir2 } from "fs/promises";
2248
+ import { join as join3 } from "path";
2062
2249
 
2063
2250
  // src/provisioning/mcp.ts
2064
- import { join as join2 } from "node:path";
2251
+ import { join as join2 } from "path";
2065
2252
  function buildMcpServers() {
2066
2253
  return {
2067
2254
  exa: {
@@ -2193,7 +2380,7 @@ async function setupAi(projectPath, aiSetup, installPonytail) {
2193
2380
  }
2194
2381
 
2195
2382
  // src/provisioning/tools.ts
2196
- import { join as join4 } from "node:path";
2383
+ import { join as join4 } from "path";
2197
2384
  function runCommand(command, cwd) {
2198
2385
  return Promise.resolve().then(() => Bun.spawn({
2199
2386
  cmd: command,
@@ -2267,354 +2454,9 @@ async function runProvisioning(config) {
2267
2454
  return results;
2268
2455
  }
2269
2456
 
2270
- // node_modules/@clack/prompts/dist/index.mjs
2271
- import { styleText as t2, stripVTControlCharacters as ne2 } from "node:util";
2272
- import P3 from "node:process";
2273
- var import_sisteransi3 = __toESM(require_src(), 1);
2274
- function Ze2() {
2275
- return P3.platform !== "win32" ? P3.env.TERM !== "linux" : !!P3.env.CI || !!P3.env.WT_SESSION || !!P3.env.TERMINUS_SUBLIME || P3.env.ConEmuTask === "{cmd::Cmder}" || P3.env.TERM_PROGRAM === "Terminus-Sublime" || P3.env.TERM_PROGRAM === "vscode" || P3.env.TERM === "xterm-256color" || P3.env.TERM === "alacritty" || P3.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2276
- }
2277
- var ee2 = Ze2();
2278
- var w3 = (e, i) => ee2 ? e : i;
2279
- var _e2 = w3("◆", "*");
2280
- var oe2 = w3("■", "x");
2281
- var ue2 = w3("▲", "x");
2282
- var F3 = w3("◇", "o");
2283
- var le2 = w3("┌", "T");
2284
- var d3 = w3("│", "|");
2285
- var E3 = w3("└", "—");
2286
- var Ie2 = w3("┐", "T");
2287
- var Ee2 = w3("┘", "—");
2288
- var z3 = w3("●", ">");
2289
- var H3 = w3("○", " ");
2290
- var te2 = w3("◻", "[•]");
2291
- var U2 = w3("◼", "[+]");
2292
- var J3 = w3("◻", "[ ]");
2293
- var xe2 = w3("▪", "•");
2294
- var se2 = w3("─", "-");
2295
- var ce2 = w3("╮", "+");
2296
- var Ge2 = w3("├", "+");
2297
- var $e2 = w3("╯", "+");
2298
- var de2 = w3("╰", "+");
2299
- var Oe2 = w3("╭", "+");
2300
- var he2 = w3("●", "•");
2301
- var pe2 = w3("◆", "*");
2302
- var me2 = w3("▲", "!");
2303
- var ge2 = w3("■", "x");
2304
- var V2 = (e) => {
2305
- switch (e) {
2306
- case "initial":
2307
- case "active":
2308
- return t2("cyan", _e2);
2309
- case "cancel":
2310
- return t2("red", oe2);
2311
- case "error":
2312
- return t2("yellow", ue2);
2313
- case "submit":
2314
- return t2("green", F3);
2315
- }
2316
- };
2317
- var ye = (e) => {
2318
- switch (e) {
2319
- case "initial":
2320
- case "active":
2321
- return t2("cyan", d3);
2322
- case "cancel":
2323
- return t2("red", d3);
2324
- case "error":
2325
- return t2("yellow", d3);
2326
- case "submit":
2327
- return t2("green", d3);
2328
- }
2329
- };
2330
- var et2 = (e, i, s, r, u2) => {
2331
- let n = i, o = 0;
2332
- for (let c2 = s;c2 < r; c2++) {
2333
- const a = e[c2];
2334
- if (n = n - a.length, o++, n <= u2)
2335
- break;
2336
- }
2337
- return { lineCount: n, removals: o };
2338
- };
2339
- var Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
2340
- const c2 = O(r) - n, a = A(r), l = t2("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
2341
- let p2 = 0;
2342
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
2343
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
2344
- const S2 = Math.min(p2 + y2, i.length), h = [];
2345
- let f = 0;
2346
- m && f++, g && f++;
2347
- const v = p2 + (m ? 1 : 0), T2 = S2 - (g ? 1 : 0);
2348
- for (let b = v;b < T2; b++) {
2349
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
2350
- `);
2351
- h.push(x), f += x.length;
2352
- }
2353
- if (f > $2) {
2354
- let b = 0, x = 0, G2 = f;
2355
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
2356
- m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
2357
- }
2358
- const C2 = [];
2359
- m && C2.push(l);
2360
- for (const b of h)
2361
- for (const x of b)
2362
- C2.push(x);
2363
- return g && C2.push(l), C2;
2364
- };
2365
- var ot2 = (e) => {
2366
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
2367
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
2368
- const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t2("gray", d3)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t2("gray", d3)}
2369
- ` : ""}${o}
2370
- `, a = this.value ? i : s;
2371
- switch (this.state) {
2372
- case "submit": {
2373
- const l = r ? `${t2("gray", d3)} ` : "";
2374
- return `${c2}${l}${t2("dim", a)}`;
2375
- }
2376
- case "cancel": {
2377
- const l = r ? `${t2("gray", d3)} ` : "";
2378
- return `${c2}${l}${t2(["strikethrough", "dim"], a)}${r ? `
2379
- ${t2("gray", d3)}` : ""}`;
2380
- }
2381
- default: {
2382
- const l = r ? `${t2("cyan", d3)} ` : "", $2 = r ? t2("cyan", E3) : "";
2383
- return `${c2}${l}${this.value ? `${t2("green", z3)} ${i}` : `${t2("dim", H3)} ${t2("dim", i)}`}${e.vertical ? r ? `
2384
- ${t2("cyan", d3)} ` : `
2385
- ` : ` ${t2("dim", "/")} `}${this.value ? `${t2("dim", H3)} ${t2("dim", s)}` : `${t2("green", z3)} ${s}`}
2386
- ${$2}
2387
- `;
2388
- }
2389
- }
2390
- } }).prompt();
2391
- };
2392
- var O2 = { message: (e = [], { symbol: i = t2("gray", d3), secondarySymbol: s = t2("gray", d3), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
2393
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
2394
- for (let p2 = 0;p2 < u2; p2++)
2395
- o.push(a);
2396
- const y2 = Array.isArray(e) ? e : e.split(`
2397
- `);
2398
- if (y2.length > 0) {
2399
- const [p2, ...m] = y2;
2400
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
2401
- for (const g of m)
2402
- g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
2403
- }
2404
- r.write(`${o.join(`
2405
- `)}
2406
- `);
2407
- }, info: (e, i) => {
2408
- O2.message(e, { ...i, symbol: t2("blue", he2) });
2409
- }, success: (e, i) => {
2410
- O2.message(e, { ...i, symbol: t2("green", pe2) });
2411
- }, step: (e, i) => {
2412
- O2.message(e, { ...i, symbol: t2("green", F3) });
2413
- }, warn: (e, i) => {
2414
- O2.message(e, { ...i, symbol: t2("yellow", me2) });
2415
- }, warning: (e, i) => {
2416
- O2.warn(e, i);
2417
- }, error: (e, i) => {
2418
- O2.message(e, { ...i, symbol: t2("red", ge2) });
2419
- } };
2420
- var pt = (e = "", i) => {
2421
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t2("gray", E3)} ` : "";
2422
- s.write(`${r}${t2("red", e)}
2423
-
2424
- `);
2425
- };
2426
- var mt = (e = "", i) => {
2427
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t2("gray", le2)} ` : "";
2428
- s.write(`${r}${e}
2429
- `);
2430
- };
2431
- var Q2 = (e, i) => e.split(`
2432
- `).map((s) => i(s)).join(`
2433
- `);
2434
- var yt = (e) => {
2435
- const i = (r, u2) => {
2436
- const n = r.label ?? String(r.value);
2437
- return u2 === "disabled" ? `${t2("gray", J3)} ${Q2(n, (o) => t2(["strikethrough", "gray"], o))}${r.hint ? ` ${t2("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u2 === "active" ? `${t2("cyan", te2)} ${n}${r.hint ? ` ${t2("dim", `(${r.hint})`)}` : ""}` : u2 === "selected" ? `${t2("green", U2)} ${Q2(n, (o) => t2("dim", o))}${r.hint ? ` ${t2("dim", `(${r.hint})`)}` : ""}` : u2 === "cancelled" ? `${Q2(n, (o) => t2(["strikethrough", "dim"], o))}` : u2 === "active-selected" ? `${t2("green", U2)} ${n}${r.hint ? ` ${t2("dim", `(${r.hint})`)}` : ""}` : u2 === "submitted" ? `${Q2(n, (o) => t2("dim", o))}` : `${t2("dim", J3)} ${Q2(n, (o) => t2("dim", o))}`;
2438
- }, s = e.required ?? true;
2439
- return new it({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(r) {
2440
- if (s && (r === undefined || r.length === 0))
2441
- return `Please select at least one option.
2442
- ${t2("reset", t2("dim", `Press ${t2(["gray", "bgWhite", "inverse"], " space ")} to select, ${t2("gray", t2("bgWhite", t2("inverse", " enter ")))} to submit`))}`;
2443
- }, render() {
2444
- const r = e.withGuide ?? u.withGuide, u2 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V2(this.state)} `), n = `${r ? `${t2("gray", d3)}
2445
- ` : ""}${u2}
2446
- `, o = this.value ?? [], c2 = (a, l) => {
2447
- if (a.disabled)
2448
- return i(a, "disabled");
2449
- const $2 = o.includes(a.value);
2450
- return l && $2 ? i(a, "active-selected") : $2 ? i(a, "selected") : i(a, l ? "active" : "inactive");
2451
- };
2452
- switch (this.state) {
2453
- case "submit": {
2454
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "submitted")).join(t2("dim", ", ")) || t2("dim", "none"), l = R(e.output, a, r ? `${t2("gray", d3)} ` : "");
2455
- return `${n}${l}`;
2456
- }
2457
- case "cancel": {
2458
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "cancelled")).join(t2("dim", ", "));
2459
- if (a.trim() === "")
2460
- return `${n}${t2("gray", d3)}`;
2461
- const l = R(e.output, a, r ? `${t2("gray", d3)} ` : "");
2462
- return `${n}${l}${r ? `
2463
- ${t2("gray", d3)}` : ""}`;
2464
- }
2465
- case "error": {
2466
- const a = r ? `${t2("yellow", d3)} ` : "", l = this.error.split(`
2467
- `).map((p2, m) => m === 0 ? `${r ? `${t2("yellow", E3)} ` : ""}${t2("yellow", p2)}` : ` ${p2}`).join(`
2468
- `), $2 = n.split(`
2469
- `).length, y2 = l.split(`
2470
- `).length + 1;
2471
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: $2 + y2, style: c2 }).join(`
2472
- ${a}`)}
2473
- ${l}
2474
- `;
2475
- }
2476
- default: {
2477
- const a = r ? `${t2("cyan", d3)} ` : "", l = n.split(`
2478
- `).length, $2 = r ? 2 : 1;
2479
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: l + $2, style: c2 }).join(`
2480
- ${a}`)}
2481
- ${r ? t2("cyan", E3) : ""}
2482
- `;
2483
- }
2484
- }
2485
- } }).prompt();
2486
- };
2487
- var Ve2 = { light: w3("─", "-"), heavy: w3("━", "="), block: w3("█", "#") };
2488
- var re = (e, i) => e.includes(`
2489
- `) ? e.split(`
2490
- `).map((s) => i(s)).join(`
2491
- `) : i(e);
2492
- var _t = (e) => {
2493
- const i = (s, r) => {
2494
- const u2 = s.label ?? String(s.value);
2495
- switch (r) {
2496
- case "disabled":
2497
- return `${t2("gray", H3)} ${re(u2, (n) => t2("gray", n))}${s.hint ? ` ${t2("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
2498
- case "selected":
2499
- return `${re(u2, (n) => t2("dim", n))}`;
2500
- case "active":
2501
- return `${t2("green", z3)} ${u2}${s.hint ? ` ${t2("dim", `(${s.hint})`)}` : ""}`;
2502
- case "cancelled":
2503
- return `${re(u2, (n) => t2(["strikethrough", "dim"], n))}`;
2504
- default:
2505
- return `${t2("dim", H3)} ${re(u2, (n) => t2("dim", n))}`;
2506
- }
2507
- };
2508
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
2509
- const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t2("gray", d3)}
2510
- ` : ""}${n}
2511
- `;
2512
- switch (this.state) {
2513
- case "submit": {
2514
- const c2 = s ? `${t2("gray", d3)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
2515
- return `${o}${a}`;
2516
- }
2517
- case "cancel": {
2518
- const c2 = s ? `${t2("gray", d3)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
2519
- return `${o}${a}${s ? `
2520
- ${t2("gray", d3)}` : ""}`;
2521
- }
2522
- default: {
2523
- const c2 = s ? `${t2("cyan", d3)} ` : "", a = s ? t2("cyan", E3) : "", l = o.split(`
2524
- `).length, $2 = s ? 2 : 1;
2525
- return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
2526
- ${c2}`)}
2527
- ${a}
2528
- `;
2529
- }
2530
- }
2531
- } }).prompt();
2532
- };
2533
- var je2 = `${t2("gray", d3)} `;
2534
- var Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
2535
- const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t2("gray", d3)}
2536
- ` : ""}${V2(this.state)} `}${e.message}
2537
- `, r = e.placeholder ? t2("inverse", e.placeholder[0]) + t2("dim", e.placeholder.slice(1)) : t2(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
2538
- switch (this.state) {
2539
- case "error": {
2540
- const o = this.error ? ` ${t2("yellow", this.error)}` : "", c2 = i ? `${t2("yellow", d3)} ` : "", a = i ? t2("yellow", E3) : "";
2541
- return `${s.trim()}
2542
- ${c2}${u2}
2543
- ${a}${o}
2544
- `;
2545
- }
2546
- case "submit": {
2547
- const o = n ? ` ${t2("dim", n)}` : "", c2 = i ? t2("gray", d3) : "";
2548
- return `${s}${c2}${o}`;
2549
- }
2550
- case "cancel": {
2551
- const o = n ? ` ${t2(["strikethrough", "dim"], n)}` : "", c2 = i ? t2("gray", d3) : "";
2552
- return `${s}${c2}${o}${n.trim() ? `
2553
- ${c2}` : ""}`;
2554
- }
2555
- default: {
2556
- const o = i ? `${t2("cyan", d3)} ` : "", c2 = i ? t2("cyan", E3) : "";
2557
- return `${s}${o}${u2}
2558
- ${c2}
2559
- `;
2560
- }
2561
- }
2562
- } }).prompt();
2563
-
2564
2457
  // src/tui/display.ts
2565
- var import_picocolors = __toESM(require_picocolors2(), 1);
2458
+ var import_picocolors = __toESM(require_picocolors(), 1);
2566
2459
  var teal = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
2567
- function formatValue(value) {
2568
- return import_picocolors.default.bold(import_picocolors.default.white(value));
2569
- }
2570
- function showPostGeneration(config) {
2571
- const nextSteps = [teal(import_picocolors.default.bold("Next steps"))];
2572
- if (config.destination !== "." && config.destination !== "./") {
2573
- nextSteps.push(` ${import_picocolors.default.cyan("cd")} ${formatValue(config.destination)}`);
2574
- }
2575
- if (config.scripting !== "none") {
2576
- nextSteps.push(` ${import_picocolors.default.cyan("bun install")} ${import_picocolors.default.dim("or")} ${import_picocolors.default.cyan("npm install")} ${import_picocolors.default.dim("Install project dependencies")}`);
2577
- }
2578
- if (config.useRgl) {
2579
- nextSteps.push(` ${import_picocolors.default.cyan("rgl watch")} ${import_picocolors.default.dim("Watch files and rebuild/export while you work")}`);
2580
- }
2581
- const usefulCommands = [teal(import_picocolors.default.bold("Useful commands"))];
2582
- if (config.useRgl) {
2583
- usefulCommands.push(` ${import_picocolors.default.cyan("rgl run")} ${import_picocolors.default.dim("Build for development")}`);
2584
- usefulCommands.push(` ${import_picocolors.default.cyan("rgl run build")} ${import_picocolors.default.dim("Build for distribution")}`);
2585
- }
2586
- if (config.scripting === "typescript") {
2587
- usefulCommands.push(` ${import_picocolors.default.cyan("bun run typecheck")} ${import_picocolors.default.dim("or")} ${import_picocolors.default.cyan("npm run typecheck")} ${import_picocolors.default.dim("Check TypeScript types")}`);
2588
- }
2589
- if (config.scripting === "none" && !config.useRgl) {
2590
- usefulCommands.push(` ${import_picocolors.default.dim("No extra build commands needed for this scaffold")}`);
2591
- }
2592
- if (config.aiSetup !== "none") {
2593
- usefulCommands.push("");
2594
- usefulCommands.push(`${teal(import_picocolors.default.bold("Note"))} ${import_picocolors.default.dim(".mcp.json is ready to use — the configured MCP servers need no API keys.")}`);
2595
- }
2596
- if (config.installPonytail) {
2597
- usefulCommands.push("");
2598
- if (config.aiSetup === "claude") {
2599
- usefulCommands.push(`${teal(import_picocolors.default.bold("Ponytail"))} ${import_picocolors.default.dim("Run inside Claude Code:")}`);
2600
- usefulCommands.push(` ${import_picocolors.default.cyan("/plugin marketplace add DietrichGebert/ponytail")}`);
2601
- usefulCommands.push(` ${import_picocolors.default.cyan("/plugin install ponytail@ponytail")}`);
2602
- } else {
2603
- usefulCommands.push(`${teal(import_picocolors.default.bold("Ponytail"))} ${import_picocolors.default.dim("Added to opencode.json — installs on next opencode run.")}`);
2604
- }
2605
- }
2606
- O2.message([...nextSteps, "", ...usefulCommands].join(`
2607
- `), {
2608
- symbol: teal("▲")
2609
- });
2610
- }
2611
-
2612
- // src/tui/wizard.ts
2613
- var import_picocolors3 = __toESM(require_picocolors2(), 1);
2614
-
2615
- // src/tui/display.ts
2616
- var import_picocolors2 = __toESM(require_picocolors2(), 1);
2617
- var teal2 = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
2618
2460
  function bgTeal(value) {
2619
2461
  return `\x1B[48;2;47;208;181m${value}\x1B[49m`;
2620
2462
  }
@@ -2655,11 +2497,11 @@ function getSelectedPackages(scriptPackages) {
2655
2497
  }
2656
2498
  return packages;
2657
2499
  }
2658
- function formatValue2(value) {
2659
- return import_picocolors2.default.bold(import_picocolors2.default.white(value));
2500
+ function formatValue(value) {
2501
+ return import_picocolors.default.bold(import_picocolors.default.white(value));
2660
2502
  }
2661
2503
  function formatToggle(enabled) {
2662
- return enabled ? import_picocolors2.default.green("Yes") : import_picocolors2.default.dim("No");
2504
+ return enabled ? import_picocolors.default.green("Yes") : import_picocolors.default.dim("No");
2663
2505
  }
2664
2506
  function padLabel(label) {
2665
2507
  return label.padEnd(22, " ");
@@ -2672,140 +2514,182 @@ function getTreeRoot(config) {
2672
2514
  return destination.replace(/[\\/]+$/, "");
2673
2515
  }
2674
2516
  function pushScopedFolder(lines, folderPrefix, scopePrefix, folder, config) {
2675
- lines.push(import_picocolors2.default.dim(`${folderPrefix}${folder}/`));
2517
+ lines.push(import_picocolors.default.dim(`${folderPrefix}${folder}/`));
2676
2518
  if (config.useMarketplaceStructure) {
2677
- lines.push(import_picocolors2.default.dim(`${scopePrefix}${getMarketplaceScopeLabel(config)}/`));
2519
+ lines.push(import_picocolors.default.dim(`${scopePrefix}${getMarketplaceScopeLabel(config)}/`));
2678
2520
  }
2679
2521
  }
2680
2522
  function showFolderTree(config) {
2681
- const lines = [import_picocolors2.default.bold(import_picocolors2.default.white(getTreeRoot(config)))];
2682
- lines.push(import_picocolors2.default.dim("├─ packs/"));
2683
- lines.push(import_picocolors2.default.dim("│ ├─ BP/"));
2684
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "animation_controllers", config);
2685
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "animations", config);
2686
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "blocks", config);
2687
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "entities", config);
2688
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "items", config);
2689
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "loot_tables", config);
2690
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "recipes", config);
2691
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "spawn_rules", config);
2692
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "structures", config);
2693
- lines.push(import_picocolors2.default.dim("│ │ ├─ texts/"));
2694
- pushScopedFolder(lines, "│ │ ├─ ", "│ │ │ └─ ", "trading", config);
2523
+ const lines = [import_picocolors.default.bold(import_picocolors.default.white(getTreeRoot(config)))];
2524
+ lines.push(import_picocolors.default.dim("\u251C\u2500 packs/"));
2525
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 BP/"));
2526
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "animation_controllers", config);
2527
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "animations", config);
2528
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "blocks", config);
2529
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "entities", config);
2530
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "items", config);
2531
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "loot_tables", config);
2532
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "recipes", config);
2533
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "spawn_rules", config);
2534
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "structures", config);
2535
+ lines.push(import_picocolors.default.dim("\u2502 \u2502 \u251C\u2500 texts/"));
2536
+ pushScopedFolder(lines, "\u2502 \u2502 \u251C\u2500 ", "\u2502 \u2502 \u2502 \u2514\u2500 ", "trading", config);
2695
2537
  if (config.scripting === "javascript" || config.scripting === "typescript" && !config.useRgl) {
2696
- lines.push(import_picocolors2.default.dim(`│ │ ├─ scripts/${config.identifier}/${config.projectId}/`));
2697
- }
2698
- lines.push(import_picocolors2.default.dim("│ │ └─ manifest.json"));
2699
- lines.push(import_picocolors2.default.dim("│ └─ RP/"));
2700
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "animation_controllers", config);
2701
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "animations", config);
2702
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "attachables", config);
2703
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "entity", config);
2704
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "fogs", config);
2705
- lines.push(import_picocolors2.default.dim("│ ├─ models/entity/"));
2538
+ lines.push(import_picocolors.default.dim(`\u2502 \u2502 \u251C\u2500 scripts/${config.identifier}/${config.projectId}/`));
2539
+ }
2540
+ lines.push(import_picocolors.default.dim("\u2502 \u2502 \u2514\u2500 manifest.json"));
2541
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 RP/"));
2542
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "animation_controllers", config);
2543
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "animations", config);
2544
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "attachables", config);
2545
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "entity", config);
2546
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "fogs", config);
2547
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 models/entity/"));
2706
2548
  if (config.useMarketplaceStructure) {
2707
- lines.push(import_picocolors2.default.dim(`│ │ └─ ${getMarketplaceScopeLabel(config)}/`));
2549
+ lines.push(import_picocolors.default.dim(`\u2502 \u2502 \u2514\u2500 ${getMarketplaceScopeLabel(config)}/`));
2708
2550
  }
2709
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "particles", config);
2710
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "render_controllers", config);
2711
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "sounds", config);
2712
- lines.push(import_picocolors2.default.dim("│ ├─ texts/"));
2713
- lines.push(import_picocolors2.default.dim("│ ├─ textures/blocks/"));
2551
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "particles", config);
2552
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "render_controllers", config);
2553
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "sounds", config);
2554
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 texts/"));
2555
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 textures/blocks/"));
2714
2556
  if (config.useMarketplaceStructure) {
2715
- lines.push(import_picocolors2.default.dim(`│ │ └─ ${getMarketplaceScopeLabel(config)}/`));
2557
+ lines.push(import_picocolors.default.dim(`\u2502 \u2502 \u2514\u2500 ${getMarketplaceScopeLabel(config)}/`));
2716
2558
  }
2717
- lines.push(import_picocolors2.default.dim("│ ├─ textures/entity/"));
2559
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 textures/entity/"));
2718
2560
  if (config.useMarketplaceStructure) {
2719
- lines.push(import_picocolors2.default.dim(`│ │ └─ ${getMarketplaceScopeLabel(config)}/`));
2561
+ lines.push(import_picocolors.default.dim(`\u2502 \u2502 \u2514\u2500 ${getMarketplaceScopeLabel(config)}/`));
2720
2562
  }
2721
- lines.push(import_picocolors2.default.dim("│ ├─ textures/items/"));
2563
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 textures/items/"));
2722
2564
  if (config.useMarketplaceStructure) {
2723
- lines.push(import_picocolors2.default.dim(`│ │ └─ ${getMarketplaceScopeLabel(config)}/`));
2724
- }
2725
- pushScopedFolder(lines, "│ ├─ ", "│ │ └─ ", "ui", config);
2726
- lines.push(import_picocolors2.default.dim("│ ├─ blocks.json"));
2727
- lines.push(import_picocolors2.default.dim("│ ├─ sounds.json"));
2728
- lines.push(import_picocolors2.default.dim("│ ├─ sound_definitions.json"));
2729
- lines.push(import_picocolors2.default.dim("│ ├─ item_texture.json"));
2730
- lines.push(import_picocolors2.default.dim("│ ├─ terrain_texture.json"));
2731
- lines.push(import_picocolors2.default.dim("│ ├─ flipbook_textures.json"));
2732
- lines.push(import_picocolors2.default.dim("│ └─ manifest.json"));
2565
+ lines.push(import_picocolors.default.dim(`\u2502 \u2502 \u2514\u2500 ${getMarketplaceScopeLabel(config)}/`));
2566
+ }
2567
+ pushScopedFolder(lines, "\u2502 \u251C\u2500 ", "\u2502 \u2502 \u2514\u2500 ", "ui", config);
2568
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 blocks.json"));
2569
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 sounds.json"));
2570
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 sound_definitions.json"));
2571
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 item_texture.json"));
2572
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 terrain_texture.json"));
2573
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 flipbook_textures.json"));
2574
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 manifest.json"));
2733
2575
  if (config.scripting === "typescript") {
2734
- lines.push(import_picocolors2.default.dim("├─ data/scripts/"));
2576
+ lines.push(import_picocolors.default.dim("\u251C\u2500 data/scripts/"));
2735
2577
  if (config.useRgl) {
2736
- lines.push(import_picocolors2.default.dim("│ ├─ main.ts"));
2737
- lines.push(import_picocolors2.default.dim("│ └─ tsconfig.json"));
2738
- lines.push(import_picocolors2.default.dim("├─ filters/"));
2739
- lines.push(import_picocolors2.default.dim("│ ├─ rolldown/"));
2740
- lines.push(import_picocolors2.default.dim("│ │ ├─ main.js"));
2741
- lines.push(import_picocolors2.default.dim("│ │ └─ package.json"));
2742
- lines.push(import_picocolors2.default.dim("│ └─ typegen/"));
2743
- lines.push(import_picocolors2.default.dim("│ ├─ main.js"));
2744
- lines.push(import_picocolors2.default.dim("│ └─ package.json"));
2578
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 main.ts"));
2579
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 tsconfig.json"));
2580
+ lines.push(import_picocolors.default.dim("\u251C\u2500 filters/"));
2581
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 rolldown/"));
2582
+ lines.push(import_picocolors.default.dim("\u2502 \u2502 \u251C\u2500 main.js"));
2583
+ lines.push(import_picocolors.default.dim("\u2502 \u2502 \u2514\u2500 package.json"));
2584
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 typegen/"));
2585
+ lines.push(import_picocolors.default.dim("\u2502 \u251C\u2500 main.js"));
2586
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 package.json"));
2745
2587
  } else {
2746
- lines.push(import_picocolors2.default.dim("│ └─ main.ts"));
2747
- lines.push(import_picocolors2.default.dim("├─ tsconfig.json"));
2588
+ lines.push(import_picocolors.default.dim("\u2502 \u2514\u2500 main.ts"));
2589
+ lines.push(import_picocolors.default.dim("\u251C\u2500 tsconfig.json"));
2748
2590
  }
2749
- lines.push(import_picocolors2.default.dim("├─ dprint.json"));
2591
+ lines.push(import_picocolors.default.dim("\u251C\u2500 dprint.json"));
2750
2592
  }
2751
2593
  if (config.scripting === "javascript") {
2752
- lines.push(import_picocolors2.default.dim(`├─ packs/BP/scripts/${config.identifier}/${config.projectId}/main.js`));
2594
+ lines.push(import_picocolors.default.dim(`\u251C\u2500 packs/BP/scripts/${config.identifier}/${config.projectId}/main.js`));
2753
2595
  }
2754
2596
  if (config.scripting !== "none") {
2755
- lines.push(import_picocolors2.default.dim("├─ package.json"));
2597
+ lines.push(import_picocolors.default.dim("\u251C\u2500 package.json"));
2756
2598
  }
2757
2599
  if (config.useRgl) {
2758
- lines.push(import_picocolors2.default.dim("├─ config.json"));
2600
+ lines.push(import_picocolors.default.dim("\u251C\u2500 config.json"));
2759
2601
  }
2760
2602
  const aiDocFilename = getAiDocFilename(config.aiSetup);
2761
2603
  if (aiDocFilename !== null) {
2762
- lines.push(import_picocolors2.default.dim(`├─ ${aiDocFilename}`));
2763
- lines.push(import_picocolors2.default.dim("├─ .mcp.json"));
2604
+ lines.push(import_picocolors.default.dim(`\u251C\u2500 ${aiDocFilename}`));
2605
+ lines.push(import_picocolors.default.dim("\u251C\u2500 .mcp.json"));
2764
2606
  if (config.installPonytail && config.aiSetup === "other") {
2765
- lines.push(import_picocolors2.default.dim("├─ opencode.json"));
2607
+ lines.push(import_picocolors.default.dim("\u251C\u2500 opencode.json"));
2766
2608
  }
2767
2609
  }
2768
- lines.push(import_picocolors2.default.dim("├─ .gitignore"));
2769
- lines.push(import_picocolors2.default.dim("└─ README.md"));
2610
+ lines.push(import_picocolors.default.dim("\u251C\u2500 .gitignore"));
2611
+ lines.push(import_picocolors.default.dim("\u2514\u2500 README.md"));
2770
2612
  return lines.join(`
2771
2613
  `);
2772
2614
  }
2773
2615
  function showReview(config) {
2774
- const border = teal2("│");
2775
- const packages = config.scripting === "none" ? import_picocolors2.default.dim("None") : getSelectedPackages(config.scriptPackages).length > 0 ? formatValue2(getSelectedPackages(config.scriptPackages).join(", ")) : import_picocolors2.default.dim("None");
2616
+ const border = teal("\u2502");
2617
+ const packages = config.scripting === "none" ? import_picocolors.default.dim("None") : getSelectedPackages(config.scriptPackages).length > 0 ? formatValue(getSelectedPackages(config.scriptPackages).join(", ")) : import_picocolors.default.dim("None");
2776
2618
  const lines = [
2777
- `${whiteOnTeal(" Spawnpack ")} ${import_picocolors2.default.dim("Review your Bedrock addon scaffold")}`,
2619
+ `${whiteOnTeal(" Spawnpack ")} ${import_picocolors.default.dim("Review your Bedrock addon scaffold")}`,
2778
2620
  "",
2779
- `${border} ${import_picocolors2.default.dim(padLabel("Project:"))} ${formatValue2(config.projectName)}`,
2780
- `${border} ${import_picocolors2.default.dim(padLabel("Author:"))} ${config.author ? formatValue2(config.author) : import_picocolors2.default.dim("—")}`,
2621
+ `${border} ${import_picocolors.default.dim(padLabel("Project:"))} ${formatValue(config.projectName)}`,
2622
+ `${border} ${import_picocolors.default.dim(padLabel("Author:"))} ${config.author ? formatValue(config.author) : import_picocolors.default.dim("\u2014")}`,
2781
2623
  ...config.useMarketplaceStructure ? [
2782
- `${border} ${import_picocolors2.default.dim(padLabel("Publisher ID:"))} ${formatValue2(config.identifier)}`,
2783
- `${border} ${import_picocolors2.default.dim(padLabel("Project ID:"))} ${formatValue2(config.projectId)}`,
2784
- `${border} ${import_picocolors2.default.dim(padLabel("Marketplace structure:"))} ${formatValue2(getMarketplaceScopeLabel(config))}`
2624
+ `${border} ${import_picocolors.default.dim(padLabel("Publisher ID:"))} ${formatValue(config.identifier)}`,
2625
+ `${border} ${import_picocolors.default.dim(padLabel("Project ID:"))} ${formatValue(config.projectId)}`,
2626
+ `${border} ${import_picocolors.default.dim(padLabel("Marketplace structure:"))} ${formatValue(getMarketplaceScopeLabel(config))}`
2785
2627
  ] : [
2786
- `${border} ${import_picocolors2.default.dim(padLabel("Marketplace structure:"))} ${import_picocolors2.default.dim("Disabled")}`
2628
+ `${border} ${import_picocolors.default.dim(padLabel("Marketplace structure:"))} ${import_picocolors.default.dim("Disabled")}`
2787
2629
  ],
2788
- `${border} ${import_picocolors2.default.dim(padLabel("Destination:"))} ${formatValue2(config.destination)}`,
2789
- `${border} ${import_picocolors2.default.dim(padLabel("Scripting:"))} ${formatValue2(getScriptingLabel(config.scripting))}`,
2790
- `${border} ${import_picocolors2.default.dim(padLabel("Packages:"))} ${packages}`,
2791
- `${border} ${import_picocolors2.default.dim(padLabel("rgl:"))} ${formatToggle(config.useRgl)}`,
2792
- `${border} ${import_picocolors2.default.dim(padLabel("Rockide:"))} ${formatToggle(config.installRockide)}`,
2793
- `${border} ${import_picocolors2.default.dim(padLabel("AI Setup:"))} ${formatValue2(getAiSetupLabel(config.aiSetup))}`,
2794
- ...config.aiSetup !== "none" ? [`${border} ${import_picocolors2.default.dim(padLabel("Ponytail:"))} ${formatToggle(config.installPonytail)}`] : [],
2630
+ `${border} ${import_picocolors.default.dim(padLabel("Destination:"))} ${formatValue(config.destination)}`,
2631
+ `${border} ${import_picocolors.default.dim(padLabel("Scripting:"))} ${formatValue(getScriptingLabel(config.scripting))}`,
2632
+ `${border} ${import_picocolors.default.dim(padLabel("Packages:"))} ${packages}`,
2633
+ `${border} ${import_picocolors.default.dim(padLabel("rgl:"))} ${formatToggle(config.useRgl)}`,
2634
+ `${border} ${import_picocolors.default.dim(padLabel("Rockide:"))} ${formatToggle(config.installRockide)}`,
2635
+ `${border} ${import_picocolors.default.dim(padLabel("AI Setup:"))} ${formatValue(getAiSetupLabel(config.aiSetup))}`,
2636
+ ...config.aiSetup !== "none" ? [`${border} ${import_picocolors.default.dim(padLabel("Ponytail:"))} ${formatToggle(config.installPonytail)}`] : [],
2795
2637
  "",
2796
- `${border} ${teal2(import_picocolors2.default.bold("Planned structure"))}`,
2638
+ `${border} ${teal(import_picocolors.default.bold("Planned structure"))}`,
2797
2639
  ...showFolderTree(config).split(`
2798
2640
  `).map((line) => `${border} ${line}`)
2799
2641
  ];
2800
2642
  O2.message(lines.join(`
2801
- `), { symbol: teal2("◆") });
2643
+ `), { symbol: teal("\u25C6") });
2644
+ }
2645
+ function showPostGeneration(config) {
2646
+ const nextSteps = [teal(import_picocolors.default.bold("Next steps"))];
2647
+ if (config.destination !== "." && config.destination !== "./") {
2648
+ nextSteps.push(` ${import_picocolors.default.cyan("cd")} ${formatValue(config.destination)}`);
2649
+ }
2650
+ if (config.scripting !== "none") {
2651
+ nextSteps.push(` ${import_picocolors.default.cyan("bun install")} ${import_picocolors.default.dim("or")} ${import_picocolors.default.cyan("npm install")} ${import_picocolors.default.dim("Install project dependencies")}`);
2652
+ }
2653
+ if (config.useRgl) {
2654
+ nextSteps.push(` ${import_picocolors.default.cyan("rgl watch")} ${import_picocolors.default.dim("Watch files and rebuild/export while you work")}`);
2655
+ }
2656
+ const usefulCommands = [teal(import_picocolors.default.bold("Useful commands"))];
2657
+ if (config.useRgl) {
2658
+ usefulCommands.push(` ${import_picocolors.default.cyan("rgl run")} ${import_picocolors.default.dim("Build for development")}`);
2659
+ usefulCommands.push(` ${import_picocolors.default.cyan("rgl run build")} ${import_picocolors.default.dim("Build for distribution")}`);
2660
+ }
2661
+ if (config.scripting === "typescript") {
2662
+ usefulCommands.push(` ${import_picocolors.default.cyan("bun run typecheck")} ${import_picocolors.default.dim("or")} ${import_picocolors.default.cyan("npm run typecheck")} ${import_picocolors.default.dim("Check TypeScript types")}`);
2663
+ }
2664
+ if (config.scripting === "none" && !config.useRgl) {
2665
+ usefulCommands.push(` ${import_picocolors.default.dim("No extra build commands needed for this scaffold")}`);
2666
+ }
2667
+ if (config.aiSetup !== "none") {
2668
+ usefulCommands.push("");
2669
+ usefulCommands.push(`${teal(import_picocolors.default.bold("Note"))} ${import_picocolors.default.dim(".mcp.json is ready to use \u2014 the configured MCP servers need no API keys.")}`);
2670
+ }
2671
+ if (config.installPonytail) {
2672
+ usefulCommands.push("");
2673
+ if (config.aiSetup === "claude") {
2674
+ usefulCommands.push(`${teal(import_picocolors.default.bold("Ponytail"))} ${import_picocolors.default.dim("Run inside Claude Code:")}`);
2675
+ usefulCommands.push(` ${import_picocolors.default.cyan("/plugin marketplace add DietrichGebert/ponytail")}`);
2676
+ usefulCommands.push(` ${import_picocolors.default.cyan("/plugin install ponytail@ponytail")}`);
2677
+ } else {
2678
+ usefulCommands.push(`${teal(import_picocolors.default.bold("Ponytail"))} ${import_picocolors.default.dim("Added to opencode.json \u2014 installs on next opencode run.")}`);
2679
+ }
2680
+ }
2681
+ O2.message([...nextSteps, "", ...usefulCommands].join(`
2682
+ `), {
2683
+ symbol: teal("\u25B2")
2684
+ });
2802
2685
  }
2803
2686
 
2804
2687
  // src/tui/wizard.ts
2805
- var teal3 = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
2688
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
2689
+ var teal2 = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
2806
2690
  var bgTeal2 = (value) => `\x1B[48;2;47;208;181m${value}\x1B[49m`;
2807
2691
  function abortWizard() {
2808
- pt(import_picocolors3.default.red("Spawnpack cancelled."));
2692
+ pt(import_picocolors2.default.red("Spawnpack cancelled."));
2809
2693
  return null;
2810
2694
  }
2811
2695
  function toScriptPackages(selected) {
@@ -2817,9 +2701,9 @@ function toScriptPackages(selected) {
2817
2701
  };
2818
2702
  }
2819
2703
  async function runWizard() {
2820
- mt(`${bgTeal2(import_picocolors3.default.bold(import_picocolors3.default.white(" Spawnpack ")))} ${teal3("Initialize your Minecraft Bedrock addon")}`);
2704
+ mt(`${bgTeal2(import_picocolors2.default.bold(import_picocolors2.default.white(" Spawnpack ")))} ${teal2("Initialize your Minecraft Bedrock addon")}`);
2821
2705
  const projectName = await Ot({
2822
- message: import_picocolors3.default.bold("Project name"),
2706
+ message: import_picocolors2.default.bold("Project name"),
2823
2707
  placeholder: "My Cool Addon",
2824
2708
  validate(value) {
2825
2709
  const trimmed = (value ?? "").trim();
@@ -2841,14 +2725,14 @@ async function runWizard() {
2841
2725
  const trimmedProjectName = projectName.trim();
2842
2726
  const suggestedProjectId = generateProjectId(trimmedProjectName);
2843
2727
  const author = await Ot({
2844
- message: `${import_picocolors3.default.bold("Author")} ${import_picocolors3.default.dim("optional")}`,
2728
+ message: `${import_picocolors2.default.bold("Author")} ${import_picocolors2.default.dim("optional")}`,
2845
2729
  placeholder: "Your Name or Studio"
2846
2730
  });
2847
2731
  if (q(author)) {
2848
2732
  return abortWizard();
2849
2733
  }
2850
2734
  const useMarketplaceStructure = await ot2({
2851
- message: `${import_picocolors3.default.bold("Marketplace Add-On structure?")} ${import_picocolors3.default.dim("Nest BP/RP content under publisher_id/project_id for better coexistence")}`,
2735
+ message: `${import_picocolors2.default.bold("Marketplace Add-On structure?")} ${import_picocolors2.default.dim("Nest BP/RP content under publisher_id/project_id for better coexistence")}`,
2852
2736
  initialValue: false
2853
2737
  });
2854
2738
  if (q(useMarketplaceStructure)) {
@@ -2858,7 +2742,7 @@ async function runWizard() {
2858
2742
  let identifierValue = defaultPublisherId;
2859
2743
  let projectIdValue = suggestedProjectId;
2860
2744
  const destination = await Ot({
2861
- message: import_picocolors3.default.bold("Destination folder"),
2745
+ message: import_picocolors2.default.bold("Destination folder"),
2862
2746
  placeholder: ".",
2863
2747
  initialValue: ".",
2864
2748
  validate(value) {
@@ -2879,7 +2763,7 @@ async function runWizard() {
2879
2763
  return abortWizard();
2880
2764
  }
2881
2765
  const scripting = await _t({
2882
- message: import_picocolors3.default.bold("Scripting API"),
2766
+ message: import_picocolors2.default.bold("Scripting API"),
2883
2767
  initialValue: "typescript",
2884
2768
  options: [
2885
2769
  { value: "none", label: "None", hint: "manifest-only addon scaffold" },
@@ -2893,7 +2777,7 @@ async function runWizard() {
2893
2777
  if (useMarketplaceStructure || scripting !== "none") {
2894
2778
  const publisherHint = useMarketplaceStructure ? "used for scoped folders like publisher_id/project_id" : "used for script folders and package naming";
2895
2779
  const publisherId = await Ot({
2896
- message: `${import_picocolors3.default.bold("Publisher ID")} ${import_picocolors3.default.dim(publisherHint)}`,
2780
+ message: `${import_picocolors2.default.bold("Publisher ID")} ${import_picocolors2.default.dim(publisherHint)}`,
2897
2781
  placeholder: defaultPublisherId,
2898
2782
  initialValue: defaultPublisherId,
2899
2783
  validate(value) {
@@ -2912,7 +2796,7 @@ async function runWizard() {
2912
2796
  }
2913
2797
  identifierValue = publisherId.trim();
2914
2798
  const projectId = await Ot({
2915
- message: `${import_picocolors3.default.bold("Project ID")} ${import_picocolors3.default.dim("1-10 lowercase letters, numbers, or underscores")}`,
2799
+ message: `${import_picocolors2.default.bold("Project ID")} ${import_picocolors2.default.dim("1-10 lowercase letters, numbers, or underscores")}`,
2916
2800
  placeholder: suggestedProjectId,
2917
2801
  initialValue: suggestedProjectId,
2918
2802
  validate(value) {
@@ -2932,7 +2816,7 @@ async function runWizard() {
2932
2816
  let useRgl = false;
2933
2817
  if (scripting !== "none") {
2934
2818
  const selectedPackages = await yt({
2935
- message: import_picocolors3.default.bold("Script packages"),
2819
+ message: import_picocolors2.default.bold("Script packages"),
2936
2820
  required: false,
2937
2821
  initialValues: Object.entries(DEFAULT_SCRIPT_PACKAGES).filter(([, enabled]) => enabled).map(([key]) => key),
2938
2822
  options: [
@@ -2947,7 +2831,7 @@ async function runWizard() {
2947
2831
  }
2948
2832
  scriptPackages = toScriptPackages(Array.from(new Set(["server", ...selectedPackages])));
2949
2833
  const rglChoice = await ot2({
2950
- message: `${import_picocolors3.default.bold("Use rgl?")} ${import_picocolors3.default.dim("fast Bedrock addon compiler, 16x faster than Regolith")}`,
2834
+ message: `${import_picocolors2.default.bold("Use rgl?")} ${import_picocolors2.default.dim("fast Bedrock addon compiler, 16x faster than Regolith")}`,
2951
2835
  initialValue: true
2952
2836
  });
2953
2837
  if (q(rglChoice)) {
@@ -2956,14 +2840,14 @@ async function runWizard() {
2956
2840
  useRgl = rglChoice;
2957
2841
  }
2958
2842
  const installRockide2 = await ot2({
2959
- message: `${import_picocolors3.default.bold("Install Rockide?")} ${import_picocolors3.default.dim("VSCode extension for Bedrock JSON autocompletion")}`,
2843
+ message: `${import_picocolors2.default.bold("Install Rockide?")} ${import_picocolors2.default.dim("VSCode extension for Bedrock JSON autocompletion")}`,
2960
2844
  initialValue: true
2961
2845
  });
2962
2846
  if (q(installRockide2)) {
2963
2847
  return abortWizard();
2964
2848
  }
2965
2849
  const aiSetup = await _t({
2966
- message: import_picocolors3.default.bold("AI setup"),
2850
+ message: import_picocolors2.default.bold("AI setup"),
2967
2851
  initialValue: "none",
2968
2852
  options: [
2969
2853
  { value: "none", label: "None", hint: "No AI configuration setup" },
@@ -2977,7 +2861,7 @@ async function runWizard() {
2977
2861
  let installPonytail = false;
2978
2862
  if (aiSetup !== "none") {
2979
2863
  const ponytailChoice = await ot2({
2980
- message: `${import_picocolors3.default.bold("Install ponytail plugin?")} ${import_picocolors3.default.dim("Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote. https://github.com/DietrichGebert/ponytail")}`,
2864
+ message: `${import_picocolors2.default.bold("Install ponytail plugin?")} ${import_picocolors2.default.dim("Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote. https://github.com/DietrichGebert/ponytail")}`,
2981
2865
  initialValue: true
2982
2866
  });
2983
2867
  if (q(ponytailChoice)) {
@@ -3001,7 +2885,7 @@ async function runWizard() {
3001
2885
  };
3002
2886
  showReview(config);
3003
2887
  const shouldGenerate = await ot2({
3004
- message: `${import_picocolors3.default.bold("Generate addon scaffold?")} ${import_picocolors3.default.dim("create the project files now")}`,
2888
+ message: `${import_picocolors2.default.bold("Generate addon scaffold?")} ${import_picocolors2.default.dim("create the project files now")}`,
3005
2889
  initialValue: true
3006
2890
  });
3007
2891
  if (q(shouldGenerate) || !shouldGenerate) {
@@ -3011,7 +2895,7 @@ async function runWizard() {
3011
2895
  }
3012
2896
 
3013
2897
  // src/index.ts
3014
- var teal4 = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
2898
+ var teal3 = (value) => `\x1B[38;2;47;208;181m${value}\x1B[39m`;
3015
2899
  var args = new Set(process.argv.slice(2));
3016
2900
  if (args.has("-v") || args.has("--version")) {
3017
2901
  const packageJson = await Bun.file(new URL("../package.json", import.meta.url)).json();
@@ -3023,12 +2907,12 @@ if (config === null) {
3023
2907
  process.exit(0);
3024
2908
  }
3025
2909
  var generation = fe();
3026
- generation.start(teal4("Generating your Bedrock addon scaffold..."));
2910
+ generation.start(teal3("Generating your Bedrock addon scaffold..."));
3027
2911
  await generateProject(config);
3028
2912
  if (config.aiSetup !== "none") {
3029
2913
  await setupAi(config.destination, config.aiSetup, config.installPonytail);
3030
2914
  }
3031
2915
  await runProvisioning(config);
3032
- generation.stop(import_picocolors4.default.green("Spawnpack scaffold generated."));
2916
+ generation.stop(import_picocolors3.default.green("Spawnpack scaffold generated."));
3033
2917
  showPostGeneration(config);
3034
- gt(teal4("Your addon is ready."));
2918
+ gt(teal3("Your addon is ready."));