@krovacloud/cli 0.1.1 → 0.2.0
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 +8 -2
- package/bin/krova.js +13 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @krovacloud/cli
|
|
2
2
|
|
|
3
|
-
The **Krova Cloud**
|
|
3
|
+
The **Krova Cloud** command-line interface (`krova`) — manage Cubes (Firecracker
|
|
4
|
+
microVMs), browse the catalog, and receive webhooks from your terminal.
|
|
4
5
|
|
|
5
6
|
```sh
|
|
6
7
|
npm i -g @krovacloud/cli
|
|
7
8
|
krova --help
|
|
8
9
|
```
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
This installs a prebuilt native binary for your platform (macOS/Linux/Windows,
|
|
12
|
+
x64 + arm64) — no Go toolchain required. npm selects the correct
|
|
13
|
+
`@krovacloud/cli-<os>-<arch>` binary automatically via its `os`/`cpu` fields.
|
|
14
|
+
|
|
15
|
+
Also available via `go install github.com/krovacloud/krova-cli/cmd/krova@latest`
|
|
16
|
+
and Homebrew. Source: https://github.com/krovacloud/krova-cli
|
package/bin/krova.js
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
// Launcher for the `krova` CLI when installed from npm (`@krovacloud/cli`).
|
|
4
|
+
// npm installs the matching `@krovacloud/cli-<os>-<arch>` optional dependency
|
|
5
|
+
// (selected via its `os`/`cpu` fields); this shim resolves that native binary
|
|
6
|
+
// and execs it, forwarding args + stdio + exit code.
|
|
3
7
|
const { spawnSync } = require("node:child_process");
|
|
8
|
+
|
|
4
9
|
const pkg = `@krovacloud/cli-${process.platform}-${process.arch}`;
|
|
5
10
|
const exe = process.platform === "win32" ? "krova.exe" : "krova";
|
|
11
|
+
|
|
6
12
|
let bin;
|
|
7
13
|
try {
|
|
8
14
|
bin = require.resolve(`${pkg}/bin/${exe}`);
|
|
9
15
|
} catch {
|
|
10
16
|
console.error(
|
|
11
17
|
`krova: no prebuilt binary for ${process.platform}-${process.arch}.\n` +
|
|
12
|
-
"Install from source:
|
|
18
|
+
"Install from source instead: " +
|
|
19
|
+
"go install github.com/krovacloud/krova-cli/cmd/krova@latest"
|
|
13
20
|
);
|
|
14
21
|
process.exit(1);
|
|
15
22
|
}
|
|
23
|
+
|
|
16
24
|
const res = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
17
|
-
if (res.error) {
|
|
25
|
+
if (res.error) {
|
|
26
|
+
console.error(res.error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
18
29
|
process.exit(res.status === null ? 1 : res.status);
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krovacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Krova Cloud CLI (krova) — manage Cubes (Firecracker microVMs) from the terminal",
|
|
5
5
|
"bin": {
|
|
6
6
|
"krova": "bin/krova.js"
|
|
7
7
|
},
|
|
8
8
|
"optionalDependencies": {
|
|
9
|
-
"@krovacloud/cli-darwin-arm64": "0.
|
|
10
|
-
"@krovacloud/cli-darwin-x64": "0.
|
|
11
|
-
"@krovacloud/cli-linux-x64": "0.
|
|
12
|
-
"@krovacloud/cli-linux-arm64": "0.
|
|
13
|
-
"@krovacloud/cli-win32-x64": "0.
|
|
9
|
+
"@krovacloud/cli-darwin-arm64": "0.2.0",
|
|
10
|
+
"@krovacloud/cli-darwin-x64": "0.2.0",
|
|
11
|
+
"@krovacloud/cli-linux-x64": "0.2.0",
|
|
12
|
+
"@krovacloud/cli-linux-arm64": "0.2.0",
|
|
13
|
+
"@krovacloud/cli-win32-x64": "0.2.0"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=16"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"homepage": "https://github.com/krovacloud/
|
|
19
|
+
"homepage": "https://github.com/krovacloud/krova-cli",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/krovacloud/
|
|
22
|
+
"url": "git+https://github.com/krovacloud/krova-cli.git"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/krovacloud/
|
|
25
|
+
"url": "https://github.com/krovacloud/krova-cli/issues"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"bin"
|