@cruxgarden/cli 0.0.2 → 0.0.3

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/bin/crux.js +12 -3
  2. package/package.json +1 -1
package/bin/crux.js CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { program } from "commander";
3
+ import { readFileSync } from "fs";
4
+ import { join, dirname } from "path";
5
+ import { fileURLToPath } from "url";
3
6
  import {
4
7
  showBanner,
5
8
  startNursery,
@@ -17,10 +20,16 @@ import {
17
20
  stopNurseryDb,
18
21
  } from "../lib/commands.js";
19
22
 
23
+ const __filename = fileURLToPath(import.meta.url);
24
+ const __dirname = dirname(__filename);
25
+ const packageJson = JSON.parse(
26
+ readFileSync(join(__dirname, "..", "package.json"), "utf-8"),
27
+ );
28
+
20
29
  program
21
30
  .name("crux")
22
- .description("Crux Garden CLI - Nursery Environment Manager")
23
- .version("0.1.0");
31
+ .description("Crux Garden CLI")
32
+ .version(packageJson.version);
24
33
 
25
34
  // Nursery environment commands
26
35
  const nursery = program
@@ -29,7 +38,7 @@ const nursery = program
29
38
 
30
39
  nursery
31
40
  .command("start")
32
- .description("Start the Nursery environment (postgres, redis, api)")
41
+ .description("Start the Nursery environment (api, postgres, redis)")
33
42
  .option("--db-only", "Start only database services (postgres, redis)")
34
43
  .option("--no-banner", "Hide the startup banner")
35
44
  .action((options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruxgarden/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Crux Garden CLI",
5
5
  "type": "module",
6
6
  "bin": {