calendit 1.0.2 → 1.0.3
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 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { createRequire } from "module";
|
|
2
3
|
import { AuthManager } from "./core/auth.js";
|
|
3
4
|
import { ConfigManager } from "./core/config.js";
|
|
4
5
|
import { ApiError, AuthError, CalendarError, ConfigError, ValidationError } from "./core/errors.js";
|
|
5
6
|
import { logger, setDebugDump, setLogLevel } from "./core/logger.js";
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
const { version } = require("../package.json");
|
|
6
9
|
import { registerAuthCommands } from "./commands/auth.js";
|
|
7
10
|
import { registerConfigCommands } from "./commands/config.js";
|
|
8
11
|
import { registerQueryCommand } from "./commands/query.js";
|
|
@@ -17,7 +20,7 @@ const deps = {
|
|
|
17
20
|
program
|
|
18
21
|
.name("calendit")
|
|
19
22
|
.description("Terminal-based Calendar Management Tool")
|
|
20
|
-
.version(
|
|
23
|
+
.version(version)
|
|
21
24
|
.option("--verbose", "Enable verbose debug logs", false)
|
|
22
25
|
.option("--debug-dump <file>", "Write all logs to a file");
|
|
23
26
|
program.hook("preAction", (thisCommand) => {
|