svcloud 0.1.1 → 0.1.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/README.md +1 -0
- package/package.json +1 -1
- package/src/index.ts +20 -1
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ svcloud mcp setup <harness> Write a coding agent harness's MCP config for svcl
|
|
|
47
47
|
svcloud mcp check Diagnose sign-in state, harness configs, and live tool visibility
|
|
48
48
|
|
|
49
49
|
Flags:
|
|
50
|
+
-v, --version Print the current version
|
|
50
51
|
--json Machine-readable output, on every read command
|
|
51
52
|
```
|
|
52
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svcloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The SV Cloud CLI. Alpha: login, logout, status, open, projects list, mcp, init, and runs are built; see PLANNING.md for what's still missing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { secretsCommand } from "./commands/secrets";
|
|
|
18
18
|
import { statusCommand } from "./commands/status";
|
|
19
19
|
import { whoamiCommand } from "./commands/whoami";
|
|
20
20
|
import { AuthRequiredError, ApiError } from "./lib/api";
|
|
21
|
+
import { CLI_VERSION } from "./lib/config";
|
|
21
22
|
import { hasFlag } from "./lib/output";
|
|
22
23
|
|
|
23
24
|
const USAGE = `svcloud — the SV Cloud CLI
|
|
@@ -39,13 +40,26 @@ Usage:
|
|
|
39
40
|
svcloud mcp check Diagnose sign-in state, harness configs, and live tool visibility
|
|
40
41
|
|
|
41
42
|
Flags:
|
|
43
|
+
-v, --version Print the current version
|
|
42
44
|
--json Machine-readable output, on every read command
|
|
43
45
|
--repo, --name, --slug, --installation, --id, --watch, --limit, --primary-key, --default
|
|
44
46
|
See each command's own usage
|
|
45
47
|
`;
|
|
46
48
|
|
|
47
49
|
async function main(): Promise<void> {
|
|
48
|
-
const
|
|
50
|
+
const rawArgv = process.argv.slice(2);
|
|
51
|
+
if (
|
|
52
|
+
hasFlag(rawArgv, "version").present ||
|
|
53
|
+
hasFlag(rawArgv, "v").present ||
|
|
54
|
+
rawArgv[0] === "-v" ||
|
|
55
|
+
rawArgv[0] === "--version" ||
|
|
56
|
+
rawArgv[0] === "version"
|
|
57
|
+
) {
|
|
58
|
+
console.log(CLI_VERSION);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const { present: json, rest: argv } = hasFlag(rawArgv, "json");
|
|
49
63
|
const [command, ...rest] = argv;
|
|
50
64
|
|
|
51
65
|
switch (command) {
|
|
@@ -85,6 +99,11 @@ async function main(): Promise<void> {
|
|
|
85
99
|
case "deploy":
|
|
86
100
|
await deployCommand(rest, json);
|
|
87
101
|
return;
|
|
102
|
+
case "version":
|
|
103
|
+
case "-v":
|
|
104
|
+
case "--version":
|
|
105
|
+
console.log(CLI_VERSION);
|
|
106
|
+
return;
|
|
88
107
|
case undefined:
|
|
89
108
|
case "-h":
|
|
90
109
|
case "--help":
|