{"version":3,"sources":["../../src/getBuiltDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'fs';\nimport { getConfiguration } from '@intlayer/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltDictionariesPath = (\n  configuration = getConfiguration()\n) => {\n  const { dictionariesDir, mainDir } = configuration.content;\n\n  // Create main directory if it doesn't exist\n  if (!existsSync(mainDir)) {\n    mkdirSync(mainDir, { recursive: true });\n  }\n\n  const dictionariesPath: string[] = fg.sync(`${dictionariesDir}/**/*.json`);\n\n  return dictionariesPath;\n};\n"],"mappings":"AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,wBAAwB;AACjC,OAAO,QAAQ;AAKR,MAAM,2BAA2B,CACtC,gBAAgB,iBAAiB,MAC9B;AACH,QAAM,EAAE,iBAAiB,QAAQ,IAAI,cAAc;AAGnD,MAAI,CAAC,WAAW,OAAO,GAAG;AACxB,cAAU,SAAS,EAAE,WAAW,KAAK,CAAC;AAAA,EACxC;AAEA,QAAM,mBAA6B,GAAG,KAAK,GAAG,eAAe,YAAY;AAEzE,SAAO;AACT;","names":[]}