@tryghost/velo-cli 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/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
8
8
|
|
|
9
9
|
// src/index.ts
|
|
10
10
|
import { Command } from "commander";
|
|
11
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
12
|
+
import { fileURLToPath } from "url";
|
|
13
|
+
import { dirname, join as join2 } from "path";
|
|
11
14
|
|
|
12
15
|
// src/commands/login.ts
|
|
13
16
|
import { createServer } from "http";
|
|
@@ -446,8 +449,10 @@ async function api(endpoint, options) {
|
|
|
446
449
|
}
|
|
447
450
|
|
|
448
451
|
// src/index.ts
|
|
452
|
+
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
453
|
+
var pkg = JSON.parse(readFileSync2(join2(__dirname, "..", "package.json"), "utf-8"));
|
|
449
454
|
var program = new Command();
|
|
450
|
-
program.name("velo").description("CLI for Velo CI/CD metrics").version(
|
|
455
|
+
program.name("velo").description("CLI for Velo CI/CD metrics").version(pkg.version);
|
|
451
456
|
program.command("login").description("Authenticate via Ghost SSO").option("--manual", "Use manual token entry (for headless servers)").action((options) => login({ manual: options.manual }));
|
|
452
457
|
program.command("logout").description("Clear saved credentials").action(logout);
|
|
453
458
|
program.command("status").description("Show CI health overview").option("-r, --repo <repo>", "Filter by repository (e.g., TryGhost/Ghost)").option("-d, --days <days>", "Number of days to analyze (default: 7)", "7").action((options) => {
|