UNPKG

youtube-video-summarizer-mcp

Version:

An MCP server for YouTube video summarization with Claude

20 lines 809 B
import { readFileSync } from 'fs'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; export function getPackageVersion() { try { // ESM doesn't have __dirname, so we need to calculate it const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // Navigate to the package.json from the current file const packageJsonPath = join(__dirname, '..', '..', 'package.json'); // Read and parse package.json const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')); return packageJson.version || '1.0.0'; } catch (error) { // Return a default version if we can't read the package.json return '1.0.0'; } } //# sourceMappingURL=get-package-version.js.map