gearbox-code 0.1.14 → 0.1.15
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/cli.mjs +29 -17
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -147353,9 +147353,9 @@ init_permission();
|
|
|
147353
147353
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
147354
147354
|
process.env.LANG = process.env.LANG || "en_US.UTF-8";
|
|
147355
147355
|
process.env.LC_ALL = process.env.LC_ALL || "en_US.UTF-8";
|
|
147356
|
-
var VERSION16 = "0.1.
|
|
147356
|
+
var VERSION16 = "0.1.15";
|
|
147357
147357
|
var args = process.argv.slice(2);
|
|
147358
|
-
var supportsAnsi = process.env.
|
|
147358
|
+
var supportsAnsi = process.env.FORCE_COLOR === "1" || process.env.TERM !== "dumb" && process.env.NO_COLOR !== "1" && process.stdout.isTTY;
|
|
147359
147359
|
var ansi = (code) => supportsAnsi ? `\x1B[${code}m` : "";
|
|
147360
147360
|
var paint = (code, text2) => `${ansi(code)}${text2}${ansi("0")}`;
|
|
147361
147361
|
var bold = (text2) => paint("1", text2);
|
|
@@ -147367,18 +147367,33 @@ var errColor = (text2) => paint("31", text2);
|
|
|
147367
147367
|
var stripAnsi2 = (text2) => text2.replace(/\x1b\[[0-9;]*m/g, "");
|
|
147368
147368
|
var visibleLength = (text2) => stripAnsi2(text2).length;
|
|
147369
147369
|
var padVisible = (text2, width) => text2 + " ".repeat(Math.max(width - visibleLength(text2), 0));
|
|
147370
|
+
var hexRgb = (h2) => [parseInt(h2.slice(1, 3), 16), parseInt(h2.slice(3, 5), 16), parseInt(h2.slice(5, 7), 16)];
|
|
147371
|
+
var trueFg = (h2) => `\x1B[38;2;${hexRgb(h2).join(";")}m`;
|
|
147372
|
+
var trueBg = (h2) => `\x1B[48;2;${hexRgb(h2).join(";")}m`;
|
|
147373
|
+
function ghostLines(cells, pad3 = " ") {
|
|
147374
|
+
return cells.map((row) => {
|
|
147375
|
+
let line = pad3;
|
|
147376
|
+
for (const { t: t2, b } of row) {
|
|
147377
|
+
if (supportsAnsi && t2 && b)
|
|
147378
|
+
line += trueFg(t2) + trueBg(b) + "▀" + ansi("0");
|
|
147379
|
+
else if (supportsAnsi && t2)
|
|
147380
|
+
line += trueFg(t2) + "▀" + ansi("0");
|
|
147381
|
+
else if (supportsAnsi && b)
|
|
147382
|
+
line += trueFg(b) + "▄" + ansi("0");
|
|
147383
|
+
else if (t2 && b)
|
|
147384
|
+
line += "█";
|
|
147385
|
+
else if (t2)
|
|
147386
|
+
line += "▀";
|
|
147387
|
+
else if (b)
|
|
147388
|
+
line += "▄";
|
|
147389
|
+
else
|
|
147390
|
+
line += " ";
|
|
147391
|
+
}
|
|
147392
|
+
return line;
|
|
147393
|
+
});
|
|
147394
|
+
}
|
|
147370
147395
|
function onboardingBoo() {
|
|
147371
|
-
return
|
|
147372
|
-
" .-''''-.",
|
|
147373
|
-
" .' .--. '.",
|
|
147374
|
-
" / ( ) \\",
|
|
147375
|
-
" | .-. .-. |",
|
|
147376
|
-
" | |_| |_| |",
|
|
147377
|
-
" | __ |",
|
|
147378
|
-
" \\ .' '. /",
|
|
147379
|
-
" '._\\____/_.'",
|
|
147380
|
-
" /| |\\"
|
|
147381
|
-
].join(`
|
|
147396
|
+
return ghostLines(renderGhost({ palette: "default", face: "happy", scale: 1 })).join(`
|
|
147382
147397
|
`);
|
|
147383
147398
|
}
|
|
147384
147399
|
function box(title, lines) {
|
|
@@ -147443,10 +147458,7 @@ async function runCliOnboarding() {
|
|
|
147443
147458
|
};
|
|
147444
147459
|
try {
|
|
147445
147460
|
console.log("");
|
|
147446
|
-
|
|
147447
|
-
console.log(paint("38;5;117", onboardingBoo()));
|
|
147448
|
-
else
|
|
147449
|
-
console.log(onboardingBoo());
|
|
147461
|
+
console.log(onboardingBoo());
|
|
147450
147462
|
console.log("");
|
|
147451
147463
|
console.log(bold("Gearbox setup"));
|
|
147452
147464
|
console.log("Boo needs one model account before the coding app opens.");
|
package/package.json
CHANGED