@intlayer/engine 9.0.0-canary.12

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 (833) hide show
  1. package/README.md +330 -0
  2. package/dist/assets/initConfig/templates/cjs.txt +140 -0
  3. package/dist/assets/initConfig/templates/json.txt +98 -0
  4. package/dist/assets/initConfig/templates/mjs.txt +140 -0
  5. package/dist/assets/initConfig/templates/ts.txt +139 -0
  6. package/dist/assets/installSkills/LICENCE.md +201 -0
  7. package/dist/assets/installSkills/skills/angular.md +159 -0
  8. package/dist/assets/installSkills/skills/astro.md +40 -0
  9. package/dist/assets/installSkills/skills/cli.md +68 -0
  10. package/dist/assets/installSkills/skills/compiler.md +32 -0
  11. package/dist/assets/installSkills/skills/config.md +63 -0
  12. package/dist/assets/installSkills/skills/content.md +377 -0
  13. package/dist/assets/installSkills/skills/next-js.md +130 -0
  14. package/dist/assets/installSkills/skills/preact.md +83 -0
  15. package/dist/assets/installSkills/skills/react.md +105 -0
  16. package/dist/assets/installSkills/skills/remote-content.md +31 -0
  17. package/dist/assets/installSkills/skills/solid.md +90 -0
  18. package/dist/assets/installSkills/skills/svelte.md +84 -0
  19. package/dist/assets/installSkills/skills/usage.md +44 -0
  20. package/dist/assets/installSkills/skills/vue.md +56 -0
  21. package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
  22. package/dist/cjs/_virtual/_utils_asset.cjs +98 -0
  23. package/dist/cjs/build.cjs +60 -0
  24. package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +80 -0
  25. package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -0
  26. package/dist/cjs/buildIntlayerDictionary/index.cjs +6 -0
  27. package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs +27 -0
  28. package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs.map +1 -0
  29. package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +206 -0
  30. package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs.map +1 -0
  31. package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +59 -0
  32. package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs.map +1 -0
  33. package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +49 -0
  34. package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs.map +1 -0
  35. package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +51 -0
  36. package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs.map +1 -0
  37. package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +62 -0
  38. package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs.map +1 -0
  39. package/dist/cjs/cleanOutputDir.cjs +31 -0
  40. package/dist/cjs/cleanOutputDir.cjs.map +1 -0
  41. package/dist/cjs/cleanRemovedContentDeclaration.cjs +97 -0
  42. package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -0
  43. package/dist/cjs/cli.cjs +48 -0
  44. package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +71 -0
  45. package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs.map +1 -0
  46. package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +43 -0
  47. package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -0
  48. package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +25 -0
  49. package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs.map +1 -0
  50. package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +26 -0
  51. package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs.map +1 -0
  52. package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +26 -0
  53. package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs.map +1 -0
  54. package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +25 -0
  55. package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs.map +1 -0
  56. package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +25 -0
  57. package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs.map +1 -0
  58. package/dist/cjs/createDictionaryEntryPoint/index.cjs +16 -0
  59. package/dist/cjs/createType/createModuleAugmentation.cjs +126 -0
  60. package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -0
  61. package/dist/cjs/createType/createType.cjs +30 -0
  62. package/dist/cjs/createType/createType.cjs.map +1 -0
  63. package/dist/cjs/createType/index.cjs +8 -0
  64. package/dist/cjs/detectFormatCommand.cjs +33 -0
  65. package/dist/cjs/detectFormatCommand.cjs.map +1 -0
  66. package/dist/cjs/docReview/alignBlocks.cjs +79 -0
  67. package/dist/cjs/docReview/alignBlocks.cjs.map +1 -0
  68. package/dist/cjs/docReview/computeSimilarity.cjs +42 -0
  69. package/dist/cjs/docReview/computeSimilarity.cjs.map +1 -0
  70. package/dist/cjs/docReview/fingerprintBlock.cjs +35 -0
  71. package/dist/cjs/docReview/fingerprintBlock.cjs.map +1 -0
  72. package/dist/cjs/docReview/index.cjs +25 -0
  73. package/dist/cjs/docReview/mapChangedLinesToBlocks.cjs +27 -0
  74. package/dist/cjs/docReview/mapChangedLinesToBlocks.cjs.map +1 -0
  75. package/dist/cjs/docReview/normalizeBlock.cjs +34 -0
  76. package/dist/cjs/docReview/normalizeBlock.cjs.map +1 -0
  77. package/dist/cjs/docReview/pipeline.cjs +144 -0
  78. package/dist/cjs/docReview/pipeline.cjs.map +1 -0
  79. package/dist/cjs/docReview/planActions.cjs +58 -0
  80. package/dist/cjs/docReview/planActions.cjs.map +1 -0
  81. package/dist/cjs/docReview/rebuildDocument.cjs +65 -0
  82. package/dist/cjs/docReview/rebuildDocument.cjs.map +1 -0
  83. package/dist/cjs/docReview/reviewReport.cjs +200 -0
  84. package/dist/cjs/docReview/reviewReport.cjs.map +1 -0
  85. package/dist/cjs/docReview/segmentDocument.cjs +134 -0
  86. package/dist/cjs/docReview/segmentDocument.cjs.map +1 -0
  87. package/dist/cjs/docReview/types.cjs +0 -0
  88. package/dist/cjs/fetchDistantDictionaries.cjs +53 -0
  89. package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -0
  90. package/dist/cjs/filterInvalidDictionaries.cjs +57 -0
  91. package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -0
  92. package/dist/cjs/formatDictionary.cjs +60 -0
  93. package/dist/cjs/formatDictionary.cjs.map +1 -0
  94. package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +83 -0
  95. package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +1 -0
  96. package/dist/cjs/getContentDeclarationFileTemplate/index.cjs +4 -0
  97. package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +35 -0
  98. package/dist/cjs/handleAdditionalContentDeclarationFile.cjs.map +1 -0
  99. package/dist/cjs/handleContentDeclarationFileChange.cjs +56 -0
  100. package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -0
  101. package/dist/cjs/handleContentDeclarationFileMoved.cjs +25 -0
  102. package/dist/cjs/handleContentDeclarationFileMoved.cjs.map +1 -0
  103. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +38 -0
  104. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -0
  105. package/dist/cjs/init/cms.cjs +140 -0
  106. package/dist/cjs/init/cms.cjs.map +1 -0
  107. package/dist/cjs/init/frameworkSetup/index.cjs +27 -0
  108. package/dist/cjs/init/frameworkSetup/index.cjs.map +1 -0
  109. package/dist/cjs/init/frameworkSetup/nextAppRouter/detect.cjs +56 -0
  110. package/dist/cjs/init/frameworkSetup/nextAppRouter/detect.cjs.map +1 -0
  111. package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +107 -0
  112. package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs.map +1 -0
  113. package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs +163 -0
  114. package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs.map +1 -0
  115. package/dist/cjs/init/frameworkSetup/nextAppRouter/templates.cjs +122 -0
  116. package/dist/cjs/init/frameworkSetup/nextAppRouter/templates.cjs.map +1 -0
  117. package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs +196 -0
  118. package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs.map +1 -0
  119. package/dist/cjs/init/frameworkSetup/tanstackStart/detect.cjs +31 -0
  120. package/dist/cjs/init/frameworkSetup/tanstackStart/detect.cjs.map +1 -0
  121. package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +76 -0
  122. package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs.map +1 -0
  123. package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs +116 -0
  124. package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs.map +1 -0
  125. package/dist/cjs/init/frameworkSetup/tanstackStart/templates.cjs +106 -0
  126. package/dist/cjs/init/frameworkSetup/tanstackStart/templates.cjs.map +1 -0
  127. package/dist/cjs/init/frameworkSetup/tanstackStart/transforms.cjs +141 -0
  128. package/dist/cjs/init/frameworkSetup/tanstackStart/transforms.cjs.map +1 -0
  129. package/dist/cjs/init/frameworkSetup/types.cjs +0 -0
  130. package/dist/cjs/init/index.cjs +521 -0
  131. package/dist/cjs/init/index.cjs.map +1 -0
  132. package/dist/cjs/init/utils/astImports.cjs +56 -0
  133. package/dist/cjs/init/utils/astImports.cjs.map +1 -0
  134. package/dist/cjs/init/utils/configManipulation.cjs +516 -0
  135. package/dist/cjs/init/utils/configManipulation.cjs.map +1 -0
  136. package/dist/cjs/init/utils/fileSystem.cjs +231 -0
  137. package/dist/cjs/init/utils/fileSystem.cjs.map +1 -0
  138. package/dist/cjs/init/utils/githubActions.cjs +159 -0
  139. package/dist/cjs/init/utils/githubActions.cjs.map +1 -0
  140. package/dist/cjs/init/utils/index.cjs +51 -0
  141. package/dist/cjs/init/utils/jsonParser.cjs +43 -0
  142. package/dist/cjs/init/utils/jsonParser.cjs.map +1 -0
  143. package/dist/cjs/init/utils/nextCompilerBabel.cjs +119 -0
  144. package/dist/cjs/init/utils/nextCompilerBabel.cjs.map +1 -0
  145. package/dist/cjs/init/utils/packageManager.cjs +303 -0
  146. package/dist/cjs/init/utils/packageManager.cjs.map +1 -0
  147. package/dist/cjs/init/utils/tsConfig.cjs +19 -0
  148. package/dist/cjs/init/utils/tsConfig.cjs.map +1 -0
  149. package/dist/cjs/initConfig/index.cjs +49 -0
  150. package/dist/cjs/initConfig/index.cjs.map +1 -0
  151. package/dist/cjs/installLSP.cjs +58 -0
  152. package/dist/cjs/installLSP.cjs.map +1 -0
  153. package/dist/cjs/installMCP/installMCP.cjs +51 -0
  154. package/dist/cjs/installMCP/installMCP.cjs.map +1 -0
  155. package/dist/cjs/installSkills/index.cjs +307 -0
  156. package/dist/cjs/installSkills/index.cjs.map +1 -0
  157. package/dist/cjs/listDictionariesPath.cjs +43 -0
  158. package/dist/cjs/listDictionariesPath.cjs.map +1 -0
  159. package/dist/cjs/listGitFiles.cjs +105 -0
  160. package/dist/cjs/listGitFiles.cjs.map +1 -0
  161. package/dist/cjs/listProjects.cjs +48 -0
  162. package/dist/cjs/listProjects.cjs.map +1 -0
  163. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +56 -0
  164. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs.map +1 -0
  165. package/dist/cjs/loadDictionaries/index.cjs +14 -0
  166. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +133 -0
  167. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -0
  168. package/dist/cjs/loadDictionaries/loadDictionaries.cjs +128 -0
  169. package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -0
  170. package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +28 -0
  171. package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -0
  172. package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs +45 -0
  173. package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs.map +1 -0
  174. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +63 -0
  175. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -0
  176. package/dist/cjs/loadDictionaries/loadYamlContentDeclaration.cjs +27 -0
  177. package/dist/cjs/loadDictionaries/loadYamlContentDeclaration.cjs.map +1 -0
  178. package/dist/cjs/loadDictionaries/log.cjs +138 -0
  179. package/dist/cjs/loadDictionaries/log.cjs.map +1 -0
  180. package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs +64 -0
  181. package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs.map +1 -0
  182. package/dist/cjs/logConfigDetails.cjs +40 -0
  183. package/dist/cjs/logConfigDetails.cjs.map +1 -0
  184. package/dist/cjs/prepareIntlayer.cjs +104 -0
  185. package/dist/cjs/prepareIntlayer.cjs.map +1 -0
  186. package/dist/cjs/reduceDictionaryContent/applyMask.cjs +31 -0
  187. package/dist/cjs/reduceDictionaryContent/applyMask.cjs.map +1 -0
  188. package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs +13 -0
  189. package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs.map +1 -0
  190. package/dist/cjs/scan/analyzeBundleContent.cjs +182 -0
  191. package/dist/cjs/scan/analyzeBundleContent.cjs.map +1 -0
  192. package/dist/cjs/scan/calculateScore.cjs +65 -0
  193. package/dist/cjs/scan/calculateScore.cjs.map +1 -0
  194. package/dist/cjs/scan/checks.cjs +274 -0
  195. package/dist/cjs/scan/checks.cjs.map +1 -0
  196. package/dist/cjs/scan/index.cjs +31 -0
  197. package/dist/cjs/scan/parseHtml.cjs +127 -0
  198. package/dist/cjs/scan/parseHtml.cjs.map +1 -0
  199. package/dist/cjs/scan/scanWebsite.cjs +205 -0
  200. package/dist/cjs/scan/scanWebsite.cjs.map +1 -0
  201. package/dist/cjs/scan/types.cjs +0 -0
  202. package/dist/cjs/utils/autoDecorateContent.cjs +90 -0
  203. package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -0
  204. package/dist/cjs/utils/buildComponentFilesList.cjs +94 -0
  205. package/dist/cjs/utils/buildComponentFilesList.cjs.map +1 -0
  206. package/dist/cjs/utils/buildFilesList.cjs +84 -0
  207. package/dist/cjs/utils/buildFilesList.cjs.map +1 -0
  208. package/dist/cjs/utils/chunkJSON.cjs +337 -0
  209. package/dist/cjs/utils/chunkJSON.cjs.map +1 -0
  210. package/dist/cjs/utils/formatter.cjs +18 -0
  211. package/dist/cjs/utils/formatter.cjs.map +1 -0
  212. package/dist/cjs/utils/getChunk.cjs +35 -0
  213. package/dist/cjs/utils/getChunk.cjs.map +1 -0
  214. package/dist/cjs/utils/getContentExtension.cjs +30 -0
  215. package/dist/cjs/utils/getContentExtension.cjs.map +1 -0
  216. package/dist/cjs/utils/getFormatFromExtension.cjs +41 -0
  217. package/dist/cjs/utils/getFormatFromExtension.cjs.map +1 -0
  218. package/dist/cjs/utils/getPathHash.cjs +22 -0
  219. package/dist/cjs/utils/getPathHash.cjs.map +1 -0
  220. package/dist/cjs/utils/index.cjs +50 -0
  221. package/dist/cjs/utils/mergeChunks.cjs +29 -0
  222. package/dist/cjs/utils/mergeChunks.cjs.map +1 -0
  223. package/dist/cjs/utils/pLimit.cjs +134 -0
  224. package/dist/cjs/utils/pLimit.cjs.map +1 -0
  225. package/dist/cjs/utils/parallelize.cjs +12 -0
  226. package/dist/cjs/utils/parallelize.cjs.map +1 -0
  227. package/dist/cjs/utils/parallelizeGlobal.cjs +30 -0
  228. package/dist/cjs/utils/parallelizeGlobal.cjs.map +1 -0
  229. package/dist/cjs/utils/readDictionariesFromDisk.cjs +25 -0
  230. package/dist/cjs/utils/readDictionariesFromDisk.cjs.map +1 -0
  231. package/dist/cjs/utils/reduceObjectFormat.cjs +70 -0
  232. package/dist/cjs/utils/reduceObjectFormat.cjs.map +1 -0
  233. package/dist/cjs/utils/resolveObjectPromises.cjs +22 -0
  234. package/dist/cjs/utils/resolveObjectPromises.cjs.map +1 -0
  235. package/dist/cjs/utils/resolveRelativePath.cjs +22 -0
  236. package/dist/cjs/utils/resolveRelativePath.cjs.map +1 -0
  237. package/dist/cjs/utils/runOnce.cjs +96 -0
  238. package/dist/cjs/utils/runOnce.cjs.map +1 -0
  239. package/dist/cjs/utils/runParallel/bin.cjs +55 -0
  240. package/dist/cjs/utils/runParallel/bin.cjs.map +1 -0
  241. package/dist/cjs/utils/runParallel/bootstrap.cjs +25 -0
  242. package/dist/cjs/utils/runParallel/bootstrap.cjs.map +1 -0
  243. package/dist/cjs/utils/runParallel/index.cjs +102 -0
  244. package/dist/cjs/utils/runParallel/index.cjs.map +1 -0
  245. package/dist/cjs/utils/runParallel/pidTree.cjs +146 -0
  246. package/dist/cjs/utils/runParallel/pidTree.cjs.map +1 -0
  247. package/dist/cjs/utils/runParallel/ps.cjs +50 -0
  248. package/dist/cjs/utils/runParallel/ps.cjs.map +1 -0
  249. package/dist/cjs/utils/runParallel/runTask.cjs +155 -0
  250. package/dist/cjs/utils/runParallel/runTask.cjs.map +1 -0
  251. package/dist/cjs/utils/runParallel/spawnPosix.cjs +49 -0
  252. package/dist/cjs/utils/runParallel/spawnPosix.cjs.map +1 -0
  253. package/dist/cjs/utils/runParallel/spawnWin32.cjs +44 -0
  254. package/dist/cjs/utils/runParallel/spawnWin32.cjs.map +1 -0
  255. package/dist/cjs/utils/runParallel/wmic.cjs +53 -0
  256. package/dist/cjs/utils/runParallel/wmic.cjs.map +1 -0
  257. package/dist/cjs/utils/sortAlphabetically.cjs +8 -0
  258. package/dist/cjs/utils/sortAlphabetically.cjs.map +1 -0
  259. package/dist/cjs/utils/splitTextByLine.cjs +12 -0
  260. package/dist/cjs/utils/splitTextByLine.cjs.map +1 -0
  261. package/dist/cjs/utils/verifyIdenticObjectFormat.cjs +66 -0
  262. package/dist/cjs/utils/verifyIdenticObjectFormat.cjs.map +1 -0
  263. package/dist/cjs/watcher.cjs +230 -0
  264. package/dist/cjs/watcher.cjs.map +1 -0
  265. package/dist/cjs/writeConfiguration/generateConfigurationContent.cjs +35 -0
  266. package/dist/cjs/writeConfiguration/generateConfigurationContent.cjs.map +1 -0
  267. package/dist/cjs/writeConfiguration/index.cjs +25 -0
  268. package/dist/cjs/writeConfiguration/index.cjs.map +1 -0
  269. package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +29 -0
  270. package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -0
  271. package/dist/cjs/writeContentDeclaration/dictionaryStatus.cjs +0 -0
  272. package/dist/cjs/writeContentDeclaration/index.cjs +10 -0
  273. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +95 -0
  274. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -0
  275. package/dist/cjs/writeContentDeclaration/transformJSFile.cjs +417 -0
  276. package/dist/cjs/writeContentDeclaration/transformJSFile.cjs.map +1 -0
  277. package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs +128 -0
  278. package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs.map +1 -0
  279. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +164 -0
  280. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -0
  281. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +93 -0
  282. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -0
  283. package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +66 -0
  284. package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -0
  285. package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +44 -0
  286. package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs.map +1 -0
  287. package/dist/cjs/writeFileIfChanged.cjs +51 -0
  288. package/dist/cjs/writeFileIfChanged.cjs.map +1 -0
  289. package/dist/cjs/writeJsonIfChanged.cjs +18 -0
  290. package/dist/cjs/writeJsonIfChanged.cjs.map +1 -0
  291. package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
  292. package/dist/esm/_virtual/_utils_asset.mjs +97 -0
  293. package/dist/esm/build.mjs +26 -0
  294. package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +78 -0
  295. package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -0
  296. package/dist/esm/buildIntlayerDictionary/index.mjs +4 -0
  297. package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs +25 -0
  298. package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs.map +1 -0
  299. package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +201 -0
  300. package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs.map +1 -0
  301. package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +56 -0
  302. package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs.map +1 -0
  303. package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +47 -0
  304. package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs.map +1 -0
  305. package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +49 -0
  306. package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs.map +1 -0
  307. package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +59 -0
  308. package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs.map +1 -0
  309. package/dist/esm/cleanOutputDir.mjs +29 -0
  310. package/dist/esm/cleanOutputDir.mjs.map +1 -0
  311. package/dist/esm/cleanRemovedContentDeclaration.mjs +94 -0
  312. package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -0
  313. package/dist/esm/cli.mjs +20 -0
  314. package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +69 -0
  315. package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs.map +1 -0
  316. package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +41 -0
  317. package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -0
  318. package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +22 -0
  319. package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs.map +1 -0
  320. package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +23 -0
  321. package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs.map +1 -0
  322. package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +23 -0
  323. package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs.map +1 -0
  324. package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +22 -0
  325. package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs.map +1 -0
  326. package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +22 -0
  327. package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs.map +1 -0
  328. package/dist/esm/createDictionaryEntryPoint/index.mjs +9 -0
  329. package/dist/esm/createType/createModuleAugmentation.mjs +122 -0
  330. package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -0
  331. package/dist/esm/createType/createType.mjs +27 -0
  332. package/dist/esm/createType/createType.mjs.map +1 -0
  333. package/dist/esm/createType/index.mjs +4 -0
  334. package/dist/esm/detectFormatCommand.mjs +31 -0
  335. package/dist/esm/detectFormatCommand.mjs.map +1 -0
  336. package/dist/esm/docReview/alignBlocks.mjs +78 -0
  337. package/dist/esm/docReview/alignBlocks.mjs.map +1 -0
  338. package/dist/esm/docReview/computeSimilarity.mjs +39 -0
  339. package/dist/esm/docReview/computeSimilarity.mjs.map +1 -0
  340. package/dist/esm/docReview/fingerprintBlock.mjs +32 -0
  341. package/dist/esm/docReview/fingerprintBlock.mjs.map +1 -0
  342. package/dist/esm/docReview/index.mjs +12 -0
  343. package/dist/esm/docReview/mapChangedLinesToBlocks.mjs +25 -0
  344. package/dist/esm/docReview/mapChangedLinesToBlocks.mjs.map +1 -0
  345. package/dist/esm/docReview/normalizeBlock.mjs +32 -0
  346. package/dist/esm/docReview/normalizeBlock.mjs.map +1 -0
  347. package/dist/esm/docReview/pipeline.mjs +142 -0
  348. package/dist/esm/docReview/pipeline.mjs.map +1 -0
  349. package/dist/esm/docReview/planActions.mjs +56 -0
  350. package/dist/esm/docReview/planActions.mjs.map +1 -0
  351. package/dist/esm/docReview/rebuildDocument.mjs +62 -0
  352. package/dist/esm/docReview/rebuildDocument.mjs.map +1 -0
  353. package/dist/esm/docReview/reviewReport.mjs +196 -0
  354. package/dist/esm/docReview/reviewReport.mjs.map +1 -0
  355. package/dist/esm/docReview/segmentDocument.mjs +131 -0
  356. package/dist/esm/docReview/segmentDocument.mjs.map +1 -0
  357. package/dist/esm/docReview/types.mjs +0 -0
  358. package/dist/esm/fetchDistantDictionaries.mjs +51 -0
  359. package/dist/esm/fetchDistantDictionaries.mjs.map +1 -0
  360. package/dist/esm/filterInvalidDictionaries.mjs +53 -0
  361. package/dist/esm/filterInvalidDictionaries.mjs.map +1 -0
  362. package/dist/esm/formatDictionary.mjs +55 -0
  363. package/dist/esm/formatDictionary.mjs.map +1 -0
  364. package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +81 -0
  365. package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +1 -0
  366. package/dist/esm/getContentDeclarationFileTemplate/index.mjs +3 -0
  367. package/dist/esm/handleAdditionalContentDeclarationFile.mjs +33 -0
  368. package/dist/esm/handleAdditionalContentDeclarationFile.mjs.map +1 -0
  369. package/dist/esm/handleContentDeclarationFileChange.mjs +54 -0
  370. package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -0
  371. package/dist/esm/handleContentDeclarationFileMoved.mjs +23 -0
  372. package/dist/esm/handleContentDeclarationFileMoved.mjs.map +1 -0
  373. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +36 -0
  374. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -0
  375. package/dist/esm/init/cms.mjs +131 -0
  376. package/dist/esm/init/cms.mjs.map +1 -0
  377. package/dist/esm/init/frameworkSetup/index.mjs +26 -0
  378. package/dist/esm/init/frameworkSetup/index.mjs.map +1 -0
  379. package/dist/esm/init/frameworkSetup/nextAppRouter/detect.mjs +52 -0
  380. package/dist/esm/init/frameworkSetup/nextAppRouter/detect.mjs.map +1 -0
  381. package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +104 -0
  382. package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs.map +1 -0
  383. package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs +157 -0
  384. package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs.map +1 -0
  385. package/dist/esm/init/frameworkSetup/nextAppRouter/templates.mjs +113 -0
  386. package/dist/esm/init/frameworkSetup/nextAppRouter/templates.mjs.map +1 -0
  387. package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs +193 -0
  388. package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs.map +1 -0
  389. package/dist/esm/init/frameworkSetup/tanstackStart/detect.mjs +28 -0
  390. package/dist/esm/init/frameworkSetup/tanstackStart/detect.mjs.map +1 -0
  391. package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +73 -0
  392. package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs.map +1 -0
  393. package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs +108 -0
  394. package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs.map +1 -0
  395. package/dist/esm/init/frameworkSetup/tanstackStart/templates.mjs +102 -0
  396. package/dist/esm/init/frameworkSetup/tanstackStart/templates.mjs.map +1 -0
  397. package/dist/esm/init/frameworkSetup/tanstackStart/transforms.mjs +139 -0
  398. package/dist/esm/init/frameworkSetup/tanstackStart/transforms.mjs.map +1 -0
  399. package/dist/esm/init/frameworkSetup/types.mjs +0 -0
  400. package/dist/esm/init/index.mjs +518 -0
  401. package/dist/esm/init/index.mjs.map +1 -0
  402. package/dist/esm/init/utils/astImports.mjs +51 -0
  403. package/dist/esm/init/utils/astImports.mjs.map +1 -0
  404. package/dist/esm/init/utils/configManipulation.mjs +499 -0
  405. package/dist/esm/init/utils/configManipulation.mjs.map +1 -0
  406. package/dist/esm/init/utils/fileSystem.mjs +222 -0
  407. package/dist/esm/init/utils/fileSystem.mjs.map +1 -0
  408. package/dist/esm/init/utils/githubActions.mjs +155 -0
  409. package/dist/esm/init/utils/githubActions.mjs.map +1 -0
  410. package/dist/esm/init/utils/index.mjs +10 -0
  411. package/dist/esm/init/utils/jsonParser.mjs +41 -0
  412. package/dist/esm/init/utils/jsonParser.mjs.map +1 -0
  413. package/dist/esm/init/utils/nextCompilerBabel.mjs +115 -0
  414. package/dist/esm/init/utils/nextCompilerBabel.mjs.map +1 -0
  415. package/dist/esm/init/utils/packageManager.mjs +294 -0
  416. package/dist/esm/init/utils/packageManager.mjs.map +1 -0
  417. package/dist/esm/init/utils/tsConfig.mjs +17 -0
  418. package/dist/esm/init/utils/tsConfig.mjs.map +1 -0
  419. package/dist/esm/initConfig/index.mjs +47 -0
  420. package/dist/esm/initConfig/index.mjs.map +1 -0
  421. package/dist/esm/installLSP.mjs +55 -0
  422. package/dist/esm/installLSP.mjs.map +1 -0
  423. package/dist/esm/installMCP/installMCP.mjs +47 -0
  424. package/dist/esm/installMCP/installMCP.mjs.map +1 -0
  425. package/dist/esm/installSkills/index.mjs +299 -0
  426. package/dist/esm/installSkills/index.mjs.map +1 -0
  427. package/dist/esm/listDictionariesPath.mjs +39 -0
  428. package/dist/esm/listDictionariesPath.mjs.map +1 -0
  429. package/dist/esm/listGitFiles.mjs +101 -0
  430. package/dist/esm/listGitFiles.mjs.map +1 -0
  431. package/dist/esm/listProjects.mjs +44 -0
  432. package/dist/esm/listProjects.mjs.map +1 -0
  433. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +54 -0
  434. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs.map +1 -0
  435. package/dist/esm/loadDictionaries/index.mjs +6 -0
  436. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +128 -0
  437. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -0
  438. package/dist/esm/loadDictionaries/loadDictionaries.mjs +125 -0
  439. package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -0
  440. package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +26 -0
  441. package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -0
  442. package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs +43 -0
  443. package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs.map +1 -0
  444. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +60 -0
  445. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -0
  446. package/dist/esm/loadDictionaries/loadYamlContentDeclaration.mjs +25 -0
  447. package/dist/esm/loadDictionaries/loadYamlContentDeclaration.mjs.map +1 -0
  448. package/dist/esm/loadDictionaries/log.mjs +135 -0
  449. package/dist/esm/loadDictionaries/log.mjs.map +1 -0
  450. package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs +62 -0
  451. package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs.map +1 -0
  452. package/dist/esm/logConfigDetails.mjs +37 -0
  453. package/dist/esm/logConfigDetails.mjs.map +1 -0
  454. package/dist/esm/prepareIntlayer.mjs +100 -0
  455. package/dist/esm/prepareIntlayer.mjs.map +1 -0
  456. package/dist/esm/reduceDictionaryContent/applyMask.mjs +29 -0
  457. package/dist/esm/reduceDictionaryContent/applyMask.mjs.map +1 -0
  458. package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs +11 -0
  459. package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs.map +1 -0
  460. package/dist/esm/scan/analyzeBundleContent.mjs +180 -0
  461. package/dist/esm/scan/analyzeBundleContent.mjs.map +1 -0
  462. package/dist/esm/scan/calculateScore.mjs +61 -0
  463. package/dist/esm/scan/calculateScore.mjs.map +1 -0
  464. package/dist/esm/scan/checks.mjs +265 -0
  465. package/dist/esm/scan/checks.mjs.map +1 -0
  466. package/dist/esm/scan/index.mjs +7 -0
  467. package/dist/esm/scan/parseHtml.mjs +115 -0
  468. package/dist/esm/scan/parseHtml.mjs.map +1 -0
  469. package/dist/esm/scan/scanWebsite.mjs +203 -0
  470. package/dist/esm/scan/scanWebsite.mjs.map +1 -0
  471. package/dist/esm/scan/types.mjs +0 -0
  472. package/dist/esm/utils/autoDecorateContent.mjs +87 -0
  473. package/dist/esm/utils/autoDecorateContent.mjs.map +1 -0
  474. package/dist/esm/utils/buildComponentFilesList.mjs +91 -0
  475. package/dist/esm/utils/buildComponentFilesList.mjs.map +1 -0
  476. package/dist/esm/utils/buildFilesList.mjs +80 -0
  477. package/dist/esm/utils/buildFilesList.mjs.map +1 -0
  478. package/dist/esm/utils/chunkJSON.mjs +334 -0
  479. package/dist/esm/utils/chunkJSON.mjs.map +1 -0
  480. package/dist/esm/utils/formatter.mjs +14 -0
  481. package/dist/esm/utils/formatter.mjs.map +1 -0
  482. package/dist/esm/utils/getChunk.mjs +34 -0
  483. package/dist/esm/utils/getChunk.mjs.map +1 -0
  484. package/dist/esm/utils/getContentExtension.mjs +28 -0
  485. package/dist/esm/utils/getContentExtension.mjs.map +1 -0
  486. package/dist/esm/utils/getFormatFromExtension.mjs +38 -0
  487. package/dist/esm/utils/getFormatFromExtension.mjs.map +1 -0
  488. package/dist/esm/utils/getPathHash.mjs +20 -0
  489. package/dist/esm/utils/getPathHash.mjs.map +1 -0
  490. package/dist/esm/utils/index.mjs +22 -0
  491. package/dist/esm/utils/mergeChunks.mjs +27 -0
  492. package/dist/esm/utils/mergeChunks.mjs.map +1 -0
  493. package/dist/esm/utils/pLimit.mjs +131 -0
  494. package/dist/esm/utils/pLimit.mjs.map +1 -0
  495. package/dist/esm/utils/parallelize.mjs +11 -0
  496. package/dist/esm/utils/parallelize.mjs.map +1 -0
  497. package/dist/esm/utils/parallelizeGlobal.mjs +27 -0
  498. package/dist/esm/utils/parallelizeGlobal.mjs.map +1 -0
  499. package/dist/esm/utils/readDictionariesFromDisk.mjs +23 -0
  500. package/dist/esm/utils/readDictionariesFromDisk.mjs.map +1 -0
  501. package/dist/esm/utils/reduceObjectFormat.mjs +67 -0
  502. package/dist/esm/utils/reduceObjectFormat.mjs.map +1 -0
  503. package/dist/esm/utils/resolveObjectPromises.mjs +20 -0
  504. package/dist/esm/utils/resolveObjectPromises.mjs.map +1 -0
  505. package/dist/esm/utils/resolveRelativePath.mjs +20 -0
  506. package/dist/esm/utils/resolveRelativePath.mjs.map +1 -0
  507. package/dist/esm/utils/runOnce.mjs +93 -0
  508. package/dist/esm/utils/runOnce.mjs.map +1 -0
  509. package/dist/esm/utils/runParallel/bin.mjs +53 -0
  510. package/dist/esm/utils/runParallel/bin.mjs.map +1 -0
  511. package/dist/esm/utils/runParallel/bootstrap.mjs +23 -0
  512. package/dist/esm/utils/runParallel/bootstrap.mjs.map +1 -0
  513. package/dist/esm/utils/runParallel/index.mjs +100 -0
  514. package/dist/esm/utils/runParallel/index.mjs.map +1 -0
  515. package/dist/esm/utils/runParallel/pidTree.mjs +143 -0
  516. package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -0
  517. package/dist/esm/utils/runParallel/ps.mjs +47 -0
  518. package/dist/esm/utils/runParallel/ps.mjs.map +1 -0
  519. package/dist/esm/utils/runParallel/runTask.mjs +153 -0
  520. package/dist/esm/utils/runParallel/runTask.mjs.map +1 -0
  521. package/dist/esm/utils/runParallel/spawnPosix.mjs +47 -0
  522. package/dist/esm/utils/runParallel/spawnPosix.mjs.map +1 -0
  523. package/dist/esm/utils/runParallel/spawnWin32.mjs +42 -0
  524. package/dist/esm/utils/runParallel/spawnWin32.mjs.map +1 -0
  525. package/dist/esm/utils/runParallel/wmic.mjs +50 -0
  526. package/dist/esm/utils/runParallel/wmic.mjs.map +1 -0
  527. package/dist/esm/utils/sortAlphabetically.mjs +6 -0
  528. package/dist/esm/utils/sortAlphabetically.mjs.map +1 -0
  529. package/dist/esm/utils/splitTextByLine.mjs +10 -0
  530. package/dist/esm/utils/splitTextByLine.mjs.map +1 -0
  531. package/dist/esm/utils/verifyIdenticObjectFormat.mjs +64 -0
  532. package/dist/esm/utils/verifyIdenticObjectFormat.mjs.map +1 -0
  533. package/dist/esm/watcher.mjs +226 -0
  534. package/dist/esm/watcher.mjs.map +1 -0
  535. package/dist/esm/writeConfiguration/generateConfigurationContent.mjs +33 -0
  536. package/dist/esm/writeConfiguration/generateConfigurationContent.mjs.map +1 -0
  537. package/dist/esm/writeConfiguration/index.mjs +22 -0
  538. package/dist/esm/writeConfiguration/index.mjs.map +1 -0
  539. package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +27 -0
  540. package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -0
  541. package/dist/esm/writeContentDeclaration/dictionaryStatus.mjs +0 -0
  542. package/dist/esm/writeContentDeclaration/index.mjs +6 -0
  543. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +92 -0
  544. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -0
  545. package/dist/esm/writeContentDeclaration/transformJSFile.mjs +412 -0
  546. package/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +1 -0
  547. package/dist/esm/writeContentDeclaration/transformJSONFile.mjs +125 -0
  548. package/dist/esm/writeContentDeclaration/transformJSONFile.mjs.map +1 -0
  549. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +162 -0
  550. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -0
  551. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +91 -0
  552. package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -0
  553. package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +64 -0
  554. package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -0
  555. package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +42 -0
  556. package/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +1 -0
  557. package/dist/esm/writeFileIfChanged.mjs +49 -0
  558. package/dist/esm/writeFileIfChanged.mjs.map +1 -0
  559. package/dist/esm/writeJsonIfChanged.mjs +17 -0
  560. package/dist/esm/writeJsonIfChanged.mjs.map +1 -0
  561. package/dist/types/build.d.ts +26 -0
  562. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +25 -0
  563. package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -0
  564. package/dist/types/buildIntlayerDictionary/index.d.ts +3 -0
  565. package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +11 -0
  566. package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts.map +1 -0
  567. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +77 -0
  568. package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -0
  569. package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +25 -0
  570. package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -0
  571. package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +40 -0
  572. package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -0
  573. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts +29 -0
  574. package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -0
  575. package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +34 -0
  576. package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts.map +1 -0
  577. package/dist/types/cleanOutputDir.d.ts +7 -0
  578. package/dist/types/cleanOutputDir.d.ts.map +1 -0
  579. package/dist/types/cleanRemovedContentDeclaration.d.ts +11 -0
  580. package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -0
  581. package/dist/types/cli.d.ts +21 -0
  582. package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +14 -0
  583. package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts.map +1 -0
  584. package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +10 -0
  585. package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -0
  586. package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +10 -0
  587. package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts.map +1 -0
  588. package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +10 -0
  589. package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts.map +1 -0
  590. package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +10 -0
  591. package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts.map +1 -0
  592. package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +10 -0
  593. package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts.map +1 -0
  594. package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +10 -0
  595. package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts.map +1 -0
  596. package/dist/types/createDictionaryEntryPoint/index.d.ts +8 -0
  597. package/dist/types/createType/createModuleAugmentation.d.ts +9 -0
  598. package/dist/types/createType/createModuleAugmentation.d.ts.map +1 -0
  599. package/dist/types/createType/createType.d.ts +12 -0
  600. package/dist/types/createType/createType.d.ts.map +1 -0
  601. package/dist/types/createType/index.d.ts +3 -0
  602. package/dist/types/detectFormatCommand.d.ts +7 -0
  603. package/dist/types/detectFormatCommand.d.ts.map +1 -0
  604. package/dist/types/docReview/alignBlocks.d.ts +18 -0
  605. package/dist/types/docReview/alignBlocks.d.ts.map +1 -0
  606. package/dist/types/docReview/computeSimilarity.d.ts +22 -0
  607. package/dist/types/docReview/computeSimilarity.d.ts.map +1 -0
  608. package/dist/types/docReview/fingerprintBlock.d.ts +18 -0
  609. package/dist/types/docReview/fingerprintBlock.d.ts.map +1 -0
  610. package/dist/types/docReview/index.d.ts +12 -0
  611. package/dist/types/docReview/mapChangedLinesToBlocks.d.ts +15 -0
  612. package/dist/types/docReview/mapChangedLinesToBlocks.d.ts.map +1 -0
  613. package/dist/types/docReview/normalizeBlock.d.ts +18 -0
  614. package/dist/types/docReview/normalizeBlock.d.ts.map +1 -0
  615. package/dist/types/docReview/pipeline.d.ts +46 -0
  616. package/dist/types/docReview/pipeline.d.ts.map +1 -0
  617. package/dist/types/docReview/planActions.d.ts +18 -0
  618. package/dist/types/docReview/planActions.d.ts.map +1 -0
  619. package/dist/types/docReview/rebuildDocument.d.ts +46 -0
  620. package/dist/types/docReview/rebuildDocument.d.ts.map +1 -0
  621. package/dist/types/docReview/reviewReport.d.ts +82 -0
  622. package/dist/types/docReview/reviewReport.d.ts.map +1 -0
  623. package/dist/types/docReview/segmentDocument.d.ts +40 -0
  624. package/dist/types/docReview/segmentDocument.d.ts.map +1 -0
  625. package/dist/types/docReview/types.d.ts +73 -0
  626. package/dist/types/docReview/types.d.ts.map +1 -0
  627. package/dist/types/fetchDistantDictionaries.d.ts +16 -0
  628. package/dist/types/fetchDistantDictionaries.d.ts.map +1 -0
  629. package/dist/types/filterInvalidDictionaries.d.ts +12 -0
  630. package/dist/types/filterInvalidDictionaries.d.ts.map +1 -0
  631. package/dist/types/formatDictionary.d.ts +62 -0
  632. package/dist/types/formatDictionary.d.ts.map +1 -0
  633. package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts +7 -0
  634. package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts.map +1 -0
  635. package/dist/types/getContentDeclarationFileTemplate/index.d.ts +2 -0
  636. package/dist/types/handleAdditionalContentDeclarationFile.d.ts +7 -0
  637. package/dist/types/handleAdditionalContentDeclarationFile.d.ts.map +1 -0
  638. package/dist/types/handleContentDeclarationFileChange.d.ts +7 -0
  639. package/dist/types/handleContentDeclarationFileChange.d.ts.map +1 -0
  640. package/dist/types/handleContentDeclarationFileMoved.d.ts +7 -0
  641. package/dist/types/handleContentDeclarationFileMoved.d.ts.map +1 -0
  642. package/dist/types/handleUnlinkedContentDeclarationFile.d.ts +7 -0
  643. package/dist/types/handleUnlinkedContentDeclarationFile.d.ts.map +1 -0
  644. package/dist/types/init/cms.d.ts +51 -0
  645. package/dist/types/init/cms.d.ts.map +1 -0
  646. package/dist/types/init/frameworkSetup/index.d.ts +13 -0
  647. package/dist/types/init/frameworkSetup/index.d.ts.map +1 -0
  648. package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts +25 -0
  649. package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts.map +1 -0
  650. package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts +12 -0
  651. package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts.map +1 -0
  652. package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts +56 -0
  653. package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts.map +1 -0
  654. package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts +26 -0
  655. package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts.map +1 -0
  656. package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts +23 -0
  657. package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts.map +1 -0
  658. package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts +19 -0
  659. package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts.map +1 -0
  660. package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts +13 -0
  661. package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts.map +1 -0
  662. package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts +68 -0
  663. package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts.map +1 -0
  664. package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts +22 -0
  665. package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts.map +1 -0
  666. package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts +17 -0
  667. package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts.map +1 -0
  668. package/dist/types/init/frameworkSetup/types.d.ts +43 -0
  669. package/dist/types/init/frameworkSetup/types.d.ts.map +1 -0
  670. package/dist/types/init/index.d.ts +46 -0
  671. package/dist/types/init/index.d.ts.map +1 -0
  672. package/dist/types/init/utils/astImports.d.ts +29 -0
  673. package/dist/types/init/utils/astImports.d.ts.map +1 -0
  674. package/dist/types/init/utils/configManipulation.d.ts +99 -0
  675. package/dist/types/init/utils/configManipulation.d.ts.map +1 -0
  676. package/dist/types/init/utils/fileSystem.d.ts +111 -0
  677. package/dist/types/init/utils/fileSystem.d.ts.map +1 -0
  678. package/dist/types/init/utils/githubActions.d.ts +19 -0
  679. package/dist/types/init/utils/githubActions.d.ts.map +1 -0
  680. package/dist/types/init/utils/index.d.ts +9 -0
  681. package/dist/types/init/utils/jsonParser.d.ts +8 -0
  682. package/dist/types/init/utils/jsonParser.d.ts.map +1 -0
  683. package/dist/types/init/utils/nextCompilerBabel.d.ts +53 -0
  684. package/dist/types/init/utils/nextCompilerBabel.d.ts.map +1 -0
  685. package/dist/types/init/utils/packageManager.d.ts +149 -0
  686. package/dist/types/init/utils/packageManager.d.ts.map +1 -0
  687. package/dist/types/init/utils/tsConfig.d.ts +8 -0
  688. package/dist/types/init/utils/tsConfig.d.ts.map +1 -0
  689. package/dist/types/initConfig/index.d.ts +10 -0
  690. package/dist/types/initConfig/index.d.ts.map +1 -0
  691. package/dist/types/installLSP.d.ts +12 -0
  692. package/dist/types/installLSP.d.ts.map +1 -0
  693. package/dist/types/installMCP/installMCP.d.ts +11 -0
  694. package/dist/types/installMCP/installMCP.d.ts.map +1 -0
  695. package/dist/types/installSkills/index.d.ts +42 -0
  696. package/dist/types/installSkills/index.d.ts.map +1 -0
  697. package/dist/types/listDictionariesPath.d.ts +17 -0
  698. package/dist/types/listDictionariesPath.d.ts.map +1 -0
  699. package/dist/types/listGitFiles.d.ts +27 -0
  700. package/dist/types/listGitFiles.d.ts.map +1 -0
  701. package/dist/types/listProjects.d.ts +26 -0
  702. package/dist/types/listProjects.d.ts.map +1 -0
  703. package/dist/types/loadDictionaries/getIntlayerBundle.d.ts +7 -0
  704. package/dist/types/loadDictionaries/getIntlayerBundle.d.ts.map +1 -0
  705. package/dist/types/loadDictionaries/index.d.ts +5 -0
  706. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +15 -0
  707. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -0
  708. package/dist/types/loadDictionaries/loadDictionaries.d.ts +23 -0
  709. package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -0
  710. package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +8 -0
  711. package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -0
  712. package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts +7 -0
  713. package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts.map +1 -0
  714. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +15 -0
  715. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -0
  716. package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts +7 -0
  717. package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts.map +1 -0
  718. package/dist/types/loadDictionaries/log.d.ts +36 -0
  719. package/dist/types/loadDictionaries/log.d.ts.map +1 -0
  720. package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts +7 -0
  721. package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts.map +1 -0
  722. package/dist/types/logConfigDetails.d.ts +7 -0
  723. package/dist/types/logConfigDetails.d.ts.map +1 -0
  724. package/dist/types/prepareIntlayer.d.ts +15 -0
  725. package/dist/types/prepareIntlayer.d.ts.map +1 -0
  726. package/dist/types/reduceDictionaryContent/applyMask.d.ts +7 -0
  727. package/dist/types/reduceDictionaryContent/applyMask.d.ts.map +1 -0
  728. package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts +7 -0
  729. package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts.map +1 -0
  730. package/dist/types/scan/analyzeBundleContent.d.ts +16 -0
  731. package/dist/types/scan/analyzeBundleContent.d.ts.map +1 -0
  732. package/dist/types/scan/calculateScore.d.ts +65 -0
  733. package/dist/types/scan/calculateScore.d.ts.map +1 -0
  734. package/dist/types/scan/checks.d.ts +38 -0
  735. package/dist/types/scan/checks.d.ts.map +1 -0
  736. package/dist/types/scan/index.d.ts +7 -0
  737. package/dist/types/scan/parseHtml.d.ts +54 -0
  738. package/dist/types/scan/parseHtml.d.ts.map +1 -0
  739. package/dist/types/scan/scanWebsite.d.ts +18 -0
  740. package/dist/types/scan/scanWebsite.d.ts.map +1 -0
  741. package/dist/types/scan/types.d.ts +76 -0
  742. package/dist/types/scan/types.d.ts.map +1 -0
  743. package/dist/types/utils/autoDecorateContent.d.ts +13 -0
  744. package/dist/types/utils/autoDecorateContent.d.ts.map +1 -0
  745. package/dist/types/utils/buildComponentFilesList.d.ts +28 -0
  746. package/dist/types/utils/buildComponentFilesList.d.ts.map +1 -0
  747. package/dist/types/utils/buildFilesList.d.ts +62 -0
  748. package/dist/types/utils/buildFilesList.d.ts.map +1 -0
  749. package/dist/types/utils/chunkJSON.d.ts +56 -0
  750. package/dist/types/utils/chunkJSON.d.ts.map +1 -0
  751. package/dist/types/utils/formatter.d.ts +9 -0
  752. package/dist/types/utils/formatter.d.ts.map +1 -0
  753. package/dist/types/utils/getChunk.d.ts +11 -0
  754. package/dist/types/utils/getChunk.d.ts.map +1 -0
  755. package/dist/types/utils/getContentExtension.d.ts +15 -0
  756. package/dist/types/utils/getContentExtension.d.ts.map +1 -0
  757. package/dist/types/utils/getFormatFromExtension.d.ts +8 -0
  758. package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -0
  759. package/dist/types/utils/getPathHash.d.ts +8 -0
  760. package/dist/types/utils/getPathHash.d.ts.map +1 -0
  761. package/dist/types/utils/index.d.ts +21 -0
  762. package/dist/types/utils/mergeChunks.d.ts +5 -0
  763. package/dist/types/utils/mergeChunks.d.ts.map +1 -0
  764. package/dist/types/utils/pLimit.d.ts +16 -0
  765. package/dist/types/utils/pLimit.d.ts.map +1 -0
  766. package/dist/types/utils/parallelize.d.ts +5 -0
  767. package/dist/types/utils/parallelize.d.ts.map +1 -0
  768. package/dist/types/utils/parallelizeGlobal.d.ts +20 -0
  769. package/dist/types/utils/parallelizeGlobal.d.ts.map +1 -0
  770. package/dist/types/utils/readDictionariesFromDisk.d.ts +9 -0
  771. package/dist/types/utils/readDictionariesFromDisk.d.ts.map +1 -0
  772. package/dist/types/utils/reduceObjectFormat.d.ts +30 -0
  773. package/dist/types/utils/reduceObjectFormat.d.ts.map +1 -0
  774. package/dist/types/utils/resolveObjectPromises.d.ts +9 -0
  775. package/dist/types/utils/resolveObjectPromises.d.ts.map +1 -0
  776. package/dist/types/utils/resolveRelativePath.d.ts +5 -0
  777. package/dist/types/utils/resolveRelativePath.d.ts.map +1 -0
  778. package/dist/types/utils/runOnce.d.ts +45 -0
  779. package/dist/types/utils/runOnce.d.ts.map +1 -0
  780. package/dist/types/utils/runParallel/bin.d.ts +15 -0
  781. package/dist/types/utils/runParallel/bin.d.ts.map +1 -0
  782. package/dist/types/utils/runParallel/bootstrap.d.ts +5 -0
  783. package/dist/types/utils/runParallel/bootstrap.d.ts.map +1 -0
  784. package/dist/types/utils/runParallel/index.d.ts +14 -0
  785. package/dist/types/utils/runParallel/index.d.ts.map +1 -0
  786. package/dist/types/utils/runParallel/pidTree.d.ts +24 -0
  787. package/dist/types/utils/runParallel/pidTree.d.ts.map +1 -0
  788. package/dist/types/utils/runParallel/ps.d.ts +11 -0
  789. package/dist/types/utils/runParallel/ps.d.ts.map +1 -0
  790. package/dist/types/utils/runParallel/runTask.d.ts +26 -0
  791. package/dist/types/utils/runParallel/runTask.d.ts.map +1 -0
  792. package/dist/types/utils/runParallel/spawnPosix.d.ts +20 -0
  793. package/dist/types/utils/runParallel/spawnPosix.d.ts.map +1 -0
  794. package/dist/types/utils/runParallel/spawnWin32.d.ts +20 -0
  795. package/dist/types/utils/runParallel/spawnWin32.d.ts.map +1 -0
  796. package/dist/types/utils/runParallel/wmic.d.ts +11 -0
  797. package/dist/types/utils/runParallel/wmic.d.ts.map +1 -0
  798. package/dist/types/utils/sortAlphabetically.d.ts +5 -0
  799. package/dist/types/utils/sortAlphabetically.d.ts.map +1 -0
  800. package/dist/types/utils/splitTextByLine.d.ts +5 -0
  801. package/dist/types/utils/splitTextByLine.d.ts.map +1 -0
  802. package/dist/types/utils/verifyIdenticObjectFormat.d.ts +23 -0
  803. package/dist/types/utils/verifyIdenticObjectFormat.d.ts.map +1 -0
  804. package/dist/types/watcher.d.ts +17 -0
  805. package/dist/types/watcher.d.ts.map +1 -0
  806. package/dist/types/writeConfiguration/generateConfigurationContent.d.ts +7 -0
  807. package/dist/types/writeConfiguration/generateConfigurationContent.d.ts.map +1 -0
  808. package/dist/types/writeConfiguration/index.d.ts +8 -0
  809. package/dist/types/writeConfiguration/index.d.ts.map +1 -0
  810. package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts +12 -0
  811. package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts.map +1 -0
  812. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +5 -0
  813. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -0
  814. package/dist/types/writeContentDeclaration/index.d.ts +6 -0
  815. package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts +14 -0
  816. package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -0
  817. package/dist/types/writeContentDeclaration/transformJSFile.d.ts +11 -0
  818. package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -0
  819. package/dist/types/writeContentDeclaration/transformJSONFile.d.ts +7 -0
  820. package/dist/types/writeContentDeclaration/transformJSONFile.d.ts.map +1 -0
  821. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +19 -0
  822. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -0
  823. package/dist/types/writeContentDeclaration/writeJSFile.d.ts +14 -0
  824. package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -0
  825. package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts +8 -0
  826. package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -0
  827. package/dist/types/writeContentDeclaration/writeYamlFile.d.ts +8 -0
  828. package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -0
  829. package/dist/types/writeFileIfChanged.d.ts +11 -0
  830. package/dist/types/writeFileIfChanged.d.ts.map +1 -0
  831. package/dist/types/writeJsonIfChanged.d.ts +9 -0
  832. package/dist/types/writeJsonIfChanged.d.ts.map +1 -0
  833. package/package.json +159 -0
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/getPathHash.ts
4
+ /**
5
+ * Fast hashing using cyrb53 algorithm for small unique strings with low collisions risk
6
+ */
7
+ const getPathHash = (filePath) => {
8
+ let h1 = 3735928559;
9
+ let h2 = 1103547991;
10
+ for (let i = 0; i < filePath.length; i++) {
11
+ const ch = filePath.charCodeAt(i);
12
+ h1 = Math.imul(h1 ^ ch, 2654435761);
13
+ h2 = Math.imul(h2 ^ ch, 1597334677);
14
+ }
15
+ h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507) ^ Math.imul(h2 ^ h2 >>> 13, 3266489909);
16
+ h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507) ^ Math.imul(h1 ^ h1 >>> 13, 3266489909);
17
+ return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36);
18
+ };
19
+
20
+ //#endregion
21
+ exports.getPathHash = getPathHash;
22
+ //# sourceMappingURL=getPathHash.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPathHash.cjs","names":[],"sources":["../../../src/utils/getPathHash.ts"],"sourcesContent":["/**\n * Fast hashing using cyrb53 algorithm for small unique strings with low collisions risk\n */\nexport const getPathHash = (filePath: string) => {\n let h1 = 0xdeadbeef;\n let h2 = 0x41c6ce57;\n\n for (let i = 0; i < filePath.length; i++) {\n const ch = filePath.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n\n h1 =\n Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^\n Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 =\n Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^\n Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n\n const hash53 = 4294967296 * (2097151 & h2) + (h1 >>> 0);\n\n // Returns a string ~11 characters long, e.g., \"_1x9z5k2m8p3\"\n return hash53.toString(36);\n};\n"],"mappings":";;;;;;AAGA,MAAa,eAAe,aAAqB;CAC/C,IAAI,KAAK;CACT,IAAI,KAAK;AAET,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,KAAK,SAAS,WAAW,EAAE;AACjC,OAAK,KAAK,KAAK,KAAK,IAAI,WAAW;AACnC,OAAK,KAAK,KAAK,KAAK,IAAI,WAAW;;AAGrC,MACE,KAAK,KAAK,KAAM,OAAO,IAAK,WAAW,GACvC,KAAK,KAAK,KAAM,OAAO,IAAK,WAAW;AACzC,MACE,KAAK,KAAK,KAAM,OAAO,IAAK,WAAW,GACvC,KAAK,KAAK,KAAM,OAAO,IAAK,WAAW;AAKzC,SAHe,cAAc,UAAU,OAAO,OAAO,IAGvC,SAAS,GAAG"}
@@ -0,0 +1,50 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_utils_pLimit = require('./pLimit.cjs');
3
+ const require_utils_parallelize = require('./parallelize.cjs');
4
+ const require_utils_getPathHash = require('./getPathHash.cjs');
5
+ const require_utils_formatter = require('./formatter.cjs');
6
+ const require_utils_autoDecorateContent = require('./autoDecorateContent.cjs');
7
+ const require_utils_buildComponentFilesList = require('./buildComponentFilesList.cjs');
8
+ const require_utils_splitTextByLine = require('./splitTextByLine.cjs');
9
+ const require_utils_getChunk = require('./getChunk.cjs');
10
+ const require_utils_chunkJSON = require('./chunkJSON.cjs');
11
+ const require_utils_getContentExtension = require('./getContentExtension.cjs');
12
+ const require_utils_getFormatFromExtension = require('./getFormatFromExtension.cjs');
13
+ const require_utils_mergeChunks = require('./mergeChunks.cjs');
14
+ const require_utils_parallelizeGlobal = require('./parallelizeGlobal.cjs');
15
+ const require_utils_reduceObjectFormat = require('./reduceObjectFormat.cjs');
16
+ const require_utils_resolveObjectPromises = require('./resolveObjectPromises.cjs');
17
+ const require_utils_resolveRelativePath = require('./resolveRelativePath.cjs');
18
+ const require_utils_runOnce = require('./runOnce.cjs');
19
+ const require_utils_runParallel_index = require('./runParallel/index.cjs');
20
+ const require_utils_sortAlphabetically = require('./sortAlphabetically.cjs');
21
+ const require_utils_verifyIdenticObjectFormat = require('./verifyIdenticObjectFormat.cjs');
22
+
23
+ exports.Queue = require_utils_pLimit.Queue;
24
+ exports.assembleJSON = require_utils_chunkJSON.assembleJSON;
25
+ exports.autoDecorateContent = require_utils_autoDecorateContent.autoDecorateContent;
26
+ exports.buildComponentFilesList = require_utils_buildComponentFilesList.buildComponentFilesList;
27
+ exports.chunkJSON = require_utils_chunkJSON.chunkJSON;
28
+ exports.excludeObjectFormat = require_utils_reduceObjectFormat.excludeObjectFormat;
29
+ exports.formatLocale = require_utils_formatter.formatLocale;
30
+ exports.formatPath = require_utils_formatter.formatPath;
31
+ exports.getChunk = require_utils_getChunk.getChunk;
32
+ exports.getContentExtension = require_utils_getContentExtension.getContentExtension;
33
+ exports.getExtensionFromFormat = require_utils_getFormatFromExtension.getExtensionFromFormat;
34
+ exports.getFormatFromExtension = require_utils_getFormatFromExtension.getFormatFromExtension;
35
+ exports.getGlobalLimiter = require_utils_parallelizeGlobal.getGlobalLimiter;
36
+ exports.getPathHash = require_utils_getPathHash.getPathHash;
37
+ exports.getTaskLimiter = require_utils_parallelizeGlobal.getTaskLimiter;
38
+ exports.mergeChunks = require_utils_mergeChunks.mergeChunks;
39
+ exports.pLimit = require_utils_pLimit.pLimit;
40
+ exports.parallelize = require_utils_parallelize.parallelize;
41
+ exports.parallelizeGlobal = require_utils_parallelizeGlobal.parallelizeGlobal;
42
+ exports.reconstructFromSingleChunk = require_utils_chunkJSON.reconstructFromSingleChunk;
43
+ exports.reduceObjectFormat = require_utils_reduceObjectFormat.reduceObjectFormat;
44
+ exports.resolveObjectPromises = require_utils_resolveObjectPromises.resolveObjectPromises;
45
+ exports.resolveRelativePath = require_utils_resolveRelativePath.resolveRelativePath;
46
+ exports.runOnce = require_utils_runOnce.runOnce;
47
+ exports.runParallel = require_utils_runParallel_index.runParallel;
48
+ exports.sortAlphabetically = require_utils_sortAlphabetically.sortAlphabetically;
49
+ exports.splitTextByLines = require_utils_splitTextByLine.splitTextByLines;
50
+ exports.verifyIdenticObjectFormat = require_utils_verifyIdenticObjectFormat.verifyIdenticObjectFormat;
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/mergeChunks.ts
4
+ const mergeChunks = (chunks) => {
5
+ if (chunks.length === 0) return {};
6
+ let result = chunks[0];
7
+ for (let i = 1; i < chunks.length; i++) result = customChunkMerge(result, chunks[i]);
8
+ return result;
9
+ };
10
+ const customChunkMerge = (dest, source) => {
11
+ if (dest === void 0 || dest === null) return source;
12
+ if (source === void 0 || source === null) return dest;
13
+ if (Array.isArray(dest) && Array.isArray(source)) {
14
+ const maxLength = Math.max(dest.length, source.length);
15
+ const result = [];
16
+ for (let i = 0; i < maxLength; i++) result[i] = customChunkMerge(dest[i], source[i]);
17
+ return result;
18
+ }
19
+ if (typeof dest === "object" && typeof source === "object") {
20
+ const result = { ...dest };
21
+ for (const key of Object.keys(source)) result[key] = customChunkMerge(result[key], source[key]);
22
+ return result;
23
+ }
24
+ return dest;
25
+ };
26
+
27
+ //#endregion
28
+ exports.mergeChunks = mergeChunks;
29
+ //# sourceMappingURL=mergeChunks.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeChunks.cjs","names":[],"sources":["../../../src/utils/mergeChunks.ts"],"sourcesContent":["export const mergeChunks = (chunks: any[]): any => {\n if (chunks.length === 0) return {};\n\n let result = chunks[0];\n\n for (let i = 1; i < chunks.length; i++) {\n result = customChunkMerge(result, chunks[i]);\n }\n\n return result;\n};\n\nconst customChunkMerge = (dest: any, source: any): any => {\n if (dest === undefined || dest === null) return source;\n if (source === undefined || source === null) return dest;\n\n if (Array.isArray(dest) && Array.isArray(source)) {\n const maxLength = Math.max(dest.length, source.length);\n const result = [];\n for (let i = 0; i < maxLength; i++) {\n result[i] = customChunkMerge(dest[i], source[i]);\n }\n return result;\n }\n\n if (typeof dest === 'object' && typeof source === 'object') {\n const result: any = { ...dest };\n for (const key of Object.keys(source)) {\n result[key] = customChunkMerge(result[key], source[key]);\n }\n return result;\n }\n\n // Primitives: if we are here, both are not null.\n // Since chunks shouldn't overlap, we can return dest.\n return dest;\n};\n"],"mappings":";;;AAAA,MAAa,eAAe,WAAuB;AACjD,KAAI,OAAO,WAAW,EAAG,QAAO,EAAE;CAElC,IAAI,SAAS,OAAO;AAEpB,MAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,IACjC,UAAS,iBAAiB,QAAQ,OAAO,GAAG;AAG9C,QAAO;;AAGT,MAAM,oBAAoB,MAAW,WAAqB;AACxD,KAAI,SAAS,UAAa,SAAS,KAAM,QAAO;AAChD,KAAI,WAAW,UAAa,WAAW,KAAM,QAAO;AAEpD,KAAI,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAQ,OAAO,EAAE;EAChD,MAAM,YAAY,KAAK,IAAI,KAAK,QAAQ,OAAO,OAAO;EACtD,MAAM,SAAS,EAAE;AACjB,OAAK,IAAI,IAAI,GAAG,IAAI,WAAW,IAC7B,QAAO,KAAK,iBAAiB,KAAK,IAAI,OAAO,GAAG;AAElD,SAAO;;AAGT,KAAI,OAAO,SAAS,YAAY,OAAO,WAAW,UAAU;EAC1D,MAAM,SAAc,EAAE,GAAG,MAAM;AAC/B,OAAK,MAAM,OAAO,OAAO,KAAK,OAAO,CACnC,QAAO,OAAO,iBAAiB,OAAO,MAAM,OAAO,KAAK;AAE1D,SAAO;;AAKT,QAAO"}
@@ -0,0 +1,134 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/pLimit.ts
4
+ var Node = class {
5
+ value;
6
+ next;
7
+ constructor(value) {
8
+ this.value = value;
9
+ }
10
+ };
11
+ var Queue = class {
12
+ #head;
13
+ #tail;
14
+ #size;
15
+ constructor() {
16
+ this.clear();
17
+ }
18
+ enqueue(value) {
19
+ const node = new Node(value);
20
+ if (this.#head) {
21
+ this.#tail.next = node;
22
+ this.#tail = node;
23
+ } else {
24
+ this.#head = node;
25
+ this.#tail = node;
26
+ }
27
+ this.#size++;
28
+ }
29
+ dequeue() {
30
+ const current = this.#head;
31
+ if (!current) return;
32
+ this.#head = current.next;
33
+ this.#size--;
34
+ return current.value;
35
+ }
36
+ peek() {
37
+ if (!this.#head) return;
38
+ return this.#head.value;
39
+ }
40
+ clear() {
41
+ this.#head = void 0;
42
+ this.#tail = void 0;
43
+ this.#size = 0;
44
+ }
45
+ get size() {
46
+ return this.#size;
47
+ }
48
+ *[Symbol.iterator]() {
49
+ let current = this.#head;
50
+ while (current) {
51
+ yield current.value;
52
+ current = current.next;
53
+ }
54
+ }
55
+ *drain() {
56
+ while (this.#head) yield this.dequeue();
57
+ }
58
+ };
59
+ const pLimit = (concurrency) => {
60
+ validateConcurrency(concurrency);
61
+ const queue = new Queue();
62
+ let activeCount = 0;
63
+ const idleWaiters = [];
64
+ const notifyIdleIfNeeded = () => {
65
+ if (activeCount === 0 && queue.size === 0) while (idleWaiters.length) idleWaiters.pop()?.();
66
+ };
67
+ const resumeNext = () => {
68
+ if (activeCount < concurrency && queue.size > 0) {
69
+ activeCount++;
70
+ queue.dequeue()?.();
71
+ }
72
+ };
73
+ const next = () => {
74
+ activeCount--;
75
+ resumeNext();
76
+ };
77
+ const run = async (fn, resolve, arguments_) => {
78
+ const result = (async () => fn(...arguments_))();
79
+ resolve(result);
80
+ try {
81
+ await result;
82
+ } catch {}
83
+ next();
84
+ };
85
+ const enqueue = (fn, resolve, arguments_) => {
86
+ new Promise((internalResolve) => {
87
+ queue.enqueue(internalResolve);
88
+ }).then(run.bind(void 0, fn, resolve, arguments_));
89
+ if (activeCount < concurrency) resumeNext();
90
+ };
91
+ const generator = (fn, ...arguments_) => new Promise((resolve) => {
92
+ enqueue(fn, resolve, arguments_);
93
+ });
94
+ Object.defineProperties(generator, {
95
+ activeCount: { get: () => activeCount },
96
+ pendingCount: { get: () => queue.size },
97
+ clearQueue: { value() {
98
+ queue.clear();
99
+ notifyIdleIfNeeded();
100
+ } },
101
+ concurrency: {
102
+ get: () => concurrency,
103
+ set(newConcurrency) {
104
+ validateConcurrency(newConcurrency);
105
+ concurrency = newConcurrency;
106
+ queueMicrotask(() => {
107
+ while (activeCount < concurrency && queue.size > 0) resumeNext();
108
+ });
109
+ }
110
+ },
111
+ map: { async value(array, fn) {
112
+ const promises = array.map((value, index) => this(fn, value, index));
113
+ return Promise.all(promises);
114
+ } },
115
+ onIdle: {
116
+ /**
117
+ * Resolves when `activeCount === 0` and the queue is empty.
118
+ * Use this to wait for completion without holding a list of Promises.
119
+ */
120
+ value() {
121
+ if (activeCount === 0 && queue.size === 0) return Promise.resolve();
122
+ return new Promise((resolve) => idleWaiters.push(resolve));
123
+ } }
124
+ });
125
+ return generator;
126
+ };
127
+ const validateConcurrency = (concurrency) => {
128
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
129
+ };
130
+
131
+ //#endregion
132
+ exports.Queue = Queue;
133
+ exports.pLimit = pLimit;
134
+ //# sourceMappingURL=pLimit.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pLimit.cjs","names":["#head","#tail","#size"],"sources":["../../../src/utils/pLimit.ts"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node<T> {\n value: T;\n next: Node<T> | undefined;\n\n constructor(value: T) {\n this.value = value;\n }\n}\n\nexport class Queue<T> {\n #head: Node<T> | undefined;\n #tail: Node<T> | undefined;\n #size!: number;\n\n constructor() {\n this.clear();\n }\n\n enqueue(value: T): void {\n const node = new Node(value);\n\n if (this.#head) {\n this.#tail!.next = node;\n this.#tail = node;\n } else {\n this.#head = node;\n this.#tail = node;\n }\n\n this.#size++;\n }\n\n dequeue(): T | undefined {\n const current = this.#head;\n if (!current) {\n return;\n }\n\n this.#head = current.next;\n this.#size--;\n return current.value;\n }\n\n peek(): T | undefined {\n if (!this.#head) {\n return;\n }\n\n return this.#head.value;\n\n // TODO: Node.js 18.\n // return this.#head?.value;\n }\n\n clear(): void {\n this.#head = undefined;\n this.#tail = undefined;\n this.#size = 0;\n }\n\n get size(): number {\n return this.#size;\n }\n\n *[Symbol.iterator](): Generator<T, void, unknown> {\n let current = this.#head;\n\n while (current) {\n yield current.value;\n current = current.next;\n }\n }\n\n *drain(): Generator<T | undefined, void, unknown> {\n while (this.#head) {\n yield this.dequeue();\n }\n }\n}\n\nexport const pLimit = (concurrency: number) => {\n validateConcurrency(concurrency);\n\n const queue = new Queue<() => void>();\n let activeCount = 0;\n\n const idleWaiters: Array<() => void> = [];\n const notifyIdleIfNeeded = (): void => {\n if (activeCount === 0 && queue.size === 0) {\n while (idleWaiters.length) idleWaiters.pop()?.();\n }\n };\n\n const resumeNext = (): void => {\n // Process the next queued function if we're under the concurrency limit\n if (activeCount < concurrency && queue.size > 0) {\n activeCount++;\n queue.dequeue()?.();\n }\n };\n\n const next = (): void => {\n activeCount--;\n resumeNext();\n };\n\n const run = async (\n fn: (...args: any[]) => Promise<any>,\n resolve: (value: Promise<any>) => void,\n arguments_: any[]\n ): Promise<void> => {\n // Execute the function and capture the result promise\n const result = (async () => fn(...arguments_))();\n\n // Resolve immediately with the promise (don't wait for completion)\n resolve(result);\n\n // Wait for the function to complete (success or failure)\n // We catch errors here to prevent unhandled rejections,\n // but the original promise rejection is preserved for the caller\n try {\n await result;\n } catch {}\n\n // Decrement active count and process next queued function\n next();\n };\n\n const enqueue = (\n fn: (...args: any[]) => Promise<any>,\n resolve: (value: Promise<any>) => void,\n arguments_: any[]\n ): void => {\n // Queue the internal resolve function instead of the run function\n // to preserve the asynchronous execution context.\n new Promise<void>((internalResolve) => {\n queue.enqueue(internalResolve);\n }).then(run.bind(undefined, fn, resolve, arguments_));\n\n // Start processing immediately if we haven't reached the concurrency limit\n if (activeCount < concurrency) {\n resumeNext();\n }\n };\n\n const generator = (\n fn: (...args: any[]) => Promise<any>,\n ...arguments_: any[]\n ): Promise<any> =>\n new Promise<any>((resolve) => {\n enqueue(fn, resolve, arguments_);\n });\n\n Object.defineProperties(generator, {\n activeCount: {\n get: () => activeCount,\n },\n pendingCount: {\n get: () => queue.size,\n },\n clearQueue: {\n value() {\n queue.clear();\n notifyIdleIfNeeded();\n },\n },\n concurrency: {\n get: () => concurrency,\n\n set(newConcurrency: number) {\n validateConcurrency(newConcurrency);\n concurrency = newConcurrency;\n\n queueMicrotask(() => {\n while (activeCount < concurrency && queue.size > 0) {\n resumeNext();\n }\n });\n },\n },\n map: {\n async value<T, R>(\n array: T[],\n fn: (value: T, index: number) => Promise<R>\n ): Promise<R[]> {\n const promises = array.map((value, index) => this(fn, value, index));\n return Promise.all(promises);\n },\n },\n onIdle: {\n /**\n * Resolves when `activeCount === 0` and the queue is empty.\n * Use this to wait for completion without holding a list of Promises.\n */\n value(): Promise<void> {\n if (activeCount === 0 && queue.size === 0) return Promise.resolve();\n return new Promise<void>((resolve) => idleWaiters.push(resolve));\n },\n },\n });\n\n return generator;\n};\n\nconst validateConcurrency = (concurrency: number): void => {\n if (\n !(\n (Number.isInteger(concurrency) ||\n concurrency === Number.POSITIVE_INFINITY) &&\n concurrency > 0\n )\n ) {\n throw new TypeError('Expected `concurrency` to be a number from 1 and up');\n }\n};\n"],"mappings":";;;AAKA,IAAM,OAAN,MAAc;CACZ;CACA;CAEA,YAAY,OAAU;AACpB,OAAK,QAAQ;;;AAIjB,IAAa,QAAb,MAAsB;CACpB;CACA;CACA;CAEA,cAAc;AACZ,OAAK,OAAO;;CAGd,QAAQ,OAAgB;EACtB,MAAM,OAAO,IAAI,KAAK,MAAM;AAE5B,MAAI,MAAKA,MAAO;AACd,SAAKC,KAAO,OAAO;AACnB,SAAKA,OAAQ;SACR;AACL,SAAKD,OAAQ;AACb,SAAKC,OAAQ;;AAGf,QAAKC;;CAGP,UAAyB;EACvB,MAAM,UAAU,MAAKF;AACrB,MAAI,CAAC,QACH;AAGF,QAAKA,OAAQ,QAAQ;AACrB,QAAKE;AACL,SAAO,QAAQ;;CAGjB,OAAsB;AACpB,MAAI,CAAC,MAAKF,KACR;AAGF,SAAO,MAAKA,KAAM;;CAMpB,QAAc;AACZ,QAAKA,OAAQ;AACb,QAAKC,OAAQ;AACb,QAAKC,OAAQ;;CAGf,IAAI,OAAe;AACjB,SAAO,MAAKA;;CAGd,EAAE,OAAO,YAAyC;EAChD,IAAI,UAAU,MAAKF;AAEnB,SAAO,SAAS;AACd,SAAM,QAAQ;AACd,aAAU,QAAQ;;;CAItB,CAAC,QAAiD;AAChD,SAAO,MAAKA,KACV,OAAM,KAAK,SAAS;;;AAK1B,MAAa,UAAU,gBAAwB;AAC7C,qBAAoB,YAAY;CAEhC,MAAM,QAAQ,IAAI,OAAmB;CACrC,IAAI,cAAc;CAElB,MAAM,cAAiC,EAAE;CACzC,MAAM,2BAAiC;AACrC,MAAI,gBAAgB,KAAK,MAAM,SAAS,EACtC,QAAO,YAAY,OAAQ,aAAY,KAAK,IAAI;;CAIpD,MAAM,mBAAyB;AAE7B,MAAI,cAAc,eAAe,MAAM,OAAO,GAAG;AAC/C;AACA,SAAM,SAAS,IAAI;;;CAIvB,MAAM,aAAmB;AACvB;AACA,cAAY;;CAGd,MAAM,MAAM,OACV,IACA,SACA,eACkB;EAElB,MAAM,UAAU,YAAY,GAAG,GAAG,WAAW,GAAG;AAGhD,UAAQ,OAAO;AAKf,MAAI;AACF,SAAM;UACA;AAGR,QAAM;;CAGR,MAAM,WACJ,IACA,SACA,eACS;AAGT,MAAI,SAAe,oBAAoB;AACrC,SAAM,QAAQ,gBAAgB;IAC9B,CAAC,KAAK,IAAI,KAAK,QAAW,IAAI,SAAS,WAAW,CAAC;AAGrD,MAAI,cAAc,YAChB,aAAY;;CAIhB,MAAM,aACJ,IACA,GAAG,eAEH,IAAI,SAAc,YAAY;AAC5B,UAAQ,IAAI,SAAS,WAAW;GAChC;AAEJ,QAAO,iBAAiB,WAAW;EACjC,aAAa,EACX,WAAW,aACZ;EACD,cAAc,EACZ,WAAW,MAAM,MAClB;EACD,YAAY,EACV,QAAQ;AACN,SAAM,OAAO;AACb,uBAAoB;KAEvB;EACD,aAAa;GACX,WAAW;GAEX,IAAI,gBAAwB;AAC1B,wBAAoB,eAAe;AACnC,kBAAc;AAEd,yBAAqB;AACnB,YAAO,cAAc,eAAe,MAAM,OAAO,EAC/C,aAAY;MAEd;;GAEL;EACD,KAAK,EACH,MAAM,MACJ,OACA,IACc;GACd,MAAM,WAAW,MAAM,KAAK,OAAO,UAAU,KAAK,IAAI,OAAO,MAAM,CAAC;AACpE,UAAO,QAAQ,IAAI,SAAS;KAE/B;EACD,QAAQ;;;;;AAKN,QAAuB;AACrB,OAAI,gBAAgB,KAAK,MAAM,SAAS,EAAG,QAAO,QAAQ,SAAS;AACnE,UAAO,IAAI,SAAe,YAAY,YAAY,KAAK,QAAQ,CAAC;KAEnE;EACF,CAAC;AAEF,QAAO;;AAGT,MAAM,uBAAuB,gBAA8B;AACzD,KACE,GACG,OAAO,UAAU,YAAY,IAC5B,gBAAgB,OAAO,sBACzB,cAAc,GAGhB,OAAM,IAAI,UAAU,sDAAsD"}
@@ -0,0 +1,12 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_utils_pLimit = require('./pLimit.cjs');
3
+
4
+ //#region src/utils/parallelize.ts
5
+ const parallelize = async (items, callback = async (item) => item, parallelLimit = 10) => {
6
+ const limit = require_utils_pLimit.pLimit(parallelLimit);
7
+ return Promise.all(items.map((item) => limit(() => callback(item))));
8
+ };
9
+
10
+ //#endregion
11
+ exports.parallelize = parallelize;
12
+ //# sourceMappingURL=parallelize.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallelize.cjs","names":["pLimit"],"sources":["../../../src/utils/parallelize.ts"],"sourcesContent":["import { pLimit } from './pLimit';\n\nexport const parallelize = async <T, R>(\n items: T[],\n callback: (item: T) => Promise<R> = async (item) =>\n item as unknown as Promise<R>,\n parallelLimit: number = 10\n): Promise<R[]> => {\n const limit = pLimit(parallelLimit);\n return Promise.all(items.map((item) => limit(() => callback(item))));\n};\n"],"mappings":";;;;AAEA,MAAa,cAAc,OACzB,OACA,WAAoC,OAAO,SACzC,MACF,gBAAwB,OACP;CACjB,MAAM,QAAQA,4BAAO,cAAc;AACnC,QAAO,QAAQ,IAAI,MAAM,KAAK,SAAS,YAAY,SAAS,KAAK,CAAC,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_utils_pLimit = require('./pLimit.cjs');
3
+
4
+ //#region src/utils/parallelizeGlobal.ts
5
+ let _globalLimiter = null;
6
+ /** Get (and optionally configure) the single, shared limiter. */
7
+ const getGlobalLimiter = (concurrency) => {
8
+ if (!_globalLimiter) _globalLimiter = require_utils_pLimit.pLimit(concurrency ?? 10);
9
+ else if (typeof concurrency === "number") _globalLimiter.concurrency = concurrency;
10
+ return _globalLimiter;
11
+ };
12
+ let _taskLimiter = null;
13
+ /** Limits how many *tasks* run concurrently (independent from AI calls). */
14
+ const getTaskLimiter = (concurrency) => {
15
+ if (!_taskLimiter) _taskLimiter = require_utils_pLimit.pLimit(concurrency ?? 5);
16
+ else if (typeof concurrency === "number") _taskLimiter.concurrency = concurrency;
17
+ return _taskLimiter;
18
+ };
19
+ const parallelizeGlobal = async (items, callback = async (item) => item, options) => {
20
+ const limiter = options?.limiter ?? getGlobalLimiter(options?.concurrency);
21
+ const run = options?.wrapInLimiter ?? true ? (fn) => limiter(fn) : (fn) => fn();
22
+ const promises = items.map((item, index) => run(() => callback(item, index)));
23
+ return Promise.all(promises);
24
+ };
25
+
26
+ //#endregion
27
+ exports.getGlobalLimiter = getGlobalLimiter;
28
+ exports.getTaskLimiter = getTaskLimiter;
29
+ exports.parallelizeGlobal = parallelizeGlobal;
30
+ //# sourceMappingURL=parallelizeGlobal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallelizeGlobal.cjs","names":["pLimit"],"sources":["../../../src/utils/parallelizeGlobal.ts"],"sourcesContent":["// === keep your Queue, Node, pLimit, validateConcurrency exactly as-is ===\n\nimport { pLimit } from './pLimit';\n\n// --- NEW: single, shared limiter for the whole process ---\nlet _globalLimiter: ReturnType<typeof pLimit> | null = null;\n\n/** Get (and optionally configure) the single, shared limiter. */\nexport const getGlobalLimiter = (concurrency?: number) => {\n if (!_globalLimiter) {\n _globalLimiter = pLimit(concurrency ?? 10);\n } else if (typeof concurrency === 'number') {\n (_globalLimiter as any).concurrency = concurrency;\n }\n return _globalLimiter!;\n};\n\n// --- NEW: task limiter for gating task starts ---\nlet _taskLimiter: ReturnType<typeof pLimit> | null = null;\n\n/** Limits how many *tasks* run concurrently (independent from AI calls). */\nexport const getTaskLimiter = (concurrency?: number) => {\n if (!_taskLimiter) {\n _taskLimiter = pLimit(concurrency ?? 5);\n } else if (typeof concurrency === 'number') {\n (_taskLimiter as any).concurrency = concurrency;\n }\n return _taskLimiter!;\n};\n\n// --- REPLACE your existing `parallelize` with this version ---\nexport const parallelizeGlobal = async <T, R>(\n items: T[],\n callback: (item: T, index: number) => Promise<R> = async (item) =>\n item as unknown as Promise<R>,\n options?: {\n /** Share a single limiter across the app. If omitted, uses global limiter. */\n limiter?: ReturnType<typeof pLimit>;\n /** If provided and no limiter is passed, configure the global limiter. */\n concurrency?: number;\n /**\n * Whether to wrap *each* callback run in the limiter.\n * - For orchestration (outer loops): set `false` (don't burn limiter slots).\n * - For atomic work (AI calls, writes): leave `true` (default).\n */\n wrapInLimiter?: boolean;\n }\n): Promise<R[]> => {\n const limiter = options?.limiter ?? getGlobalLimiter(options?.concurrency);\n const wrap = options?.wrapInLimiter ?? true;\n\n const run = wrap\n ? <U>(fn: () => Promise<U>) => limiter(fn)\n : <U>(fn: () => Promise<U>) => fn();\n\n const promises = items.map((item, index) => run(() => callback(item, index)));\n return Promise.all(promises);\n};\n"],"mappings":";;;;AAKA,IAAI,iBAAmD;;AAGvD,MAAa,oBAAoB,gBAAyB;AACxD,KAAI,CAAC,eACH,kBAAiBA,4BAAO,eAAe,GAAG;UACjC,OAAO,gBAAgB,SAChC,CAAC,eAAuB,cAAc;AAExC,QAAO;;AAIT,IAAI,eAAiD;;AAGrD,MAAa,kBAAkB,gBAAyB;AACtD,KAAI,CAAC,aACH,gBAAeA,4BAAO,eAAe,EAAE;UAC9B,OAAO,gBAAgB,SAChC,CAAC,aAAqB,cAAc;AAEtC,QAAO;;AAIT,MAAa,oBAAoB,OAC/B,OACA,WAAmD,OAAO,SACxD,MACF,YAYiB;CACjB,MAAM,UAAU,SAAS,WAAW,iBAAiB,SAAS,YAAY;CAG1E,MAAM,MAFO,SAAS,iBAAiB,QAG/B,OAAyB,QAAQ,GAAG,IACpC,OAAyB,IAAI;CAErC,MAAM,WAAW,MAAM,KAAK,MAAM,UAAU,UAAU,SAAS,MAAM,MAAM,CAAC,CAAC;AAC7E,QAAO,QAAQ,IAAI,SAAS"}
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_path = require("node:path");
4
+ let node_fs = require("node:fs");
5
+
6
+ //#region src/utils/readDictionariesFromDisk.ts
7
+ /**
8
+ * Reads all JSON dictionary files from a directory, keyed by filename.
9
+ * Uses readFileSync instead of require() to avoid require.cache memory leak.
10
+ */
11
+ const readDictionariesFromDisk = (directory) => {
12
+ const dictionaries = {};
13
+ if ((0, node_fs.existsSync)(directory)) {
14
+ const files = (0, node_fs.readdirSync)(directory).filter((file) => file.endsWith(".json"));
15
+ for (const file of files) {
16
+ const key = (0, node_path.basename)(file, (0, node_path.extname)(file));
17
+ dictionaries[key] = JSON.parse((0, node_fs.readFileSync)((0, node_path.join)(directory, file), "utf-8"));
18
+ }
19
+ }
20
+ return dictionaries;
21
+ };
22
+
23
+ //#endregion
24
+ exports.readDictionariesFromDisk = readDictionariesFromDisk;
25
+ //# sourceMappingURL=readDictionariesFromDisk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readDictionariesFromDisk.cjs","names":[],"sources":["../../../src/utils/readDictionariesFromDisk.ts"],"sourcesContent":["import { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\n\n/**\n * Reads all JSON dictionary files from a directory, keyed by filename.\n * Uses readFileSync instead of require() to avoid require.cache memory leak.\n */\nexport const readDictionariesFromDisk = <T = Record<string, any>>(\n directory: string\n): T => {\n const dictionaries: Record<string, any> = {};\n\n if (existsSync(directory)) {\n const files = readdirSync(directory).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n dictionaries[key] = JSON.parse(\n readFileSync(join(directory, file), 'utf-8')\n );\n }\n }\n\n return dictionaries as T;\n};\n"],"mappings":";;;;;;;;;;AAOA,MAAa,4BACX,cACM;CACN,MAAM,eAAoC,EAAE;AAE5C,6BAAe,UAAU,EAAE;EACzB,MAAM,iCAAoB,UAAU,CAAC,QAAQ,SAC3C,KAAK,SAAS,QAAQ,CACvB;AAED,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,8BAAe,6BAAc,KAAK,CAAC;AACzC,gBAAa,OAAO,KAAK,oDACL,WAAW,KAAK,EAAE,QAAQ,CAC7C;;;AAIL,QAAO"}
@@ -0,0 +1,70 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/reduceObjectFormat.ts
4
+ /**
5
+ * Reduce an object to only the shape provided by a format object.
6
+ * Values are always taken from the source object; the format is used only for structure.
7
+ *
8
+ * Examples:
9
+ * reduceObjectFormat({ a: 1, b: 2 }, { a: 0 }) => { a: 1 }
10
+ * reduceObjectFormat({ a: { x: 1, y: 2 } }, { a: { x: 0 } }) => { a: { x: 1 } }
11
+ */
12
+ const reduceObjectFormat = (source, format) => {
13
+ if (Array.isArray(format)) {
14
+ const sourceArray = Array.isArray(source) ? source : [];
15
+ return format.map((formatItem, index) => reduceObjectFormat(sourceArray[index], formatItem));
16
+ }
17
+ if (typeof format === "object" && format !== null) {
18
+ const result = {};
19
+ const sourceObject = typeof source === "object" && source !== null && !Array.isArray(source) ? source : {};
20
+ for (const key of Object.keys(format)) {
21
+ const nextSource = sourceObject[key];
22
+ const nextFormat = format[key];
23
+ result[key] = reduceObjectFormat(nextSource, nextFormat);
24
+ }
25
+ return result;
26
+ }
27
+ return source;
28
+ };
29
+ /**
30
+ * Returns the subset of source whose keys are NOT present in the format object.
31
+ * Inverse of reduceObjectFormat.
32
+ *
33
+ * Null values in source are always included as explicit fallback markers
34
+ * (they signal "use default locale" at render time).
35
+ *
36
+ * Examples:
37
+ * excludeObjectFormat({ a: 1, b: 2 }, { b: 0 }) => { a: 1 }
38
+ * excludeObjectFormat({ a: { x: 1, y: 2 } }, { a: { x: 0 } }) => { a: { y: 2 } }
39
+ * excludeObjectFormat({ a: null, b: 2 }, { b: 0 }) => { a: null }
40
+ */
41
+ const excludeObjectFormat = (source, format) => {
42
+ if (source === null) return null;
43
+ if (format === void 0 || format === null) return source;
44
+ if (typeof source === "object" && !Array.isArray(source) && typeof format === "object" && !Array.isArray(format)) {
45
+ const result = {};
46
+ let hasContent = false;
47
+ for (const key of Object.keys(source)) {
48
+ const excluded = excludeObjectFormat(source[key], format[key]);
49
+ if (excluded !== void 0) {
50
+ result[key] = excluded;
51
+ hasContent = true;
52
+ }
53
+ }
54
+ return hasContent ? result : void 0;
55
+ }
56
+ if (Array.isArray(source)) {
57
+ const formatArr = Array.isArray(format) ? format : [];
58
+ const result = [];
59
+ for (let i = 0; i < source.length; i++) {
60
+ const excluded = excludeObjectFormat(source[i], formatArr[i]);
61
+ if (excluded !== void 0) result.push(excluded);
62
+ }
63
+ return result.length > 0 ? result : void 0;
64
+ }
65
+ };
66
+
67
+ //#endregion
68
+ exports.excludeObjectFormat = excludeObjectFormat;
69
+ exports.reduceObjectFormat = reduceObjectFormat;
70
+ //# sourceMappingURL=reduceObjectFormat.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduceObjectFormat.cjs","names":[],"sources":["../../../src/utils/reduceObjectFormat.ts"],"sourcesContent":["export type Primitive = string | number | boolean | null | undefined;\n\nexport type Recursive =\n | Primitive\n | { [key: string]: Recursive }\n | Array<Recursive>;\n\n/**\n * Reduce an object to only the shape provided by a format object.\n * Values are always taken from the source object; the format is used only for structure.\n *\n * Examples:\n * reduceObjectFormat({ a: 1, b: 2 }, { a: 0 }) => { a: 1 }\n * reduceObjectFormat({ a: { x: 1, y: 2 } }, { a: { x: 0 } }) => { a: { x: 1 } }\n */\nexport const reduceObjectFormat = (\n source: Recursive,\n format: Recursive\n): Recursive => {\n // If the format is an array, reduce each element by its counterpart in source\n if (Array.isArray(format)) {\n const sourceArray = Array.isArray(source) ? source : [];\n return format.map((formatItem, index) =>\n reduceObjectFormat(sourceArray[index], formatItem)\n );\n }\n\n // If the format is an object (and not null), pick matching keys and recurse\n if (typeof format === 'object' && format !== null) {\n const result: Record<string, Recursive> = {};\n const sourceObject =\n typeof source === 'object' && source !== null && !Array.isArray(source)\n ? (source as Record<string, Recursive>)\n : ({} as Record<string, Recursive>);\n\n for (const key of Object.keys(format)) {\n const nextSource = sourceObject[key];\n const nextFormat = (format as Record<string, Recursive>)[key];\n result[key] = reduceObjectFormat(nextSource, nextFormat);\n }\n return result;\n }\n\n // For primitives in the format, simply return the source value (can be undefined)\n return source as Primitive;\n};\n\n/**\n * Returns the subset of source whose keys are NOT present in the format object.\n * Inverse of reduceObjectFormat.\n *\n * Null values in source are always included as explicit fallback markers\n * (they signal \"use default locale\" at render time).\n *\n * Examples:\n * excludeObjectFormat({ a: 1, b: 2 }, { b: 0 }) => { a: 1 }\n * excludeObjectFormat({ a: { x: 1, y: 2 } }, { a: { x: 0 } }) => { a: { y: 2 } }\n * excludeObjectFormat({ a: null, b: 2 }, { b: 0 }) => { a: null }\n */\nexport const excludeObjectFormat = (\n source: Recursive,\n format: Recursive\n): Recursive | undefined => {\n // null in source = explicit fallback marker → always include\n if (source === null) return null;\n\n // No format means nothing is translated yet → include all source\n if (format === undefined || format === null) return source;\n\n // Both plain objects → recurse key-by-key\n if (\n typeof source === 'object' &&\n !Array.isArray(source) &&\n typeof format === 'object' &&\n !Array.isArray(format)\n ) {\n const result: Record<string, Recursive> = {};\n let hasContent = false;\n\n for (const key of Object.keys(source as Record<string, Recursive>)) {\n const excluded = excludeObjectFormat(\n (source as Record<string, Recursive>)[key],\n (format as Record<string, Recursive>)[key]\n );\n if (excluded !== undefined) {\n result[key] = excluded;\n hasContent = true;\n }\n }\n\n return hasContent ? result : undefined;\n }\n\n // Arrays → recurse by index\n if (Array.isArray(source)) {\n const formatArr = Array.isArray(format) ? format : [];\n const result: Recursive[] = [];\n\n for (let i = 0; i < source.length; i++) {\n const excluded = excludeObjectFormat(source[i], formatArr[i]);\n if (excluded !== undefined) {\n result.push(excluded);\n }\n }\n\n return result.length > 0 ? result : undefined;\n }\n\n // Primitive in source and format has a value → already translated → exclude\n return undefined;\n};\n"],"mappings":";;;;;;;;;;;AAeA,MAAa,sBACX,QACA,WACc;AAEd,KAAI,MAAM,QAAQ,OAAO,EAAE;EACzB,MAAM,cAAc,MAAM,QAAQ,OAAO,GAAG,SAAS,EAAE;AACvD,SAAO,OAAO,KAAK,YAAY,UAC7B,mBAAmB,YAAY,QAAQ,WAAW,CACnD;;AAIH,KAAI,OAAO,WAAW,YAAY,WAAW,MAAM;EACjD,MAAM,SAAoC,EAAE;EAC5C,MAAM,eACJ,OAAO,WAAW,YAAY,WAAW,QAAQ,CAAC,MAAM,QAAQ,OAAO,GAClE,SACA,EAAE;AAET,OAAK,MAAM,OAAO,OAAO,KAAK,OAAO,EAAE;GACrC,MAAM,aAAa,aAAa;GAChC,MAAM,aAAc,OAAqC;AACzD,UAAO,OAAO,mBAAmB,YAAY,WAAW;;AAE1D,SAAO;;AAIT,QAAO;;;;;;;;;;;;;;AAeT,MAAa,uBACX,QACA,WAC0B;AAE1B,KAAI,WAAW,KAAM,QAAO;AAG5B,KAAI,WAAW,UAAa,WAAW,KAAM,QAAO;AAGpD,KACE,OAAO,WAAW,YAClB,CAAC,MAAM,QAAQ,OAAO,IACtB,OAAO,WAAW,YAClB,CAAC,MAAM,QAAQ,OAAO,EACtB;EACA,MAAM,SAAoC,EAAE;EAC5C,IAAI,aAAa;AAEjB,OAAK,MAAM,OAAO,OAAO,KAAK,OAAoC,EAAE;GAClE,MAAM,WAAW,oBACd,OAAqC,MACrC,OAAqC,KACvC;AACD,OAAI,aAAa,QAAW;AAC1B,WAAO,OAAO;AACd,iBAAa;;;AAIjB,SAAO,aAAa,SAAS;;AAI/B,KAAI,MAAM,QAAQ,OAAO,EAAE;EACzB,MAAM,YAAY,MAAM,QAAQ,OAAO,GAAG,SAAS,EAAE;EACrD,MAAM,SAAsB,EAAE;AAE9B,OAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;GACtC,MAAM,WAAW,oBAAoB,OAAO,IAAI,UAAU,GAAG;AAC7D,OAAI,aAAa,OACf,QAAO,KAAK,SAAS;;AAIzB,SAAO,OAAO,SAAS,IAAI,SAAS"}
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/utils/resolveObjectPromises.ts
4
+ /**
5
+ * A more "unified" approach where each type (function, array, object, primitive)
6
+ * is handled inside the main recursive body.
7
+ */
8
+ const resolveObjectPromises = async (entry) => {
9
+ if (entry && typeof entry.then === "function") return resolveObjectPromises(await entry);
10
+ if (typeof entry === "function") return resolveObjectPromises(entry());
11
+ if (Array.isArray(entry)) return Promise.all(entry.map(async (item) => resolveObjectPromises(item)));
12
+ if (entry && typeof entry === "object") {
13
+ const result = {};
14
+ for (const key of Object.keys(entry)) result[key] = await resolveObjectPromises(entry[key]);
15
+ return result;
16
+ }
17
+ return entry;
18
+ };
19
+
20
+ //#endregion
21
+ exports.resolveObjectPromises = resolveObjectPromises;
22
+ //# sourceMappingURL=resolveObjectPromises.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveObjectPromises.cjs","names":[],"sources":["../../../src/utils/resolveObjectPromises.ts"],"sourcesContent":["/**\n * A more \"unified\" approach where each type (function, array, object, primitive)\n * is handled inside the main recursive body.\n */\nexport const resolveObjectPromises = async <T = unknown>(\n entry: any\n): Promise<T> => {\n // Check if entry is a Promise (Thenable)\n if (entry && typeof entry.then === 'function') {\n const awaited = await entry;\n return resolveObjectPromises(awaited);\n }\n\n // If entry is a function, invoke it and process the result\n if (typeof entry === 'function') {\n const result = entry();\n return resolveObjectPromises(result);\n }\n\n if (Array.isArray(entry)) {\n return Promise.all(\n entry.map(async (item) => resolveObjectPromises(item))\n ) as unknown as T;\n }\n\n // Handle plain objects (but not arrays)\n if (entry && typeof entry === 'object') {\n // Arrays are handled in the `Array.isArray` branch above, so we know `entry` is a plain object here.\n\n const result: Record<string, any> = {};\n\n // Iterate over keys **sequentially** to make sure the insertion order of the\n // resulting object matches the original key order. Using `Promise.all` here\n // could lead to out-of-order insertions when asynchronous resolutions\n // finish at different times.\n for (const key of Object.keys(entry)) {\n result[key] = await resolveObjectPromises(entry[key]);\n }\n\n return result as T;\n }\n\n return entry as T;\n};\n"],"mappings":";;;;;;;AAIA,MAAa,wBAAwB,OACnC,UACe;AAEf,KAAI,SAAS,OAAO,MAAM,SAAS,WAEjC,QAAO,sBAAsB,MADP,MACe;AAIvC,KAAI,OAAO,UAAU,WAEnB,QAAO,sBADQ,OACoB,CAAC;AAGtC,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,QAAQ,IACb,MAAM,IAAI,OAAO,SAAS,sBAAsB,KAAK,CAAC,CACvD;AAIH,KAAI,SAAS,OAAO,UAAU,UAAU;EAGtC,MAAM,SAA8B,EAAE;AAMtC,OAAK,MAAM,OAAO,OAAO,KAAK,MAAM,CAClC,QAAO,OAAO,MAAM,sBAAsB,MAAM,KAAK;AAGvD,SAAO;;AAGT,QAAO"}
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_path = require("node:path");
4
+
5
+ //#region src/utils/resolveRelativePath.ts
6
+ const resolveRelativePath = (path, sourcePath, baseDir) => {
7
+ if ((0, node_path.isAbsolute)(path)) {
8
+ const normalizedResult = (0, node_path.normalize)(path);
9
+ const normalizedBaseDir = (0, node_path.normalize)(baseDir);
10
+ if (path.startsWith("/") && !normalizedResult.startsWith(normalizedBaseDir)) {
11
+ const relativeToBase = (0, node_path.resolve)(baseDir, path.substring(1));
12
+ if (!path.startsWith("/usr/") && !path.startsWith("/etc/") && !path.startsWith("/var/") && !path.startsWith("/home/") && !path.startsWith("/Users/") && !path.startsWith("/tmp/") && !path.startsWith("/private/") && !path.startsWith("/opt/")) return relativeToBase;
13
+ }
14
+ return normalizedResult;
15
+ }
16
+ if (path.startsWith("./") || path.startsWith("../")) return (0, node_path.resolve)((0, node_path.dirname)(sourcePath), path);
17
+ return (0, node_path.resolve)(baseDir, path);
18
+ };
19
+
20
+ //#endregion
21
+ exports.resolveRelativePath = resolveRelativePath;
22
+ //# sourceMappingURL=resolveRelativePath.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRelativePath.cjs","names":[],"sources":["../../../src/utils/resolveRelativePath.ts"],"sourcesContent":["import { dirname, isAbsolute, normalize, resolve } from 'node:path';\n\nexport const resolveRelativePath = (\n path: string,\n sourcePath: string,\n baseDir: string\n) => {\n // Handle absolute paths\n if (isAbsolute(path)) {\n const normalizedResult = normalize(path);\n const normalizedBaseDir = normalize(baseDir);\n\n // Check if it's relative to baseDir (starts with /)\n // but not a system path (like /usr/local)\n if (\n path.startsWith('/') &&\n !normalizedResult.startsWith(normalizedBaseDir)\n ) {\n // Try to resolve it relative to baseDir first\n const relativeToBase = resolve(baseDir, path.substring(1));\n\n // If the path doesn't exist in common system directories, treat as relative to baseDir\n if (\n !path.startsWith('/usr/') &&\n !path.startsWith('/etc/') &&\n !path.startsWith('/var/') &&\n !path.startsWith('/home/') &&\n !path.startsWith('/Users/') &&\n !path.startsWith('/tmp/') &&\n !path.startsWith('/private/') &&\n !path.startsWith('/opt/')\n ) {\n return relativeToBase;\n }\n }\n\n // It's a true system absolute path\n return normalizedResult;\n }\n\n // Handle relative paths (starting with ./ or ../)\n if (path.startsWith('./') || path.startsWith('../')) {\n const fileDir = dirname(sourcePath);\n return resolve(fileDir, path);\n }\n\n // Default case: treat as relative to baseDir\n return resolve(baseDir, path);\n};\n"],"mappings":";;;;;AAEA,MAAa,uBACX,MACA,YACA,YACG;AAEH,+BAAe,KAAK,EAAE;EACpB,MAAM,4CAA6B,KAAK;EACxC,MAAM,6CAA8B,QAAQ;AAI5C,MACE,KAAK,WAAW,IAAI,IACpB,CAAC,iBAAiB,WAAW,kBAAkB,EAC/C;GAEA,MAAM,wCAAyB,SAAS,KAAK,UAAU,EAAE,CAAC;AAG1D,OACE,CAAC,KAAK,WAAW,QAAQ,IACzB,CAAC,KAAK,WAAW,QAAQ,IACzB,CAAC,KAAK,WAAW,QAAQ,IACzB,CAAC,KAAK,WAAW,SAAS,IAC1B,CAAC,KAAK,WAAW,UAAU,IAC3B,CAAC,KAAK,WAAW,QAAQ,IACzB,CAAC,KAAK,WAAW,YAAY,IAC7B,CAAC,KAAK,WAAW,QAAQ,CAEzB,QAAO;;AAKX,SAAO;;AAIT,KAAI,KAAK,WAAW,KAAK,IAAI,KAAK,WAAW,MAAM,CAEjD,sDADwB,WACF,EAAE,KAAK;AAI/B,+BAAe,SAAS,KAAK"}
@@ -0,0 +1,96 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs_promises = require("node:fs/promises");
4
+ let node_path = require("node:path");
5
+ let _intlayer_core_package_json = require("@intlayer/core/package.json");
6
+ _intlayer_core_package_json = require_runtime.__toESM(_intlayer_core_package_json);
7
+
8
+ //#region src/utils/runOnce.ts
9
+ const DEFAULT_RUN_ONCE_OPTIONS = { cacheTimeoutMs: 60 * 1e3 };
10
+ const writeSentinelFile = async (sentinelFilePath, currentTimestamp) => {
11
+ const data = {
12
+ version: _intlayer_core_package_json.default.version,
13
+ timestamp: currentTimestamp
14
+ };
15
+ try {
16
+ await (0, node_fs_promises.mkdir)((0, node_path.dirname)(sentinelFilePath), { recursive: true });
17
+ await (0, node_fs_promises.writeFile)(sentinelFilePath, JSON.stringify(data), { flag: "wx" });
18
+ } catch (err) {
19
+ if (err.code === "EEXIST") return;
20
+ if (err.code === "ENOENT") try {
21
+ await (0, node_fs_promises.mkdir)((0, node_path.dirname)(sentinelFilePath), { recursive: true });
22
+ await (0, node_fs_promises.writeFile)(sentinelFilePath, JSON.stringify(data), { flag: "wx" });
23
+ return;
24
+ } catch (retryErr) {
25
+ if (retryErr.code === "EEXIST") return;
26
+ }
27
+ throw err;
28
+ }
29
+ };
30
+ /**
31
+ * Ensures a callback function runs only once within a specified time window across multiple processes.
32
+ * Uses a sentinel file to coordinate execution and prevent duplicate work.
33
+ *
34
+ * @param sentinelFilePath - Path to the sentinel file used for coordination
35
+ * @param callback - The function to execute (should be async)
36
+ * @param options - The options for the runOnce function
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * await runPrepareIntlayerOnce(
41
+ * '/tmp/intlayer-sentinel',
42
+ * async () => {
43
+ * // Your initialization logic here
44
+ * await prepareIntlayer();
45
+ * },
46
+ * 30 * 1000 // 30 seconds cache
47
+ * );
48
+ * ```
49
+ *
50
+ * @throws {Error} When there are unexpected filesystem errors
51
+ */
52
+ const runOnce = async (sentinelFilePath, callback, options) => {
53
+ const { onIsCached, cacheTimeoutMs, forceRun } = {
54
+ ...DEFAULT_RUN_ONCE_OPTIONS,
55
+ ...options ?? {}
56
+ };
57
+ const currentTimestamp = Date.now();
58
+ try {
59
+ const sentinelAge = currentTimestamp - (await (0, node_fs_promises.stat)(sentinelFilePath)).mtime.getTime();
60
+ let shouldRebuild = Boolean(forceRun) || sentinelAge > cacheTimeoutMs;
61
+ if (!shouldRebuild) try {
62
+ const raw = await (0, node_fs_promises.readFile)(sentinelFilePath, "utf8");
63
+ let cachedVersion;
64
+ try {
65
+ cachedVersion = JSON.parse(raw).version;
66
+ } catch {
67
+ cachedVersion = void 0;
68
+ }
69
+ if (!cachedVersion || cachedVersion !== _intlayer_core_package_json.default.version) shouldRebuild = true;
70
+ } catch {
71
+ shouldRebuild = true;
72
+ }
73
+ if (shouldRebuild) try {
74
+ await (0, node_fs_promises.unlink)(sentinelFilePath);
75
+ } catch {}
76
+ else {
77
+ await onIsCached?.();
78
+ return;
79
+ }
80
+ } catch (err) {
81
+ if (err.code === "ENOENT") {} else throw err;
82
+ }
83
+ await writeSentinelFile(sentinelFilePath, currentTimestamp);
84
+ try {
85
+ await callback();
86
+ await writeSentinelFile(sentinelFilePath, currentTimestamp);
87
+ } catch {
88
+ try {
89
+ await (0, node_fs_promises.unlink)(sentinelFilePath);
90
+ } catch {}
91
+ }
92
+ };
93
+
94
+ //#endregion
95
+ exports.runOnce = runOnce;
96
+ //# sourceMappingURL=runOnce.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runOnce.cjs","names":["packageJson"],"sources":["../../../src/utils/runOnce.ts"],"sourcesContent":["import { mkdir, readFile, stat, unlink, writeFile } from 'node:fs/promises';\nimport { dirname } from 'node:path';\nimport packageJson from '@intlayer/core/package.json' with { type: 'json' };\n\ntype RunOnceOptions = {\n /**\n * The function to execute when the sentinel is not found or is older than the cache timeout.\n */\n onIsCached?: () => void | Promise<void>;\n /**\n * The time window in milliseconds during which the sentinel is considered valid.\n *\n * @default 60000 = 1 minute\n */\n cacheTimeoutMs?: number;\n /**\n * If true, the callback will always run. If undefined, the callback will run only if the sentinel is older than the cache timeout.\n *\n * @default false\n */\n forceRun?: boolean;\n};\n\nconst DEFAULT_RUN_ONCE_OPTIONS = {\n cacheTimeoutMs: 60 * 1000, // 1 minute in milliseconds,\n} satisfies RunOnceOptions;\n\ntype SentinelData = {\n version: string;\n timestamp: number;\n};\n\nconst writeSentinelFile = async (\n sentinelFilePath: string,\n currentTimestamp: number\n) => {\n // O_EXCL ensures only the *first* process can create the file\n const data: SentinelData = {\n version: packageJson.version,\n timestamp: currentTimestamp,\n };\n\n try {\n // Ensure the directory exists before writing the file\n await mkdir(dirname(sentinelFilePath), { recursive: true });\n\n await writeFile(sentinelFilePath, JSON.stringify(data), { flag: 'wx' });\n } catch (err: any) {\n if (err.code === 'EEXIST') {\n // Another process already created it → we're done\n return;\n }\n // Optimization: If ENOENT occurs on write despite mkdir (race condition with external deletion), retry once.\n if (err.code === 'ENOENT') {\n try {\n await mkdir(dirname(sentinelFilePath), { recursive: true });\n await writeFile(sentinelFilePath, JSON.stringify(data), { flag: 'wx' });\n return;\n } catch (retryErr: any) {\n if (retryErr.code === 'EEXIST') return;\n }\n }\n throw err; // unexpected FS error\n }\n};\n\n/**\n * Ensures a callback function runs only once within a specified time window across multiple processes.\n * Uses a sentinel file to coordinate execution and prevent duplicate work.\n *\n * @param sentinelFilePath - Path to the sentinel file used for coordination\n * @param callback - The function to execute (should be async)\n * @param options - The options for the runOnce function\n *\n * @example\n * ```typescript\n * await runPrepareIntlayerOnce(\n * '/tmp/intlayer-sentinel',\n * async () => {\n * // Your initialization logic here\n * await prepareIntlayer();\n * },\n * 30 * 1000 // 30 seconds cache\n * );\n * ```\n *\n * @throws {Error} When there are unexpected filesystem errors\n */\nexport const runOnce = async (\n sentinelFilePath: string,\n callback: () => void | Promise<void>,\n options?: RunOnceOptions\n) => {\n const { onIsCached, cacheTimeoutMs, forceRun } = {\n ...DEFAULT_RUN_ONCE_OPTIONS,\n ...(options ?? {}),\n };\n const currentTimestamp = Date.now();\n\n try {\n // Check if sentinel file exists and get its stats\n const sentinelStats = await stat(sentinelFilePath);\n const sentinelAge = currentTimestamp - sentinelStats.mtime.getTime();\n\n // Determine if we should rebuild based on cache age, force flag, or version mismatch\n let shouldRebuild = Boolean(forceRun) || sentinelAge > cacheTimeoutMs!;\n\n if (!shouldRebuild) {\n try {\n const raw = await readFile(sentinelFilePath, 'utf8');\n let cachedVersion: string | undefined;\n try {\n const parsed = JSON.parse(raw) as Partial<SentinelData>;\n cachedVersion = parsed.version;\n } catch {\n // Legacy format (timestamp only). Force a rebuild once to write versioned sentinel.\n cachedVersion = undefined;\n }\n\n if (!cachedVersion || cachedVersion !== packageJson.version) {\n shouldRebuild = true;\n }\n } catch {\n // If we cannot read the file, err on the safe side and rebuild\n shouldRebuild = true;\n }\n }\n\n if (shouldRebuild) {\n try {\n await unlink(sentinelFilePath);\n } catch {}\n // Fall through to create new sentinel and rebuild\n } else {\n await onIsCached?.();\n // Sentinel is recent and versions match, no need to rebuild\n return;\n }\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n // File doesn't exist, continue to create it\n } else {\n throw err; // unexpected FS error\n }\n }\n\n // Write sentinel file before to block parallel processes\n // Added await here\n await writeSentinelFile(sentinelFilePath, currentTimestamp);\n\n try {\n await callback();\n\n // Write sentinel file after to ensure the first one has not been removed with cleanOutputDir\n // Added await here\n await writeSentinelFile(sentinelFilePath, currentTimestamp);\n } catch {\n try {\n await unlink(sentinelFilePath); // Remove sentinel file if an error occurs\n } catch {}\n }\n};\n"],"mappings":";;;;;;;;AAuBA,MAAM,2BAA2B,EAC/B,gBAAgB,KAAK,KACtB;AAOD,MAAM,oBAAoB,OACxB,kBACA,qBACG;CAEH,MAAM,OAAqB;EACzB,SAASA,oCAAY;EACrB,WAAW;EACZ;AAED,KAAI;AAEF,2DAAoB,iBAAiB,EAAE,EAAE,WAAW,MAAM,CAAC;AAE3D,wCAAgB,kBAAkB,KAAK,UAAU,KAAK,EAAE,EAAE,MAAM,MAAM,CAAC;UAChE,KAAU;AACjB,MAAI,IAAI,SAAS,SAEf;AAGF,MAAI,IAAI,SAAS,SACf,KAAI;AACF,4DAAoB,iBAAiB,EAAE,EAAE,WAAW,MAAM,CAAC;AAC3D,yCAAgB,kBAAkB,KAAK,UAAU,KAAK,EAAE,EAAE,MAAM,MAAM,CAAC;AACvE;WACO,UAAe;AACtB,OAAI,SAAS,SAAS,SAAU;;AAGpC,QAAM;;;;;;;;;;;;;;;;;;;;;;;;;AA0BV,MAAa,UAAU,OACrB,kBACA,UACA,YACG;CACH,MAAM,EAAE,YAAY,gBAAgB,aAAa;EAC/C,GAAG;EACH,GAAI,WAAW,EAAE;EAClB;CACD,MAAM,mBAAmB,KAAK,KAAK;AAEnC,KAAI;EAGF,MAAM,cAAc,oBAAmB,iCADN,iBAAiB,EACG,MAAM,SAAS;EAGpE,IAAI,gBAAgB,QAAQ,SAAS,IAAI,cAAc;AAEvD,MAAI,CAAC,cACH,KAAI;GACF,MAAM,MAAM,qCAAe,kBAAkB,OAAO;GACpD,IAAI;AACJ,OAAI;AAEF,oBADe,KAAK,MAAM,IACJ,CAAC;WACjB;AAEN,oBAAgB;;AAGlB,OAAI,CAAC,iBAAiB,kBAAkBA,oCAAY,QAClD,iBAAgB;UAEZ;AAEN,mBAAgB;;AAIpB,MAAI,cACF,KAAI;AACF,sCAAa,iBAAiB;UACxB;OAEH;AACL,SAAM,cAAc;AAEpB;;UAEK,KAAU;AACjB,MAAI,IAAI,SAAS,UAAU,OAGzB,OAAM;;AAMV,OAAM,kBAAkB,kBAAkB,iBAAiB;AAE3D,KAAI;AACF,QAAM,UAAU;AAIhB,QAAM,kBAAkB,kBAAkB,iBAAiB;SACrD;AACN,MAAI;AACF,sCAAa,iBAAiB;UACxB"}