@vizamodo/viza-cli 1.4.2 → 1.4.6

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/bin/viza.js CHANGED
@@ -1,13 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
- import { fileURLToPath } from "node:url";
4
- import path from "node:path";
5
- import fs from "node:fs";
6
3
  import { handleError } from "../src/errors/handleError.js";
4
+ import { getCliVersion } from "../src/core/version.js";
7
5
  import { bootstrapCommand } from "../src/commands/bootstrap/index.js";
8
6
  import { loginAwsCommand } from "../src/commands/login/aws.js";
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
7
  /**
12
8
  * Helper: Gộp tất cả options từ root xuống sub-command
13
9
  */
@@ -20,21 +16,11 @@ function getResolvedOptions(command) {
20
16
  }
21
17
  return allOptions;
22
18
  }
23
- function readCliVersion() {
24
- try {
25
- const pkgPath = path.resolve(__dirname, "../package.json");
26
- const json = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
27
- return json.version || "dev";
28
- }
29
- catch {
30
- return "dev";
31
- }
32
- }
33
19
  const program = new Command();
34
20
  program
35
21
  .name("viza")
36
22
  .description("Viza CLI")
37
- .version(readCliVersion())
23
+ .version(getCliVersion())
38
24
  // Global Options
39
25
  .option("--status", "Show status only (no execution)")
40
26
  .option("--keep-log", "Keep execution logs", false)
@@ -51,7 +51,6 @@ export async function dispatchIntentAndWait(input, opts = {}) {
51
51
  cliVersion,
52
52
  };
53
53
  showDispatchBanner(input, meta);
54
- console.log('input', input);
55
54
  const handle = await dispatchIntent(input, mode);
56
55
  const spinner = startSpinner("Waiting for dispatch session");
57
56
  // Fast update check (kept before wait/log so the hint is not lost)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizamodo/viza-cli",
3
- "version": "1.4.2",
3
+ "version": "1.4.6",
4
4
  "type": "module",
5
5
  "description": "Viza unified command line interface",
6
6
  "bin": {