@valuerail/cli 1.0.0-beta.6 → 1.0.0-beta.7

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.
Files changed (2) hide show
  1. package/dist/index.js +98 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48495,6 +48495,10 @@ var import_react19 = __toESM(require_react(), 1);
48495
48495
  var import_react20 = __toESM(require_react(), 1);
48496
48496
  // ../../node_modules/ink/build/hooks/use-focus-manager.js
48497
48497
  var import_react21 = __toESM(require_react(), 1);
48498
+ // src/index.tsx
48499
+ import fs8 from "fs";
48500
+ import path3 from "path";
48501
+
48498
48502
  // src/ui/App.tsx
48499
48503
  var import_react30 = __toESM(require_react(), 1);
48500
48504
 
@@ -50357,9 +50361,6 @@ var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
50357
50361
  function App2() {
50358
50362
  const [currentView, setCurrentView] = import_react30.useState("dashboard");
50359
50363
  const [focusArea, setFocusArea] = import_react30.useState("content");
50360
- import_react30.useEffect(() => {
50361
- console.clear();
50362
- }, []);
50363
50364
  const goToHeader = () => setFocusArea("header");
50364
50365
  const goToDashboard = () => {
50365
50366
  setCurrentView("dashboard");
@@ -50433,8 +50434,99 @@ function App2() {
50433
50434
  }, undefined, true, undefined, this);
50434
50435
  }
50435
50436
 
50436
- // src/index.tsx
50437
+ // src/ui/components/GoodbyeScreen.tsx
50437
50438
  var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
50439
+ function GoodbyeScreen({ version, cwd: cwd2, isVrailProject }) {
50440
+ return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50441
+ flexDirection: "column",
50442
+ padding: 1,
50443
+ children: [
50444
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(dist_default5, {
50445
+ name: "morning",
50446
+ children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(dist_default6, {
50447
+ text: "VALUERAIL",
50448
+ font: "simple"
50449
+ }, undefined, false, undefined, this)
50450
+ }, undefined, false, undefined, this),
50451
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50452
+ flexDirection: "column",
50453
+ marginLeft: 1,
50454
+ marginTop: 1,
50455
+ children: [
50456
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50457
+ flexDirection: "row",
50458
+ gap: 2,
50459
+ children: [
50460
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50461
+ color: "gray",
50462
+ children: [
50463
+ "Version: ",
50464
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50465
+ color: "#CD6052",
50466
+ children: version
50467
+ }, undefined, false, undefined, this)
50468
+ ]
50469
+ }, undefined, true, undefined, this),
50470
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50471
+ color: "gray",
50472
+ children: [
50473
+ "Project Status: ",
50474
+ isVrailProject ? /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50475
+ color: "green",
50476
+ children: "✔ Vrail Project Detected"
50477
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50478
+ color: "red",
50479
+ children: "✘ Not a Vrail Project"
50480
+ }, undefined, false, undefined, this)
50481
+ ]
50482
+ }, undefined, true, undefined, this)
50483
+ ]
50484
+ }, undefined, true, undefined, this),
50485
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50486
+ color: "gray",
50487
+ dimColor: true,
50488
+ children: cwd2
50489
+ }, undefined, false, undefined, this)
50490
+ ]
50491
+ }, undefined, true, undefined, this),
50492
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50493
+ marginTop: 2,
50494
+ marginLeft: 1,
50495
+ children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
50496
+ color: "#CD6052",
50497
+ bold: true,
50498
+ children: "\uD83D\uDC4B Thanks for using ValueRail! See you soon."
50499
+ }, undefined, false, undefined, this)
50500
+ }, undefined, false, undefined, this)
50501
+ ]
50502
+ }, undefined, true, undefined, this);
50503
+ }
50504
+
50505
+ // src/index.tsx
50506
+ var jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
50507
+ var hasVrailConfig2 = () => {
50508
+ try {
50509
+ return fs8.existsSync(path3.join(process.cwd(), "vrail.config.ts"));
50510
+ } catch {
50511
+ return false;
50512
+ }
50513
+ };
50514
+ var showGoodbye = () => {
50515
+ const version = process.env.CLI_VERSION || "v0.0.1";
50516
+ const cwd2 = process.cwd();
50517
+ const isVrailProject = hasVrailConfig2();
50518
+ render_default(/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(GoodbyeScreen, {
50519
+ version,
50520
+ cwd: cwd2,
50521
+ isVrailProject
50522
+ }, undefined, false, undefined, this));
50523
+ setTimeout(() => {
50524
+ process.exit(0);
50525
+ }, 1500);
50526
+ };
50527
+ process.on("SIGINT", () => {
50528
+ showGoodbye();
50529
+ });
50438
50530
  process.on("uncaughtException", (err) => {
50439
50531
  console.error("Uncaught Exception:", err);
50440
50532
  process.exit(1);
@@ -50443,5 +50535,6 @@ process.on("unhandledRejection", (reason, promise) => {
50443
50535
  console.error("Unhandled Rejection at:", promise, "reason:", reason);
50444
50536
  process.exit(1);
50445
50537
  });
50446
- var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(App2, {}, undefined, false, undefined, this));
50538
+ var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(App2, {}, undefined, false, undefined, this));
50447
50539
  await waitUntilExit();
50540
+ showGoodbye();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valuerail/cli",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.7",
4
4
  "author": "Kamil Guszpit",
5
5
  "license": "BUSL-1.1",
6
6
  "type": "module",