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

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 +242 -121
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1840,7 +1840,7 @@ var require_react = __commonJS((exports, module) => {
1840
1840
  }
1841
1841
  });
1842
1842
 
1843
- // ../../node_modules/signal-exit/signals.js
1843
+ // ../../node_modules/ink/node_modules/signal-exit/signals.js
1844
1844
  var require_signals = __commonJS((exports, module) => {
1845
1845
  module.exports = [
1846
1846
  "SIGABRT",
@@ -1857,7 +1857,7 @@ var require_signals = __commonJS((exports, module) => {
1857
1857
  }
1858
1858
  });
1859
1859
 
1860
- // ../../node_modules/signal-exit/index.js
1860
+ // ../../node_modules/ink/node_modules/signal-exit/index.js
1861
1861
  var require_signal_exit = __commonJS((exports, module) => {
1862
1862
  var process3 = global.process;
1863
1863
  var processOk = function(process4) {
@@ -37124,6 +37124,176 @@ var require_onetime = __commonJS((exports, module) => {
37124
37124
  };
37125
37125
  });
37126
37126
 
37127
+ // ../../node_modules/restore-cursor/node_modules/signal-exit/signals.js
37128
+ var require_signals2 = __commonJS((exports, module) => {
37129
+ module.exports = [
37130
+ "SIGABRT",
37131
+ "SIGALRM",
37132
+ "SIGHUP",
37133
+ "SIGINT",
37134
+ "SIGTERM"
37135
+ ];
37136
+ if (process.platform !== "win32") {
37137
+ module.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
37138
+ }
37139
+ if (process.platform === "linux") {
37140
+ module.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
37141
+ }
37142
+ });
37143
+
37144
+ // ../../node_modules/restore-cursor/node_modules/signal-exit/index.js
37145
+ var require_signal_exit2 = __commonJS((exports, module) => {
37146
+ var process5 = global.process;
37147
+ var processOk = function(process6) {
37148
+ return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function";
37149
+ };
37150
+ if (!processOk(process5)) {
37151
+ module.exports = function() {
37152
+ return function() {};
37153
+ };
37154
+ } else {
37155
+ assert = __require("assert");
37156
+ signals = require_signals2();
37157
+ isWin = /^win/i.test(process5.platform);
37158
+ EE = __require("events");
37159
+ if (typeof EE !== "function") {
37160
+ EE = EE.EventEmitter;
37161
+ }
37162
+ if (process5.__signal_exit_emitter__) {
37163
+ emitter = process5.__signal_exit_emitter__;
37164
+ } else {
37165
+ emitter = process5.__signal_exit_emitter__ = new EE;
37166
+ emitter.count = 0;
37167
+ emitter.emitted = {};
37168
+ }
37169
+ if (!emitter.infinite) {
37170
+ emitter.setMaxListeners(Infinity);
37171
+ emitter.infinite = true;
37172
+ }
37173
+ module.exports = function(cb, opts) {
37174
+ if (!processOk(global.process)) {
37175
+ return function() {};
37176
+ }
37177
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
37178
+ if (loaded === false) {
37179
+ load();
37180
+ }
37181
+ var ev = "exit";
37182
+ if (opts && opts.alwaysLast) {
37183
+ ev = "afterexit";
37184
+ }
37185
+ var remove = function() {
37186
+ emitter.removeListener(ev, cb);
37187
+ if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
37188
+ unload();
37189
+ }
37190
+ };
37191
+ emitter.on(ev, cb);
37192
+ return remove;
37193
+ };
37194
+ unload = function unload2() {
37195
+ if (!loaded || !processOk(global.process)) {
37196
+ return;
37197
+ }
37198
+ loaded = false;
37199
+ signals.forEach(function(sig) {
37200
+ try {
37201
+ process5.removeListener(sig, sigListeners[sig]);
37202
+ } catch (er) {}
37203
+ });
37204
+ process5.emit = originalProcessEmit;
37205
+ process5.reallyExit = originalProcessReallyExit;
37206
+ emitter.count -= 1;
37207
+ };
37208
+ module.exports.unload = unload;
37209
+ emit = function emit2(event, code, signal) {
37210
+ if (emitter.emitted[event]) {
37211
+ return;
37212
+ }
37213
+ emitter.emitted[event] = true;
37214
+ emitter.emit(event, code, signal);
37215
+ };
37216
+ sigListeners = {};
37217
+ signals.forEach(function(sig) {
37218
+ sigListeners[sig] = function listener() {
37219
+ if (!processOk(global.process)) {
37220
+ return;
37221
+ }
37222
+ var listeners = process5.listeners(sig);
37223
+ if (listeners.length === emitter.count) {
37224
+ unload();
37225
+ emit("exit", null, sig);
37226
+ emit("afterexit", null, sig);
37227
+ if (isWin && sig === "SIGHUP") {
37228
+ sig = "SIGINT";
37229
+ }
37230
+ process5.kill(process5.pid, sig);
37231
+ }
37232
+ };
37233
+ });
37234
+ module.exports.signals = function() {
37235
+ return signals;
37236
+ };
37237
+ loaded = false;
37238
+ load = function load2() {
37239
+ if (loaded || !processOk(global.process)) {
37240
+ return;
37241
+ }
37242
+ loaded = true;
37243
+ emitter.count += 1;
37244
+ signals = signals.filter(function(sig) {
37245
+ try {
37246
+ process5.on(sig, sigListeners[sig]);
37247
+ return true;
37248
+ } catch (er) {
37249
+ return false;
37250
+ }
37251
+ });
37252
+ process5.emit = processEmit;
37253
+ process5.reallyExit = processReallyExit;
37254
+ };
37255
+ module.exports.load = load;
37256
+ originalProcessReallyExit = process5.reallyExit;
37257
+ processReallyExit = function processReallyExit2(code) {
37258
+ if (!processOk(global.process)) {
37259
+ return;
37260
+ }
37261
+ process5.exitCode = code || 0;
37262
+ emit("exit", process5.exitCode, null);
37263
+ emit("afterexit", process5.exitCode, null);
37264
+ originalProcessReallyExit.call(process5, process5.exitCode);
37265
+ };
37266
+ originalProcessEmit = process5.emit;
37267
+ processEmit = function processEmit2(ev, arg) {
37268
+ if (ev === "exit" && processOk(global.process)) {
37269
+ if (arg !== undefined) {
37270
+ process5.exitCode = arg;
37271
+ }
37272
+ var ret = originalProcessEmit.apply(this, arguments);
37273
+ emit("exit", process5.exitCode, null);
37274
+ emit("afterexit", process5.exitCode, null);
37275
+ return ret;
37276
+ } else {
37277
+ return originalProcessEmit.apply(this, arguments);
37278
+ }
37279
+ };
37280
+ }
37281
+ var assert;
37282
+ var signals;
37283
+ var isWin;
37284
+ var EE;
37285
+ var emitter;
37286
+ var unload;
37287
+ var emit;
37288
+ var sigListeners;
37289
+ var loaded;
37290
+ var load;
37291
+ var originalProcessReallyExit;
37292
+ var processReallyExit;
37293
+ var originalProcessEmit;
37294
+ var processEmit;
37295
+ });
37296
+
37127
37297
  // ../../node_modules/stack-utils/node_modules/escape-string-regexp/index.js
37128
37298
  var require_escape_string_regexp = __commonJS((exports, module) => {
37129
37299
  var matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
@@ -47467,7 +47637,7 @@ import process6 from "node:process";
47467
47637
 
47468
47638
  // ../../node_modules/restore-cursor/index.js
47469
47639
  var import_onetime = __toESM(require_onetime(), 1);
47470
- var import_signal_exit = __toESM(require_signal_exit(), 1);
47640
+ var import_signal_exit = __toESM(require_signal_exit2(), 1);
47471
47641
  import process5 from "node:process";
47472
47642
  var restoreCursor = import_onetime.default(() => {
47473
47643
  import_signal_exit.default(() => {
@@ -48495,13 +48665,11 @@ var import_react19 = __toESM(require_react(), 1);
48495
48665
  var import_react20 = __toESM(require_react(), 1);
48496
48666
  // ../../node_modules/ink/build/hooks/use-focus-manager.js
48497
48667
  var import_react21 = __toESM(require_react(), 1);
48498
- // src/index.tsx
48668
+ // src/ui/App.tsx
48669
+ var import_react31 = __toESM(require_react(), 1);
48499
48670
  import fs8 from "fs";
48500
48671
  import path3 from "path";
48501
48672
 
48502
- // src/ui/App.tsx
48503
- var import_react30 = __toESM(require_react(), 1);
48504
-
48505
48673
  // src/ui/components/Header.tsx
48506
48674
  var import_react22 = __toESM(require_react(), 1);
48507
48675
  var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
@@ -48853,16 +49021,16 @@ var hasVrailConfig = () => {
48853
49021
  return false;
48854
49022
  }
48855
49023
  };
48856
- function Banner() {
49024
+ function Banner({ hideStatus = false }) {
48857
49025
  const isVrailProject = hasVrailConfig();
48858
49026
  const [version, setVersion] = import_react26.useState("v0.0.1");
48859
49027
  import_react26.useEffect(() => {
48860
- const v = process.env.CLI_VERSION || "v0.0.1";
49028
+ const v = '"1.0.0-beta.9"';
48861
49029
  setVersion(v);
48862
49030
  }, []);
48863
49031
  return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48864
49032
  flexDirection: "column",
48865
- marginBottom: 1,
49033
+ marginBottom: hideStatus ? 0 : 1,
48866
49034
  children: [
48867
49035
  /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ErrorBoundary, {
48868
49036
  fallback: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
@@ -48876,7 +49044,7 @@ function Banner() {
48876
49044
  }, undefined, false, undefined, this)
48877
49045
  }, undefined, false, undefined, this)
48878
49046
  }, undefined, false, undefined, this),
48879
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49047
+ !hideStatus && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
48880
49048
  flexDirection: "column",
48881
49049
  marginLeft: 1,
48882
49050
  children: [
@@ -50192,12 +50360,10 @@ function Dashboard({ isFocused, onAction }) {
50192
50360
 
50193
50361
  // src/ui/views/ExitConfirmation.tsx
50194
50362
  var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
50195
- function ExitConfirmation({ onCancel }) {
50196
- const { exit } = use_app_default();
50363
+ function ExitConfirmation({ onCancel, onExit }) {
50197
50364
  use_input_default((input, key) => {
50198
50365
  if (input === "y") {
50199
- exit();
50200
- process.exit(0);
50366
+ onExit();
50201
50367
  }
50202
50368
  if (input === "n" || key.escape) {
50203
50369
  onCancel();
@@ -50356,17 +50522,56 @@ function License({ onBack, isFocused }) {
50356
50522
  }, undefined, false, undefined, this);
50357
50523
  }
50358
50524
 
50359
- // src/ui/App.tsx
50525
+ // src/ui/views/GoodbyeView.tsx
50526
+ var import_react30 = __toESM(require_react(), 1);
50360
50527
  var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
50528
+ function GoodbyeView({ version, cwd: cwd2, isVrailProject }) {
50529
+ const { exit } = use_app_default();
50530
+ import_react30.useEffect(() => {
50531
+ const timer = setTimeout(() => {
50532
+ exit();
50533
+ }, 2000);
50534
+ return () => clearTimeout(timer);
50535
+ }, [exit]);
50536
+ return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50537
+ flexDirection: "column",
50538
+ padding: 1,
50539
+ children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50540
+ marginTop: 0,
50541
+ marginLeft: 1,
50542
+ children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
50543
+ color: "#CD6052",
50544
+ bold: true,
50545
+ children: "\uD83D\uDC4B Thanks for using ValueRail! See you soon."
50546
+ }, undefined, false, undefined, this)
50547
+ }, undefined, false, undefined, this)
50548
+ }, undefined, false, undefined, this);
50549
+ }
50550
+
50551
+ // src/ui/App.tsx
50552
+ var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
50553
+ var hasVrailConfig2 = () => {
50554
+ try {
50555
+ return fs8.existsSync(path3.join(process.cwd(), "vrail.config.ts"));
50556
+ } catch {
50557
+ return false;
50558
+ }
50559
+ };
50361
50560
  function App2() {
50362
- const [currentView, setCurrentView] = import_react30.useState("dashboard");
50363
- const [focusArea, setFocusArea] = import_react30.useState("content");
50561
+ const { exit } = use_app_default();
50562
+ const [currentView, setCurrentView] = import_react31.useState("dashboard");
50563
+ const [focusArea, setFocusArea] = import_react31.useState("content");
50364
50564
  const goToHeader = () => setFocusArea("header");
50365
50565
  const goToDashboard = () => {
50366
50566
  setCurrentView("dashboard");
50367
50567
  setFocusArea("header");
50368
50568
  };
50569
+ const handleExit = () => {
50570
+ setCurrentView("goodbye");
50571
+ };
50369
50572
  use_input_default((input, key) => {
50573
+ if (currentView === "goodbye")
50574
+ return;
50370
50575
  if (currentView === "exit-confirm")
50371
50576
  return;
50372
50577
  if (key.escape) {
@@ -50381,13 +50586,15 @@ function App2() {
50381
50586
  setFocusArea((prev) => prev === "header" ? "content" : "header");
50382
50587
  }
50383
50588
  });
50384
- return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50589
+ return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50385
50590
  flexDirection: "column",
50386
50591
  height: "100%",
50387
50592
  padding: 1,
50388
50593
  children: [
50389
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Banner, {}, undefined, false, undefined, this),
50390
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Header, {
50594
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Banner, {
50595
+ hideStatus: currentView === "goodbye"
50596
+ }, undefined, false, undefined, this),
50597
+ currentView !== "goodbye" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Header, {
50391
50598
  currentView: currentView === "exit-confirm" ? "dashboard" : currentView,
50392
50599
  onViewChange: (view) => {
50393
50600
  setCurrentView(view);
@@ -50395,11 +50602,11 @@ function App2() {
50395
50602
  },
50396
50603
  isFocused: focusArea === "header"
50397
50604
  }, undefined, false, undefined, this),
50398
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
50605
+ /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
50399
50606
  marginTop: 1,
50400
50607
  flexDirection: "column",
50401
50608
  children: [
50402
- currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Dashboard, {
50609
+ currentView === "dashboard" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Dashboard, {
50403
50610
  isFocused: focusArea === "content",
50404
50611
  onAction: (action) => {
50405
50612
  if (action === "exit") {
@@ -50407,26 +50614,32 @@ function App2() {
50407
50614
  }
50408
50615
  }
50409
50616
  }, undefined, false, undefined, this),
50410
- currentView === "author" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Author, {
50617
+ currentView === "author" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Author, {
50411
50618
  onViewChange: goToHeader,
50412
50619
  isFocused: focusArea === "content"
50413
50620
  }, undefined, false, undefined, this),
50414
- currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50621
+ currentView === "npm" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ExternalLink, {
50415
50622
  label: "NPM Registry",
50416
50623
  url: "https://www.npmjs.com/package/valuerail",
50417
50624
  onBack: goToHeader
50418
50625
  }, undefined, false, undefined, this),
50419
- currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExternalLink, {
50626
+ currentView === "repo" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ExternalLink, {
50420
50627
  label: "GitHub Repository",
50421
50628
  url: "https://github.com/kamilguszpit/valuerail",
50422
50629
  onBack: goToHeader
50423
50630
  }, undefined, false, undefined, this),
50424
- currentView === "license" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(License, {
50631
+ currentView === "license" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(License, {
50425
50632
  onBack: goToHeader,
50426
50633
  isFocused: focusArea === "content"
50427
50634
  }, undefined, false, undefined, this),
50428
- currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ExitConfirmation, {
50429
- onCancel: goToDashboard
50635
+ currentView === "exit-confirm" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ExitConfirmation, {
50636
+ onCancel: goToDashboard,
50637
+ onExit: handleExit
50638
+ }, undefined, false, undefined, this),
50639
+ currentView === "goodbye" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(GoodbyeView, {
50640
+ version: '"1.0.0-beta.9"',
50641
+ cwd: process.cwd(),
50642
+ isVrailProject: hasVrailConfig2()
50430
50643
  }, undefined, false, undefined, this)
50431
50644
  ]
50432
50645
  }, undefined, true, undefined, this)
@@ -50434,99 +50647,8 @@ function App2() {
50434
50647
  }, undefined, true, undefined, this);
50435
50648
  }
50436
50649
 
50437
- // src/ui/components/GoodbyeScreen.tsx
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
50650
  // src/index.tsx
50506
50651
  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
- });
50530
50652
  process.on("uncaughtException", (err) => {
50531
50653
  console.error("Uncaught Exception:", err);
50532
50654
  process.exit(1);
@@ -50537,4 +50659,3 @@ process.on("unhandledRejection", (reason, promise) => {
50537
50659
  });
50538
50660
  var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(App2, {}, undefined, false, undefined, this));
50539
50661
  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.7",
3
+ "version": "1.0.0-beta.9",
4
4
  "author": "Kamil Guszpit",
5
5
  "license": "BUSL-1.1",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
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
20
  "start": "node ./dist/index.js",
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
+ "build:npm": "bun build ./src/index.tsx --target=node --format=esm --outfile dist/index.js --define process.env.CLI_VERSION='\"'$(cat package.json | grep '\"version\"' | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d ' ')'\"'",
22
22
  "postbuild:npm": "rm -rf fonts && cp -r $(find ../../node_modules -path \"*/cfonts/fonts\" -type d | head -n 1) ./fonts",
23
23
  "lint": "echo 'linting...'"
24
24
  },