@kzheart_/mc-pilot 0.1.5 → 0.1.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/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import {
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
5
|
import { createBlockCommand } from "./commands/block.js";
|
|
4
6
|
import { createBookCommand } from "./commands/book.js";
|
|
5
7
|
import { createClientCommand } from "./commands/client.js";
|
|
@@ -44,7 +46,7 @@ export function buildProgram() {
|
|
|
44
46
|
" mct client launch p1 && mct client launch p2\n" +
|
|
45
47
|
" mct --client p1 chat send \"Hello from p1\"\n" +
|
|
46
48
|
" mct --client p2 chat send \"Hello from p2\"")
|
|
47
|
-
.version(
|
|
49
|
+
.version(JSON.parse(readFileSync(path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf8")).version, "--cli-version", "Show CLI version");
|
|
48
50
|
attachGlobalOptions(program);
|
|
49
51
|
program
|
|
50
52
|
.command("config-show")
|