@yunuseon/kayra 0.13.1 → 0.14.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/cli/dist/main.js +3 -1
- package/package.json +1 -1
package/cli/dist/main.js
CHANGED
|
@@ -16,11 +16,13 @@ import { interpret } from "./interpret.js";
|
|
|
16
16
|
import { findFleetRoot, loadFleet } from "./load.js";
|
|
17
17
|
import { render } from "./plan.js";
|
|
18
18
|
import { flatMap, ok } from "./result.js";
|
|
19
|
+
import { z } from "zod";
|
|
19
20
|
const here = absolutePath(process.cwd());
|
|
20
21
|
const engine = absolutePath(import.meta.dirname);
|
|
21
22
|
if (!here.ok || !engine.ok)
|
|
22
23
|
throw new Error("node reported a relative path");
|
|
23
24
|
const kayra = kayraRoot(within(engine.value, "..", ".."));
|
|
25
|
+
const version = z.object({ version: z.string() }).parse(JSON.parse(readFileSync(join(kayra, "package.json"), "utf8"))).version;
|
|
24
26
|
const appKinds = { "app runs": "runs", "app logs": "logs", "app deploy": "deploy", "app rollback": "rollback" };
|
|
25
27
|
const isDeployer = (command) => command.name === "job" || command.name in appKinds;
|
|
26
28
|
const deployerCommand = (command) => command.name === "job"
|
|
@@ -92,7 +94,7 @@ const fleet = found.ok ? found : ok({ root: fleetRoot(here.value), servers: [] }
|
|
|
92
94
|
if (!fleet.ok)
|
|
93
95
|
fail(fleet.error);
|
|
94
96
|
else {
|
|
95
|
-
const args = run(parser(fleet.value), { programName: "kayra", help: "both", completion: "both" });
|
|
97
|
+
const args = run(parser(fleet.value), { programName: "kayra", help: "both", completion: "both", version: { value: version, command: true, option: true } });
|
|
96
98
|
if (!found.ok && args.command.name !== "app check")
|
|
97
99
|
fail(found.error);
|
|
98
100
|
if (args.command.name === "app check") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yunuseon/kayra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "A self-hosted app platform and the CLI that runs it: Traefik, Authelia, a registry, rootless BuildKit and a small deployer per server, set up with OpenTofu and Ansible.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Yunus Öztürk",
|