UNPKG

@ace-sdk/cli

Version:

ACE CLI - Command-line tool for intelligent pattern learning and playbook management

25 lines 737 B
/** * Semver - Re-export from @ace-sdk/core * * @package @ace-sdk/cli */ import { readFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; export { parseVersion, compareVersions, satisfiesVersion } from '@ace-sdk/core'; /** * Get client version from package.json * Reads from installed package location */ export function getClientVersion() { try { const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const packageJson = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf8')); return packageJson.version; } catch { return '0.0.0'; } } //# sourceMappingURL=semver.js.map