UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

29 lines (28 loc) • 1.25 kB
import { d as isRootVersionInvocation } from "./argv-CbnKpH-r.mjs"; import { c as formatErrorStackWithMessage } from "./error-coercion-hDrHOSGy.mjs"; import { r as resolveCliContainerTarget } from "./container-target-Gm4i9O54.mjs"; //#region src/entry.version-fast-path.ts function tryHandleRootVersionFastPath(e) { if (resolveCliContainerTarget(e)) return false; if (!isRootVersionInvocation(e)) return false; const onError = async (e) => { const t = `[openclaw] Failed to resolve version: ${e instanceof Error ? formatErrorStackWithMessage(e) : String(e)}\n`; try { const [{ loadCliDotEnv: e }, { formatConsoleDiagnosticBlock: n }] = await Promise.all([import("./dotenv-BqC7eRgR.mjs"), import("./json-console-line-CjjM6-5-.mjs")]); e(); process.stderr.write(n({ message: t })); } catch { process.stderr.write(t); } finally { process.exitCode = 1; } }; Promise.all([import("./version-Cu2zLIq0.mjs"), import("./git-commit-CEpRmiA8.mjs")]).then(([{ VERSION: e }, { resolveCommitHash: t }]) => { const n = t({ moduleUrl: import.meta.url }); console.log(n ? `OpenClaw ${e} (${n})` : `OpenClaw ${e}`); process.exitCode = 0; }).catch(onError); return true; } //#endregion export { tryHandleRootVersionFastPath as t };