svcloud 0.1.1 → 0.1.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.
- package/README.md +1 -0
- package/package.json +1 -1
- package/src/index.ts +20 -1
- package/src/lib/loopback-server.ts +7 -7
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.3",
|
|
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":
|
|
@@ -210,22 +210,22 @@ const CALLBACK_PAGE = (ok: boolean) => `<!doctype html>
|
|
|
210
210
|
<span>SV Cloud</span>
|
|
211
211
|
</div>
|
|
212
212
|
<div class="card">
|
|
213
|
-
<div class="status-icon
|
|
214
|
-
|
|
213
|
+
<div class="status-icon ${ok ? 'status-icon--ok' : 'status-icon--error'}">
|
|
214
|
+
${ok
|
|
215
215
|
? '<svg width="20" height="20" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8.5 6.5 12 13 4.5"/></svg>'
|
|
216
216
|
: '<svg width="20" height="20" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2.2 15 14H1Z"/><path d="M8 6.6v3.2"/><circle cx="8" cy="11.9" r="0.9" fill="currentColor"/></svg>'}
|
|
217
217
|
</div>
|
|
218
218
|
<div>
|
|
219
|
-
<h1
|
|
220
|
-
<p class="desc"
|
|
219
|
+
<h1>${ok ? "You're signed in" : "Sign-in didn't finish"}</h1>
|
|
220
|
+
<p class="desc">${ok ? "You can close this tab and return to your terminal." : "The sign-in request was not completed. Nothing changed on your account."}</p>
|
|
221
221
|
</div>
|
|
222
222
|
<div class="terminal-box">
|
|
223
223
|
<div class="cmd">
|
|
224
224
|
<span class="prompt">$</span>
|
|
225
|
-
<span
|
|
225
|
+
<span>${ok ? "svcloud" : "svcloud login"}</span>
|
|
226
226
|
</div>
|
|
227
|
-
<span class="status-pill
|
|
228
|
-
|
|
227
|
+
<span class="status-pill ${ok ? 'status-pill--ok' : 'status-pill--error'}">
|
|
228
|
+
${ok ? "Ready" : "Retry"}
|
|
229
229
|
</span>
|
|
230
230
|
</div>
|
|
231
231
|
</div>
|