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
getBuiltDictionariesPath.ts•673 B
import { existsSync, mkdirSync } from 'node:fs';
import { normalizePath } from '@intlayer/config';
import type { IntlayerConfig } from '@intlayer/types';
import fg from 'fast-glob';
/**
* This function generates a list of dictionaries in the main directory
*/
export const getBuiltDictionariesPath = async (
configuration: IntlayerConfig
) => {
const { dictionariesDir, mainDir } = configuration.content;
// Create main directory if it doesn't exist
if (!existsSync(mainDir)) {
mkdirSync(mainDir, { recursive: true });
}
const dictionariesPath: string[] = await fg(
`${normalizePath(dictionariesDir)}/**/*.json`
);
return dictionariesPath;
};