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

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 +173 -144
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
- #!/usr/bin/env bun
2
- // @bun
1
+ #!/usr/bin/env node
3
2
  import { createRequire } from "node:module";
4
3
  var __create = Object.create;
5
4
  var __getProtoOf = Object.getPrototypeOf;
@@ -38265,7 +38264,7 @@ var require_jsx_dev_runtime = __commonJS((exports, module) => {
38265
38264
 
38266
38265
  // ../../node_modules/react/cjs/react-jsx-runtime.development.js
38267
38266
  var require_react_jsx_runtime_development = __commonJS((exports) => {
38268
- var React11 = __toESM(require_react());
38267
+ var React12 = __toESM(require_react());
38269
38268
  if (true) {
38270
38269
  (function() {
38271
38270
  var REACT_ELEMENT_TYPE = Symbol.for("react.element");
@@ -38293,7 +38292,7 @@ var require_react_jsx_runtime_development = __commonJS((exports) => {
38293
38292
  }
38294
38293
  return null;
38295
38294
  }
38296
- var ReactSharedInternals = React11.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
38295
+ var ReactSharedInternals = React12.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
38297
38296
  function error(format) {
38298
38297
  {
38299
38298
  {
@@ -38623,8 +38622,8 @@ var require_react_jsx_runtime_development = __commonJS((exports) => {
38623
38622
  return describeNativeComponentFrame(fn, false);
38624
38623
  }
38625
38624
  }
38626
- function shouldConstruct(Component) {
38627
- var prototype = Component.prototype;
38625
+ function shouldConstruct(Component2) {
38626
+ var prototype = Component2.prototype;
38628
38627
  return !!(prototype && prototype.isReactComponent);
38629
38628
  }
38630
38629
  function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
@@ -38852,7 +38851,7 @@ var require_react_jsx_runtime_development = __commonJS((exports) => {
38852
38851
  }
38853
38852
  return element;
38854
38853
  };
38855
- function jsxDEV2(type, config, maybeKey, source, self2) {
38854
+ function jsxDEV3(type, config, maybeKey, source, self2) {
38856
38855
  {
38857
38856
  var propName;
38858
38857
  var props = {};
@@ -39087,7 +39086,7 @@ Check the top-level render call using <` + parentName + ">.";
39087
39086
  }
39088
39087
  error("React.jsx: type is invalid -- expected a string (for " + "built-in components) or a class/function (for composite " + "components) but got: %s.%s", typeString, info);
39089
39088
  }
39090
- var element = jsxDEV2(type, props, key, source, self2);
39089
+ var element = jsxDEV3(type, props, key, source, self2);
39091
39090
  if (element == null) {
39092
39091
  return element;
39093
39092
  }
@@ -42859,14 +42858,6 @@ var require_lib = __commonJS((exports, module) => {
42859
42858
  };
42860
42859
  });
42861
42860
 
42862
- // ../../node_modules/react/jsx-dev-runtime.js
42863
- var require_jsx_dev_runtime2 = __commonJS((exports, module) => {
42864
- var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development());
42865
- if (false) {} else {
42866
- module.exports = react_jsx_dev_runtime_development;
42867
- }
42868
- });
42869
-
42870
42861
  // ../../node_modules/ink/build/render.js
42871
42862
  import { Stream } from "node:stream";
42872
42863
  import process12 from "node:process";
@@ -48505,7 +48496,8 @@ var import_react20 = __toESM(require_react(), 1);
48505
48496
  // ../../node_modules/ink/build/hooks/use-focus-manager.js
48506
48497
  var import_react21 = __toESM(require_react(), 1);
48507
48498
  // src/ui/App.tsx
48508
- var import_react29 = __toESM(require_react(), 1);
48499
+ var import_react30 = __toESM(require_react(), 1);
48500
+
48509
48501
  // src/ui/components/Header.tsx
48510
48502
  var import_react22 = __toESM(require_react(), 1);
48511
48503
  var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
@@ -48562,11 +48554,34 @@ function Header({ currentView, onViewChange, isFocused }) {
48562
48554
  }
48563
48555
 
48564
48556
  // src/ui/components/Banner.tsx
48565
- var import_react25 = __toESM(require_react(), 1);
48557
+ var import_react26 = __toESM(require_react(), 1);
48558
+
48559
+ // src/ui/components/ErrorBoundary.tsx
48560
+ var import_react23 = __toESM(require_react(), 1);
48561
+ var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
48562
+
48563
+ class ErrorBoundary extends import_react23.Component {
48564
+ constructor(props) {
48565
+ super(props);
48566
+ this.state = { hasError: false };
48567
+ }
48568
+ static getDerivedStateFromError(error) {
48569
+ return { hasError: true };
48570
+ }
48571
+ componentDidCatch(error, errorInfo) {}
48572
+ render() {
48573
+ if (this.state.hasError) {
48574
+ return this.props.fallback || /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48575
+ children: "VALUERAIL"
48576
+ }, undefined, false, undefined, this);
48577
+ }
48578
+ return this.props.children;
48579
+ }
48580
+ }
48566
48581
 
48567
48582
  // ../../node_modules/ink-gradient/dist/index.js
48568
48583
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
48569
- var import_react23 = __toESM(require_react(), 1);
48584
+ var import_react24 = __toESM(require_react(), 1);
48570
48585
 
48571
48586
  // ../../node_modules/gradient-string/dist/index.js
48572
48587
  var import_tinygradient = __toESM(require_tinygradient(), 1);
@@ -48712,11 +48727,11 @@ var Gradient = (props) => {
48712
48727
  const containsBoxDescendant = (nodeChildren) => {
48713
48728
  let hasBox = false;
48714
48729
  const search = (value) => {
48715
- import_react23.Children.forEach(value, (child) => {
48730
+ import_react24.Children.forEach(value, (child) => {
48716
48731
  if (hasBox) {
48717
48732
  return;
48718
48733
  }
48719
- if (!import_react23.isValidElement(child)) {
48734
+ if (!import_react24.isValidElement(child)) {
48720
48735
  return;
48721
48736
  }
48722
48737
  if (child.type === Box_default) {
@@ -48735,7 +48750,7 @@ var Gradient = (props) => {
48735
48750
  const hasChildrenProp = (props2) => Object.hasOwn(props2, "children");
48736
48751
  const isPlainTextNode = (node) => typeof node === "string" || typeof node === "number";
48737
48752
  const isNonRenderableChild = (node) => node === null || node === undefined || typeof node === "boolean";
48738
- const childrenCount = import_react23.Children.count(props.children);
48753
+ const childrenCount = import_react24.Children.count(props.children);
48739
48754
  if (isPlainTextNode(props.children)) {
48740
48755
  return import_jsx_runtime.jsx(Transform, { transform: applyGradient2, children: props.children });
48741
48756
  }
@@ -48758,7 +48773,7 @@ var Gradient = (props) => {
48758
48773
  bufferedText = "";
48759
48774
  pushTransformed(import_jsx_runtime.jsx(Text, { children: text }), createKey());
48760
48775
  };
48761
- import_react23.Children.forEach(children, (child) => {
48776
+ import_react24.Children.forEach(children, (child) => {
48762
48777
  if (isNonRenderableChild(child)) {
48763
48778
  return;
48764
48779
  }
@@ -48767,7 +48782,7 @@ var Gradient = (props) => {
48767
48782
  return;
48768
48783
  }
48769
48784
  flushText();
48770
- if (import_react23.isValidElement(child)) {
48785
+ if (import_react24.isValidElement(child)) {
48771
48786
  const childKey = child.key ?? createKey();
48772
48787
  const childProps = child.props;
48773
48788
  if (child.type === Text) {
@@ -48777,10 +48792,10 @@ var Gradient = (props) => {
48777
48792
  if (child.type === Box_default) {
48778
48793
  if (hasChildrenProp(childProps)) {
48779
48794
  const childChildren = childProps["children"];
48780
- nodes.push(import_react23.cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
48795
+ nodes.push(import_react24.cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
48781
48796
  return;
48782
48797
  }
48783
- nodes.push(import_react23.cloneElement(child, { key: childKey }));
48798
+ nodes.push(import_react24.cloneElement(child, { key: childKey }));
48784
48799
  return;
48785
48800
  }
48786
48801
  if (hasChildrenProp(childProps)) {
@@ -48789,7 +48804,7 @@ var Gradient = (props) => {
48789
48804
  pushTransformed(child, childKey);
48790
48805
  return;
48791
48806
  }
48792
- nodes.push(import_react23.cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
48807
+ nodes.push(import_react24.cloneElement(child, { key: childKey }, applyGradientToChildren(childChildren)));
48793
48808
  return;
48794
48809
  }
48795
48810
  pushTransformed(child, childKey);
@@ -48805,7 +48820,7 @@ var Gradient = (props) => {
48805
48820
  var dist_default5 = Gradient;
48806
48821
 
48807
48822
  // ../../node_modules/ink-big-text/dist/index.js
48808
- var import_react24 = __toESM(require_react(), 1);
48823
+ var import_react25 = __toESM(require_react(), 1);
48809
48824
  var import_cfonts = __toESM(require_lib(), 1);
48810
48825
  var defaultCFontProps = {
48811
48826
  font: "block",
@@ -48819,12 +48834,12 @@ var defaultCFontProps = {
48819
48834
  };
48820
48835
  var BigText = ({ text, ...props }) => {
48821
48836
  const cFontProps = { ...defaultCFontProps, ...props };
48822
- return import_react24.default.createElement(Text, null, import_cfonts.default.render(text, cFontProps).string);
48837
+ return import_react25.default.createElement(Text, null, import_cfonts.default.render(text, cFontProps).string);
48823
48838
  };
48824
48839
  var dist_default6 = BigText;
48825
48840
 
48826
48841
  // src/ui/components/Banner.tsx
48827
- var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
48842
+ var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
48828
48843
  import fs2 from "fs";
48829
48844
  import path from "path";
48830
48845
  var hasVrailConfig = () => {
@@ -48836,48 +48851,53 @@ var hasVrailConfig = () => {
48836
48851
  };
48837
48852
  function Banner() {
48838
48853
  const isVrailProject = hasVrailConfig();
48839
- const [version, setVersion] = import_react25.useState("v0.0.1");
48840
- import_react25.useEffect(() => {
48854
+ const [version, setVersion] = import_react26.useState("v0.0.1");
48855
+ import_react26.useEffect(() => {
48841
48856
  const v = process.env.CLI_VERSION || "v0.0.1";
48842
48857
  setVersion(v);
48843
48858
  }, []);
48844
- return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48859
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48845
48860
  flexDirection: "column",
48846
48861
  marginBottom: 1,
48847
48862
  children: [
48848
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(dist_default5, {
48849
- name: "morning",
48850
- children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(dist_default6, {
48851
- text: "VALUERAIL",
48852
- font: "simple"
48863
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ErrorBoundary, {
48864
+ fallback: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48865
+ children: "VALUERAIL"
48866
+ }, undefined, false, undefined, this),
48867
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(dist_default5, {
48868
+ name: "morning",
48869
+ children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(dist_default6, {
48870
+ text: "VALUERAIL",
48871
+ font: "simple"
48872
+ }, undefined, false, undefined, this)
48853
48873
  }, undefined, false, undefined, this)
48854
48874
  }, undefined, false, undefined, this),
48855
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48875
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48856
48876
  flexDirection: "column",
48857
48877
  marginLeft: 1,
48858
48878
  children: [
48859
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48879
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48860
48880
  flexDirection: "row",
48861
48881
  gap: 2,
48862
48882
  children: [
48863
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48883
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48864
48884
  color: "gray",
48865
48885
  children: [
48866
48886
  "Version: ",
48867
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48887
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48868
48888
  color: "#CD6052",
48869
48889
  children: version
48870
48890
  }, undefined, false, undefined, this)
48871
48891
  ]
48872
48892
  }, undefined, true, undefined, this),
48873
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48893
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48874
48894
  color: "gray",
48875
48895
  children: [
48876
48896
  "Project Status: ",
48877
- isVrailProject ? /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48897
+ isVrailProject ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48878
48898
  color: "green",
48879
48899
  children: "✔ Vrail Project Detected"
48880
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48900
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48881
48901
  color: "red",
48882
48902
  children: "✘ Not a Vrail Project"
48883
48903
  }, undefined, false, undefined, this)
@@ -48885,7 +48905,7 @@ function Banner() {
48885
48905
  }, undefined, true, undefined, this)
48886
48906
  ]
48887
48907
  }, undefined, true, undefined, this),
48888
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48908
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48889
48909
  color: "gray",
48890
48910
  dimColor: true,
48891
48911
  children: process.cwd()
@@ -48897,7 +48917,7 @@ function Banner() {
48897
48917
  }
48898
48918
 
48899
48919
  // src/ui/views/Author.tsx
48900
- var import_react26 = __toESM(require_react(), 1);
48920
+ var import_react27 = __toESM(require_react(), 1);
48901
48921
 
48902
48922
  // ../../node_modules/open/index.js
48903
48923
  import process19 from "node:process";
@@ -49506,7 +49526,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
49506
49526
  var open_default = open;
49507
49527
 
49508
49528
  // src/ui/views/Author.tsx
49509
- var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
49529
+ var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
49510
49530
  var AVATAR_ASCII = ` .---.
49511
49531
  / \\
49512
49532
  | o o |
@@ -49521,7 +49541,7 @@ var LINKS_DATA = [
49521
49541
  { label: "\uD83D\uDD19 Back", detail: " to Dashboard", value: "back" }
49522
49542
  ];
49523
49543
  function Author({ onViewChange, isFocused }) {
49524
- const [selectedIndex, setSelectedIndex] = import_react26.useState(0);
49544
+ const [selectedIndex, setSelectedIndex] = import_react27.useState(0);
49525
49545
  use_input_default((input, key) => {
49526
49546
  if (input === "b" || key.escape) {
49527
49547
  onViewChange("dashboard");
@@ -49543,7 +49563,7 @@ function Author({ onViewChange, isFocused }) {
49543
49563
  }
49544
49564
  }, { isActive: isFocused });
49545
49565
  const borderColor = isFocused ? "#CD6052" : "gray";
49546
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49566
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49547
49567
  flexDirection: "column",
49548
49568
  paddingLeft: 1,
49549
49569
  borderStyle: "single",
@@ -49552,64 +49572,64 @@ function Author({ onViewChange, isFocused }) {
49552
49572
  borderTop: false,
49553
49573
  borderBottom: false,
49554
49574
  borderColor,
49555
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49575
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49556
49576
  flexDirection: "column",
49557
49577
  children: [
49558
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49578
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49559
49579
  flexDirection: "row",
49560
49580
  gap: 2,
49561
49581
  children: [
49562
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49582
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49563
49583
  flexDirection: "column",
49564
49584
  marginRight: 2,
49565
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49585
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49566
49586
  color: "#CD6052",
49567
49587
  children: AVATAR_ASCII
49568
49588
  }, undefined, false, undefined, this)
49569
49589
  }, undefined, false, undefined, this),
49570
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49590
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49571
49591
  flexDirection: "column",
49572
49592
  children: [
49573
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49593
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49574
49594
  flexDirection: "column",
49575
49595
  children: [
49576
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49596
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49577
49597
  color: "#CD6052",
49578
49598
  bold: true,
49579
49599
  children: "Kamil Guszpit"
49580
49600
  }, undefined, false, undefined, this),
49581
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49601
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49582
49602
  children: "Full-Stack Developer & CTO"
49583
49603
  }, undefined, false, undefined, this),
49584
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49604
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49585
49605
  dimColor: true,
49586
49606
  children: "Wrocław, Poland"
49587
49607
  }, undefined, false, undefined, this)
49588
49608
  ]
49589
49609
  }, undefined, true, undefined, this),
49590
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49610
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49591
49611
  marginTop: 1,
49592
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49612
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49593
49613
  children: "Building scalable web applications, system architecture, and cloud-based solutions. Focused on deep technical refinement."
49594
49614
  }, undefined, false, undefined, this)
49595
49615
  }, undefined, false, undefined, this),
49596
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49616
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49597
49617
  marginTop: 1,
49598
49618
  flexDirection: "row",
49599
49619
  alignItems: "center",
49600
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49620
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49601
49621
  flexDirection: "row",
49602
49622
  children: LINKS_DATA.map((item, index) => {
49603
49623
  const isSelected = index === selectedIndex;
49604
49624
  const showSelection = isSelected && isFocused;
49605
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49625
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49606
49626
  marginRight: 2,
49607
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49627
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49608
49628
  color: showSelection ? "#CD6052" : "gray",
49609
49629
  underline: showSelection,
49610
49630
  children: [
49611
49631
  item.label,
49612
- showSelection ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49632
+ showSelection ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49613
49633
  dimColor: true,
49614
49634
  children: item.detail
49615
49635
  }, undefined, false, undefined, this) : ""
@@ -49623,9 +49643,9 @@ function Author({ onViewChange, isFocused }) {
49623
49643
  }, undefined, true, undefined, this)
49624
49644
  ]
49625
49645
  }, undefined, true, undefined, this),
49626
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49646
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49627
49647
  marginTop: 1,
49628
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49648
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49629
49649
  dimColor: true,
49630
49650
  children: isFocused ? "Press 'b' or ESC to return, Left/Right to navigate links" : "(Press TAB or focus content to navigate)"
49631
49651
  }, undefined, false, undefined, this)
@@ -49636,7 +49656,7 @@ function Author({ onViewChange, isFocused }) {
49636
49656
  }
49637
49657
 
49638
49658
  // src/ui/views/ExternalLink.tsx
49639
- var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
49659
+ var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
49640
49660
  function ExternalLink({ url, label, onBack }) {
49641
49661
  use_input_default((input, key) => {
49642
49662
  if (input === "b" || key.escape || key.return) {
@@ -49647,7 +49667,7 @@ function ExternalLink({ url, label, onBack }) {
49647
49667
  }
49648
49668
  });
49649
49669
  const borderColor = "#CD6052";
49650
- return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49670
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49651
49671
  flexDirection: "column",
49652
49672
  paddingLeft: 1,
49653
49673
  borderStyle: "single",
@@ -49656,24 +49676,24 @@ function ExternalLink({ url, label, onBack }) {
49656
49676
  borderTop: false,
49657
49677
  borderBottom: false,
49658
49678
  borderColor,
49659
- children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49679
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49660
49680
  flexDirection: "column",
49661
49681
  gap: 1,
49662
49682
  children: [
49663
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49683
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49664
49684
  bold: true,
49665
49685
  color: "#CD6052",
49666
49686
  children: "External Link "
49667
49687
  }, undefined, false, undefined, this),
49668
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49688
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49669
49689
  marginTop: 1,
49670
49690
  children: [
49671
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49691
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49672
49692
  color: "white",
49673
49693
  bold: true,
49674
49694
  children: label
49675
49695
  }, undefined, false, undefined, this),
49676
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49696
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49677
49697
  dimColor: true,
49678
49698
  children: [
49679
49699
  ": ",
@@ -49682,15 +49702,15 @@ function ExternalLink({ url, label, onBack }) {
49682
49702
  }, undefined, true, undefined, this)
49683
49703
  ]
49684
49704
  }, undefined, true, undefined, this),
49685
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49705
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49686
49706
  marginTop: 1,
49687
49707
  gap: 2,
49688
49708
  flexDirection: "column",
49689
49709
  children: [
49690
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49710
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49691
49711
  children: [
49692
49712
  "Press ",
49693
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49713
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49694
49714
  bold: true,
49695
49715
  color: "#CD6052",
49696
49716
  children: "O"
@@ -49698,7 +49718,7 @@ function ExternalLink({ url, label, onBack }) {
49698
49718
  " to open in browser"
49699
49719
  ]
49700
49720
  }, undefined, true, undefined, this),
49701
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49721
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49702
49722
  dimColor: true,
49703
49723
  children: "Press 'b', ESC, or Enter to go back"
49704
49724
  }, undefined, false, undefined, this)
@@ -49710,7 +49730,7 @@ function ExternalLink({ url, label, onBack }) {
49710
49730
  }
49711
49731
 
49712
49732
  // ../../node_modules/ink-select-input/build/Indicator.js
49713
- var import_react27 = __toESM(require_react(), 1);
49733
+ var import_react28 = __toESM(require_react(), 1);
49714
49734
 
49715
49735
  // ../../node_modules/is-unicode-supported/index.js
49716
49736
  import process20 from "node:process";
@@ -50001,17 +50021,17 @@ var replacements = Object.entries(specialMainSymbols);
50001
50021
 
50002
50022
  // ../../node_modules/ink-select-input/build/Indicator.js
50003
50023
  function Indicator({ isSelected = false }) {
50004
- return import_react27.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react27.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react27.default.createElement(Text, null, " "));
50024
+ return import_react28.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react28.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react28.default.createElement(Text, null, " "));
50005
50025
  }
50006
50026
  var Indicator_default = Indicator;
50007
50027
  // ../../node_modules/ink-select-input/build/Item.js
50008
- var React15 = __toESM(require_react(), 1);
50028
+ var React16 = __toESM(require_react(), 1);
50009
50029
  function Item({ isSelected = false, label }) {
50010
- return React15.createElement(Text, { color: isSelected ? "blue" : undefined }, label);
50030
+ return React16.createElement(Text, { color: isSelected ? "blue" : undefined }, label);
50011
50031
  }
50012
50032
  var Item_default = Item;
50013
50033
  // ../../node_modules/ink-select-input/build/SelectInput.js
50014
- var import_react28 = __toESM(require_react(), 1);
50034
+ var import_react29 = __toESM(require_react(), 1);
50015
50035
  import { isDeepStrictEqual } from "node:util";
50016
50036
 
50017
50037
  // ../../node_modules/to-rotated/index.js
@@ -50041,17 +50061,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
50041
50061
  const hasLimit = typeof customLimit === "number" && items.length > customLimit;
50042
50062
  const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
50043
50063
  const lastIndex = limit - 1;
50044
- const [rotateIndex, setRotateIndex] = import_react28.useState(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
50045
- const [selectedIndex, setSelectedIndex] = import_react28.useState(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
50046
- const previousItems = import_react28.useRef(items);
50047
- import_react28.useEffect(() => {
50064
+ const [rotateIndex, setRotateIndex] = import_react29.useState(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
50065
+ const [selectedIndex, setSelectedIndex] = import_react29.useState(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
50066
+ const previousItems = import_react29.useRef(items);
50067
+ import_react29.useEffect(() => {
50048
50068
  if (!isDeepStrictEqual(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
50049
50069
  setRotateIndex(0);
50050
50070
  setSelectedIndex(0);
50051
50071
  }
50052
50072
  previousItems.current = items;
50053
50073
  }, [items]);
50054
- use_input_default(import_react28.useCallback((input, key) => {
50074
+ use_input_default(import_react29.useCallback((input, key) => {
50055
50075
  if (input === "k" || key.upArrow) {
50056
50076
  const lastIndex2 = (hasLimit ? limit : items.length) - 1;
50057
50077
  const atFirstIndex = selectedIndex === 0;
@@ -50103,14 +50123,14 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
50103
50123
  onHighlight
50104
50124
  ]), { isActive: isFocused });
50105
50125
  const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit) : items;
50106
- return import_react28.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
50126
+ return import_react29.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
50107
50127
  const isSelected = index === selectedIndex;
50108
- return import_react28.default.createElement(Box_default, { key: item.key ?? item.value }, import_react28.default.createElement(indicatorComponent, { isSelected }), import_react28.default.createElement(itemComponent, { ...item, isSelected }));
50128
+ return import_react29.default.createElement(Box_default, { key: item.key ?? item.value }, import_react29.default.createElement(indicatorComponent, { isSelected }), import_react29.default.createElement(itemComponent, { ...item, isSelected }));
50109
50129
  }));
50110
50130
  }
50111
50131
  var SelectInput_default = SelectInput;
50112
50132
  // src/ui/views/Dashboard.tsx
50113
- var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
50133
+ var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
50114
50134
  var MENU_ITEMS = [
50115
50135
  { label: "\uD83D\uDE80 Initialize New Project", value: "init" },
50116
50136
  { label: "\uD83E\uDDE9 Add Module", value: "add-module" },
@@ -50121,7 +50141,7 @@ var MENU_ITEMS = [
50121
50141
  ];
50122
50142
  function Dashboard({ isFocused, onAction }) {
50123
50143
  const borderColor = isFocused ? "#CD6052" : "gray";
50124
- return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50144
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50125
50145
  flexDirection: "column",
50126
50146
  paddingLeft: 1,
50127
50147
  borderStyle: "single",
@@ -50130,33 +50150,33 @@ function Dashboard({ isFocused, onAction }) {
50130
50150
  borderTop: false,
50131
50151
  borderBottom: false,
50132
50152
  borderColor,
50133
- children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50153
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50134
50154
  flexDirection: "column",
50135
50155
  children: [
50136
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50156
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50137
50157
  bold: true,
50138
50158
  underline: true,
50139
50159
  color: borderColor,
50140
50160
  children: [
50141
50161
  "Dashboard Actions",
50142
- isFocused ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50162
+ isFocused ? /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50143
50163
  dimColor: true,
50144
50164
  children: " (Press ESC to Focus Header)"
50145
50165
  }, undefined, false, undefined, this) : ""
50146
50166
  ]
50147
50167
  }, undefined, true, undefined, this),
50148
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50168
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50149
50169
  height: 1
50150
50170
  }, undefined, false, undefined, this),
50151
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectInput_default, {
50171
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(SelectInput_default, {
50152
50172
  items: MENU_ITEMS,
50153
50173
  isFocused,
50154
50174
  onSelect: (item) => onAction(item.value),
50155
- indicatorComponent: ({ isSelected }) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50175
+ indicatorComponent: ({ isSelected }) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50156
50176
  color: "#CD6052",
50157
50177
  children: isSelected ? "> " : " "
50158
50178
  }, undefined, false, undefined, this),
50159
- itemComponent: ({ isSelected, label }) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50179
+ itemComponent: ({ isSelected, label }) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50160
50180
  color: isSelected ? "#CD6052" : isFocused ? "white" : "gray",
50161
50181
  children: label
50162
50182
  }, undefined, false, undefined, this)
@@ -50167,7 +50187,7 @@ function Dashboard({ isFocused, onAction }) {
50167
50187
  }
50168
50188
 
50169
50189
  // src/ui/views/ExitConfirmation.tsx
50170
- var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
50190
+ var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
50171
50191
  function ExitConfirmation({ onCancel }) {
50172
50192
  const { exit } = use_app_default();
50173
50193
  use_input_default((input, key) => {
@@ -50180,7 +50200,7 @@ function ExitConfirmation({ onCancel }) {
50180
50200
  }
50181
50201
  });
50182
50202
  const borderColor = "#CD6052";
50183
- return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50203
+ return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50184
50204
  flexDirection: "column",
50185
50205
  paddingLeft: 1,
50186
50206
  borderStyle: "single",
@@ -50189,29 +50209,29 @@ function ExitConfirmation({ onCancel }) {
50189
50209
  borderTop: false,
50190
50210
  borderBottom: false,
50191
50211
  borderColor,
50192
- children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50212
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50193
50213
  flexDirection: "column",
50194
50214
  children: [
50195
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50215
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50196
50216
  bold: true,
50197
50217
  color: borderColor,
50198
50218
  underline: true,
50199
50219
  children: "EXIT CONFIRMATION"
50200
50220
  }, undefined, false, undefined, this),
50201
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50221
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50202
50222
  height: 1
50203
50223
  }, undefined, false, undefined, this),
50204
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50224
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50205
50225
  children: "Are you sure you want to stop the CLI?"
50206
50226
  }, undefined, false, undefined, this),
50207
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50227
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50208
50228
  marginTop: 1,
50209
50229
  gap: 1,
50210
50230
  flexDirection: "column",
50211
50231
  children: [
50212
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50232
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50213
50233
  children: [
50214
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50234
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50215
50235
  bold: true,
50216
50236
  color: borderColor,
50217
50237
  children: "[Y]"
@@ -50219,9 +50239,9 @@ function ExitConfirmation({ onCancel }) {
50219
50239
  " Quit"
50220
50240
  ]
50221
50241
  }, undefined, true, undefined, this),
50222
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50242
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50223
50243
  children: [
50224
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50244
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50225
50245
  bold: true,
50226
50246
  color: "white",
50227
50247
  children: "[N / ESC]"
@@ -50237,7 +50257,7 @@ function ExitConfirmation({ onCancel }) {
50237
50257
  }
50238
50258
 
50239
50259
  // src/ui/views/License.tsx
50240
- var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
50260
+ var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
50241
50261
  function License({ onBack, isFocused }) {
50242
50262
  use_input_default((input, key) => {
50243
50263
  if (input === "b" || key.escape || key.return) {
@@ -50245,7 +50265,7 @@ function License({ onBack, isFocused }) {
50245
50265
  }
50246
50266
  }, { isActive: isFocused });
50247
50267
  const borderColor = "#CD6052";
50248
- return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50268
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50249
50269
  flexDirection: "column",
50250
50270
  paddingLeft: 1,
50251
50271
  borderStyle: "single",
@@ -50254,56 +50274,56 @@ function License({ onBack, isFocused }) {
50254
50274
  borderTop: false,
50255
50275
  borderBottom: false,
50256
50276
  borderColor,
50257
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50277
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50258
50278
  flexDirection: "column",
50259
50279
  gap: 1,
50260
50280
  children: [
50261
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50281
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50262
50282
  bold: true,
50263
50283
  color: "#CD6052",
50264
50284
  children: "License Information"
50265
50285
  }, undefined, false, undefined, this),
50266
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50286
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50267
50287
  marginTop: 1,
50268
50288
  flexDirection: "column",
50269
50289
  children: [
50270
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50290
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50271
50291
  bold: true,
50272
50292
  children: "Business Source License (BSL) 1.1"
50273
50293
  }, undefined, false, undefined, this),
50274
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50294
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50275
50295
  dimColor: true,
50276
50296
  children: "Licensor: Kamil Guszpit"
50277
50297
  }, undefined, false, undefined, this),
50278
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50298
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50279
50299
  dimColor: true,
50280
50300
  children: "Change Date: 4 years after release"
50281
50301
  }, undefined, false, undefined, this)
50282
50302
  ]
50283
50303
  }, undefined, true, undefined, this),
50284
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50304
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50285
50305
  marginTop: 1,
50286
50306
  borderStyle: "round",
50287
50307
  borderColor: "gray",
50288
50308
  padding: 1,
50289
50309
  flexDirection: "column",
50290
50310
  children: [
50291
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50311
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50292
50312
  children: [
50293
50313
  "You may use this software for ",
50294
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50314
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50295
50315
  bold: true,
50296
50316
  color: "green",
50297
50317
  children: "Non-Commercial"
50298
50318
  }, undefined, false, undefined, this),
50299
50319
  ", ",
50300
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50320
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50301
50321
  bold: true,
50302
50322
  color: "green",
50303
50323
  children: "Personal"
50304
50324
  }, undefined, false, undefined, this),
50305
50325
  ", or ",
50306
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50326
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50307
50327
  bold: true,
50308
50328
  color: "green",
50309
50329
  children: "Development"
@@ -50311,18 +50331,18 @@ function License({ onBack, isFocused }) {
50311
50331
  " purposes."
50312
50332
  ]
50313
50333
  }, undefined, true, undefined, this),
50314
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50334
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50315
50335
  children: "Production use requires a Commercial License."
50316
50336
  }, undefined, false, undefined, this),
50317
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50337
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50318
50338
  dimColor: true,
50319
50339
  children: "Files automatically convert to Apache 2.0 (Open Source) after 4 years."
50320
50340
  }, undefined, false, undefined, this)
50321
50341
  ]
50322
50342
  }, undefined, true, undefined, this),
50323
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50343
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50324
50344
  marginTop: 1,
50325
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50345
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50326
50346
  dimColor: true,
50327
50347
  children: "Press 'b', ESC, or Enter to go back"
50328
50348
  }, undefined, false, undefined, this)
@@ -50333,11 +50353,11 @@ function License({ onBack, isFocused }) {
50333
50353
  }
50334
50354
 
50335
50355
  // src/ui/App.tsx
50336
- var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
50356
+ var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
50337
50357
  function App2() {
50338
- const [currentView, setCurrentView] = import_react29.useState("dashboard");
50339
- const [focusArea, setFocusArea] = import_react29.useState("content");
50340
- import_react29.useEffect(() => {
50358
+ const [currentView, setCurrentView] = import_react30.useState("dashboard");
50359
+ const [focusArea, setFocusArea] = import_react30.useState("content");
50360
+ import_react30.useEffect(() => {
50341
50361
  console.clear();
50342
50362
  }, []);
50343
50363
  const goToHeader = () => setFocusArea("header");
@@ -50360,13 +50380,13 @@ function App2() {
50360
50380
  setFocusArea((prev) => prev === "header" ? "content" : "header");
50361
50381
  }
50362
50382
  });
50363
- return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50383
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50364
50384
  flexDirection: "column",
50365
50385
  height: "100%",
50366
50386
  padding: 1,
50367
50387
  children: [
50368
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Banner, {}, undefined, false, undefined, this),
50369
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Header, {
50388
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Banner, {}, undefined, false, undefined, this),
50389
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Header, {
50370
50390
  currentView: currentView === "exit-confirm" ? "dashboard" : currentView,
50371
50391
  onViewChange: (view) => {
50372
50392
  setCurrentView(view);
@@ -50374,11 +50394,11 @@ function App2() {
50374
50394
  },
50375
50395
  isFocused: focusArea === "header"
50376
50396
  }, undefined, false, undefined, this),
50377
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50397
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50378
50398
  marginTop: 1,
50379
50399
  flexDirection: "column",
50380
50400
  children: [
50381
- currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Dashboard, {
50401
+ currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Dashboard, {
50382
50402
  isFocused: focusArea === "content",
50383
50403
  onAction: (action) => {
50384
50404
  if (action === "exit") {
@@ -50386,25 +50406,25 @@ function App2() {
50386
50406
  }
50387
50407
  }
50388
50408
  }, undefined, false, undefined, this),
50389
- currentView === "author" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Author, {
50409
+ currentView === "author" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Author, {
50390
50410
  onViewChange: goToHeader,
50391
50411
  isFocused: focusArea === "content"
50392
50412
  }, undefined, false, undefined, this),
50393
- currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExternalLink, {
50413
+ currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50394
50414
  label: "NPM Registry",
50395
50415
  url: "https://www.npmjs.com/package/valuerail",
50396
50416
  onBack: goToHeader
50397
50417
  }, undefined, false, undefined, this),
50398
- currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExternalLink, {
50418
+ currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50399
50419
  label: "GitHub Repository",
50400
50420
  url: "https://github.com/kamilguszpit/valuerail",
50401
50421
  onBack: goToHeader
50402
50422
  }, undefined, false, undefined, this),
50403
- currentView === "license" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(License, {
50423
+ currentView === "license" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(License, {
50404
50424
  onBack: goToHeader,
50405
50425
  isFocused: focusArea === "content"
50406
50426
  }, undefined, false, undefined, this),
50407
- currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExitConfirmation, {
50427
+ currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExitConfirmation, {
50408
50428
  onCancel: goToDashboard
50409
50429
  }, undefined, false, undefined, this)
50410
50430
  ]
@@ -50414,5 +50434,14 @@ function App2() {
50414
50434
  }
50415
50435
 
50416
50436
  // src/index.tsx
50417
- var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime2(), 1);
50418
- render_default(/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(App2, {}, undefined, false, undefined, this));
50437
+ var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
50438
+ process.on("uncaughtException", (err) => {
50439
+ console.error("Uncaught Exception:", err);
50440
+ process.exit(1);
50441
+ });
50442
+ process.on("unhandledRejection", (reason, promise) => {
50443
+ console.error("Unhandled Rejection at:", promise, "reason:", reason);
50444
+ process.exit(1);
50445
+ });
50446
+ var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(App2, {}, undefined, false, undefined, this));
50447
+ await waitUntilExit();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valuerail/cli",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "author": "Kamil Guszpit",
5
5
  "license": "BUSL-1.1",
6
6
  "type": "module",
@@ -17,8 +17,9 @@
17
17
  "scripts": {
18
18
  "dev": "CLI_VERSION=$(bun -e 'console.log(require(\"./package.json\").version)') bun --watch run src/index.tsx",
19
19
  "build": "bun build ./src/index.tsx --compile --outfile dist/vrail",
20
+ "start": "node ./dist/index.js",
20
21
  "build:npm": "bun build ./src/index.tsx --target=node --format=esm --outfile dist/index.js --define:process.env.CLI_VERSION=\"\\\"$(jq -r .version package.json)\\\"\"",
21
- "postbuild:npm": "cp -r ../../node_modules/cfonts/fonts ./fonts",
22
+ "postbuild:npm": "rm -rf fonts && cp -r $(find ../../node_modules -path \"*/cfonts/fonts\" -type d | head -n 1) ./fonts",
22
23
  "lint": "echo 'linting...'"
23
24
  },
24
25
  "dependencies": {