Skip to main content
Glama
review.ts1.94 kB
import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import type { AIOptions } from '@intlayer/api'; import { type ListGitFilesOptions, reviewDoc } from '@intlayer/cli'; import { getConfiguration } from '@intlayer/config'; import { type Locale, Locales } from '@intlayer/types'; import { defaultLocale, locales } from '../intlayer.config'; // Fill the list of files to audit if you want to audit only a subset of the files // If empty list is provided, the audit will run on all markdown files present in the /en folder const DOC_PATTERN: string[] = [ './docs/en/**/*.md', './blog/en/**/*.md', './docs/en/**/configuration.md', ]; const EXCLUDED_GLOB_PATTEN: string[] = [ '**/_*', '**/node_modules/**', '**/dist/**', '**/src/**', ]; // Number of files to process simultaneously const NB_SIMULTANEOUS_FILE_PROCESSED: number = 1; const LOCALE_LIST_TO_TRANSLATE: Locale[] = locales.filter( // Include all locales except English // Change it to include your specific locales if you want to translate only a subset of the locale(s) (locale) => locale !== Locales.ENGLISH ); const SKIP_IF_MODIFIED_BEFORE: number | undefined = undefined; //1000 * 60 * 60 * 24; // 1 day ago const SKIP_IF_MODIFIED_AFTER: number | undefined = undefined; const GIT_OPTIONS: ListGitFilesOptions | undefined = { mode: ['uncommitted', 'unpushed'], }; const configuration = getConfiguration(); const customInstructions = readFileSync( join(process.cwd(), './tools/prompts/CUSTOM_INSTRUCTIONS.md'), 'utf-8' ); reviewDoc({ excludedGlobPattern: EXCLUDED_GLOB_PATTEN, docPattern: DOC_PATTERN, locales: LOCALE_LIST_TO_TRANSLATE, baseLocale: defaultLocale, aiOptions: configuration.ai as AIOptions, nbSimultaneousFileProcessed: NB_SIMULTANEOUS_FILE_PROCESSED, customInstructions, skipIfModifiedBefore: SKIP_IF_MODIFIED_BEFORE, skipIfModifiedAfter: SKIP_IF_MODIFIED_AFTER, gitOptions: GIT_OPTIONS, });

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