@intlayer/engine 9.4.3 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/README.md +0 -2
  2. package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +1 -2
  3. package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -1
  4. package/dist/cjs/init/index.cjs +14 -11
  5. package/dist/cjs/init/index.cjs.map +1 -1
  6. package/dist/cjs/init/utils/devScript.cjs +57 -0
  7. package/dist/cjs/init/utils/devScript.cjs.map +1 -0
  8. package/dist/cjs/init/utils/index.cjs +3 -0
  9. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
  10. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
  11. package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs +6 -5
  12. package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs.map +1 -1
  13. package/dist/cjs/syncPluginKit/createSyncPlugin.cjs +51 -3
  14. package/dist/cjs/syncPluginKit/createSyncPlugin.cjs.map +1 -1
  15. package/dist/cjs/utils/contentWatcherLock.cjs +173 -0
  16. package/dist/cjs/utils/contentWatcherLock.cjs.map +1 -0
  17. package/dist/cjs/utils/index.cjs +13 -1
  18. package/dist/cjs/utils/parseContentDeclarationFileName.cjs +35 -0
  19. package/dist/cjs/utils/parseContentDeclarationFileName.cjs.map +1 -0
  20. package/dist/cjs/utils/withFileLock.cjs +133 -0
  21. package/dist/cjs/utils/withFileLock.cjs.map +1 -0
  22. package/dist/cjs/watcher.cjs +7 -3
  23. package/dist/cjs/watcher.cjs.map +1 -1
  24. package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +1 -2
  25. package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -1
  26. package/dist/esm/init/index.mjs +14 -11
  27. package/dist/esm/init/index.mjs.map +1 -1
  28. package/dist/esm/init/utils/devScript.mjs +55 -0
  29. package/dist/esm/init/utils/devScript.mjs.map +1 -0
  30. package/dist/esm/init/utils/index.mjs +2 -1
  31. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
  32. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
  33. package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs +6 -5
  34. package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs.map +1 -1
  35. package/dist/esm/syncPluginKit/createSyncPlugin.mjs +51 -3
  36. package/dist/esm/syncPluginKit/createSyncPlugin.mjs.map +1 -1
  37. package/dist/esm/utils/contentWatcherLock.mjs +164 -0
  38. package/dist/esm/utils/contentWatcherLock.mjs.map +1 -0
  39. package/dist/esm/utils/index.mjs +4 -1
  40. package/dist/esm/utils/parseContentDeclarationFileName.mjs +34 -0
  41. package/dist/esm/utils/parseContentDeclarationFileName.mjs.map +1 -0
  42. package/dist/esm/utils/withFileLock.mjs +132 -0
  43. package/dist/esm/utils/withFileLock.mjs.map +1 -0
  44. package/dist/esm/watcher.mjs +8 -4
  45. package/dist/esm/watcher.mjs.map +1 -1
  46. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +2 -3
  47. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
  48. package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +1 -2
  49. package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts.map +1 -1
  50. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +10 -11
  51. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -1
  52. package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +2 -3
  53. package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -1
  54. package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +5 -6
  55. package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -1
  56. package/dist/types/buildIntlayerDictionary/writeNestedDictionary.d.ts +4 -5
  57. package/dist/types/buildIntlayerDictionary/writeNestedDictionary.d.ts.map +1 -1
  58. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts +3 -4
  59. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -1
  60. package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +4 -5
  61. package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts.map +1 -1
  62. package/dist/types/cleanOutputDir.d.ts +1 -2
  63. package/dist/types/cleanOutputDir.d.ts.map +1 -1
  64. package/dist/types/cleanRemovedContentDeclaration.d.ts +1 -2
  65. package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -1
  66. package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +2 -3
  67. package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts.map +1 -1
  68. package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +1 -2
  69. package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -1
  70. package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +1 -2
  71. package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts.map +1 -1
  72. package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +1 -2
  73. package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts.map +1 -1
  74. package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +1 -2
  75. package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts.map +1 -1
  76. package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +1 -2
  77. package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts.map +1 -1
  78. package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +1 -2
  79. package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts.map +1 -1
  80. package/dist/types/createType/createModuleAugmentation.d.ts +4 -5
  81. package/dist/types/createType/createModuleAugmentation.d.ts.map +1 -1
  82. package/dist/types/createType/createType.d.ts +2 -3
  83. package/dist/types/createType/createType.d.ts.map +1 -1
  84. package/dist/types/detectFormatCommand.d.ts +1 -2
  85. package/dist/types/detectFormatCommand.d.ts.map +1 -1
  86. package/dist/types/docReview/alignBlocks.d.ts +1 -2
  87. package/dist/types/docReview/alignBlocks.d.ts.map +1 -1
  88. package/dist/types/docReview/computeSimilarity.d.ts +2 -3
  89. package/dist/types/docReview/computeSimilarity.d.ts.map +1 -1
  90. package/dist/types/docReview/fingerprintBlock.d.ts +1 -2
  91. package/dist/types/docReview/fingerprintBlock.d.ts.map +1 -1
  92. package/dist/types/docReview/mapChangedLinesToBlocks.d.ts +1 -2
  93. package/dist/types/docReview/mapChangedLinesToBlocks.d.ts.map +1 -1
  94. package/dist/types/docReview/normalizeBlock.d.ts +1 -2
  95. package/dist/types/docReview/normalizeBlock.d.ts.map +1 -1
  96. package/dist/types/docReview/pipeline.d.ts +4 -4
  97. package/dist/types/docReview/pipeline.d.ts.map +1 -1
  98. package/dist/types/docReview/planActions.d.ts +1 -2
  99. package/dist/types/docReview/planActions.d.ts.map +1 -1
  100. package/dist/types/docReview/rebuildDocument.d.ts +5 -6
  101. package/dist/types/docReview/rebuildDocument.d.ts.map +1 -1
  102. package/dist/types/docReview/reviewReport.d.ts +8 -9
  103. package/dist/types/docReview/reviewReport.d.ts.map +1 -1
  104. package/dist/types/docReview/segmentDocument.d.ts +2 -3
  105. package/dist/types/docReview/segmentDocument.d.ts.map +1 -1
  106. package/dist/types/docReview/types.d.ts +9 -10
  107. package/dist/types/docReview/types.d.ts.map +1 -1
  108. package/dist/types/fetchDistantDictionaries.d.ts +1 -2
  109. package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
  110. package/dist/types/filterInvalidDictionaries.d.ts +2 -3
  111. package/dist/types/filterInvalidDictionaries.d.ts.map +1 -1
  112. package/dist/types/formatDictionary.d.ts +6 -8
  113. package/dist/types/formatDictionary.d.ts.map +1 -1
  114. package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts +1 -2
  115. package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts.map +1 -1
  116. package/dist/types/handleAdditionalContentDeclarationFile.d.ts +1 -2
  117. package/dist/types/handleAdditionalContentDeclarationFile.d.ts.map +1 -1
  118. package/dist/types/handleContentDeclarationFileChange.d.ts +1 -2
  119. package/dist/types/handleContentDeclarationFileChange.d.ts.map +1 -1
  120. package/dist/types/handleContentDeclarationFileMoved.d.ts +1 -2
  121. package/dist/types/handleContentDeclarationFileMoved.d.ts.map +1 -1
  122. package/dist/types/handleUnlinkedContentDeclarationFile.d.ts +1 -2
  123. package/dist/types/handleUnlinkedContentDeclarationFile.d.ts.map +1 -1
  124. package/dist/types/init/cms.d.ts +8 -9
  125. package/dist/types/init/cms.d.ts.map +1 -1
  126. package/dist/types/init/frameworkSetup/index.d.ts +2 -2
  127. package/dist/types/init/frameworkSetup/index.d.ts.map +1 -1
  128. package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts +4 -4
  129. package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts.map +1 -1
  130. package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts +1 -2
  131. package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts.map +1 -1
  132. package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts +5 -6
  133. package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts.map +1 -1
  134. package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts +8 -9
  135. package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts.map +1 -1
  136. package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts +2 -3
  137. package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts.map +1 -1
  138. package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts +3 -4
  139. package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts.map +1 -1
  140. package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts +1 -2
  141. package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts.map +1 -1
  142. package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts +7 -8
  143. package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts.map +1 -1
  144. package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts +3 -4
  145. package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts.map +1 -1
  146. package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts +2 -3
  147. package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts.map +1 -1
  148. package/dist/types/init/frameworkSetup/types.d.ts +2 -3
  149. package/dist/types/init/frameworkSetup/types.d.ts.map +1 -1
  150. package/dist/types/init/index.d.ts +4 -5
  151. package/dist/types/init/index.d.ts.map +1 -1
  152. package/dist/types/init/utils/astImports.d.ts +3 -4
  153. package/dist/types/init/utils/astImports.d.ts.map +1 -1
  154. package/dist/types/init/utils/configManipulation.d.ts +19 -20
  155. package/dist/types/init/utils/configManipulation.d.ts.map +1 -1
  156. package/dist/types/init/utils/devScript.d.ts +49 -0
  157. package/dist/types/init/utils/devScript.d.ts.map +1 -0
  158. package/dist/types/init/utils/fileSystem.d.ts +11 -12
  159. package/dist/types/init/utils/fileSystem.d.ts.map +1 -1
  160. package/dist/types/init/utils/githubActions.d.ts +7 -8
  161. package/dist/types/init/utils/githubActions.d.ts.map +1 -1
  162. package/dist/types/init/utils/index.d.ts +2 -1
  163. package/dist/types/init/utils/jsonParser.d.ts +1 -2
  164. package/dist/types/init/utils/jsonParser.d.ts.map +1 -1
  165. package/dist/types/init/utils/nextCompilerBabel.d.ts +2 -3
  166. package/dist/types/init/utils/nextCompilerBabel.d.ts.map +1 -1
  167. package/dist/types/init/utils/packageManager.d.ts +17 -18
  168. package/dist/types/init/utils/packageManager.d.ts.map +1 -1
  169. package/dist/types/init/utils/tsConfig.d.ts +1 -2
  170. package/dist/types/init/utils/tsConfig.d.ts.map +1 -1
  171. package/dist/types/init/utils/version.d.ts +1 -2
  172. package/dist/types/init/utils/version.d.ts.map +1 -1
  173. package/dist/types/initConfig/index.d.ts +2 -3
  174. package/dist/types/initConfig/index.d.ts.map +1 -1
  175. package/dist/types/installLSP.d.ts +1 -2
  176. package/dist/types/installLSP.d.ts.map +1 -1
  177. package/dist/types/installMCP/installMCP.d.ts +2 -3
  178. package/dist/types/installMCP/installMCP.d.ts.map +1 -1
  179. package/dist/types/installSkills/index.d.ts +9 -10
  180. package/dist/types/installSkills/index.d.ts.map +1 -1
  181. package/dist/types/listDictionariesPath.d.ts +2 -3
  182. package/dist/types/listDictionariesPath.d.ts.map +1 -1
  183. package/dist/types/listGitFiles.d.ts +5 -6
  184. package/dist/types/listGitFiles.d.ts.map +1 -1
  185. package/dist/types/listProjects.d.ts +3 -4
  186. package/dist/types/listProjects.d.ts.map +1 -1
  187. package/dist/types/loadDictionaries/getIntlayerBundle.d.ts +1 -2
  188. package/dist/types/loadDictionaries/getIntlayerBundle.d.ts.map +1 -1
  189. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +4 -5
  190. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -1
  191. package/dist/types/loadDictionaries/loadDictionaries.d.ts +2 -3
  192. package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -1
  193. package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +1 -2
  194. package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -1
  195. package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts +2 -2
  196. package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts.map +1 -1
  197. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +2 -3
  198. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
  199. package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts +1 -2
  200. package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts.map +1 -1
  201. package/dist/types/loadDictionaries/log.d.ts +1 -2
  202. package/dist/types/loadDictionaries/log.d.ts.map +1 -1
  203. package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts +1 -2
  204. package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts.map +1 -1
  205. package/dist/types/logConfigDetails.d.ts +1 -2
  206. package/dist/types/logConfigDetails.d.ts.map +1 -1
  207. package/dist/types/prepareIntlayer.d.ts +1 -2
  208. package/dist/types/prepareIntlayer.d.ts.map +1 -1
  209. package/dist/types/reduceDictionaryContent/applyMask.d.ts +1 -2
  210. package/dist/types/reduceDictionaryContent/applyMask.d.ts.map +1 -1
  211. package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts +1 -2
  212. package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts.map +1 -1
  213. package/dist/types/scan/analyzeBundleContent.d.ts +1 -2
  214. package/dist/types/scan/analyzeBundleContent.d.ts.map +1 -1
  215. package/dist/types/scan/calculateScore.d.ts +6 -7
  216. package/dist/types/scan/calculateScore.d.ts.map +1 -1
  217. package/dist/types/scan/checks.d.ts +8 -9
  218. package/dist/types/scan/checks.d.ts.map +1 -1
  219. package/dist/types/scan/parseHtml.d.ts +13 -14
  220. package/dist/types/scan/parseHtml.d.ts.map +1 -1
  221. package/dist/types/scan/scanWebsite.d.ts +1 -2
  222. package/dist/types/scan/scanWebsite.d.ts.map +1 -1
  223. package/dist/types/scan/types.d.ts +9 -10
  224. package/dist/types/scan/types.d.ts.map +1 -1
  225. package/dist/types/syncPluginKit/createFileAdapter.d.ts +4 -5
  226. package/dist/types/syncPluginKit/createFileAdapter.d.ts.map +1 -1
  227. package/dist/types/syncPluginKit/createSyncPlugin.d.ts +1 -2
  228. package/dist/types/syncPluginKit/createSyncPlugin.d.ts.map +1 -1
  229. package/dist/types/syncPluginKit/extractKeyAndLocaleFromPath.d.ts +1 -2
  230. package/dist/types/syncPluginKit/extractKeyAndLocaleFromPath.d.ts.map +1 -1
  231. package/dist/types/syncPluginKit/filePathPatternHelpers.d.ts +1 -2
  232. package/dist/types/syncPluginKit/filePathPatternHelpers.d.ts.map +1 -1
  233. package/dist/types/syncPluginKit/index.d.ts +2 -2
  234. package/dist/types/syncPluginKit/types.d.ts +28 -15
  235. package/dist/types/syncPluginKit/types.d.ts.map +1 -1
  236. package/dist/types/utils/autoDecorateContent.d.ts +1 -2
  237. package/dist/types/utils/autoDecorateContent.d.ts.map +1 -1
  238. package/dist/types/utils/babelParser.d.ts +3 -3
  239. package/dist/types/utils/babelParser.d.ts.map +1 -1
  240. package/dist/types/utils/buildComponentFilesList.d.ts +1 -2
  241. package/dist/types/utils/buildComponentFilesList.d.ts.map +1 -1
  242. package/dist/types/utils/buildFilesList.d.ts +3 -4
  243. package/dist/types/utils/buildFilesList.d.ts.map +1 -1
  244. package/dist/types/utils/chunkArray.d.ts +1 -2
  245. package/dist/types/utils/chunkArray.d.ts.map +1 -1
  246. package/dist/types/utils/chunkJSON.d.ts +5 -6
  247. package/dist/types/utils/chunkJSON.d.ts.map +1 -1
  248. package/dist/types/utils/contentWatcherLock.d.ts +113 -0
  249. package/dist/types/utils/contentWatcherLock.d.ts.map +1 -0
  250. package/dist/types/utils/formatter.d.ts +2 -3
  251. package/dist/types/utils/formatter.d.ts.map +1 -1
  252. package/dist/types/utils/getChunk.d.ts +1 -2
  253. package/dist/types/utils/getChunk.d.ts.map +1 -1
  254. package/dist/types/utils/getContentExtension.d.ts +1 -2
  255. package/dist/types/utils/getContentExtension.d.ts.map +1 -1
  256. package/dist/types/utils/getFormatFromExtension.d.ts +4 -5
  257. package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -1
  258. package/dist/types/utils/getPathHash.d.ts +1 -2
  259. package/dist/types/utils/getPathHash.d.ts.map +1 -1
  260. package/dist/types/utils/index.d.ts +4 -1
  261. package/dist/types/utils/mergeChunks.d.ts +1 -2
  262. package/dist/types/utils/mergeChunks.d.ts.map +1 -1
  263. package/dist/types/utils/pLimit.d.ts +2 -3
  264. package/dist/types/utils/pLimit.d.ts.map +1 -1
  265. package/dist/types/utils/parallelize.d.ts +1 -2
  266. package/dist/types/utils/parallelize.d.ts.map +1 -1
  267. package/dist/types/utils/parallelizeGlobal.d.ts +3 -4
  268. package/dist/types/utils/parallelizeGlobal.d.ts.map +1 -1
  269. package/dist/types/utils/parseContentDeclarationFileName.d.ts +23 -0
  270. package/dist/types/utils/parseContentDeclarationFileName.d.ts.map +1 -0
  271. package/dist/types/utils/readDictionariesFromDisk.d.ts +1 -2
  272. package/dist/types/utils/readDictionariesFromDisk.d.ts.map +1 -1
  273. package/dist/types/utils/reduceObjectFormat.d.ts +4 -5
  274. package/dist/types/utils/reduceObjectFormat.d.ts.map +1 -1
  275. package/dist/types/utils/resolveObjectPromises.d.ts +1 -2
  276. package/dist/types/utils/resolveObjectPromises.d.ts.map +1 -1
  277. package/dist/types/utils/resolveRelativePath.d.ts +1 -2
  278. package/dist/types/utils/resolveRelativePath.d.ts.map +1 -1
  279. package/dist/types/utils/runOnce.d.ts +2 -3
  280. package/dist/types/utils/runOnce.d.ts.map +1 -1
  281. package/dist/types/utils/runParallel/bin.d.ts +1 -2
  282. package/dist/types/utils/runParallel/bin.d.ts.map +1 -1
  283. package/dist/types/utils/runParallel/bootstrap.d.ts +1 -2
  284. package/dist/types/utils/runParallel/bootstrap.d.ts.map +1 -1
  285. package/dist/types/utils/runParallel/index.d.ts +2 -3
  286. package/dist/types/utils/runParallel/index.d.ts.map +1 -1
  287. package/dist/types/utils/runParallel/pidTree.d.ts +1 -2
  288. package/dist/types/utils/runParallel/pidTree.d.ts.map +1 -1
  289. package/dist/types/utils/runParallel/ps.d.ts +1 -2
  290. package/dist/types/utils/runParallel/ps.d.ts.map +1 -1
  291. package/dist/types/utils/runParallel/runTask.d.ts +1 -2
  292. package/dist/types/utils/runParallel/runTask.d.ts.map +1 -1
  293. package/dist/types/utils/runParallel/spawnPosix.d.ts +1 -2
  294. package/dist/types/utils/runParallel/spawnPosix.d.ts.map +1 -1
  295. package/dist/types/utils/runParallel/spawnWin32.d.ts +1 -2
  296. package/dist/types/utils/runParallel/spawnWin32.d.ts.map +1 -1
  297. package/dist/types/utils/runParallel/wmic.d.ts +1 -2
  298. package/dist/types/utils/runParallel/wmic.d.ts.map +1 -1
  299. package/dist/types/utils/sortAlphabetically.d.ts +1 -2
  300. package/dist/types/utils/sortAlphabetically.d.ts.map +1 -1
  301. package/dist/types/utils/splitTextByLine.d.ts +1 -2
  302. package/dist/types/utils/splitTextByLine.d.ts.map +1 -1
  303. package/dist/types/utils/verifyIdenticObjectFormat.d.ts +1 -2
  304. package/dist/types/utils/verifyIdenticObjectFormat.d.ts.map +1 -1
  305. package/dist/types/utils/withFileLock.d.ts +44 -0
  306. package/dist/types/utils/withFileLock.d.ts.map +1 -0
  307. package/dist/types/watcher.d.ts +2 -3
  308. package/dist/types/watcher.d.ts.map +1 -1
  309. package/dist/types/writeConfiguration/generateConfigurationContent.d.ts +1 -2
  310. package/dist/types/writeConfiguration/generateConfigurationContent.d.ts.map +1 -1
  311. package/dist/types/writeConfiguration/index.d.ts +2 -3
  312. package/dist/types/writeConfiguration/index.d.ts.map +1 -1
  313. package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts +1 -2
  314. package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts.map +1 -1
  315. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +1 -2
  316. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -1
  317. package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts +1 -2
  318. package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -1
  319. package/dist/types/writeContentDeclaration/transformJSFile.d.ts +1 -2
  320. package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -1
  321. package/dist/types/writeContentDeclaration/transformJSONFile.d.ts +1 -2
  322. package/dist/types/writeContentDeclaration/transformJSONFile.d.ts.map +1 -1
  323. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +1 -2
  324. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
  325. package/dist/types/writeContentDeclaration/writeJSFile.d.ts +1 -2
  326. package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -1
  327. package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts +1 -2
  328. package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -1
  329. package/dist/types/writeContentDeclaration/writeYamlFile.d.ts +1 -2
  330. package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -1
  331. package/dist/types/writeFileIfChanged.d.ts +2 -3
  332. package/dist/types/writeFileIfChanged.d.ts.map +1 -1
  333. package/dist/types/writeJsonIfChanged.d.ts +1 -2
  334. package/dist/types/writeJsonIfChanged.d.ts.map +1 -1
  335. package/package.json +12 -12
  336. package/dist/types/intlayer/dist/types/index.d.ts +0 -14
@@ -0,0 +1,132 @@
1
+ import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
2
+ import { dirname } from "node:path";
3
+ import { rmSync } from "node:fs";
4
+
5
+ //#region src/utils/withFileLock.ts
6
+ const DEFAULT_OPTIONS = {
7
+ staleTimeoutMs: 3e4,
8
+ acquireTimeoutMs: 6e4
9
+ };
10
+ /** Delay between two attempts to take a lock held by someone else. */
11
+ const POLL_INTERVAL_MS = 25;
12
+ const delay = (durationMs) => new Promise((resolve) => setTimeout(resolve, durationMs));
13
+ /**
14
+ * Locks held by this process, released synchronously on exit so a crash never
15
+ * leaves a lock file that would stall every later run for `staleTimeoutMs`.
16
+ */
17
+ const ownedLockFilePaths = /* @__PURE__ */ new Set();
18
+ process.on("exit", () => {
19
+ for (const lockFilePath of ownedLockFilePaths) try {
20
+ rmSync(lockFilePath, { force: true });
21
+ } catch {}
22
+ });
23
+ /**
24
+ * Whether the process holding the lock is still alive. An unreadable PID is
25
+ * reported as alive so {@link WithFileLockOptions.staleTimeoutMs} stays the
26
+ * only way to reclaim the lock.
27
+ */
28
+ const getIsOwnerAlive = (pid) => {
29
+ if (!pid || pid === process.pid) return true;
30
+ try {
31
+ process.kill(pid, 0);
32
+ return true;
33
+ } catch (error) {
34
+ return error.code === "EPERM";
35
+ }
36
+ };
37
+ const readLockOwner = async (lockFilePath) => {
38
+ try {
39
+ const raw = await readFile(lockFilePath, "utf8");
40
+ const parsed = JSON.parse(raw);
41
+ return {
42
+ pid: parsed.pid ?? 0,
43
+ acquiredAt: parsed.acquiredAt ?? 0
44
+ };
45
+ } catch {
46
+ return;
47
+ }
48
+ };
49
+ const releaseLock = async (lockFilePath) => {
50
+ try {
51
+ await unlink(lockFilePath);
52
+ } catch {}
53
+ };
54
+ /**
55
+ * Attempts to create the lock file. `wx` makes the creation atomic, so exactly
56
+ * one process wins even when several try at the same moment.
57
+ */
58
+ const tryAcquireLock = async (lockFilePath) => {
59
+ const data = JSON.stringify({
60
+ pid: process.pid,
61
+ acquiredAt: Date.now()
62
+ });
63
+ for (let attempt = 0; attempt < 2; attempt++) try {
64
+ await mkdir(dirname(lockFilePath), { recursive: true });
65
+ await writeFile(lockFilePath, data, { flag: "wx" });
66
+ return true;
67
+ } catch (error) {
68
+ const code = error.code;
69
+ if (code === "EEXIST") return false;
70
+ if (code === "ENOENT" && attempt === 0) continue;
71
+ throw error;
72
+ }
73
+ return false;
74
+ };
75
+ /**
76
+ * Runs `callback` under a cross-process mutex materialised by a lock file.
77
+ *
78
+ * Unlike `runOnce`, which lets one process do the work and the others skip it,
79
+ * every caller here runs the callback — just never at the same time. This is
80
+ * what shared, read-modify-write outputs need (e.g. building the `.intlayer`
81
+ * dictionaries, which merges every dictionary on disk): concurrent runs would
82
+ * each read a half-written state.
83
+ *
84
+ * The lock is released even when the callback throws, and its error is
85
+ * re-thrown to the caller unchanged.
86
+ *
87
+ * @param lockFilePath - Path of the lock file coordinating the callers.
88
+ * @param callback - The critical section.
89
+ * @param options - Staleness and acquisition timeouts.
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * await withFileLock(join(cacheDir, 'build-dictionary.lock'), () =>
94
+ * buildDictionary([dictionary], configuration)
95
+ * );
96
+ * ```
97
+ */
98
+ const withFileLock = async (lockFilePath, callback, options) => {
99
+ const { staleTimeoutMs, acquireTimeoutMs } = {
100
+ ...DEFAULT_OPTIONS,
101
+ ...options ?? {}
102
+ };
103
+ const acquireDeadline = Date.now() + acquireTimeoutMs;
104
+ let hasAcquiredLock = false;
105
+ while (Date.now() < acquireDeadline) {
106
+ if (await tryAcquireLock(lockFilePath)) {
107
+ hasAcquiredLock = true;
108
+ break;
109
+ }
110
+ const owner = await readLockOwner(lockFilePath);
111
+ if (owner) {
112
+ if (!getIsOwnerAlive(owner.pid) || Date.now() - owner.acquiredAt > staleTimeoutMs) {
113
+ await releaseLock(lockFilePath);
114
+ continue;
115
+ }
116
+ }
117
+ await delay(POLL_INTERVAL_MS);
118
+ }
119
+ if (hasAcquiredLock) ownedLockFilePaths.add(lockFilePath);
120
+ try {
121
+ return await callback();
122
+ } finally {
123
+ if (hasAcquiredLock) {
124
+ ownedLockFilePaths.delete(lockFilePath);
125
+ await releaseLock(lockFilePath);
126
+ }
127
+ }
128
+ };
129
+
130
+ //#endregion
131
+ export { withFileLock };
132
+ //# sourceMappingURL=withFileLock.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withFileLock.mjs","names":[],"sources":["../../../src/utils/withFileLock.ts"],"sourcesContent":["import { rmSync } from 'node:fs';\nimport { mkdir, readFile, unlink, writeFile } from 'node:fs/promises';\nimport { dirname } from 'node:path';\n\n/** Payload written inside a lock file, used to detect abandoned locks. */\ntype LockOwnerData = {\n /** PID of the process currently holding the lock. */\n pid: number;\n /** Epoch milliseconds at which the lock was taken. */\n acquiredAt: number;\n};\n\ntype WithFileLockOptions = {\n /**\n * How long a lock may be held before it is considered abandoned and taken\n * over, in milliseconds.\n *\n * @default 30000 = 30 seconds\n */\n staleTimeoutMs?: number;\n /**\n * How long to wait for the lock before running the callback anyway, in\n * milliseconds. Giving up serialises nothing, but it is strictly better than\n * deadlocking a build behind a lock that never clears.\n *\n * @default 60000 = 1 minute\n */\n acquireTimeoutMs?: number;\n};\n\nconst DEFAULT_OPTIONS = {\n staleTimeoutMs: 30 * 1000,\n acquireTimeoutMs: 60 * 1000,\n} satisfies Required<WithFileLockOptions>;\n\n/** Delay between two attempts to take a lock held by someone else. */\nconst POLL_INTERVAL_MS = 25;\n\nconst delay = (durationMs: number): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, durationMs));\n\n/**\n * Locks held by this process, released synchronously on exit so a crash never\n * leaves a lock file that would stall every later run for `staleTimeoutMs`.\n */\nconst ownedLockFilePaths = new Set<string>();\n\nprocess.on('exit', () => {\n for (const lockFilePath of ownedLockFilePaths) {\n try {\n rmSync(lockFilePath, { force: true });\n } catch {}\n }\n});\n\n/**\n * Whether the process holding the lock is still alive. An unreadable PID is\n * reported as alive so {@link WithFileLockOptions.staleTimeoutMs} stays the\n * only way to reclaim the lock.\n */\nconst getIsOwnerAlive = (pid: number): boolean => {\n if (!pid || pid === process.pid) return true;\n\n try {\n // Signal 0 checks for existence without delivering a signal.\n process.kill(pid, 0);\n return true;\n } catch (error) {\n // EPERM means the process exists but belongs to another user.\n return (error as NodeJS.ErrnoException).code === 'EPERM';\n }\n};\n\nconst readLockOwner = async (\n lockFilePath: string\n): Promise<LockOwnerData | undefined> => {\n try {\n const raw = await readFile(lockFilePath, 'utf8');\n const parsed = JSON.parse(raw) as Partial<LockOwnerData>;\n\n return {\n pid: parsed.pid ?? 0,\n acquiredAt: parsed.acquiredAt ?? 0,\n };\n } catch {\n return undefined;\n }\n};\n\nconst releaseLock = async (lockFilePath: string): Promise<void> => {\n try {\n await unlink(lockFilePath);\n } catch {}\n};\n\n/**\n * Attempts to create the lock file. `wx` makes the creation atomic, so exactly\n * one process wins even when several try at the same moment.\n */\nconst tryAcquireLock = async (lockFilePath: string): Promise<boolean> => {\n const data = JSON.stringify({\n pid: process.pid,\n acquiredAt: Date.now(),\n } satisfies LockOwnerData);\n\n for (let attempt = 0; attempt < 2; attempt++) {\n try {\n await mkdir(dirname(lockFilePath), { recursive: true });\n await writeFile(lockFilePath, data, { flag: 'wx' });\n\n return true;\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n\n if (code === 'EEXIST') return false;\n // The directory was removed between the mkdir and the write (e.g. a\n // concurrent output-directory clean); retry once.\n if (code === 'ENOENT' && attempt === 0) continue;\n\n throw error;\n }\n }\n\n return false;\n};\n\n/**\n * Runs `callback` under a cross-process mutex materialised by a lock file.\n *\n * Unlike `runOnce`, which lets one process do the work and the others skip it,\n * every caller here runs the callback — just never at the same time. This is\n * what shared, read-modify-write outputs need (e.g. building the `.intlayer`\n * dictionaries, which merges every dictionary on disk): concurrent runs would\n * each read a half-written state.\n *\n * The lock is released even when the callback throws, and its error is\n * re-thrown to the caller unchanged.\n *\n * @param lockFilePath - Path of the lock file coordinating the callers.\n * @param callback - The critical section.\n * @param options - Staleness and acquisition timeouts.\n *\n * @example\n * ```typescript\n * await withFileLock(join(cacheDir, 'build-dictionary.lock'), () =>\n * buildDictionary([dictionary], configuration)\n * );\n * ```\n */\nexport const withFileLock = async <T>(\n lockFilePath: string,\n callback: () => T | Promise<T>,\n options?: WithFileLockOptions\n): Promise<T> => {\n const { staleTimeoutMs, acquireTimeoutMs } = {\n ...DEFAULT_OPTIONS,\n ...(options ?? {}),\n };\n\n const acquireDeadline = Date.now() + acquireTimeoutMs;\n let hasAcquiredLock = false;\n\n while (Date.now() < acquireDeadline) {\n if (await tryAcquireLock(lockFilePath)) {\n hasAcquiredLock = true;\n break;\n }\n\n const owner = await readLockOwner(lockFilePath);\n\n // A missing owner means the lock was released between the two calls; loop\n // back and try to take it.\n if (owner) {\n const isAbandoned =\n !getIsOwnerAlive(owner.pid) ||\n Date.now() - owner.acquiredAt > staleTimeoutMs;\n\n if (isAbandoned) {\n await releaseLock(lockFilePath);\n continue;\n }\n }\n\n await delay(POLL_INTERVAL_MS);\n }\n\n if (hasAcquiredLock) ownedLockFilePaths.add(lockFilePath);\n\n try {\n return await callback();\n } finally {\n if (hasAcquiredLock) {\n ownedLockFilePaths.delete(lockFilePath);\n await releaseLock(lockFilePath);\n }\n }\n};\n"],"mappings":";;;;;AA8BA,MAAM,kBAAkB;CACtB,gBAAgB;CAChB,kBAAkB;AACpB;;AAGA,MAAM,mBAAmB;AAEzB,MAAM,SAAS,eACb,IAAI,SAAS,YAAY,WAAW,SAAS,UAAU,CAAC;;;;;AAM1D,MAAM,qCAAqB,IAAI,IAAY;AAE3C,QAAQ,GAAG,cAAc;CACvB,KAAK,MAAM,gBAAgB,oBACzB,IAAI;EACF,OAAO,cAAc,EAAE,OAAO,KAAK,CAAC;CACtC,QAAQ,CAAC;AAEb,CAAC;;;;;;AAOD,MAAM,mBAAmB,QAAyB;CAChD,IAAI,CAAC,OAAO,QAAQ,QAAQ,KAAK,OAAO;CAExC,IAAI;EAEF,QAAQ,KAAK,KAAK,CAAC;EACnB,OAAO;CACT,SAAS,OAAO;EAEd,OAAQ,MAAgC,SAAS;CACnD;AACF;AAEA,MAAM,gBAAgB,OACpB,iBACuC;CACvC,IAAI;EACF,MAAM,MAAM,MAAM,SAAS,cAAc,MAAM;EAC/C,MAAM,SAAS,KAAK,MAAM,GAAG;EAE7B,OAAO;GACL,KAAK,OAAO,OAAO;GACnB,YAAY,OAAO,cAAc;EACnC;CACF,QAAQ;EACN;CACF;AACF;AAEA,MAAM,cAAc,OAAO,iBAAwC;CACjE,IAAI;EACF,MAAM,OAAO,YAAY;CAC3B,QAAQ,CAAC;AACX;;;;;AAMA,MAAM,iBAAiB,OAAO,iBAA2C;CACvE,MAAM,OAAO,KAAK,UAAU;EAC1B,KAAK,QAAQ;EACb,YAAY,KAAK,IAAI;CACvB,CAAyB;CAEzB,KAAK,IAAI,UAAU,GAAG,UAAU,GAAG,WACjC,IAAI;EACF,MAAM,MAAM,QAAQ,YAAY,GAAG,EAAE,WAAW,KAAK,CAAC;EACtD,MAAM,UAAU,cAAc,MAAM,EAAE,MAAM,KAAK,CAAC;EAElD,OAAO;CACT,SAAS,OAAO;EACd,MAAM,OAAQ,MAAgC;EAE9C,IAAI,SAAS,UAAU,OAAO;EAG9B,IAAI,SAAS,YAAY,YAAY,GAAG;EAExC,MAAM;CACR;CAGF,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,eAAe,OAC1B,cACA,UACA,YACe;CACf,MAAM,EAAE,gBAAgB,qBAAqB;EAC3C,GAAG;EACH,GAAI,WAAW,CAAC;CAClB;CAEA,MAAM,kBAAkB,KAAK,IAAI,IAAI;CACrC,IAAI,kBAAkB;CAEtB,OAAO,KAAK,IAAI,IAAI,iBAAiB;EACnC,IAAI,MAAM,eAAe,YAAY,GAAG;GACtC,kBAAkB;GAClB;EACF;EAEA,MAAM,QAAQ,MAAM,cAAc,YAAY;EAI9C,IAAI,OAKF;OAHE,CAAC,gBAAgB,MAAM,GAAG,KAC1B,KAAK,IAAI,IAAI,MAAM,aAAa,gBAEjB;IACf,MAAM,YAAY,YAAY;IAC9B;GACF;;EAGF,MAAM,MAAM,gBAAgB;CAC9B;CAEA,IAAI,iBAAiB,mBAAmB,IAAI,YAAY;CAExD,IAAI;EACF,OAAO,MAAM,SAAS;CACxB,UAAU;EACR,IAAI,iBAAiB;GACnB,mBAAmB,OAAO,YAAY;GACtC,MAAM,YAAY,YAAY;EAChC;CACF;AACF"}
@@ -1,4 +1,6 @@
1
1
  import { formatPath } from "./utils/formatter.mjs";
2
+ import { getFormatFromExtension } from "./utils/getFormatFromExtension.mjs";
3
+ import { parseContentDeclarationFileName } from "./utils/parseContentDeclarationFileName.mjs";
2
4
  import { handleContentDeclarationFileChange } from "./handleContentDeclarationFileChange.mjs";
3
5
  import { handleContentDeclarationFileMoved } from "./handleContentDeclarationFileMoved.mjs";
4
6
  import { handleAdditionalContentDeclarationFile } from "./handleAdditionalContentDeclarationFile.mjs";
@@ -6,7 +8,7 @@ import { handleUnlinkedContentDeclarationFile } from "./handleUnlinkedContentDec
6
8
  import { prepareIntlayer } from "./prepareIntlayer.mjs";
7
9
  import { writeContentDeclaration } from "./writeContentDeclaration/writeContentDeclaration.mjs";
8
10
  import { readFile } from "node:fs/promises";
9
- import { basename, dirname, resolve } from "node:path";
11
+ import { basename, dirname, extname, resolve } from "node:path";
10
12
  import { colorize, getAppLogger } from "@intlayer/config/logger";
11
13
  import { getConfiguration, getConfigurationAndFilePath } from "@intlayer/config/node";
12
14
  import { existsSync, watch as watch$1 } from "node:fs";
@@ -166,10 +168,12 @@ const watch = async (options) => {
166
168
  else scheduleStable(path, () => {
167
169
  processEvent(async () => {
168
170
  if (await readFile(filePath, "utf-8") === "") {
169
- const extensionPattern = fileExtensions.map((ext) => ext.replace(/\./g, "\\.")).join("|");
170
- const name = fileName.replace(new RegExp(`(${extensionPattern})$`), "");
171
+ const { key, locale } = parseContentDeclarationFileName(filePath, configuration);
172
+ const isMarkdown = getFormatFromExtension(extname(filePath)) === "md";
173
+ const declaredLocale = locale ?? (isMarkdown ? configuration.internationalization.defaultLocale : void 0);
171
174
  await writeContentDeclaration({
172
- key: name,
175
+ key,
176
+ ...declaredLocale && { locale: declaredLocale },
173
177
  content: {},
174
178
  filePath
175
179
  }, configuration);
@@ -1 +1 @@
1
- {"version":3,"file":"watcher.mjs","names":["fsWatch"],"sources":["../../src/watcher.ts"],"sourcesContent":["import { existsSync, watch as fsWatch } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { basename, dirname, resolve } from 'node:path';\nimport * as ANSIColor from '@intlayer/config/colors';\nimport { transpileTSToCJS } from '@intlayer/config/file';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n getConfigurationAndFilePath,\n} from '@intlayer/config/node';\nimport {\n clearAllCache,\n clearDiskCacheMemory,\n clearModuleCache,\n normalizePath,\n} from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { handleAdditionalContentDeclarationFile } from './handleAdditionalContentDeclarationFile';\nimport { handleContentDeclarationFileChange } from './handleContentDeclarationFileChange';\nimport { handleContentDeclarationFileMoved } from './handleContentDeclarationFileMoved';\nimport { handleUnlinkedContentDeclarationFile } from './handleUnlinkedContentDeclarationFile';\nimport { prepareIntlayer } from './prepareIntlayer';\nimport { formatPath } from './utils';\nimport { writeContentDeclaration } from './writeContentDeclaration';\n\n// Map to track files that were recently unlinked: oldPath -> { timer, timestamp }\nconst pendingUnlinks = new Map<\n string,\n { timer: NodeJS.Timeout; oldPath: string }\n>();\n\n// Array-based sequential task queue — no Promise chain accumulation, no race conditions\nconst taskQueue: (() => Promise<void>)[] = [];\nlet isProcessing = false;\n\nconst processQueue = async () => {\n if (isProcessing) return;\n isProcessing = true;\n while (taskQueue.length > 0) {\n const task = taskQueue.shift()!;\n try {\n await task();\n } catch (error) {\n console.error(error);\n }\n }\n isProcessing = false;\n};\n\nconst processEvent = (task: () => Promise<void>) => {\n taskQueue.push(task);\n processQueue();\n};\n\ntype WatchOptions = {\n configuration?: IntlayerConfig;\n configOptions?: GetConfigurationOptions;\n skipPrepare?: boolean;\n persistent?: boolean;\n};\n\n// awaitWriteFinish equivalent: debounce per path until the file is stable\nconst STABILITY_THRESHOLD = 1000;\n\nconst createStabilityDebounce = () => {\n const pending = new Map<string, NodeJS.Timeout>();\n return (path: string, handler: () => void) => {\n const existing = pending.get(path);\n if (existing) clearTimeout(existing);\n pending.set(\n path,\n setTimeout(() => {\n pending.delete(path);\n handler();\n }, STABILITY_THRESHOLD)\n );\n };\n};\n\n// Initialize @parcel/watcher (non-persistent until subscribed)\nexport const watch = async (options?: WatchOptions) => {\n const { subscribe } = await import('@parcel/watcher');\n\n const configResult = getConfigurationAndFilePath(options?.configOptions);\n const configurationFilePath = configResult.configurationFilePath;\n let configuration: IntlayerConfig =\n options?.configuration ?? configResult.configuration;\n const appLogger = getAppLogger(configuration);\n\n const {\n watch: isWatchMode,\n fileExtensions,\n contentDir,\n excludedPath,\n } = configuration.content;\n\n if (!configuration.content.watch) return;\n\n appLogger('Watching Intlayer content declarations');\n\n if (configuration.build.optimize === true) {\n appLogger(\n [\n `Build optimization is forced to ${colorize('true', ANSIColor.GREY)}, but watching is enabled too.`,\n 'It may lead to dev mode performance degradation as well as import errors.',\n 'Its recommended to keep the',\n colorize('`build.optimized`', ANSIColor.BLUE),\n 'option',\n colorize('undefined', ANSIColor.GREY),\n 'to get the best dev mode experience',\n ],\n {\n level: 'warn',\n }\n );\n }\n\n // Strip glob markers from excludedPath entries to get plain segments (e.g. 'node_modules')\n const excludedSegments = excludedPath.map((segment) =>\n segment.replace(/^\\*\\*\\//, '').replace(/\\/\\*\\*$/, '')\n );\n\n const normalizedConfigPath = configurationFilePath\n ? normalizePath(configurationFilePath)\n : null;\n\n const { mainDir, baseDir } = configuration.system;\n const normalizedMainDir = normalizePath(mainDir);\n const normalizedIntlayerDir = normalizePath(dirname(mainDir));\n\n const subscriptions: { unsubscribe: () => Promise<void> }[] = [];\n\n const scheduleStable = createStabilityDebounce();\n\n // ── mainDir watcher (depth 0) ──────────────────────────────────────────────\n // Detects broken or missing entry-point files inside .intlayer/main\n if (existsSync(mainDir)) {\n const mainDirSub = await subscribe(normalizedMainDir, (err, events) => {\n if (err || isProcessing) return;\n\n for (const event of events) {\n const eventPath = normalizePath(event.path);\n // depth-0 filter: only files directly inside mainDir\n const rel = eventPath.slice(normalizedMainDir.length + 1);\n if (!rel || rel.includes('/')) continue;\n // Temp files written by the bundler (write-then-rename) are build-internal;\n // their deletion must not trigger a clean rebuild.\n if (rel.endsWith('.tmp')) continue;\n\n if (event.type === 'update') {\n processEvent(async () => {\n try {\n // Validate that the regenerated entry point — and the relative\n // dictionary graph it imports — still resolves, by bundling it\n // in-memory with esbuild (via the shared, freshness-checked\n // transpile cache). This replaces a cache-busting dynamic\n // `import()`, which leaked a permanent record into Node's ESM\n // registry on every rebuild since that registry is never evicted.\n const entryCode = await readFile(event.path, 'utf-8');\n await transpileTSToCJS(entryCode, event.path);\n } catch {\n appLogger(\n `Entry point ${basename(event.path)} failed to load, running clean rebuild...`,\n { level: 'warn' }\n );\n await prepareIntlayer(configuration, {\n clean: true,\n forceRun: true,\n });\n }\n });\n } else if (event.type === 'delete') {\n processEvent(async () => {\n appLogger(\n [\n 'Entry point',\n formatPath(basename(event.path)),\n 'was removed, running clean rebuild...',\n ],\n { level: 'warn' }\n );\n await prepareIntlayer(configuration, {\n clean: true,\n forceRun: true,\n });\n });\n }\n }\n });\n subscriptions.push(mainDirSub);\n }\n\n // ── baseDir watcher (depth 0) — detect .intlayer directory removal ─────────\n // Native fs.watch is non-recursive and ideal for single-directory depth-0 detection.\n const intlayerDirName = basename(normalizedIntlayerDir);\n const fsDirWatcher = fsWatch(\n baseDir,\n { persistent: isWatchMode },\n (eventType, filename) => {\n if (isProcessing || !filename) return;\n if (filename !== intlayerDirName) return;\n\n const fullPath = normalizePath(resolve(baseDir, filename));\n if (fullPath !== normalizedIntlayerDir) return;\n\n if (eventType === 'rename' && !existsSync(normalizedIntlayerDir)) {\n appLogger([\n formatPath('.intlayer'),\n 'directory removed, running clean rebuild...',\n ]);\n processEvent(() =>\n prepareIntlayer(configuration, { clean: true, forceRun: true })\n );\n }\n }\n );\n subscriptions.push({\n unsubscribe: async () => {\n fsDirWatcher.close();\n },\n });\n\n // ── main content watcher ───────────────────────────────────────────────────\n // Ignore patterns for @parcel/watcher (micromatch globs)\n const ignorePatterns = excludedSegments.map((s) => `**/${s}/**`);\n\n // Strip trailing slashes so directory matching stays exact. A user-supplied\n const contentDirs = contentDir\n .map((dir) => normalizePath(dir).replace(/\\/+$/, ''))\n .filter(existsSync);\n\n // Collect unique directories to subscribe to (dirs only, not file paths)\n const dirsToWatch = new Set<string>(contentDirs);\n if (normalizedConfigPath) {\n dirsToWatch.add(normalizePath(dirname(normalizedConfigPath)));\n }\n\n const contentHandler = (\n err: Error | null,\n events: Array<{ type: string; path: string }>\n ) => {\n if (err) {\n appLogger(`Watcher error: ${err}`, { level: 'error' });\n appLogger('Restarting watcher');\n prepareIntlayer(configuration);\n return;\n }\n\n for (const event of events) {\n const filePath = event.path;\n const path = normalizePath(filePath);\n\n const isConfigFile =\n normalizedConfigPath && path === normalizedConfigPath;\n\n if (!isConfigFile) {\n // Must originate from a watched content directory\n const isInContentDir = contentDirs.some(\n (d) => path.startsWith(`${d}/`) || path === d\n );\n if (!isInContentDir) continue;\n\n if (excludedSegments.some((segment) => path.includes(`/${segment}`)))\n continue;\n\n if (!fileExtensions.some((extension) => path.endsWith(extension)))\n continue;\n }\n\n if (event.type === 'create') {\n const fileName = basename(filePath);\n\n // Move detection must happen synchronously before any debounce\n let isMove = false;\n let matchedOldPath: string | undefined;\n\n for (const [oldPath] of pendingUnlinks) {\n if (basename(oldPath) === fileName) {\n matchedOldPath = oldPath;\n break;\n }\n }\n\n if (!matchedOldPath && pendingUnlinks.size === 1) {\n matchedOldPath = pendingUnlinks.keys().next().value;\n }\n\n if (matchedOldPath) {\n const pending = pendingUnlinks.get(matchedOldPath);\n if (pending) {\n clearTimeout(pending.timer);\n pendingUnlinks.delete(matchedOldPath);\n }\n isMove = true;\n appLogger(`File moved from ${matchedOldPath} to ${filePath}`);\n }\n\n if (isMove && matchedOldPath) {\n processEvent(async () => {\n await handleContentDeclarationFileMoved(\n matchedOldPath!,\n filePath,\n configuration\n );\n });\n } else {\n // Debounce: wait for write to finish before reading the file\n scheduleStable(path, () => {\n processEvent(async () => {\n const fileContent = await readFile(filePath, 'utf-8');\n const isEmpty = fileContent === '';\n\n if (isEmpty) {\n const extensionPattern = fileExtensions\n .map((ext) => ext.replace(/\\./g, '\\\\.'))\n .join('|');\n const name = fileName.replace(\n new RegExp(`(${extensionPattern})$`),\n ''\n );\n\n await writeContentDeclaration(\n { key: name, content: {}, filePath },\n configuration\n );\n }\n\n await handleAdditionalContentDeclarationFile(\n filePath,\n configuration\n );\n });\n });\n }\n } else if (event.type === 'update') {\n scheduleStable(path, () => {\n processEvent(async () => {\n if (isConfigFile) {\n appLogger('Configuration file changed, repreparing Intlayer');\n\n clearModuleCache(filePath);\n clearAllCache();\n\n const { configuration: newConfiguration } =\n getConfigurationAndFilePath(options?.configOptions);\n\n configuration = options?.configuration ?? newConfiguration;\n\n await prepareIntlayer(configuration, { clean: false });\n } else {\n // Clear module cache for the changed file to avoid stale require() results\n clearModuleCache(filePath);\n // Evict in-memory caches so loadContentDeclaration picks up fresh content\n clearAllCache();\n clearDiskCacheMemory();\n await handleContentDeclarationFileChange(filePath, configuration);\n }\n });\n });\n } else if (event.type === 'delete') {\n // Delay unlink processing to see if an 'add' event occurs (indicating a move)\n const timer = setTimeout(async () => {\n // If timer fires, the file was genuinely removed\n pendingUnlinks.delete(filePath);\n processEvent(async () =>\n handleUnlinkedContentDeclarationFile(filePath, configuration)\n );\n }, 200); // 200ms window to catch the 'create' event\n\n pendingUnlinks.set(filePath, { timer, oldPath: filePath });\n }\n }\n };\n\n for (const dir of dirsToWatch) {\n const sub = await subscribe(dir, contentHandler, {\n ignore: ignorePatterns,\n });\n\n subscriptions.push(sub);\n }\n\n return subscriptions;\n};\n\nexport const buildAndWatchIntlayer = async (options?: WatchOptions) => {\n const { skipPrepare, ...rest } = options ?? {};\n const configuration =\n options?.configuration ?? getConfiguration(options?.configOptions);\n\n if (!skipPrepare) {\n await prepareIntlayer(configuration, { forceRun: true });\n }\n\n // Only enter watch mode when the caller explicitly opts in via `persistent`.\n // `configuration.content.watch` is the dev-mode signal consumed by bundler\n // plugins (e.g. vite-intlayer's `configureServer`); it must not coerce\n // `intlayer build` (which passes `persistent: false`) into a persistent\n // watcher, since that prevents the build command from ever exiting.\n if (options?.persistent) {\n await watch({ ...rest, configuration });\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA2B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AC;QACI,IAAI,MAAM,SAAS,UAAU;IAElC,MAAM,QAAQ,WAAW,YAAY;KAEnC,eAAe,OAAO,QAAQ;KAC9B,aAAa,YACX,qCAAqC,UAAU,aAAa,CAC9D;IACF,GAAG,GAAG;IAEN,eAAe,IAAI,UAAU;KAAE;KAAO,SAAS;IAAS,CAAC;GAC3D;EACF;CACF;CAEA,KAAK,MAAM,OAAO,aAAa;EAC7B,MAAM,MAAM,MAAM,UAAU,KAAK,gBAAgB,EAC/C,QAAQ,eACV,CAAC;EAED,cAAc,KAAK,GAAG;CACxB;CAEA,OAAO;AACT;AAEA,MAAa,wBAAwB,OAAO,YAA2B;CACrE,MAAM,EAAE,aAAa,GAAG,SAAS,WAAW,CAAC;CAC7C,MAAM,gBACJ,SAAS,iBAAiB,iBAAiB,SAAS,aAAa;CAEnE,IAAI,CAAC,aACH,MAAM,gBAAgB,eAAe,EAAE,UAAU,KAAK,CAAC;CAQzD,IAAI,SAAS,YACX,MAAM,MAAM;EAAE,GAAG;EAAM;CAAc,CAAC;AAE1C"}
1
+ {"version":3,"file":"watcher.mjs","names":["fsWatch"],"sources":["../../src/watcher.ts"],"sourcesContent":["import { existsSync, watch as fsWatch } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { basename, dirname, extname, resolve } from 'node:path';\nimport * as ANSIColor from '@intlayer/config/colors';\nimport { transpileTSToCJS } from '@intlayer/config/file';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfiguration,\n getConfigurationAndFilePath,\n} from '@intlayer/config/node';\nimport {\n clearAllCache,\n clearDiskCacheMemory,\n clearModuleCache,\n normalizePath,\n} from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { handleAdditionalContentDeclarationFile } from './handleAdditionalContentDeclarationFile';\nimport { handleContentDeclarationFileChange } from './handleContentDeclarationFileChange';\nimport { handleContentDeclarationFileMoved } from './handleContentDeclarationFileMoved';\nimport { handleUnlinkedContentDeclarationFile } from './handleUnlinkedContentDeclarationFile';\nimport { prepareIntlayer } from './prepareIntlayer';\nimport {\n formatPath,\n getFormatFromExtension,\n parseContentDeclarationFileName,\n} from './utils';\nimport { writeContentDeclaration } from './writeContentDeclaration';\n\n// Map to track files that were recently unlinked: oldPath -> { timer, timestamp }\nconst pendingUnlinks = new Map<\n string,\n { timer: NodeJS.Timeout; oldPath: string }\n>();\n\n// Array-based sequential task queue — no Promise chain accumulation, no race conditions\nconst taskQueue: (() => Promise<void>)[] = [];\nlet isProcessing = false;\n\nconst processQueue = async () => {\n if (isProcessing) return;\n isProcessing = true;\n while (taskQueue.length > 0) {\n const task = taskQueue.shift()!;\n try {\n await task();\n } catch (error) {\n console.error(error);\n }\n }\n isProcessing = false;\n};\n\nconst processEvent = (task: () => Promise<void>) => {\n taskQueue.push(task);\n processQueue();\n};\n\ntype WatchOptions = {\n configuration?: IntlayerConfig;\n configOptions?: GetConfigurationOptions;\n skipPrepare?: boolean;\n persistent?: boolean;\n};\n\n// awaitWriteFinish equivalent: debounce per path until the file is stable\nconst STABILITY_THRESHOLD = 1000;\n\nconst createStabilityDebounce = () => {\n const pending = new Map<string, NodeJS.Timeout>();\n return (path: string, handler: () => void) => {\n const existing = pending.get(path);\n if (existing) clearTimeout(existing);\n pending.set(\n path,\n setTimeout(() => {\n pending.delete(path);\n handler();\n }, STABILITY_THRESHOLD)\n );\n };\n};\n\n// Initialize @parcel/watcher (non-persistent until subscribed)\nexport const watch = async (options?: WatchOptions) => {\n const { subscribe } = await import('@parcel/watcher');\n\n const configResult = getConfigurationAndFilePath(options?.configOptions);\n const configurationFilePath = configResult.configurationFilePath;\n let configuration: IntlayerConfig =\n options?.configuration ?? configResult.configuration;\n const appLogger = getAppLogger(configuration);\n\n const {\n watch: isWatchMode,\n fileExtensions,\n contentDir,\n excludedPath,\n } = configuration.content;\n\n if (!configuration.content.watch) return;\n\n appLogger('Watching Intlayer content declarations');\n\n if (configuration.build.optimize === true) {\n appLogger(\n [\n `Build optimization is forced to ${colorize('true', ANSIColor.GREY)}, but watching is enabled too.`,\n 'It may lead to dev mode performance degradation as well as import errors.',\n 'Its recommended to keep the',\n colorize('`build.optimized`', ANSIColor.BLUE),\n 'option',\n colorize('undefined', ANSIColor.GREY),\n 'to get the best dev mode experience',\n ],\n {\n level: 'warn',\n }\n );\n }\n\n // Strip glob markers from excludedPath entries to get plain segments (e.g. 'node_modules')\n const excludedSegments = excludedPath.map((segment) =>\n segment.replace(/^\\*\\*\\//, '').replace(/\\/\\*\\*$/, '')\n );\n\n const normalizedConfigPath = configurationFilePath\n ? normalizePath(configurationFilePath)\n : null;\n\n const { mainDir, baseDir } = configuration.system;\n const normalizedMainDir = normalizePath(mainDir);\n const normalizedIntlayerDir = normalizePath(dirname(mainDir));\n\n const subscriptions: { unsubscribe: () => Promise<void> }[] = [];\n\n const scheduleStable = createStabilityDebounce();\n\n // ── mainDir watcher (depth 0) ──────────────────────────────────────────────\n // Detects broken or missing entry-point files inside .intlayer/main\n if (existsSync(mainDir)) {\n const mainDirSub = await subscribe(normalizedMainDir, (err, events) => {\n if (err || isProcessing) return;\n\n for (const event of events) {\n const eventPath = normalizePath(event.path);\n // depth-0 filter: only files directly inside mainDir\n const rel = eventPath.slice(normalizedMainDir.length + 1);\n if (!rel || rel.includes('/')) continue;\n // Temp files written by the bundler (write-then-rename) are build-internal;\n // their deletion must not trigger a clean rebuild.\n if (rel.endsWith('.tmp')) continue;\n\n if (event.type === 'update') {\n processEvent(async () => {\n try {\n // Validate that the regenerated entry point — and the relative\n // dictionary graph it imports — still resolves, by bundling it\n // in-memory with esbuild (via the shared, freshness-checked\n // transpile cache). This replaces a cache-busting dynamic\n // `import()`, which leaked a permanent record into Node's ESM\n // registry on every rebuild since that registry is never evicted.\n const entryCode = await readFile(event.path, 'utf-8');\n await transpileTSToCJS(entryCode, event.path);\n } catch {\n appLogger(\n `Entry point ${basename(event.path)} failed to load, running clean rebuild...`,\n { level: 'warn' }\n );\n await prepareIntlayer(configuration, {\n clean: true,\n forceRun: true,\n });\n }\n });\n } else if (event.type === 'delete') {\n processEvent(async () => {\n appLogger(\n [\n 'Entry point',\n formatPath(basename(event.path)),\n 'was removed, running clean rebuild...',\n ],\n { level: 'warn' }\n );\n await prepareIntlayer(configuration, {\n clean: true,\n forceRun: true,\n });\n });\n }\n }\n });\n subscriptions.push(mainDirSub);\n }\n\n // ── baseDir watcher (depth 0) — detect .intlayer directory removal ─────────\n // Native fs.watch is non-recursive and ideal for single-directory depth-0 detection.\n const intlayerDirName = basename(normalizedIntlayerDir);\n const fsDirWatcher = fsWatch(\n baseDir,\n { persistent: isWatchMode },\n (eventType, filename) => {\n if (isProcessing || !filename) return;\n if (filename !== intlayerDirName) return;\n\n const fullPath = normalizePath(resolve(baseDir, filename));\n if (fullPath !== normalizedIntlayerDir) return;\n\n if (eventType === 'rename' && !existsSync(normalizedIntlayerDir)) {\n appLogger([\n formatPath('.intlayer'),\n 'directory removed, running clean rebuild...',\n ]);\n processEvent(() =>\n prepareIntlayer(configuration, { clean: true, forceRun: true })\n );\n }\n }\n );\n subscriptions.push({\n unsubscribe: async () => {\n fsDirWatcher.close();\n },\n });\n\n // ── main content watcher ───────────────────────────────────────────────────\n // Ignore patterns for @parcel/watcher (micromatch globs)\n const ignorePatterns = excludedSegments.map((s) => `**/${s}/**`);\n\n // Strip trailing slashes so directory matching stays exact. A user-supplied\n const contentDirs = contentDir\n .map((dir) => normalizePath(dir).replace(/\\/+$/, ''))\n .filter(existsSync);\n\n // Collect unique directories to subscribe to (dirs only, not file paths)\n const dirsToWatch = new Set<string>(contentDirs);\n if (normalizedConfigPath) {\n dirsToWatch.add(normalizePath(dirname(normalizedConfigPath)));\n }\n\n const contentHandler = (\n err: Error | null,\n events: Array<{ type: string; path: string }>\n ) => {\n if (err) {\n appLogger(`Watcher error: ${err}`, { level: 'error' });\n appLogger('Restarting watcher');\n prepareIntlayer(configuration);\n return;\n }\n\n for (const event of events) {\n const filePath = event.path;\n const path = normalizePath(filePath);\n\n const isConfigFile =\n normalizedConfigPath && path === normalizedConfigPath;\n\n if (!isConfigFile) {\n // Must originate from a watched content directory\n const isInContentDir = contentDirs.some(\n (d) => path.startsWith(`${d}/`) || path === d\n );\n if (!isInContentDir) continue;\n\n if (excludedSegments.some((segment) => path.includes(`/${segment}`)))\n continue;\n\n if (!fileExtensions.some((extension) => path.endsWith(extension)))\n continue;\n }\n\n if (event.type === 'create') {\n const fileName = basename(filePath);\n\n // Move detection must happen synchronously before any debounce\n let isMove = false;\n let matchedOldPath: string | undefined;\n\n for (const [oldPath] of pendingUnlinks) {\n if (basename(oldPath) === fileName) {\n matchedOldPath = oldPath;\n break;\n }\n }\n\n if (!matchedOldPath && pendingUnlinks.size === 1) {\n matchedOldPath = pendingUnlinks.keys().next().value;\n }\n\n if (matchedOldPath) {\n const pending = pendingUnlinks.get(matchedOldPath);\n if (pending) {\n clearTimeout(pending.timer);\n pendingUnlinks.delete(matchedOldPath);\n }\n isMove = true;\n appLogger(`File moved from ${matchedOldPath} to ${filePath}`);\n }\n\n if (isMove && matchedOldPath) {\n processEvent(async () => {\n await handleContentDeclarationFileMoved(\n matchedOldPath!,\n filePath,\n configuration\n );\n });\n } else {\n // Debounce: wait for write to finish before reading the file\n scheduleStable(path, () => {\n processEvent(async () => {\n const fileContent = await readFile(filePath, 'utf-8');\n const isEmpty = fileContent === '';\n\n if (isEmpty) {\n const { key, locale } = parseContentDeclarationFileName(\n filePath,\n configuration\n );\n\n // A markdown declaration carries a single locale body, so it\n // must always state which locale it holds.\n const isMarkdown =\n getFormatFromExtension(extname(filePath)) === 'md';\n const declaredLocale =\n locale ??\n (isMarkdown\n ? configuration.internationalization.defaultLocale\n : undefined);\n\n await writeContentDeclaration(\n {\n key,\n ...(declaredLocale && { locale: declaredLocale }),\n content: {},\n filePath,\n },\n configuration\n );\n }\n\n await handleAdditionalContentDeclarationFile(\n filePath,\n configuration\n );\n });\n });\n }\n } else if (event.type === 'update') {\n scheduleStable(path, () => {\n processEvent(async () => {\n if (isConfigFile) {\n appLogger('Configuration file changed, repreparing Intlayer');\n\n clearModuleCache(filePath);\n clearAllCache();\n\n const { configuration: newConfiguration } =\n getConfigurationAndFilePath(options?.configOptions);\n\n configuration = options?.configuration ?? newConfiguration;\n\n await prepareIntlayer(configuration, { clean: false });\n } else {\n // Clear module cache for the changed file to avoid stale require() results\n clearModuleCache(filePath);\n // Evict in-memory caches so loadContentDeclaration picks up fresh content\n clearAllCache();\n clearDiskCacheMemory();\n await handleContentDeclarationFileChange(filePath, configuration);\n }\n });\n });\n } else if (event.type === 'delete') {\n // Delay unlink processing to see if an 'add' event occurs (indicating a move)\n const timer = setTimeout(async () => {\n // If timer fires, the file was genuinely removed\n pendingUnlinks.delete(filePath);\n processEvent(async () =>\n handleUnlinkedContentDeclarationFile(filePath, configuration)\n );\n }, 200); // 200ms window to catch the 'create' event\n\n pendingUnlinks.set(filePath, { timer, oldPath: filePath });\n }\n }\n };\n\n for (const dir of dirsToWatch) {\n const sub = await subscribe(dir, contentHandler, {\n ignore: ignorePatterns,\n });\n\n subscriptions.push(sub);\n }\n\n return subscriptions;\n};\n\nexport const buildAndWatchIntlayer = async (options?: WatchOptions) => {\n const { skipPrepare, ...rest } = options ?? {};\n const configuration =\n options?.configuration ?? getConfiguration(options?.configOptions);\n\n if (!skipPrepare) {\n await prepareIntlayer(configuration, { forceRun: true });\n }\n\n // Only enter watch mode when the caller explicitly opts in via `persistent`.\n // `configuration.content.watch` is the dev-mode signal consumed by bundler\n // plugins (e.g. vite-intlayer's `configureServer`); it must not coerce\n // `intlayer build` (which passes `persistent: false`) into a persistent\n // watcher, since that prevents the build command from ever exiting.\n if (options?.persistent) {\n await watch({ ...rest, configuration });\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+BA,MAAM,iCAAiB,IAAI,IAGzB;AAGF,MAAM,YAAqC,CAAC;AAC5C,IAAI,eAAe;AAEnB,MAAM,eAAe,YAAY;CAC/B,IAAI,cAAc;C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qCAAqC,UAAU,aAAa,CAC9D;IACF,GAAG,GAAG;IAEN,eAAe,IAAI,UAAU;KAAE;KAAO,SAAS;IAAS,CAAC;GAC3D;EACF;CACF;CAEA,KAAK,MAAM,OAAO,aAAa;EAC7B,MAAM,MAAM,MAAM,UAAU,KAAK,gBAAgB,EAC/C,QAAQ,eACV,CAAC;EAED,cAAc,KAAK,GAAG;CACxB;CAEA,OAAO;AACT;AAEA,MAAa,wBAAwB,OAAO,YAA2B;CACrE,MAAM,EAAE,aAAa,GAAG,SAAS,WAAW,CAAC;CAC7C,MAAM,gBACJ,SAAS,iBAAiB,iBAAiB,SAAS,aAAa;CAEnE,IAAI,CAAC,aACH,MAAM,gBAAgB,eAAe,EAAE,UAAU,KAAK,CAAC;CAQzD,IAAI,SAAS,YACX,MAAM,MAAM;EAAE,GAAG;EAAM;CAAc,CAAC;AAE1C"}
@@ -5,7 +5,7 @@ import { IntlayerConfig } from "@intlayer/types/config";
5
5
  import { Dictionary } from "@intlayer/types/dictionary";
6
6
  import { OUTPUT_FORMAT } from "@intlayer/config/defaultValues";
7
7
  //#region src/buildIntlayerDictionary/buildIntlayerDictionary.d.ts
8
- type BuildDictionariesOptions = Partial<{
8
+ export type BuildDictionariesOptions = Partial<{
9
9
  formats: typeof OUTPUT_FORMAT;
10
10
  importOtherDictionaries: boolean;
11
11
  env: 'prod' | 'dev';
@@ -13,12 +13,11 @@ type BuildDictionariesOptions = Partial<{
13
13
  /**
14
14
  * This function transpile the bundled code to to make dictionaries as JSON files
15
15
  */
16
- declare const buildDictionary: (localDictionariesEntries: Dictionary[], configuration: IntlayerConfig, options?: BuildDictionariesOptions) => Promise<{
16
+ export declare const buildDictionary: (localDictionariesEntries: Dictionary[], configuration: IntlayerConfig, options?: BuildDictionariesOptions) => Promise<{
17
17
  unmergedDictionaries: UnmergedDictionaryOutput;
18
18
  mergedDictionaries: MergedDictionaryOutput;
19
19
  dynamicDictionaries: LocalizedDictionaryOutput;
20
20
  fetchDictionaries: LocalizedDictionaryOutput;
21
21
  }>;
22
22
  //#endregion
23
- export { BuildDictionariesOptions, buildDictionary };
24
23
  //# sourceMappingURL=buildIntlayerDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildIntlayerDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"mappings":";;;;;;;KAuBY,2BAA2B;EACrC,gBAAgB;EAChB;EACA;;;;;cAYW,kBAAe,0BACA,cAAY,eACvB,gBAAc,UACnB,6BAAwB;wBAAxB"}
1
+ {"version":3,"file":"buildIntlayerDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"mappings":";;;;;;;YAuBY,2BAA2B;EACrC,gBAAgB;EAChB;EACA;;;;;qBAYW,kBAAe,0BACA,cAAY,eACvB,gBAAc,UACnB,6BAAwB;wBAAxB"}
@@ -4,7 +4,6 @@ import { Dictionary } from "@intlayer/types/dictionary";
4
4
  /**
5
5
  * Function to load, process the module and return the Intlayer Dictionary from the module file
6
6
  */
7
- declare const processContentDeclaration: (contentDeclaration: Dictionary, configuration: IntlayerConfig) => Promise<Dictionary | undefined>;
7
+ export declare const processContentDeclaration: (contentDeclaration: Dictionary, configuration: IntlayerConfig) => Promise<Dictionary | undefined>;
8
8
  //#endregion
9
- export { processContentDeclaration };
10
9
  //# sourceMappingURL=processContentDeclaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"processContentDeclaration.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/processContentDeclaration.ts"],"mappings":";;;;;;cASa,4BAAyB,oBAChB,YAAU,eACf,mBACd,QAAQ"}
1
+ {"version":3,"file":"processContentDeclaration.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/processContentDeclaration.ts"],"mappings":";;;;;;qBASa,4BAAyB,oBAChB,YAAU,eACf,mBACd,QAAQ"}
@@ -3,12 +3,12 @@ import { IntlayerConfig } from "@intlayer/types/config";
3
3
  import { Dictionary, DictionaryQualifierType, QualifiedDictionaryGroup } from "@intlayer/types/dictionary";
4
4
  import { Locale } from "@intlayer/types/allLocales";
5
5
  //#region src/buildIntlayerDictionary/writeDynamicDictionary.d.ts
6
- type DictionaryResult = {
6
+ export type DictionaryResult = {
7
7
  dictionaryPath: string;
8
8
  dictionary: Dictionary;
9
9
  };
10
- type LocalizedDictionaryResult = Partial<Record<Locale, DictionaryResult>>;
11
- type LocalizedDictionaryOutput = Record<string, LocalizedDictionaryResult>;
10
+ export type LocalizedDictionaryResult = Partial<Record<Locale, DictionaryResult>>;
11
+ export type LocalizedDictionaryOutput = Record<string, LocalizedDictionaryResult>;
12
12
  /**
13
13
  * Generates the content of a dictionary entry point file.
14
14
  *
@@ -24,7 +24,7 @@ type LocalizedDictionaryOutput = Record<string, LocalizedDictionaryResult>;
24
24
  * @param format - Output module format.
25
25
  * @param nestedKeys - Keys referenced through `nest()`, transitively.
26
26
  */
27
- declare const generateDictionaryEntryPoint: (key: string, locales: string[], format?: 'cjs' | 'esm', nestedKeys?: string[]) => string;
27
+ export declare const generateDictionaryEntryPoint: (key: string, locales: string[], format?: 'cjs' | 'esm', nestedKeys?: string[]) => string;
28
28
  /**
29
29
  * One entry of a qualified loader map.
30
30
  *
@@ -34,7 +34,7 @@ declare const generateDictionaryEntryPoint: (key: string, locales: string[], for
34
34
  * fan-out): the alias keeps its own tree position but points at the canonical
35
35
  * entry's chunk, so equal content is emitted — and downloaded — only once.
36
36
  */
37
- type QualifiedEntrySegments = {
37
+ export type QualifiedEntrySegments = {
38
38
  treeSegments: string[];
39
39
  chunkSegments: string[];
40
40
  };
@@ -49,7 +49,7 @@ type QualifiedEntrySegments = {
49
49
  * dynamic imports (Turbopack). Entries whose content is identical share one
50
50
  * chunk: their leaves point at the canonical entry's import path.
51
51
  */
52
- declare const generateQualifiedDictionaryEntryPoint: (key: string, qualifierTypes: DictionaryQualifierType[], entries: QualifiedEntrySegments[], locales: string[], format?: 'cjs' | 'esm') => string;
52
+ export declare const generateQualifiedDictionaryEntryPoint: (key: string, qualifierTypes: DictionaryQualifierType[], entries: QualifiedEntrySegments[], locales: string[], format?: 'cjs' | 'esm') => string;
53
53
  /**
54
54
  * Write the localized dictionaries to the dictionariesDir
55
55
  * @param mergedDictionaries - The merged dictionaries
@@ -66,12 +66,12 @@ declare const generateQualifiedDictionaryEntryPoint: (key: string, qualifierType
66
66
  * // .intlayer/dynamic_dictionary/dictionaries/fr_home.json
67
67
  * ```
68
68
  */
69
- declare const writeDynamicDictionary: (mergedDictionaries: PlainMergedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[], nestedDictionaryGraph?: Map<string, Set<string>>) => Promise<LocalizedDictionaryOutput>;
70
- type QualifiedMergedDictionaryResult = {
69
+ export declare const writeDynamicDictionary: (mergedDictionaries: PlainMergedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[], nestedDictionaryGraph?: Map<string, Set<string>>) => Promise<LocalizedDictionaryOutput>;
70
+ export type QualifiedMergedDictionaryResult = {
71
71
  dictionaryPath: string;
72
72
  dictionary: QualifiedDictionaryGroup;
73
73
  };
74
- type QualifiedMergedDictionaryOutput = Record<string, QualifiedMergedDictionaryResult>;
74
+ export type QualifiedMergedDictionaryOutput = Record<string, QualifiedMergedDictionaryResult>;
75
75
  /**
76
76
  * Writes the dynamic chunks and entry points of qualified dictionaries
77
77
  * (collections, variants — possibly combined) in
@@ -82,7 +82,6 @@ type QualifiedMergedDictionaryOutput = Record<string, QualifiedMergedDictionaryR
82
82
  * `{key}.{ext}` entry point exposes the matching nested loader tree, so the
83
83
  * entry point is discovered and aggregated exactly like a plain dynamic one.
84
84
  */
85
- declare const writeDynamicQualifiedDictionaries: (qualifiedDictionaries: QualifiedMergedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[]) => Promise<void>;
85
+ export declare const writeDynamicQualifiedDictionaries: (qualifiedDictionaries: QualifiedMergedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[]) => Promise<void>;
86
86
  //#endregion
87
- export { DictionaryResult, LocalizedDictionaryOutput, LocalizedDictionaryResult, QualifiedEntrySegments, QualifiedMergedDictionaryOutput, QualifiedMergedDictionaryResult, generateDictionaryEntryPoint, generateQualifiedDictionaryEntryPoint, writeDynamicDictionary, writeDynamicQualifiedDictionaries };
88
87
  //# sourceMappingURL=writeDynamicDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeDynamicDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeDynamicDictionary.ts"],"mappings":";;;;;KA2BY;EACV;EACA,YAAY;;KAGF,4BAA4B,QACtC,OAAO,QAAQ;KAGL,4BAA4B,eAEtC;;;;;;;;;;;;;;;;cAyCW,+BAA4B,aAC5B,mBACM,wBACI;;;;;;;;;;KAoEX;EACV;EACA;;;;;;;;;;;;;cA8EW,wCAAqC,aACrC,gBACK,2BAAyB,SAChC,0BAAwB,mBAChB;;;;;;;;;;;;;;;;;cAyCN,yBAAsB,oBACb,6BAA2B,eAChC,gBAAc,6BACH,wBACH,YAAY,iBAClC,QAAQ;KA2EC;EACV;EACA,YAAY;;KAGF,kCAAkC,eAE5C;;;;;;;;;;;cAaW,oCAAiC,uBACrB,iCAA+B,eACvC,gBAAc,gCAE5B"}
1
+ {"version":3,"file":"writeDynamicDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeDynamicDictionary.ts"],"mappings":";;;;;YA2BY;EACV;EACA,YAAY;;YAGF,4BAA4B,QACtC,OAAO,QAAQ;YAGL,4BAA4B,eAEtC;;;;;;;;;;;;;;;;qBAyCW,+BAA4B,aAC5B,mBACM,wBACI;;;;;;;;;;YAoEX;EACV;EACA;;;;;;;;;;;;;qBA8EW,wCAAqC,aACrC,gBACK,2BAAyB,SAChC,0BAAwB,mBAChB;;;;;;;;;;;;;;;;;qBAyCN,yBAAsB,oBACb,6BAA2B,eAChC,gBAAc,6BACH,wBACH,YAAY,iBAClC,QAAQ;YA2EC;EACV;EACA,YAAY;;YAGF,kCAAkC,eAE5C;;;;;;;;;;;qBAaW,oCAAiC,uBACrB,iCAA+B,eACvC,gBAAc,gCAE5B"}
@@ -15,7 +15,7 @@ import { IntlayerConfig } from "@intlayer/types/config";
15
15
  * @param format - Output module format.
16
16
  * @param nestedKeys - Keys referenced through `nest()`, transitively.
17
17
  */
18
- declare const generateDictionaryEntryPoint: (key: string, locales: string[], relativePrefix: string, format?: 'cjs' | 'esm', nestedKeys?: string[]) => string;
18
+ export declare const generateDictionaryEntryPoint: (key: string, locales: string[], relativePrefix: string, format?: 'cjs' | 'esm', nestedKeys?: string[]) => string;
19
19
  /**
20
20
  * Write the localized dictionaries to the dictionariesDir
21
21
  * @param mergedDictionaries - The merged dictionaries
@@ -32,7 +32,6 @@ declare const generateDictionaryEntryPoint: (key: string, locales: string[], rel
32
32
  * // .intlayer/fetch_dictionary/home.cjs
33
33
  * ```
34
34
  */
35
- declare const writeFetchDictionary: (dynamicDictionaries: LocalizedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[], nestedDictionaryGraph?: Map<string, Set<string>>) => Promise<LocalizedDictionaryOutput>;
35
+ export declare const writeFetchDictionary: (dynamicDictionaries: LocalizedDictionaryOutput, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[], nestedDictionaryGraph?: Map<string, Set<string>>) => Promise<LocalizedDictionaryOutput>;
36
36
  //#endregion
37
- export { generateDictionaryEntryPoint, writeFetchDictionary };
38
37
  //# sourceMappingURL=writeFetchDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeFetchDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeFetchDictionary.ts"],"mappings":";;;;;;;;;;;;;;;;;cAqDa,+BAA4B,aAC5B,mBACM,wBACK,wBACD;;;;;;;;;;;;;;;;;cA2FV,uBAAoB,qBACV,2BAAyB,eAC/B,gBAAc,6BACH,wBACH,YAAY,iBAClC,QAAQ"}
1
+ {"version":3,"file":"writeFetchDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeFetchDictionary.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAqDa,+BAA4B,aAC5B,mBACM,wBACK,wBACD;;;;;;;;;;;;;;;;;qBA2FV,uBAAoB,qBACV,2BAAyB,eAC/B,gBAAc,6BACH,wBACH,YAAY,iBAClC,QAAQ"}
@@ -2,21 +2,21 @@ import { UnmergedDictionaryOutput } from "./writeUnmergedDictionary.js";
2
2
  import { IntlayerConfig } from "@intlayer/types/config";
3
3
  import { Dictionary, QualifiedDictionaryGroup } from "@intlayer/types/dictionary";
4
4
  //#region src/buildIntlayerDictionary/writeMergedDictionary.d.ts
5
- type MergedDictionaryResult = {
5
+ export type MergedDictionaryResult = {
6
6
  dictionaryPath: string;
7
7
  dictionary: Dictionary | QualifiedDictionaryGroup;
8
8
  };
9
- type MergedDictionaryOutput = Record<string, MergedDictionaryResult>;
9
+ export type MergedDictionaryOutput = Record<string, MergedDictionaryResult>;
10
10
  /**
11
11
  * Merged output restricted to plain (unqualified) dictionaries — qualified
12
12
  * groups (collections, variants) are static-only and filtered
13
13
  * out before the dynamic/fetch build steps.
14
14
  */
15
- type PlainMergedDictionaryResult = {
15
+ export type PlainMergedDictionaryResult = {
16
16
  dictionaryPath: string;
17
17
  dictionary: Dictionary;
18
18
  };
19
- type PlainMergedDictionaryOutput = Record<string, PlainMergedDictionaryResult>;
19
+ export type PlainMergedDictionaryOutput = Record<string, PlainMergedDictionaryResult>;
20
20
  /**
21
21
  * Write the merged dictionaries to the dictionariesDir
22
22
  * @param groupedDictionaries - The grouped dictionaries
@@ -33,7 +33,6 @@ type PlainMergedDictionaryOutput = Record<string, PlainMergedDictionaryResult>;
33
33
  * // { key: 'home', content: { ... } },
34
34
  * ```
35
35
  */
36
- declare const writeMergedDictionaries: (groupedDictionaries: UnmergedDictionaryOutput, configuration: IntlayerConfig) => Promise<MergedDictionaryOutput>;
36
+ export declare const writeMergedDictionaries: (groupedDictionaries: UnmergedDictionaryOutput, configuration: IntlayerConfig) => Promise<MergedDictionaryOutput>;
37
37
  //#endregion
38
- export { MergedDictionaryOutput, MergedDictionaryResult, PlainMergedDictionaryOutput, PlainMergedDictionaryResult, writeMergedDictionaries };
39
38
  //# sourceMappingURL=writeMergedDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeMergedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeMergedDictionary.ts"],"mappings":";;;;KAiBY;EACV;EACA,YAAY,aAAa;;KAGf,yBAAyB,eAAe;;;;;;KAOxC;EACV;EACA,YAAY;;KAGF,8BAA8B,eAExC;;;;;;;;;;;;;;;;;cAmBW,0BAAuB,qBACb,0BAAwB,eAC9B,mBACd,QAAQ"}
1
+ {"version":3,"file":"writeMergedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeMergedDictionary.ts"],"mappings":";;;;YAiBY;EACV;EACA,YAAY,aAAa;;YAGf,yBAAyB,eAAe;;;;;;YAOxC;EACV;EACA,YAAY;;YAGF,8BAA8B,eAExC;;;;;;;;;;;;;;;;;qBAmBW,0BAAuB,qBACb,0BAAwB,eAC9B,mBACd,QAAQ"}
@@ -6,7 +6,7 @@ import { IntlayerConfig } from "@intlayer/types/config";
6
6
  * because the `**\/*.json` globs listing compiled dictionaries never match the
7
7
  * `.mjs` / `.cjs` files written here.
8
8
  */
9
- declare const NESTED_DICTIONARIES_SUBDIR = "nested";
9
+ export declare const NESTED_DICTIONARIES_SUBDIR = "nested";
10
10
  /**
11
11
  * Path of the companion module carrying the `nest()` targets of a dictionary.
12
12
  *
@@ -18,7 +18,7 @@ declare const NESTED_DICTIONARIES_SUBDIR = "nested";
18
18
  * @param key - The dictionary key.
19
19
  * @param extension - Module extension, `'mjs'` (default) or `'cjs'`.
20
20
  */
21
- declare const getNestedDictionaryPath: (dictionariesDir: string, key: string, extension?: 'mjs' | 'cjs') => string;
21
+ export declare const getNestedDictionaryPath: (dictionariesDir: string, key: string, extension?: 'mjs' | 'cjs') => string;
22
22
  /**
23
23
  * Generates a companion module that re-exports a compiled dictionary with its
24
24
  * `nest()` targets attached.
@@ -40,7 +40,7 @@ declare const getNestedDictionaryPath: (dictionariesDir: string, key: string, ex
40
40
  * export default { ..._dictionary, nestedDictionaries: { 'common': _1a2b3c } };
41
41
  * ```
42
42
  */
43
- declare const generateNestedDictionaryEntryPoint: (key: string, nestedKeys: string[], format?: 'cjs' | 'esm') => string;
43
+ export declare const generateNestedDictionaryEntryPoint: (key: string, nestedKeys: string[], format?: 'cjs' | 'esm') => string;
44
44
  /**
45
45
  * Writes one companion module per dictionary holding `nest()` references.
46
46
  *
@@ -48,7 +48,6 @@ declare const generateNestedDictionaryEntryPoint: (key: string, nestedKeys: stri
48
48
  * @param configuration - The resolved intlayer configuration.
49
49
  * @param formats - Module formats to emit.
50
50
  */
51
- declare const writeNestedDictionaries: (nestedDictionaryGraph: Map<string, Set<string>>, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[]) => Promise<void>;
51
+ export declare const writeNestedDictionaries: (nestedDictionaryGraph: Map<string, Set<string>>, configuration: IntlayerConfig, formats?: ('cjs' | 'esm')[]) => Promise<void>;
52
52
  //#endregion
53
- export { NESTED_DICTIONARIES_SUBDIR, generateNestedDictionaryEntryPoint, getNestedDictionaryPath, writeNestedDictionaries };
54
53
  //# sourceMappingURL=writeNestedDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeNestedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeNestedDictionary.ts"],"mappings":";;;;;;;;cAgBa;;;;;;;;;;;;cAoBA,0BAAuB,yBACX,aACZ;;;;;;;;;;;;;;;;;;;;;;cA0BA,qCAAkC,aAClC,sBACS;;;;;;;;cAkDT,0BAAuB,uBACX,YAAY,cAAY,eAChC,gBAAc,gCAE5B"}
1
+ {"version":3,"file":"writeNestedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeNestedDictionary.ts"],"mappings":";;;;;;;;qBAgBa;;;;;;;;;;;;qBAoBA,0BAAuB,yBACX,aACZ;;;;;;;;;;;;;;;;;;;;;;qBA0BA,qCAAkC,aAClC,sBACS;;;;;;;;qBAkDT,0BAAuB,uBACX,YAAY,cAAY,eAChC,gBAAc,gCAE5B"}
@@ -1,11 +1,11 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  import { Dictionary } from "@intlayer/types/dictionary";
3
3
  //#region src/buildIntlayerDictionary/writeRemoteDictionary.d.ts
4
- type RemoteDictionaryResult = {
4
+ export type RemoteDictionaryResult = {
5
5
  dictionaryPath: string;
6
6
  dictionaries: Dictionary[];
7
7
  };
8
- type RemoteDictionaryOutput = Record<string, RemoteDictionaryResult>;
8
+ export type RemoteDictionaryOutput = Record<string, RemoteDictionaryResult>;
9
9
  /**
10
10
  * Write the localized dictionaries to the dictionariesDir
11
11
  * @param mergedDictionaries - The merged dictionaries
@@ -22,7 +22,6 @@ type RemoteDictionaryOutput = Record<string, RemoteDictionaryResult>;
22
22
  * // { key: 'home', content: { ... } },
23
23
  * ```
24
24
  */
25
- declare const writeRemoteDictionary: (remoteDictionaries: Dictionary[], configuration: IntlayerConfig) => Promise<RemoteDictionaryOutput>;
25
+ export declare const writeRemoteDictionary: (remoteDictionaries: Dictionary[], configuration: IntlayerConfig) => Promise<RemoteDictionaryOutput>;
26
26
  //#endregion
27
- export { RemoteDictionaryOutput, RemoteDictionaryResult, writeRemoteDictionary };
28
27
  //# sourceMappingURL=writeRemoteDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeRemoteDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeRemoteDictionary.ts"],"mappings":";;;KAeY;EACV;EACA,cAAc;;KAGJ,yBAAyB,eAAe;;;;;;;;;;;;;;;;;cAkBvC,wBAAqB,oBACZ,cAAY,eACjB,mBACd,QAAQ"}
1
+ {"version":3,"file":"writeRemoteDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeRemoteDictionary.ts"],"mappings":";;;YAeY;EACV;EACA,cAAc;;YAGJ,yBAAyB,eAAe;;;;;;;;;;;;;;;;;qBAkBvC,wBAAqB,oBACZ,cAAY,eACjB,mBACd,QAAQ"}
@@ -1,12 +1,12 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  import { Dictionary, DictionaryKey } from "@intlayer/types/dictionary";
3
3
  //#region src/buildIntlayerDictionary/writeUnmergedDictionary.d.ts
4
- declare const groupDictionariesByKey: (dictionaries: Dictionary[]) => Record<string, Dictionary[]>;
5
- type UnmergedDictionaryResult = {
4
+ export declare const groupDictionariesByKey: (dictionaries: Dictionary[]) => Record<string, Dictionary[]>;
5
+ export type UnmergedDictionaryResult = {
6
6
  dictionaryPath: string;
7
7
  dictionaries: Dictionary[];
8
8
  };
9
- type UnmergedDictionaryOutput = Record<DictionaryKey, UnmergedDictionaryResult>;
9
+ export type UnmergedDictionaryOutput = Record<DictionaryKey, UnmergedDictionaryResult>;
10
10
  /**
11
11
  * Write the unmerged dictionaries to the unmergedDictionariesDir
12
12
  * @param dictionaries - The dictionaries to write
@@ -27,7 +27,6 @@ type UnmergedDictionaryOutput = Record<DictionaryKey, UnmergedDictionaryResult>;
27
27
  * // }
28
28
  * ```
29
29
  */
30
- declare const writeUnmergedDictionaries: (dictionaries: Dictionary[], configuration: IntlayerConfig, env: 'prod' | 'dev') => Promise<UnmergedDictionaryOutput>;
30
+ export declare const writeUnmergedDictionaries: (dictionaries: Dictionary[], configuration: IntlayerConfig, env: 'prod' | 'dev') => Promise<UnmergedDictionaryOutput>;
31
31
  //#endregion
32
- export { UnmergedDictionaryOutput, UnmergedDictionaryResult, groupDictionariesByKey, writeUnmergedDictionaries };
33
32
  //# sourceMappingURL=writeUnmergedDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeUnmergedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeUnmergedDictionary.ts"],"mappings":";;;cAWa,yBAAsB,cACnB,iBACb,eAAe;KAaN;EACV;EACA,cAAc;;KAGJ,2BAA2B,OACrC,eACA;;;;;;;;;;;;;;;;;;;;;cAuBW,4BAAyB,cACtB,cAAY,eACX,gBAAc,wBAE5B,QAAQ"}
1
+ {"version":3,"file":"writeUnmergedDictionary.d.ts","names":[],"sources":["../../../src/buildIntlayerDictionary/writeUnmergedDictionary.ts"],"mappings":";;;qBAWa,yBAAsB,cACnB,iBACb,eAAe;YAaN;EACV;EACA,cAAc;;YAGJ,2BAA2B,OACrC,eACA;;;;;;;;;;;;;;;;;;;;;qBAuBW,4BAAyB,cACtB,cAAY,eACX,gBAAc,wBAE5B,QAAQ"}
@@ -1,6 +1,5 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  //#region src/cleanOutputDir.d.ts
3
- declare const cleanOutputDir: (configuration: IntlayerConfig) => Promise<void>;
3
+ export declare const cleanOutputDir: (configuration: IntlayerConfig) => Promise<void>;
4
4
  //#endregion
5
- export { cleanOutputDir };
6
5
  //# sourceMappingURL=cleanOutputDir.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanOutputDir.d.ts","names":[],"sources":["../../src/cleanOutputDir.ts"],"mappings":";;cAKa,iBAAc,eAAyB,mBAAc"}
1
+ {"version":3,"file":"cleanOutputDir.d.ts","names":[],"sources":["../../src/cleanOutputDir.ts"],"mappings":";;qBAKa,iBAAc,eAAyB,mBAAc"}
@@ -1,10 +1,9 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  //#region src/cleanRemovedContentDeclaration.d.ts
3
- declare const cleanRemovedContentDeclaration: (filePath: string, keysToKeep: string[], configuration: IntlayerConfig) => Promise<{
3
+ export declare const cleanRemovedContentDeclaration: (filePath: string, keysToKeep: string[], configuration: IntlayerConfig) => Promise<{
4
4
  changedDictionariesLocalIds: string[];
5
5
  excludeKeys: string[];
6
6
  hasRebuilt: boolean;
7
7
  }>;
8
8
  //#endregion
9
- export { cleanRemovedContentDeclaration };
10
9
  //# sourceMappingURL=cleanRemovedContentDeclaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanRemovedContentDeclaration.d.ts","names":[],"sources":["../../src/cleanRemovedContentDeclaration.ts"],"mappings":";;cAea,iCAA8B,kBACzB,sBACI,eACL,mBACd;EACD;EACA;EACA"}
1
+ {"version":3,"file":"cleanRemovedContentDeclaration.d.ts","names":[],"sources":["../../src/cleanRemovedContentDeclaration.ts"],"mappings":";;qBAea,iCAA8B,kBACzB,sBACI,eACL,mBACd;EACD;EACA;EACA"}
@@ -1,12 +1,11 @@
1
1
  //#region src/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts
2
- type CreateDictionaryEntryPointOptions = {
2
+ export type CreateDictionaryEntryPointOptions = {
3
3
  formats?: ('cjs' | 'esm')[];
4
4
  excludeKeys?: string[];
5
5
  };
6
6
  /**
7
7
  * This function generates a list of dictionaries in the main directory
8
8
  */
9
- declare const createDictionaryEntryPoint: (configuration?: import("@intlayer/types").IntlayerConfig, options?: CreateDictionaryEntryPointOptions) => Promise<void>;
9
+ export declare const createDictionaryEntryPoint: (configuration?: import("@intlayer/types").IntlayerConfig, options?: CreateDictionaryEntryPointOptions) => Promise<void>;
10
10
  //#endregion
11
- export { CreateDictionaryEntryPointOptions, createDictionaryEntryPoint };
12
11
  //# sourceMappingURL=createDictionaryEntryPoint.d.ts.map