/
githubmirror
/
serverless
Обзор
Документация
Войти
/
githubmirror
/
serverless
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/mcp/src/utils/path-utils.js
16 строк
496 B
Tomasz Czubocha
chore: integrate v4 packages into main repository
19 дек 2025, 00:28
19 дек 2025, 00:28
8cec971
Код
Авторство
О чём код?
import path from 'node:path' import { fileURLToPath } from 'node:url' const __dirname = path.dirname(fileURLToPath(import.meta.url)) /** * Resolves a path relative to the repository root * @param {string} relativePath - Path relative to repo root * @returns {string} - Absolute path */ export function fromRepoRoot(relativePath) { if (__dirname.endsWith('dist')) { return path.resolve(__dirname, '..', relativePath) } return path.resolve(__dirname, '../../../..', relativePath) }