protovibe 1.1.2 → 1.1.4
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.mjs +29 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -587,6 +587,28 @@ async function scaffoldProject() {
|
|
|
587
587
|
// src/cli.tsx
|
|
588
588
|
import { confirm } from "@clack/prompts";
|
|
589
589
|
import { spawnSync } from "child_process";
|
|
590
|
+
import chalk from "chalk";
|
|
591
|
+
function printLaunchBox() {
|
|
592
|
+
const W = 42;
|
|
593
|
+
const border = (s) => chalk.hex("#3a1a6a")(s);
|
|
594
|
+
const accent = (s) => chalk.hex("#b39ddb")(s);
|
|
595
|
+
const row = (text2, visibleLen) => border("\u2502") + text2 + " ".repeat(Math.max(0, W - visibleLen)) + border("\u2502");
|
|
596
|
+
const lines = [
|
|
597
|
+
"",
|
|
598
|
+
border("\u256D" + "\u2500".repeat(W) + "\u256E"),
|
|
599
|
+
row("", 0),
|
|
600
|
+
row(" " + chalk.white("Claude Code is loading your project."), 38),
|
|
601
|
+
row("", 0),
|
|
602
|
+
row(
|
|
603
|
+
" Type " + accent('"Hello"') + " or " + accent(`"What's up?"`) + " to begin.",
|
|
604
|
+
40
|
|
605
|
+
),
|
|
606
|
+
row("", 0),
|
|
607
|
+
border("\u2570" + "\u2500".repeat(W) + "\u256F"),
|
|
608
|
+
""
|
|
609
|
+
];
|
|
610
|
+
process.stdout.write(lines.join("\n") + "\n");
|
|
611
|
+
}
|
|
590
612
|
function App({ terminalWidth: terminalWidth2, version }) {
|
|
591
613
|
const { exit } = useApp();
|
|
592
614
|
const [stage, setStage] = useState("boot");
|
|
@@ -642,20 +664,23 @@ function App({ terminalWidth: terminalWidth2, version }) {
|
|
|
642
664
|
if (stage !== "scaffold") return;
|
|
643
665
|
exit();
|
|
644
666
|
scaffoldProject().then((projectPath) => {
|
|
667
|
+
printLaunchBox();
|
|
645
668
|
spawnClaude(projectPath);
|
|
646
669
|
});
|
|
647
670
|
}, [stage]);
|
|
648
671
|
if (error) {
|
|
649
672
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox, { version }), /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "red" }, "\u2717 ", error)));
|
|
650
673
|
}
|
|
651
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox,
|
|
674
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingTop: 1 }, /* @__PURE__ */ React4.createElement(Logo, { terminalWidth: terminalWidth2 }), /* @__PURE__ */ React4.createElement(InfoBox, { version }), (stage === "auth-done" || stage === "claude-check" || stage === "scaffold") && /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "#7B2FBE" }, "\u2713 "), /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, "Logged in to Claude Code")));
|
|
652
675
|
}
|
|
653
676
|
|
|
654
677
|
// src/index.tsx
|
|
655
|
-
import { createRequire } from "module";
|
|
656
678
|
import { execSync as execSync2, spawnSync as spawnSync2 } from "child_process";
|
|
657
|
-
|
|
658
|
-
|
|
679
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
680
|
+
import { fileURLToPath } from "url";
|
|
681
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
682
|
+
var __dirname = dirname2(fileURLToPath(import.meta.url));
|
|
683
|
+
var pkg = JSON.parse(readFileSync2(join3(__dirname, "..", "package.json"), "utf-8"));
|
|
659
684
|
function isNewerVersion(current, latest) {
|
|
660
685
|
const parse = (v) => v.split(".").map(Number);
|
|
661
686
|
const [cMaj, cMin, cPatch] = parse(current);
|