gearbox-code 0.1.23 → 0.1.24
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 +13 -41
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -147867,7 +147867,7 @@ init_permission();
|
|
|
147867
147867
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
147868
147868
|
process.env.LANG = process.env.LANG || "en_US.UTF-8";
|
|
147869
147869
|
process.env.LC_ALL = process.env.LC_ALL || "en_US.UTF-8";
|
|
147870
|
-
var VERSION16 = "0.1.
|
|
147870
|
+
var VERSION16 = "0.1.24";
|
|
147871
147871
|
var args = process.argv.slice(2);
|
|
147872
147872
|
var supportsAnsi = process.env.FORCE_COLOR === "1" || process.env.TERM !== "dumb" && process.env.NO_COLOR !== "1" && process.stdout.isTTY;
|
|
147873
147873
|
var ansi = (code) => supportsAnsi ? `\x1B[${code}m` : "";
|
|
@@ -147881,37 +147881,17 @@ var errColor = (text2) => paint("31", text2);
|
|
|
147881
147881
|
var stripAnsi2 = (text2) => text2.replace(/\x1b\[[0-9;]*m/g, "");
|
|
147882
147882
|
var visibleLength = (text2) => stripAnsi2(text2).length;
|
|
147883
147883
|
var padVisible = (text2, width) => text2 + " ".repeat(Math.max(width - visibleLength(text2), 0));
|
|
147884
|
-
|
|
147885
|
-
|
|
147886
|
-
|
|
147887
|
-
|
|
147888
|
-
|
|
147889
|
-
|
|
147890
|
-
|
|
147891
|
-
|
|
147892
|
-
|
|
147893
|
-
|
|
147894
|
-
|
|
147895
|
-
else if (supportsAnsi && b)
|
|
147896
|
-
line += trueFg(b) + "▄" + ansi("0");
|
|
147897
|
-
else if (t2 && b)
|
|
147898
|
-
line += "█";
|
|
147899
|
-
else if (t2)
|
|
147900
|
-
line += "▀";
|
|
147901
|
-
else if (b)
|
|
147902
|
-
line += "▄";
|
|
147903
|
-
else
|
|
147904
|
-
line += " ";
|
|
147905
|
-
}
|
|
147906
|
-
return line;
|
|
147907
|
-
});
|
|
147908
|
-
}
|
|
147909
|
-
function onboardingBoo(termWidth) {
|
|
147910
|
-
const cells = renderGhost({ palette: "default", face: "happy", scale: 1 });
|
|
147911
|
-
const ghostW = cells[0]?.length ?? 20;
|
|
147912
|
-
const leftPad = Math.max(2, Math.floor((termWidth - ghostW) / 2));
|
|
147913
|
-
return ghostLines(cells, " ".repeat(leftPad)).join(`
|
|
147914
|
-
`);
|
|
147884
|
+
function onboardingBanner(termWidth) {
|
|
147885
|
+
const ruleW = Math.min(42, termWidth - 4);
|
|
147886
|
+
const rule = dim("─".repeat(ruleW));
|
|
147887
|
+
console.log("");
|
|
147888
|
+
console.log(centerStr(rule, termWidth));
|
|
147889
|
+
console.log(centerStr(bold(accent("g e a r b o x")), termWidth));
|
|
147890
|
+
console.log(centerStr(rule, termWidth));
|
|
147891
|
+
console.log("");
|
|
147892
|
+
console.log(centerStr(dim("one terminal · every model you pay for"), termWidth));
|
|
147893
|
+
console.log(centerStr(dim("keys stay local, never sent anywhere"), termWidth));
|
|
147894
|
+
console.log("");
|
|
147915
147895
|
}
|
|
147916
147896
|
var centerStr = (text2, width) => {
|
|
147917
147897
|
const pad3 = Math.max(0, Math.floor((width - visibleLength(text2)) / 2));
|
|
@@ -147979,15 +147959,7 @@ async function runCliOnboarding() {
|
|
|
147979
147959
|
};
|
|
147980
147960
|
try {
|
|
147981
147961
|
const termWidth = Math.min(process.stdout.columns || 80, 100);
|
|
147982
|
-
|
|
147983
|
-
console.log("");
|
|
147984
|
-
console.log(onboardingBoo(termWidth));
|
|
147985
|
-
console.log("");
|
|
147986
|
-
console.log(centerStr(bold(accent("gearbox")), termWidth));
|
|
147987
|
-
console.log(centerStr(dim("one terminal · every model you already pay for"), termWidth));
|
|
147988
|
-
console.log("");
|
|
147989
|
-
console.log(centerStr(dim("─".repeat(ruleW)), termWidth));
|
|
147990
|
-
console.log("");
|
|
147962
|
+
onboardingBanner(termWidth);
|
|
147991
147963
|
while (!anyProviderAvailable()) {
|
|
147992
147964
|
const env3 = importableEnvCreds2();
|
|
147993
147965
|
const cloud = importableCloudCreds2();
|
package/package.json
CHANGED