@valuerail/cli 1.0.0-beta.4 → 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 +176 -146
  2. package/package.json +4 -3
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 = () => {
@@ -48834,49 +48849,55 @@ var hasVrailConfig = () => {
48834
48849
  return false;
48835
48850
  }
48836
48851
  };
48837
- var getCliVersion = () => {
48838
- return process.env.CLI_VERSION || "v0.0.1";
48839
- };
48840
48852
  function Banner() {
48841
48853
  const isVrailProject = hasVrailConfig();
48842
- const [version, setVersion] = import_react25.useState(getCliVersion());
48843
- return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48854
+ const [version, setVersion] = import_react26.useState("v0.0.1");
48855
+ import_react26.useEffect(() => {
48856
+ const v = process.env.CLI_VERSION || "v0.0.1";
48857
+ setVersion(v);
48858
+ }, []);
48859
+ return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48844
48860
  flexDirection: "column",
48845
48861
  marginBottom: 1,
48846
48862
  children: [
48847
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(dist_default5, {
48848
- name: "morning",
48849
- children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(dist_default6, {
48850
- text: "VALUERAIL",
48851
- 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)
48852
48873
  }, undefined, false, undefined, this)
48853
48874
  }, undefined, false, undefined, this),
48854
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48875
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48855
48876
  flexDirection: "column",
48856
48877
  marginLeft: 1,
48857
48878
  children: [
48858
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Box_default, {
48879
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48859
48880
  flexDirection: "row",
48860
48881
  gap: 2,
48861
48882
  children: [
48862
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48883
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48863
48884
  color: "gray",
48864
48885
  children: [
48865
48886
  "Version: ",
48866
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48887
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48867
48888
  color: "#CD6052",
48868
48889
  children: version
48869
48890
  }, undefined, false, undefined, this)
48870
48891
  ]
48871
48892
  }, undefined, true, undefined, this),
48872
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48893
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48873
48894
  color: "gray",
48874
48895
  children: [
48875
48896
  "Project Status: ",
48876
- isVrailProject ? /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48897
+ isVrailProject ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48877
48898
  color: "green",
48878
48899
  children: "✔ Vrail Project Detected"
48879
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48900
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48880
48901
  color: "red",
48881
48902
  children: "✘ Not a Vrail Project"
48882
48903
  }, undefined, false, undefined, this)
@@ -48884,7 +48905,7 @@ function Banner() {
48884
48905
  }, undefined, true, undefined, this)
48885
48906
  ]
48886
48907
  }, undefined, true, undefined, this),
48887
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48908
+ /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
48888
48909
  color: "gray",
48889
48910
  dimColor: true,
48890
48911
  children: process.cwd()
@@ -48896,7 +48917,7 @@ function Banner() {
48896
48917
  }
48897
48918
 
48898
48919
  // src/ui/views/Author.tsx
48899
- var import_react26 = __toESM(require_react(), 1);
48920
+ var import_react27 = __toESM(require_react(), 1);
48900
48921
 
48901
48922
  // ../../node_modules/open/index.js
48902
48923
  import process19 from "node:process";
@@ -49505,7 +49526,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
49505
49526
  var open_default = open;
49506
49527
 
49507
49528
  // src/ui/views/Author.tsx
49508
- var jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
49529
+ var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
49509
49530
  var AVATAR_ASCII = ` .---.
49510
49531
  / \\
49511
49532
  | o o |
@@ -49520,7 +49541,7 @@ var LINKS_DATA = [
49520
49541
  { label: "\uD83D\uDD19 Back", detail: " to Dashboard", value: "back" }
49521
49542
  ];
49522
49543
  function Author({ onViewChange, isFocused }) {
49523
- const [selectedIndex, setSelectedIndex] = import_react26.useState(0);
49544
+ const [selectedIndex, setSelectedIndex] = import_react27.useState(0);
49524
49545
  use_input_default((input, key) => {
49525
49546
  if (input === "b" || key.escape) {
49526
49547
  onViewChange("dashboard");
@@ -49542,7 +49563,7 @@ function Author({ onViewChange, isFocused }) {
49542
49563
  }
49543
49564
  }, { isActive: isFocused });
49544
49565
  const borderColor = isFocused ? "#CD6052" : "gray";
49545
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49566
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49546
49567
  flexDirection: "column",
49547
49568
  paddingLeft: 1,
49548
49569
  borderStyle: "single",
@@ -49551,64 +49572,64 @@ function Author({ onViewChange, isFocused }) {
49551
49572
  borderTop: false,
49552
49573
  borderBottom: false,
49553
49574
  borderColor,
49554
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49575
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49555
49576
  flexDirection: "column",
49556
49577
  children: [
49557
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49578
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49558
49579
  flexDirection: "row",
49559
49580
  gap: 2,
49560
49581
  children: [
49561
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49582
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49562
49583
  flexDirection: "column",
49563
49584
  marginRight: 2,
49564
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49585
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49565
49586
  color: "#CD6052",
49566
49587
  children: AVATAR_ASCII
49567
49588
  }, undefined, false, undefined, this)
49568
49589
  }, undefined, false, undefined, this),
49569
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49590
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49570
49591
  flexDirection: "column",
49571
49592
  children: [
49572
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49593
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49573
49594
  flexDirection: "column",
49574
49595
  children: [
49575
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49596
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49576
49597
  color: "#CD6052",
49577
49598
  bold: true,
49578
49599
  children: "Kamil Guszpit"
49579
49600
  }, undefined, false, undefined, this),
49580
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49601
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49581
49602
  children: "Full-Stack Developer & CTO"
49582
49603
  }, undefined, false, undefined, this),
49583
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49604
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49584
49605
  dimColor: true,
49585
49606
  children: "Wrocław, Poland"
49586
49607
  }, undefined, false, undefined, this)
49587
49608
  ]
49588
49609
  }, undefined, true, undefined, this),
49589
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49610
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49590
49611
  marginTop: 1,
49591
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49612
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49592
49613
  children: "Building scalable web applications, system architecture, and cloud-based solutions. Focused on deep technical refinement."
49593
49614
  }, undefined, false, undefined, this)
49594
49615
  }, undefined, false, undefined, this),
49595
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49616
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49596
49617
  marginTop: 1,
49597
49618
  flexDirection: "row",
49598
49619
  alignItems: "center",
49599
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49620
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49600
49621
  flexDirection: "row",
49601
49622
  children: LINKS_DATA.map((item, index) => {
49602
49623
  const isSelected = index === selectedIndex;
49603
49624
  const showSelection = isSelected && isFocused;
49604
- return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49625
+ return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49605
49626
  marginRight: 2,
49606
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49627
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49607
49628
  color: showSelection ? "#CD6052" : "gray",
49608
49629
  underline: showSelection,
49609
49630
  children: [
49610
49631
  item.label,
49611
- showSelection ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49632
+ showSelection ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49612
49633
  dimColor: true,
49613
49634
  children: item.detail
49614
49635
  }, undefined, false, undefined, this) : ""
@@ -49622,9 +49643,9 @@ function Author({ onViewChange, isFocused }) {
49622
49643
  }, undefined, true, undefined, this)
49623
49644
  ]
49624
49645
  }, undefined, true, undefined, this),
49625
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49646
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49626
49647
  marginTop: 1,
49627
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
49648
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49628
49649
  dimColor: true,
49629
49650
  children: isFocused ? "Press 'b' or ESC to return, Left/Right to navigate links" : "(Press TAB or focus content to navigate)"
49630
49651
  }, undefined, false, undefined, this)
@@ -49635,7 +49656,7 @@ function Author({ onViewChange, isFocused }) {
49635
49656
  }
49636
49657
 
49637
49658
  // src/ui/views/ExternalLink.tsx
49638
- var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
49659
+ var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
49639
49660
  function ExternalLink({ url, label, onBack }) {
49640
49661
  use_input_default((input, key) => {
49641
49662
  if (input === "b" || key.escape || key.return) {
@@ -49646,7 +49667,7 @@ function ExternalLink({ url, label, onBack }) {
49646
49667
  }
49647
49668
  });
49648
49669
  const borderColor = "#CD6052";
49649
- return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49670
+ return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49650
49671
  flexDirection: "column",
49651
49672
  paddingLeft: 1,
49652
49673
  borderStyle: "single",
@@ -49655,24 +49676,24 @@ function ExternalLink({ url, label, onBack }) {
49655
49676
  borderTop: false,
49656
49677
  borderBottom: false,
49657
49678
  borderColor,
49658
- children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49679
+ children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49659
49680
  flexDirection: "column",
49660
49681
  gap: 1,
49661
49682
  children: [
49662
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49683
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49663
49684
  bold: true,
49664
49685
  color: "#CD6052",
49665
49686
  children: "External Link "
49666
49687
  }, undefined, false, undefined, this),
49667
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49688
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49668
49689
  marginTop: 1,
49669
49690
  children: [
49670
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49691
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49671
49692
  color: "white",
49672
49693
  bold: true,
49673
49694
  children: label
49674
49695
  }, undefined, false, undefined, this),
49675
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49696
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49676
49697
  dimColor: true,
49677
49698
  children: [
49678
49699
  ": ",
@@ -49681,15 +49702,15 @@ function ExternalLink({ url, label, onBack }) {
49681
49702
  }, undefined, true, undefined, this)
49682
49703
  ]
49683
49704
  }, undefined, true, undefined, this),
49684
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
49705
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
49685
49706
  marginTop: 1,
49686
49707
  gap: 2,
49687
49708
  flexDirection: "column",
49688
49709
  children: [
49689
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49710
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49690
49711
  children: [
49691
49712
  "Press ",
49692
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49713
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49693
49714
  bold: true,
49694
49715
  color: "#CD6052",
49695
49716
  children: "O"
@@ -49697,7 +49718,7 @@ function ExternalLink({ url, label, onBack }) {
49697
49718
  " to open in browser"
49698
49719
  ]
49699
49720
  }, undefined, true, undefined, this),
49700
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
49721
+ /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
49701
49722
  dimColor: true,
49702
49723
  children: "Press 'b', ESC, or Enter to go back"
49703
49724
  }, undefined, false, undefined, this)
@@ -49709,7 +49730,7 @@ function ExternalLink({ url, label, onBack }) {
49709
49730
  }
49710
49731
 
49711
49732
  // ../../node_modules/ink-select-input/build/Indicator.js
49712
- var import_react27 = __toESM(require_react(), 1);
49733
+ var import_react28 = __toESM(require_react(), 1);
49713
49734
 
49714
49735
  // ../../node_modules/is-unicode-supported/index.js
49715
49736
  import process20 from "node:process";
@@ -50000,17 +50021,17 @@ var replacements = Object.entries(specialMainSymbols);
50000
50021
 
50001
50022
  // ../../node_modules/ink-select-input/build/Indicator.js
50002
50023
  function Indicator({ isSelected = false }) {
50003
- 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, " "));
50004
50025
  }
50005
50026
  var Indicator_default = Indicator;
50006
50027
  // ../../node_modules/ink-select-input/build/Item.js
50007
- var React15 = __toESM(require_react(), 1);
50028
+ var React16 = __toESM(require_react(), 1);
50008
50029
  function Item({ isSelected = false, label }) {
50009
- return React15.createElement(Text, { color: isSelected ? "blue" : undefined }, label);
50030
+ return React16.createElement(Text, { color: isSelected ? "blue" : undefined }, label);
50010
50031
  }
50011
50032
  var Item_default = Item;
50012
50033
  // ../../node_modules/ink-select-input/build/SelectInput.js
50013
- var import_react28 = __toESM(require_react(), 1);
50034
+ var import_react29 = __toESM(require_react(), 1);
50014
50035
  import { isDeepStrictEqual } from "node:util";
50015
50036
 
50016
50037
  // ../../node_modules/to-rotated/index.js
@@ -50040,17 +50061,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
50040
50061
  const hasLimit = typeof customLimit === "number" && items.length > customLimit;
50041
50062
  const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
50042
50063
  const lastIndex = limit - 1;
50043
- const [rotateIndex, setRotateIndex] = import_react28.useState(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
50044
- const [selectedIndex, setSelectedIndex] = import_react28.useState(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
50045
- const previousItems = import_react28.useRef(items);
50046
- 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(() => {
50047
50068
  if (!isDeepStrictEqual(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
50048
50069
  setRotateIndex(0);
50049
50070
  setSelectedIndex(0);
50050
50071
  }
50051
50072
  previousItems.current = items;
50052
50073
  }, [items]);
50053
- use_input_default(import_react28.useCallback((input, key) => {
50074
+ use_input_default(import_react29.useCallback((input, key) => {
50054
50075
  if (input === "k" || key.upArrow) {
50055
50076
  const lastIndex2 = (hasLimit ? limit : items.length) - 1;
50056
50077
  const atFirstIndex = selectedIndex === 0;
@@ -50102,14 +50123,14 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
50102
50123
  onHighlight
50103
50124
  ]), { isActive: isFocused });
50104
50125
  const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit) : items;
50105
- 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) => {
50106
50127
  const isSelected = index === selectedIndex;
50107
- 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 }));
50108
50129
  }));
50109
50130
  }
50110
50131
  var SelectInput_default = SelectInput;
50111
50132
  // src/ui/views/Dashboard.tsx
50112
- var jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
50133
+ var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
50113
50134
  var MENU_ITEMS = [
50114
50135
  { label: "\uD83D\uDE80 Initialize New Project", value: "init" },
50115
50136
  { label: "\uD83E\uDDE9 Add Module", value: "add-module" },
@@ -50120,7 +50141,7 @@ var MENU_ITEMS = [
50120
50141
  ];
50121
50142
  function Dashboard({ isFocused, onAction }) {
50122
50143
  const borderColor = isFocused ? "#CD6052" : "gray";
50123
- return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50144
+ return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50124
50145
  flexDirection: "column",
50125
50146
  paddingLeft: 1,
50126
50147
  borderStyle: "single",
@@ -50129,33 +50150,33 @@ function Dashboard({ isFocused, onAction }) {
50129
50150
  borderTop: false,
50130
50151
  borderBottom: false,
50131
50152
  borderColor,
50132
- children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50153
+ children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50133
50154
  flexDirection: "column",
50134
50155
  children: [
50135
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50156
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50136
50157
  bold: true,
50137
50158
  underline: true,
50138
50159
  color: borderColor,
50139
50160
  children: [
50140
50161
  "Dashboard Actions",
50141
- isFocused ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50162
+ isFocused ? /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50142
50163
  dimColor: true,
50143
50164
  children: " (Press ESC to Focus Header)"
50144
50165
  }, undefined, false, undefined, this) : ""
50145
50166
  ]
50146
50167
  }, undefined, true, undefined, this),
50147
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
50168
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50148
50169
  height: 1
50149
50170
  }, undefined, false, undefined, this),
50150
- /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectInput_default, {
50171
+ /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(SelectInput_default, {
50151
50172
  items: MENU_ITEMS,
50152
50173
  isFocused,
50153
50174
  onSelect: (item) => onAction(item.value),
50154
- indicatorComponent: ({ isSelected }) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50175
+ indicatorComponent: ({ isSelected }) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50155
50176
  color: "#CD6052",
50156
50177
  children: isSelected ? "> " : " "
50157
50178
  }, undefined, false, undefined, this),
50158
- itemComponent: ({ isSelected, label }) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
50179
+ itemComponent: ({ isSelected, label }) => /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50159
50180
  color: isSelected ? "#CD6052" : isFocused ? "white" : "gray",
50160
50181
  children: label
50161
50182
  }, undefined, false, undefined, this)
@@ -50166,7 +50187,7 @@ function Dashboard({ isFocused, onAction }) {
50166
50187
  }
50167
50188
 
50168
50189
  // src/ui/views/ExitConfirmation.tsx
50169
- var jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
50190
+ var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
50170
50191
  function ExitConfirmation({ onCancel }) {
50171
50192
  const { exit } = use_app_default();
50172
50193
  use_input_default((input, key) => {
@@ -50179,7 +50200,7 @@ function ExitConfirmation({ onCancel }) {
50179
50200
  }
50180
50201
  });
50181
50202
  const borderColor = "#CD6052";
50182
- return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50203
+ return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50183
50204
  flexDirection: "column",
50184
50205
  paddingLeft: 1,
50185
50206
  borderStyle: "single",
@@ -50188,29 +50209,29 @@ function ExitConfirmation({ onCancel }) {
50188
50209
  borderTop: false,
50189
50210
  borderBottom: false,
50190
50211
  borderColor,
50191
- children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50212
+ children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50192
50213
  flexDirection: "column",
50193
50214
  children: [
50194
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50215
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50195
50216
  bold: true,
50196
50217
  color: borderColor,
50197
50218
  underline: true,
50198
50219
  children: "EXIT CONFIRMATION"
50199
50220
  }, undefined, false, undefined, this),
50200
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50221
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50201
50222
  height: 1
50202
50223
  }, undefined, false, undefined, this),
50203
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50224
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50204
50225
  children: "Are you sure you want to stop the CLI?"
50205
50226
  }, undefined, false, undefined, this),
50206
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
50227
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50207
50228
  marginTop: 1,
50208
50229
  gap: 1,
50209
50230
  flexDirection: "column",
50210
50231
  children: [
50211
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50232
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50212
50233
  children: [
50213
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50234
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50214
50235
  bold: true,
50215
50236
  color: borderColor,
50216
50237
  children: "[Y]"
@@ -50218,9 +50239,9 @@ function ExitConfirmation({ onCancel }) {
50218
50239
  " Quit"
50219
50240
  ]
50220
50241
  }, undefined, true, undefined, this),
50221
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50242
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50222
50243
  children: [
50223
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
50244
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50224
50245
  bold: true,
50225
50246
  color: "white",
50226
50247
  children: "[N / ESC]"
@@ -50236,7 +50257,7 @@ function ExitConfirmation({ onCancel }) {
50236
50257
  }
50237
50258
 
50238
50259
  // src/ui/views/License.tsx
50239
- var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
50260
+ var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
50240
50261
  function License({ onBack, isFocused }) {
50241
50262
  use_input_default((input, key) => {
50242
50263
  if (input === "b" || key.escape || key.return) {
@@ -50244,7 +50265,7 @@ function License({ onBack, isFocused }) {
50244
50265
  }
50245
50266
  }, { isActive: isFocused });
50246
50267
  const borderColor = "#CD6052";
50247
- return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50268
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50248
50269
  flexDirection: "column",
50249
50270
  paddingLeft: 1,
50250
50271
  borderStyle: "single",
@@ -50253,56 +50274,56 @@ function License({ onBack, isFocused }) {
50253
50274
  borderTop: false,
50254
50275
  borderBottom: false,
50255
50276
  borderColor,
50256
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50277
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50257
50278
  flexDirection: "column",
50258
50279
  gap: 1,
50259
50280
  children: [
50260
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50281
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50261
50282
  bold: true,
50262
50283
  color: "#CD6052",
50263
50284
  children: "License Information"
50264
50285
  }, undefined, false, undefined, this),
50265
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50286
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50266
50287
  marginTop: 1,
50267
50288
  flexDirection: "column",
50268
50289
  children: [
50269
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50290
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50270
50291
  bold: true,
50271
50292
  children: "Business Source License (BSL) 1.1"
50272
50293
  }, undefined, false, undefined, this),
50273
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50294
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50274
50295
  dimColor: true,
50275
50296
  children: "Licensor: Kamil Guszpit"
50276
50297
  }, undefined, false, undefined, this),
50277
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50298
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50278
50299
  dimColor: true,
50279
50300
  children: "Change Date: 4 years after release"
50280
50301
  }, undefined, false, undefined, this)
50281
50302
  ]
50282
50303
  }, undefined, true, undefined, this),
50283
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50304
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50284
50305
  marginTop: 1,
50285
50306
  borderStyle: "round",
50286
50307
  borderColor: "gray",
50287
50308
  padding: 1,
50288
50309
  flexDirection: "column",
50289
50310
  children: [
50290
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50311
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50291
50312
  children: [
50292
50313
  "You may use this software for ",
50293
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50314
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50294
50315
  bold: true,
50295
50316
  color: "green",
50296
50317
  children: "Non-Commercial"
50297
50318
  }, undefined, false, undefined, this),
50298
50319
  ", ",
50299
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50320
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50300
50321
  bold: true,
50301
50322
  color: "green",
50302
50323
  children: "Personal"
50303
50324
  }, undefined, false, undefined, this),
50304
50325
  ", or ",
50305
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50326
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50306
50327
  bold: true,
50307
50328
  color: "green",
50308
50329
  children: "Development"
@@ -50310,18 +50331,18 @@ function License({ onBack, isFocused }) {
50310
50331
  " purposes."
50311
50332
  ]
50312
50333
  }, undefined, true, undefined, this),
50313
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50334
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50314
50335
  children: "Production use requires a Commercial License."
50315
50336
  }, undefined, false, undefined, this),
50316
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50337
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50317
50338
  dimColor: true,
50318
50339
  children: "Files automatically convert to Apache 2.0 (Open Source) after 4 years."
50319
50340
  }, undefined, false, undefined, this)
50320
50341
  ]
50321
50342
  }, undefined, true, undefined, this),
50322
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
50343
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50323
50344
  marginTop: 1,
50324
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
50345
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
50325
50346
  dimColor: true,
50326
50347
  children: "Press 'b', ESC, or Enter to go back"
50327
50348
  }, undefined, false, undefined, this)
@@ -50332,11 +50353,11 @@ function License({ onBack, isFocused }) {
50332
50353
  }
50333
50354
 
50334
50355
  // src/ui/App.tsx
50335
- var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
50356
+ var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
50336
50357
  function App2() {
50337
- const [currentView, setCurrentView] = import_react29.useState("dashboard");
50338
- const [focusArea, setFocusArea] = import_react29.useState("content");
50339
- import_react29.useEffect(() => {
50358
+ const [currentView, setCurrentView] = import_react30.useState("dashboard");
50359
+ const [focusArea, setFocusArea] = import_react30.useState("content");
50360
+ import_react30.useEffect(() => {
50340
50361
  console.clear();
50341
50362
  }, []);
50342
50363
  const goToHeader = () => setFocusArea("header");
@@ -50359,13 +50380,13 @@ function App2() {
50359
50380
  setFocusArea((prev) => prev === "header" ? "content" : "header");
50360
50381
  }
50361
50382
  });
50362
- return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50383
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50363
50384
  flexDirection: "column",
50364
50385
  height: "100%",
50365
50386
  padding: 1,
50366
50387
  children: [
50367
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Banner, {}, undefined, false, undefined, this),
50368
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Header, {
50388
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Banner, {}, undefined, false, undefined, this),
50389
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Header, {
50369
50390
  currentView: currentView === "exit-confirm" ? "dashboard" : currentView,
50370
50391
  onViewChange: (view) => {
50371
50392
  setCurrentView(view);
@@ -50373,11 +50394,11 @@ function App2() {
50373
50394
  },
50374
50395
  isFocused: focusArea === "header"
50375
50396
  }, undefined, false, undefined, this),
50376
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
50397
+ /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50377
50398
  marginTop: 1,
50378
50399
  flexDirection: "column",
50379
50400
  children: [
50380
- currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Dashboard, {
50401
+ currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Dashboard, {
50381
50402
  isFocused: focusArea === "content",
50382
50403
  onAction: (action) => {
50383
50404
  if (action === "exit") {
@@ -50385,25 +50406,25 @@ function App2() {
50385
50406
  }
50386
50407
  }
50387
50408
  }, undefined, false, undefined, this),
50388
- currentView === "author" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Author, {
50409
+ currentView === "author" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Author, {
50389
50410
  onViewChange: goToHeader,
50390
50411
  isFocused: focusArea === "content"
50391
50412
  }, undefined, false, undefined, this),
50392
- currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExternalLink, {
50413
+ currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50393
50414
  label: "NPM Registry",
50394
50415
  url: "https://www.npmjs.com/package/valuerail",
50395
50416
  onBack: goToHeader
50396
50417
  }, undefined, false, undefined, this),
50397
- currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExternalLink, {
50418
+ currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50398
50419
  label: "GitHub Repository",
50399
50420
  url: "https://github.com/kamilguszpit/valuerail",
50400
50421
  onBack: goToHeader
50401
50422
  }, undefined, false, undefined, this),
50402
- currentView === "license" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(License, {
50423
+ currentView === "license" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(License, {
50403
50424
  onBack: goToHeader,
50404
50425
  isFocused: focusArea === "content"
50405
50426
  }, undefined, false, undefined, this),
50406
- currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ExitConfirmation, {
50427
+ currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExitConfirmation, {
50407
50428
  onCancel: goToDashboard
50408
50429
  }, undefined, false, undefined, this)
50409
50430
  ]
@@ -50413,5 +50434,14 @@ function App2() {
50413
50434
  }
50414
50435
 
50415
50436
  // src/index.tsx
50416
- var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime2(), 1);
50417
- 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.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "author": "Kamil Guszpit",
5
5
  "license": "BUSL-1.1",
6
6
  "type": "module",
@@ -15,10 +15,11 @@
15
15
  "fonts"
16
16
  ],
17
17
  "scripts": {
18
- "dev": "bun --watch run src/index.tsx",
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": {