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
getBuiltRemoteDictionariesPath.ts•690 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 getBuiltRemoteDictionariesPath = async (
configuration: IntlayerConfig
) => {
const { remoteDictionariesDir, mainDir } = configuration.content;
// Create main directory if it doesn't exist
if (!existsSync(mainDir)) {
mkdirSync(mainDir, { recursive: true });
}
const dictionariesPath: string[] = fg.sync(
`${normalizePath(remoteDictionariesDir)}/**/*.json`
);
return dictionariesPath;
};