UNPKG

@civic/mcp-bridge-commander

Version:

Stdio <-> HTTP/SSE MCP bridge with Civic auth handling

29 lines 896 B
/** * Version utilities for the Nexus Bridge * Provides access to the package version for display in logs */ import { readFileSync } from 'fs'; import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; /** * Get the package version from package.json * @returns The version string from package.json */ export function getVersion() { try { const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const packagePath = join(__dirname, '..', 'package.json'); const packageJson = JSON.parse(readFileSync(packagePath, 'utf8')); return packageJson.version; } catch (error) { console.error('Error reading package version:', error); return 'unknown'; } } /** * The current version of the Nexus Bridge */ export const version = getVersion(); //# sourceMappingURL=version.js.map