@cruxgarden/cli 0.0.8 → 0.0.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/lib/commands.js +8 -1
  2. package/package.json +1 -1
package/lib/commands.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { execSync, spawn } from "child_process";
2
2
  import { fileURLToPath } from "url";
3
3
  import { dirname, join } from "path";
4
+ import { readFileSync } from "fs";
4
5
  import readline from "readline";
5
6
  import chalk from "chalk";
6
7
  import ora from "ora";
@@ -9,6 +10,12 @@ const __filename = fileURLToPath(import.meta.url);
9
10
  const __dirname = dirname(__filename);
10
11
  const dockerDir = join(__dirname, "..", "docker");
11
12
 
13
+ // Read version from package.json
14
+ const packageJson = JSON.parse(
15
+ readFileSync(join(__dirname, "..", "package.json"), "utf-8")
16
+ );
17
+ const VERSION = packageJson.version;
18
+
12
19
  // Colors
13
20
  const SUCCESS_GREEN = "#9BD39B";
14
21
 
@@ -50,7 +57,7 @@ export function showBanner() {
50
57
  console.log(randomColor(line));
51
58
  });
52
59
 
53
- console.log(chalk.gray(" Nursery Environment - Demo & Trial\n"));
60
+ console.log(chalk.gray(` Nursery Environment - Demo & Trial (v${VERSION})\n`));
54
61
 
55
62
  // Set environment variable so it persists for this shell session
56
63
  process.env.CRUX_BANNER_SHOWN = "1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruxgarden/cli",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Crux Garden CLI",
5
5
  "type": "module",
6
6
  "bin": {