{"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;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAsC;AACtC,oBAAiC;AACjC,uBAAe;AAKR,MAAM,2BAA2B,CACtC,oBAAgB,gCAAiB,MAC9B;AACH,QAAM,EAAE,iBAAiB,QAAQ,IAAI,cAAc;AAGnD,MAAI,KAAC,sBAAW,OAAO,GAAG;AACxB,6BAAU,SAAS,EAAE,WAAW,KAAK,CAAC;AAAA,EACxC;AAEA,QAAM,mBAA6B,iBAAAA,QAAG,KAAK,GAAG,eAAe,YAAY;AAEzE,SAAO;AACT;","names":["fg"]}