@nurix/apollo 0.3.1 → 0.3.2
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.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// packages/cli/src/index.ts - `apollo` CLI entry: command wiring.
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
3
4
|
import { Command } from "commander";
|
|
4
5
|
import { runLogin } from "./commands/login.js";
|
|
5
6
|
import { runInit } from "./commands/init.js";
|
|
@@ -11,11 +12,13 @@ import { runValidate } from "./commands/validate.js";
|
|
|
11
12
|
import { runGraph } from "./commands/graph.js";
|
|
12
13
|
import { runDoctor } from "./commands/doctor.js";
|
|
13
14
|
import { runOpen } from "./commands/open.js";
|
|
15
|
+
// Single version source: package.json (npm ships it alongside dist/).
|
|
16
|
+
const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
14
17
|
const program = new Command();
|
|
15
18
|
program
|
|
16
19
|
.name("apollo")
|
|
17
20
|
.description("Bootstrap NuStack services into your repo via the Apollo discovery plane.")
|
|
18
|
-
.version(
|
|
21
|
+
.version(version)
|
|
19
22
|
.option("--apollo-url <url>", "Apollo base URL (defaults to $APOLLO_URL, then the hosted instance)");
|
|
20
23
|
program
|
|
21
24
|
.command("login")
|