🔧 chore: Bump project version and load dynamically in CLI

This commit is contained in:
2026-06-09 05:04:20 +07:00
parent 301a6eaad0
commit 35a3f5916e
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "beamboxctl", "name": "beamboxctl",
"version": "0.0.1", "version": "1.1.0",
"description": "CLI tool for uploading and managing BeamBox e-Badge devices", "description": "CLI tool for uploading and managing BeamBox e-Badge devices",
"type": "module", "type": "module",
"bin": { "bin": {
+5 -1
View File
@@ -1,5 +1,9 @@
import { Command } from "commander"; import { Command } from "commander";
import { createRequire } from "node:module";
import { logger, LogLevel } from "../lib/utils/logger.ts"; import { logger, LogLevel } from "../lib/utils/logger.ts";
const require = createRequire(import.meta.url);
const { version } = require("../../package.json") as { version: string };
import { statSync } from "node:fs"; import { statSync } from "node:fs";
import { join, basename } from "node:path"; import { join, basename } from "node:path";
import { scanDirectoryForImages } from "../utils/app-utils.ts"; import { scanDirectoryForImages } from "../utils/app-utils.ts";
@@ -82,7 +86,7 @@ export function setupCLI() {
program program
.name("beamboxctl") .name("beamboxctl")
.description("CLI tool for managing BeamBox e-Badge devices") .description("CLI tool for managing BeamBox e-Badge devices")
.version("1.0.0") .version(version)
.option("-v, --verbose", "Show detailed logs including packet data", false); .option("-v, --verbose", "Show detailed logs including packet data", false);
program program