@cyberxon/xon 0.2.1 → 0.2.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/cli.js +3 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { Command, CommanderError } from "commander";
|
|
4
5
|
import { ApiClient, ApiError } from "./api-client.js";
|
|
@@ -9,6 +10,7 @@ import { previewRetrieve, resumeRetrieve, startRetrieve } from "./retrieve.js";
|
|
|
9
10
|
import { collectSourceFiles, writeSourceFiles } from "./source.js";
|
|
10
11
|
import { displayOrg, loginAccessToken, loginJwt, loginSfdxUrl, loginWeb, logoutOrg, openInBrowser, openOrg } from "./org.js";
|
|
11
12
|
import { clearOrgs, listOrgs } from "./org-store.js";
|
|
13
|
+
const cliVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
12
14
|
const program = new Command();
|
|
13
15
|
function output(value) {
|
|
14
16
|
console.log(typeof value === "string" ? value : JSON.stringify(value, null, 2));
|
|
@@ -51,7 +53,7 @@ const parseWait = (value) => {
|
|
|
51
53
|
program
|
|
52
54
|
.name("xon")
|
|
53
55
|
.description("Manage Xon projects and deployments")
|
|
54
|
-
.version(
|
|
56
|
+
.version(cliVersion)
|
|
55
57
|
.showSuggestionAfterError();
|
|
56
58
|
const project = program.command("project").description("Manage Xon projects");
|
|
57
59
|
project
|