fix(cli): send version during daemon handshake

This commit is contained in:
Mohamed Boudra
2026-04-22 16:19:51 +07:00
parent 43b9123c5c
commit 9e3d8f0ec5
4 changed files with 26 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
type CliPackageJson = {
version?: unknown;
};
export function resolveCliVersion(): string {
const packageJson = require("../package.json") as CliPackageJson;
if (typeof packageJson.version === "string" && packageJson.version.trim().length > 0) {
return packageJson.version.trim();
}
throw new Error("Unable to resolve @getpaseo/cli version from package.json.");
}