fix: add --version to adapter CLIs, read VERSION from package.json
CI / check (pull_request) Successful in 3m29s
CI / check (pull_request) Successful in 3m29s
- All uwf-* adapter CLIs now support --version / -V
- util VERSION constant reads from package.json at runtime
- agent-hermes ACP clientInfo uses dynamic VERSION
小橘 🍊(NEKO Team)
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
// This version is kept in sync with package.json during releases.
|
||||
export const VERSION = "0.1.0";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8")) as {
|
||||
version: string;
|
||||
};
|
||||
export const VERSION = pkg.version;
|
||||
|
||||
Reference in New Issue
Block a user