Skip to main content
Glama
formatter.ts942 B
import { relative } from 'node:path'; import { ANSIColors, colorize, colorizePath } from '@intlayer/config'; import configuration from '@intlayer/config/built'; import { getLocaleName } from '@intlayer/core'; import { Locales, type LocalesValues } from '@intlayer/types'; export const formatPath = ( path: string | string[], color?: ANSIColors | false ) => [path] .flat() .map((path) => path.startsWith('/') ? relative(configuration.content.baseDir, path) : path ) .map((relativePath) => color === false ? relativePath : colorizePath(relativePath, color) ) .join(`, `); export const formatLocale = ( locale: LocalesValues | LocalesValues[], color: ANSIColors | false = ANSIColors.GREEN ) => [locale] .flat() .map((locale) => `${getLocaleName(locale, Locales.ENGLISH)} (${locale})`) .map((text) => (color === false ? text : colorize(text, color))) .join(`, `);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server