gt 2.14.35 → 2.14.37

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 (430) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/api/collectUserEditDiffs.js +112 -155
  3. package/dist/api/collectUserEditDiffs.js.map +1 -0
  4. package/dist/api/downloadFileBatch.js +164 -241
  5. package/dist/api/downloadFileBatch.js.map +1 -0
  6. package/dist/api/saveLocalEdits.js +37 -41
  7. package/dist/api/saveLocalEdits.js.map +1 -0
  8. package/dist/bin/bin-entry.js +17 -7
  9. package/dist/bin/bin-entry.js.map +1 -0
  10. package/dist/bin/bin-main.js +43 -61
  11. package/dist/bin/bin-main.js.map +1 -0
  12. package/dist/cli/base.js +382 -497
  13. package/dist/cli/base.js.map +1 -0
  14. package/dist/cli/commands/download.js +41 -49
  15. package/dist/cli/commands/download.js.map +1 -0
  16. package/dist/cli/commands/enqueue.js +26 -25
  17. package/dist/cli/commands/enqueue.js.map +1 -0
  18. package/dist/cli/commands/setupProject.js +33 -36
  19. package/dist/cli/commands/setupProject.js.map +1 -0
  20. package/dist/cli/commands/stage.js +53 -61
  21. package/dist/cli/commands/stage.js.map +1 -0
  22. package/dist/cli/commands/translate.js +75 -112
  23. package/dist/cli/commands/translate.js.map +1 -0
  24. package/dist/cli/commands/upload.js +185 -213
  25. package/dist/cli/commands/upload.js.map +1 -0
  26. package/dist/cli/commands/utils/validation.js +39 -34
  27. package/dist/cli/commands/utils/validation.js.map +1 -0
  28. package/dist/cli/flags.js +35 -62
  29. package/dist/cli/flags.js.map +1 -0
  30. package/dist/cli/inline.js +112 -137
  31. package/dist/cli/inline.js.map +1 -0
  32. package/dist/cli/next.js +17 -12
  33. package/dist/cli/next.js.map +1 -0
  34. package/dist/cli/node.js +19 -15
  35. package/dist/cli/node.js.map +1 -0
  36. package/dist/cli/python.js +13 -8
  37. package/dist/cli/python.js.map +1 -0
  38. package/dist/cli/react.js +61 -78
  39. package/dist/cli/react.js.map +1 -0
  40. package/dist/config/defaults.js +16 -11
  41. package/dist/config/defaults.js.map +1 -0
  42. package/dist/config/generateSettings.js +167 -269
  43. package/dist/config/generateSettings.js.map +1 -0
  44. package/dist/config/optionPresets.js +78 -96
  45. package/dist/config/optionPresets.js.map +1 -0
  46. package/dist/config/resolveConfig.js +27 -32
  47. package/dist/config/resolveConfig.js.map +1 -0
  48. package/dist/config/utils.js +7 -3
  49. package/dist/config/utils.js.map +1 -0
  50. package/dist/config/validateSettings.js +19 -30
  51. package/dist/config/validateSettings.js.map +1 -0
  52. package/dist/console/colors.js +18 -13
  53. package/dist/console/colors.js.map +1 -0
  54. package/dist/console/displayTranslateSummary.js +40 -37
  55. package/dist/console/displayTranslateSummary.js.map +1 -0
  56. package/dist/console/formatting.js +8 -5
  57. package/dist/console/formatting.js.map +1 -0
  58. package/dist/console/index.d.ts +11 -9
  59. package/dist/console/index.js +53 -50
  60. package/dist/console/index.js.map +1 -0
  61. package/dist/console/inkFields.d.ts +23 -0
  62. package/dist/console/inkFields.js +87 -0
  63. package/dist/console/inkFields.js.map +1 -0
  64. package/dist/console/inkLayout.d.ts +7 -0
  65. package/dist/console/inkLayout.js +139 -0
  66. package/dist/console/inkLayout.js.map +1 -0
  67. package/dist/console/inkLocaleData.d.ts +4 -0
  68. package/dist/console/inkLocaleData.js +32 -0
  69. package/dist/console/inkLocaleData.js.map +1 -0
  70. package/dist/console/inkPrompts.d.ts +8 -0
  71. package/dist/console/inkPrompts.js +496 -0
  72. package/dist/console/inkPrompts.js.map +1 -0
  73. package/dist/console/inkSession.d.ts +3 -0
  74. package/dist/console/inkSession.js +42 -0
  75. package/dist/console/inkSession.js.map +1 -0
  76. package/dist/console/inkTerminal.d.ts +4 -0
  77. package/dist/console/inkTerminal.js +15 -0
  78. package/dist/console/inkTerminal.js.map +1 -0
  79. package/dist/console/inkTypes.d.ts +66 -0
  80. package/dist/console/inkTypes.js +1 -0
  81. package/dist/console/inkUtils.d.ts +24 -0
  82. package/dist/console/inkUtils.js +87 -0
  83. package/dist/console/inkUtils.js.map +1 -0
  84. package/dist/console/logger.js +209 -249
  85. package/dist/console/logger.js.map +1 -0
  86. package/dist/console/logging.d.ts +14 -0
  87. package/dist/console/logging.js +203 -162
  88. package/dist/console/logging.js.map +1 -0
  89. package/dist/console/promptParsing.d.ts +5 -0
  90. package/dist/console/promptParsing.js +28 -0
  91. package/dist/console/promptParsing.js.map +1 -0
  92. package/dist/console/terminalSession.d.ts +5 -0
  93. package/dist/console/terminalSession.js +38 -0
  94. package/dist/console/terminalSession.js.map +1 -0
  95. package/dist/extraction/index.js +3 -2
  96. package/dist/extraction/mapToUpdates.js +19 -18
  97. package/dist/extraction/mapToUpdates.js.map +1 -0
  98. package/dist/extraction/postProcess.js +68 -86
  99. package/dist/extraction/postProcess.js.map +1 -0
  100. package/dist/formats/files/aggregateFiles.js +223 -304
  101. package/dist/formats/files/aggregateFiles.js.map +1 -0
  102. package/dist/formats/files/collectFiles.js +53 -54
  103. package/dist/formats/files/collectFiles.js.map +1 -0
  104. package/dist/formats/files/convertToFileTranslationData.js +21 -19
  105. package/dist/formats/files/convertToFileTranslationData.js.map +1 -0
  106. package/dist/formats/files/fileMapping.js +82 -119
  107. package/dist/formats/files/fileMapping.js.map +1 -0
  108. package/dist/formats/files/preprocess/mdx.js +15 -12
  109. package/dist/formats/files/preprocess/mdx.js.map +1 -0
  110. package/dist/formats/files/preprocess/mintlify.js +15 -13
  111. package/dist/formats/files/preprocess/mintlify.js.map +1 -0
  112. package/dist/formats/files/preprocessContent.js +20 -21
  113. package/dist/formats/files/preprocessContent.js.map +1 -0
  114. package/dist/formats/files/save.js +18 -15
  115. package/dist/formats/files/save.js.map +1 -0
  116. package/dist/formats/files/supportedFiles.js +27 -22
  117. package/dist/formats/files/supportedFiles.js.map +1 -0
  118. package/dist/formats/files/transformFormat.js +93 -100
  119. package/dist/formats/files/transformFormat.js.map +1 -0
  120. package/dist/formats/json/extractJson.js +83 -110
  121. package/dist/formats/json/extractJson.js.map +1 -0
  122. package/dist/formats/json/flattenJson.js +41 -48
  123. package/dist/formats/json/flattenJson.js.map +1 -0
  124. package/dist/formats/json/jsonPath.js +20 -15
  125. package/dist/formats/json/jsonPath.js.map +1 -0
  126. package/dist/formats/json/jsonPointer.js +17 -17
  127. package/dist/formats/json/jsonPointer.js.map +1 -0
  128. package/dist/formats/json/mergeJson.js +230 -371
  129. package/dist/formats/json/mergeJson.js.map +1 -0
  130. package/dist/formats/json/parseJson.js +74 -111
  131. package/dist/formats/json/parseJson.js.map +1 -0
  132. package/dist/formats/json/transformJson.js +53 -61
  133. package/dist/formats/json/transformJson.js.map +1 -0
  134. package/dist/formats/json/utils.js +158 -187
  135. package/dist/formats/json/utils.js.map +1 -0
  136. package/dist/formats/parseKeyedMetadata.js +85 -106
  137. package/dist/formats/parseKeyedMetadata.js.map +1 -0
  138. package/dist/formats/utils.js +13 -23
  139. package/dist/formats/utils.js.map +1 -0
  140. package/dist/formats/yaml/extractYaml.js +32 -31
  141. package/dist/formats/yaml/extractYaml.js.map +1 -0
  142. package/dist/formats/yaml/mergeYaml.js +43 -60
  143. package/dist/formats/yaml/mergeYaml.js.map +1 -0
  144. package/dist/formats/yaml/parseYaml.js +34 -23
  145. package/dist/formats/yaml/parseYaml.js.map +1 -0
  146. package/dist/formats/yaml/utils.js +19 -21
  147. package/dist/formats/yaml/utils.js.map +1 -0
  148. package/dist/fs/clearLocaleDirs.js +82 -114
  149. package/dist/fs/clearLocaleDirs.js.map +1 -0
  150. package/dist/fs/config/downloadedVersions.js +174 -188
  151. package/dist/fs/config/downloadedVersions.js.map +1 -0
  152. package/dist/fs/config/loadConfig.js +12 -8
  153. package/dist/fs/config/loadConfig.js.map +1 -0
  154. package/dist/fs/config/parseFilesConfig.js +166 -227
  155. package/dist/fs/config/parseFilesConfig.js.map +1 -0
  156. package/dist/fs/config/setupConfig.js +43 -52
  157. package/dist/fs/config/setupConfig.js.map +1 -0
  158. package/dist/fs/config/updateConfig.js +44 -56
  159. package/dist/fs/config/updateConfig.js.map +1 -0
  160. package/dist/fs/config/updateVersions.js +27 -28
  161. package/dist/fs/config/updateVersions.js.map +1 -0
  162. package/dist/fs/copyFile.js +33 -37
  163. package/dist/fs/copyFile.js.map +1 -0
  164. package/dist/fs/createLoadTranslationsFile.js +32 -48
  165. package/dist/fs/createLoadTranslationsFile.js.map +1 -0
  166. package/dist/fs/determineFramework/detectPythonLibrary.js +30 -34
  167. package/dist/fs/determineFramework/detectPythonLibrary.js.map +1 -0
  168. package/dist/fs/determineFramework/index.js +46 -64
  169. package/dist/fs/determineFramework/index.js.map +1 -0
  170. package/dist/fs/determineFramework/matchPyprojectDependency.js +65 -78
  171. package/dist/fs/determineFramework/matchPyprojectDependency.js.map +1 -0
  172. package/dist/fs/determineFramework/matchRequirementsTxtDependency.js +21 -19
  173. package/dist/fs/determineFramework/matchRequirementsTxtDependency.js.map +1 -0
  174. package/dist/fs/determineFramework/matchSetupPyDependency.js +60 -81
  175. package/dist/fs/determineFramework/matchSetupPyDependency.js.map +1 -0
  176. package/dist/fs/determineFramework/resolveGtDependency.js +15 -15
  177. package/dist/fs/determineFramework/resolveGtDependency.js.map +1 -0
  178. package/dist/fs/findFilepath.js +63 -78
  179. package/dist/fs/findFilepath.js.map +1 -0
  180. package/dist/fs/loadJSON.js +18 -15
  181. package/dist/fs/loadJSON.js.map +1 -0
  182. package/dist/fs/matchFiles.js +12 -7
  183. package/dist/fs/matchFiles.js.map +1 -0
  184. package/dist/fs/saveJSON.js +10 -6
  185. package/dist/fs/saveJSON.js.map +1 -0
  186. package/dist/fs/utils.js +19 -15
  187. package/dist/fs/utils.js.map +1 -0
  188. package/dist/functions.d.ts +2 -1
  189. package/dist/functions.js +3 -6
  190. package/dist/generated/version.d.ts +1 -1
  191. package/dist/generated/version.js +6 -2
  192. package/dist/generated/version.js.map +1 -0
  193. package/dist/git/branches.js +77 -83
  194. package/dist/git/branches.js.map +1 -0
  195. package/dist/hooks/postProcess.js +97 -114
  196. package/dist/hooks/postProcess.js.map +1 -0
  197. package/dist/index.js +23 -31
  198. package/dist/index.js.map +1 -0
  199. package/dist/locadex/setupFlow.js +11 -8
  200. package/dist/locadex/setupFlow.js.map +1 -0
  201. package/dist/main.js +17 -7
  202. package/dist/main.js.map +1 -0
  203. package/dist/next/config/parseNextConfig.js +32 -51
  204. package/dist/next/config/parseNextConfig.js.map +1 -0
  205. package/dist/next/jsx/utils.js +25 -37
  206. package/dist/next/jsx/utils.js.map +1 -0
  207. package/dist/next/parse/handleInitGT.js +87 -154
  208. package/dist/next/parse/handleInitGT.js.map +1 -0
  209. package/dist/next/parse/wrapContent.js +136 -158
  210. package/dist/next/parse/wrapContent.js.map +1 -0
  211. package/dist/python/parse/createPythonInlineUpdates.js +36 -33
  212. package/dist/python/parse/createPythonInlineUpdates.js.map +1 -0
  213. package/dist/react/config/createESBuildConfig.js +115 -115
  214. package/dist/react/config/createESBuildConfig.js.map +1 -0
  215. package/dist/react/jsx/evaluateJsx.js +90 -124
  216. package/dist/react/jsx/evaluateJsx.js.map +1 -0
  217. package/dist/react/jsx/utils/buildImportMap.js +24 -28
  218. package/dist/react/jsx/utils/buildImportMap.js.map +1 -0
  219. package/dist/react/jsx/utils/constants.js +79 -87
  220. package/dist/react/jsx/utils/constants.js.map +1 -0
  221. package/dist/react/jsx/utils/extractSourceCode.js +36 -37
  222. package/dist/react/jsx/utils/extractSourceCode.js.map +1 -0
  223. package/dist/react/jsx/utils/getCalleeNameFromExpression.js +30 -30
  224. package/dist/react/jsx/utils/getCalleeNameFromExpression.js.map +1 -0
  225. package/dist/react/jsx/utils/getPathsAndAliases.js +70 -105
  226. package/dist/react/jsx/utils/getPathsAndAliases.js.map +1 -0
  227. package/dist/react/jsx/utils/isNumberLiteral.js +13 -11
  228. package/dist/react/jsx/utils/isNumberLiteral.js.map +1 -0
  229. package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js +103 -148
  230. package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js.map +1 -0
  231. package/dist/react/jsx/utils/jsxParsing/autoInsertion.js +305 -389
  232. package/dist/react/jsx/utils/jsxParsing/autoInsertion.js.map +1 -0
  233. package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js +122 -193
  234. package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js.map +1 -0
  235. package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js +50 -64
  236. package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js.map +1 -0
  237. package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js +41 -68
  238. package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js.map +1 -0
  239. package/dist/react/jsx/utils/jsxParsing/parseJsx.js +760 -1107
  240. package/dist/react/jsx/utils/jsxParsing/parseJsx.js.map +1 -0
  241. package/dist/react/jsx/utils/jsxParsing/parseTProps.js +35 -71
  242. package/dist/react/jsx/utils/jsxParsing/parseTProps.js.map +1 -0
  243. package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js +39 -58
  244. package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js.map +1 -0
  245. package/dist/react/jsx/utils/jsxParsing/types.js +10 -24
  246. package/dist/react/jsx/utils/jsxParsing/types.js.map +1 -0
  247. package/dist/react/jsx/utils/mapAttributeName.js +13 -13
  248. package/dist/react/jsx/utils/mapAttributeName.js.map +1 -0
  249. package/dist/react/jsx/utils/parseAst.js +142 -272
  250. package/dist/react/jsx/utils/parseAst.js.map +1 -0
  251. package/dist/react/jsx/utils/parseString.js +726 -1090
  252. package/dist/react/jsx/utils/parseString.js.map +1 -0
  253. package/dist/react/jsx/utils/parseStringFunction.js +274 -401
  254. package/dist/react/jsx/utils/parseStringFunction.js.map +1 -0
  255. package/dist/react/jsx/utils/resolveImportPath.d.ts +1 -1
  256. package/dist/react/jsx/utils/resolveImportPath.js +125 -108
  257. package/dist/react/jsx/utils/resolveImportPath.js.map +1 -0
  258. package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js +18 -24
  259. package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js.map +1 -0
  260. package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js +412 -579
  261. package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js.map +1 -0
  262. package/dist/react/jsx/utils/stringParsing/derivation/index.js +57 -67
  263. package/dist/react/jsx/utils/stringParsing/derivation/index.js.map +1 -0
  264. package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js +26 -36
  265. package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js.map +1 -0
  266. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js +29 -24
  267. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js.map +1 -0
  268. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js +34 -32
  269. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js.map +1 -0
  270. package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js +80 -117
  271. package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js.map +1 -0
  272. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js +24 -19
  273. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js.map +1 -0
  274. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js +18 -21
  275. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js.map +1 -0
  276. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js +45 -50
  277. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js.map +1 -0
  278. package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js +54 -59
  279. package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js.map +1 -0
  280. package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js +56 -69
  281. package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js.map +1 -0
  282. package/dist/react/jsx/utils/validateStringFunction.js +21 -29
  283. package/dist/react/jsx/utils/validateStringFunction.js.map +1 -0
  284. package/dist/react/jsx/wrapJsx.js +192 -375
  285. package/dist/react/jsx/wrapJsx.js.map +1 -0
  286. package/dist/react/parse/addVitePlugin/index.js +40 -34
  287. package/dist/react/parse/addVitePlugin/index.js.map +1 -0
  288. package/dist/react/parse/addVitePlugin/installCompiler.js +18 -20
  289. package/dist/react/parse/addVitePlugin/installCompiler.js.map +1 -0
  290. package/dist/react/parse/addVitePlugin/updateViteConfig.js +107 -111
  291. package/dist/react/parse/addVitePlugin/updateViteConfig.js.map +1 -0
  292. package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js +23 -26
  293. package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js.map +1 -0
  294. package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js +29 -43
  295. package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js.map +1 -0
  296. package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js +70 -104
  297. package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js.map +1 -0
  298. package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js +23 -29
  299. package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js.map +1 -0
  300. package/dist/react/parse/createDictionaryUpdates.js +121 -185
  301. package/dist/react/parse/createDictionaryUpdates.js.map +1 -0
  302. package/dist/react/parse/createInlineUpdates.js +123 -139
  303. package/dist/react/parse/createInlineUpdates.js.map +1 -0
  304. package/dist/react/parse/wrapContent.js +131 -156
  305. package/dist/react/parse/wrapContent.js.map +1 -0
  306. package/dist/react/utils/flattenDictionary.js +55 -70
  307. package/dist/react/utils/flattenDictionary.js.map +1 -0
  308. package/dist/react/utils/getEntryAndMetadata.js +14 -10
  309. package/dist/react/utils/getEntryAndMetadata.js.map +1 -0
  310. package/dist/react/utils/getVariableName.js +36 -33
  311. package/dist/react/utils/getVariableName.js.map +1 -0
  312. package/dist/setup/detectFramework.js +85 -102
  313. package/dist/setup/detectFramework.js.map +1 -0
  314. package/dist/setup/frameworkUtils.js +17 -28
  315. package/dist/setup/frameworkUtils.js.map +1 -0
  316. package/dist/setup/userInput.js +24 -31
  317. package/dist/setup/userInput.js.map +1 -0
  318. package/dist/setup/wizard.js +141 -143
  319. package/dist/setup/wizard.js.map +1 -0
  320. package/dist/state/mintlifyRefMap.js +12 -9
  321. package/dist/state/mintlifyRefMap.js.map +1 -0
  322. package/dist/state/recentDownloads.js +26 -23
  323. package/dist/state/recentDownloads.js.map +1 -0
  324. package/dist/state/translateWarnings.js +17 -8
  325. package/dist/state/translateWarnings.js.map +1 -0
  326. package/dist/translation/parse.js +77 -98
  327. package/dist/translation/parse.js.map +1 -0
  328. package/dist/translation/stage.js +28 -43
  329. package/dist/translation/stage.js.map +1 -0
  330. package/dist/translation/validate.js +68 -91
  331. package/dist/translation/validate.js.map +1 -0
  332. package/dist/types/libraries.js +93 -91
  333. package/dist/types/libraries.js.map +1 -0
  334. package/dist/types/parsing.js +19 -10
  335. package/dist/types/parsing.js.map +1 -0
  336. package/dist/utils/addExplicitAnchorIds.js +270 -389
  337. package/dist/utils/addExplicitAnchorIds.js.map +1 -0
  338. package/dist/utils/calculateTimeoutMs.js +11 -6
  339. package/dist/utils/calculateTimeoutMs.js.map +1 -0
  340. package/dist/utils/constants.js +15 -12
  341. package/dist/utils/constants.js.map +1 -0
  342. package/dist/utils/credentials.js +67 -114
  343. package/dist/utils/credentials.js.map +1 -0
  344. package/dist/utils/fetch.js +22 -20
  345. package/dist/utils/fetch.js.map +1 -0
  346. package/dist/utils/flattenJsonFiles.js +27 -34
  347. package/dist/utils/flattenJsonFiles.js.map +1 -0
  348. package/dist/utils/gitDiff.js +30 -32
  349. package/dist/utils/gitDiff.js.map +1 -0
  350. package/dist/utils/gt.js +7 -2
  351. package/dist/utils/gt.js.map +1 -0
  352. package/dist/utils/hash.js +14 -9
  353. package/dist/utils/hash.js.map +1 -0
  354. package/dist/utils/headers.js +10 -13
  355. package/dist/utils/headers.js.map +1 -0
  356. package/dist/utils/installPackage.js +70 -75
  357. package/dist/utils/installPackage.js.map +1 -0
  358. package/dist/utils/localizeRelativeAssets.js +114 -157
  359. package/dist/utils/localizeRelativeAssets.js.map +1 -0
  360. package/dist/utils/localizeStaticImports.js +229 -371
  361. package/dist/utils/localizeStaticImports.js.map +1 -0
  362. package/dist/utils/localizeStaticUrls.js +241 -424
  363. package/dist/utils/localizeStaticUrls.js.map +1 -0
  364. package/dist/utils/mintlifyTitleFallback.js +64 -72
  365. package/dist/utils/mintlifyTitleFallback.js.map +1 -0
  366. package/dist/utils/monorepoVersionCheck.js +177 -215
  367. package/dist/utils/monorepoVersionCheck.js.map +1 -0
  368. package/dist/utils/packageInfo.js +17 -16
  369. package/dist/utils/packageInfo.js.map +1 -0
  370. package/dist/utils/packageJson.js +51 -66
  371. package/dist/utils/packageJson.js.map +1 -0
  372. package/dist/utils/packageManager.js +237 -260
  373. package/dist/utils/packageManager.js.map +1 -0
  374. package/dist/utils/parse/needsCJS.js +36 -69
  375. package/dist/utils/parse/needsCJS.js.map +1 -0
  376. package/dist/utils/persistPostprocessHashes.js +30 -32
  377. package/dist/utils/persistPostprocessHashes.js.map +1 -0
  378. package/dist/utils/processAnchorIds.js +32 -54
  379. package/dist/utils/processAnchorIds.js.map +1 -0
  380. package/dist/utils/processOpenApi.js +469 -578
  381. package/dist/utils/processOpenApi.js.map +1 -0
  382. package/dist/utils/resolveMintlifyRefs.js +89 -105
  383. package/dist/utils/resolveMintlifyRefs.js.map +1 -0
  384. package/dist/utils/resolvePublish.js +46 -54
  385. package/dist/utils/resolvePublish.js.map +1 -0
  386. package/dist/utils/sanitizeFileContent.js +20 -27
  387. package/dist/utils/sanitizeFileContent.js.map +1 -0
  388. package/dist/utils/sharedStaticAssets.js +248 -366
  389. package/dist/utils/sharedStaticAssets.js.map +1 -0
  390. package/dist/utils/splitMintlifyLanguageRefs.js +208 -282
  391. package/dist/utils/splitMintlifyLanguageRefs.js.map +1 -0
  392. package/dist/utils/validateMdx.js +26 -23
  393. package/dist/utils/validateMdx.js.map +1 -0
  394. package/dist/utils/wrapPlainUrls.js +58 -70
  395. package/dist/utils/wrapPlainUrls.js.map +1 -0
  396. package/dist/workflows/download.js +92 -126
  397. package/dist/workflows/download.js.map +1 -0
  398. package/dist/workflows/enqueue.js +47 -54
  399. package/dist/workflows/enqueue.js.map +1 -0
  400. package/dist/workflows/publish.js +29 -29
  401. package/dist/workflows/publish.js.map +1 -0
  402. package/dist/workflows/setupProject.js +39 -40
  403. package/dist/workflows/setupProject.js.map +1 -0
  404. package/dist/workflows/stage.js +61 -65
  405. package/dist/workflows/stage.js.map +1 -0
  406. package/dist/workflows/steps/BranchStep.js +118 -163
  407. package/dist/workflows/steps/BranchStep.js.map +1 -0
  408. package/dist/workflows/steps/DownloadStep.js +107 -137
  409. package/dist/workflows/steps/DownloadStep.js.map +1 -0
  410. package/dist/workflows/steps/EnqueueStep.js +32 -32
  411. package/dist/workflows/steps/EnqueueStep.js.map +1 -0
  412. package/dist/workflows/steps/PollJobsStep.js +208 -292
  413. package/dist/workflows/steps/PollJobsStep.js.map +1 -0
  414. package/dist/workflows/steps/PublishStep.js +33 -38
  415. package/dist/workflows/steps/PublishStep.js.map +1 -0
  416. package/dist/workflows/steps/SetupStep.js +71 -72
  417. package/dist/workflows/steps/SetupStep.js.map +1 -0
  418. package/dist/workflows/steps/TagStep.js +39 -44
  419. package/dist/workflows/steps/TagStep.js.map +1 -0
  420. package/dist/workflows/steps/UploadSourcesStep.js +108 -140
  421. package/dist/workflows/steps/UploadSourcesStep.js.map +1 -0
  422. package/dist/workflows/steps/UploadTranslationsStep.js +61 -71
  423. package/dist/workflows/steps/UploadTranslationsStep.js.map +1 -0
  424. package/dist/workflows/steps/UserEditDiffsStep.js +32 -34
  425. package/dist/workflows/steps/UserEditDiffsStep.js.map +1 -0
  426. package/dist/workflows/steps/WorkflowStep.js +6 -2
  427. package/dist/workflows/steps/WorkflowStep.js.map +1 -0
  428. package/dist/workflows/upload.js +45 -46
  429. package/dist/workflows/upload.js.map +1 -0
  430. package/package.json +14 -7
@@ -1,24 +1,14 @@
1
- // helper function to replace locale placeholders in a string
2
- // with the corresponding locale properties
3
- // ex: {locale} -> will be replaced with the locale code
4
- // ex: {localeName} -> will be replaced with the locale name
5
- export function replaceLocalePlaceholders(string, localeProperties) {
6
- return string.replace(/\{(\w+)\}/g, (match, property) => {
7
- // Handle common aliases
8
- if (property === 'locale' || property === 'localeCode') {
9
- return localeProperties.code;
10
- }
11
- if (property === 'localeName') {
12
- return localeProperties.name;
13
- }
14
- if (property === 'localeNativeName') {
15
- return localeProperties.nativeName;
16
- }
17
- // Check if the property exists in localeProperties
18
- if (property in localeProperties) {
19
- return localeProperties[property];
20
- }
21
- // Return the original placeholder if property not found
22
- return match;
23
- });
1
+ //#region src/formats/utils.ts
2
+ function replaceLocalePlaceholders(string, localeProperties) {
3
+ return string.replace(/\{(\w+)\}/g, (match, property) => {
4
+ if (property === "locale" || property === "localeCode") return localeProperties.code;
5
+ if (property === "localeName") return localeProperties.name;
6
+ if (property === "localeNativeName") return localeProperties.nativeName;
7
+ if (property in localeProperties) return localeProperties[property];
8
+ return match;
9
+ });
24
10
  }
11
+ //#endregion
12
+ export { replaceLocalePlaceholders };
13
+
14
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/formats/utils.ts"],"sourcesContent":["import type { LocaleProperties } from '@generaltranslation/format/types';\n\n// helper function to replace locale placeholders in a string\n// with the corresponding locale properties\n// ex: {locale} -> will be replaced with the locale code\n// ex: {localeName} -> will be replaced with the locale name\nexport function replaceLocalePlaceholders(\n string: string,\n localeProperties: LocaleProperties\n): string {\n return string.replace(/\\{(\\w+)\\}/g, (match, property) => {\n // Handle common aliases\n if (property === 'locale' || property === 'localeCode') {\n return localeProperties.code;\n }\n if (property === 'localeName') {\n return localeProperties.name;\n }\n if (property === 'localeNativeName') {\n return localeProperties.nativeName;\n }\n // Check if the property exists in localeProperties\n if (property in localeProperties) {\n return localeProperties[property as keyof typeof localeProperties];\n }\n // Return the original placeholder if property not found\n return match;\n });\n}\n"],"mappings":";AAMA,SAAgB,0BACd,QACA,kBACQ;AACR,QAAO,OAAO,QAAQ,eAAe,OAAO,aAAa;AAEvD,MAAI,aAAa,YAAY,aAAa,aACxC,QAAO,iBAAiB;AAE1B,MAAI,aAAa,aACf,QAAO,iBAAiB;AAE1B,MAAI,aAAa,mBACf,QAAO,iBAAiB;AAG1B,MAAI,YAAY,iBACd,QAAO,iBAAiB;AAG1B,SAAO;GACP"}
@@ -1,33 +1,34 @@
1
- import { logger } from '../../console/logger.js';
2
- import { validateYamlSchema } from './utils.js';
3
- import { flattenJsonWithStringFilter } from '../json/flattenJson.js';
4
- import YAML from 'yaml';
1
+ import { logger } from "../../console/logger.js";
2
+ import { flattenJsonWithStringFilter } from "../json/flattenJson.js";
3
+ import { validateYamlSchema } from "./utils.js";
4
+ import YAML from "yaml";
5
+ //#region src/formats/yaml/extractYaml.ts
5
6
  /**
6
- * Extracts translated values from a fully merged YAML file back into the
7
- * flattened JSON pointer format that mergeYaml expects.
8
- * This is the inverse of mergeYaml — it takes a merged YAML document and
9
- * extracts only the values at the schema's include paths.
10
- *
11
- * @param localContent - The full YAML content from the user's local file
12
- * @param inputPath - The path to the file (used for matching yamlSchema)
13
- * @param options - Additional options containing yamlSchema config
14
- * @returns The flattened JSON string of translatable values, or null if no extraction needed
15
- */
16
- export function extractYaml(localContent, inputPath, options) {
17
- const yamlSchema = validateYamlSchema(options, inputPath);
18
- if (!yamlSchema || !yamlSchema.include) {
19
- return null;
20
- }
21
- let yaml;
22
- try {
23
- yaml = YAML.parse(localContent);
24
- }
25
- catch {
26
- logger.error(`Invalid YAML file: ${inputPath}`);
27
- return null;
28
- }
29
- const extracted = flattenJsonWithStringFilter(yaml, yamlSchema.include);
30
- if (!Object.keys(extracted).length)
31
- return null;
32
- return JSON.stringify(extracted);
7
+ * Extracts translated values from a fully merged YAML file back into the
8
+ * flattened JSON pointer format that mergeYaml expects.
9
+ * This is the inverse of mergeYaml — it takes a merged YAML document and
10
+ * extracts only the values at the schema's include paths.
11
+ *
12
+ * @param localContent - The full YAML content from the user's local file
13
+ * @param inputPath - The path to the file (used for matching yamlSchema)
14
+ * @param options - Additional options containing yamlSchema config
15
+ * @returns The flattened JSON string of translatable values, or null if no extraction needed
16
+ */
17
+ function extractYaml(localContent, inputPath, options) {
18
+ const yamlSchema = validateYamlSchema(options, inputPath);
19
+ if (!yamlSchema || !yamlSchema.include) return null;
20
+ let yaml;
21
+ try {
22
+ yaml = YAML.parse(localContent);
23
+ } catch {
24
+ logger.error(`Invalid YAML file: ${inputPath}`);
25
+ return null;
26
+ }
27
+ const extracted = flattenJsonWithStringFilter(yaml, yamlSchema.include);
28
+ if (!Object.keys(extracted).length) return null;
29
+ return JSON.stringify(extracted);
33
30
  }
31
+ //#endregion
32
+ export { extractYaml };
33
+
34
+ //# sourceMappingURL=extractYaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractYaml.js","names":[],"sources":["../../../src/formats/yaml/extractYaml.ts"],"sourcesContent":["import { AdditionalOptions } from '../../types/index.js';\nimport { logger } from '../../console/logger.js';\nimport { validateYamlSchema } from './utils.js';\nimport { flattenJsonWithStringFilter } from '../json/flattenJson.js';\nimport YAML from 'yaml';\n\n/**\n * Extracts translated values from a fully merged YAML file back into the\n * flattened JSON pointer format that mergeYaml expects.\n * This is the inverse of mergeYaml — it takes a merged YAML document and\n * extracts only the values at the schema's include paths.\n *\n * @param localContent - The full YAML content from the user's local file\n * @param inputPath - The path to the file (used for matching yamlSchema)\n * @param options - Additional options containing yamlSchema config\n * @returns The flattened JSON string of translatable values, or null if no extraction needed\n */\nexport function extractYaml(\n localContent: string,\n inputPath: string,\n options: AdditionalOptions\n): string | null {\n const yamlSchema = validateYamlSchema(options, inputPath);\n if (!yamlSchema || !yamlSchema.include) {\n return null;\n }\n\n let yaml: Record<string, unknown>;\n try {\n yaml = YAML.parse(localContent);\n } catch {\n logger.error(`Invalid YAML file: ${inputPath}`);\n return null;\n }\n\n const extracted = flattenJsonWithStringFilter(yaml, yamlSchema.include);\n if (!Object.keys(extracted).length) return null;\n return JSON.stringify(extracted);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,YACd,cACA,WACA,SACe;CACf,MAAM,aAAa,mBAAmB,SAAS,UAAU;AACzD,KAAI,CAAC,cAAc,CAAC,WAAW,QAC7B,QAAO;CAGT,IAAI;AACJ,KAAI;AACF,SAAO,KAAK,MAAM,aAAa;SACzB;AACN,SAAO,MAAM,sBAAsB,YAAY;AAC/C,SAAO;;CAGT,MAAM,YAAY,4BAA4B,MAAM,WAAW,QAAQ;AACvE,KAAI,CAAC,OAAO,KAAK,UAAU,CAAC,OAAQ,QAAO;AAC3C,QAAO,KAAK,UAAU,UAAU"}
@@ -1,61 +1,44 @@
1
- import JSONPointer from 'jsonpointer';
2
- import { exitSync } from '../../console/logging.js';
3
- import { logger } from '../../console/logger.js';
4
- import { validateYamlSchema } from './utils.js';
5
- import YAML from 'yaml';
6
- import { applyTransformations } from '../json/mergeJson.js';
7
- export default function mergeYaml(originalContent, inputPath, options, targets, defaultLocale) {
8
- const yamlSchema = validateYamlSchema(options, inputPath);
9
- if (!yamlSchema) {
10
- return targets.map((target) => target.translatedContent);
11
- }
12
- let originalYaml;
13
- try {
14
- originalYaml = YAML.parse(originalContent);
15
- }
16
- catch {
17
- logger.error(`Invalid YAML file: ${inputPath}`);
18
- return exitSync(1);
19
- }
20
- // Unreachable (validated in validateYamlSchema, included for type check)
21
- if (!yamlSchema.include) {
22
- logger.error('No include property found in YAML schema');
23
- return exitSync(1);
24
- }
25
- // Handle include
26
- const output = [];
27
- for (const target of targets) {
28
- // Must clone the original YAML to avoid mutations
29
- const mergedYaml = JSON.parse(JSON.stringify(originalYaml));
30
- let translatedJson;
31
- try {
32
- translatedJson = JSON.parse(target.translatedContent);
33
- }
34
- catch {
35
- // If parsing fails, treat as empty object to avoid crashes
36
- translatedJson = {};
37
- }
38
- for (const [jsonPointer, translatedValue] of Object.entries(translatedJson)) {
39
- try {
40
- // Try to get the value - if this succeeds, the pointer exists
41
- if (JSONPointer.get(mergedYaml, jsonPointer) == null) {
42
- continue;
43
- }
44
- // Set the new value regardless of what the current value is (including null/falsy)
45
- JSONPointer.set(mergedYaml, jsonPointer, translatedValue);
46
- }
47
- catch {
48
- // Silently ignore invalid or non-existent JSON pointers
49
- }
50
- }
51
- // Apply transformations if they exist
52
- if (yamlSchema.transform) {
53
- applyTransformations(mergedYaml, yamlSchema.transform, target.targetLocale, defaultLocale);
54
- }
55
- output.push(YAML.stringify(mergedYaml));
56
- }
57
- if (!output.length) {
58
- return [originalContent];
59
- }
60
- return output;
1
+ import { logger } from "../../console/logger.js";
2
+ import { exitSync } from "../../console/logging.js";
3
+ import { validateYamlSchema } from "./utils.js";
4
+ import { applyTransformations } from "../json/mergeJson.js";
5
+ import JSONPointer from "jsonpointer";
6
+ import YAML from "yaml";
7
+ //#region src/formats/yaml/mergeYaml.ts
8
+ function mergeYaml(originalContent, inputPath, options, targets, defaultLocale) {
9
+ const yamlSchema = validateYamlSchema(options, inputPath);
10
+ if (!yamlSchema) return targets.map((target) => target.translatedContent);
11
+ let originalYaml;
12
+ try {
13
+ originalYaml = YAML.parse(originalContent);
14
+ } catch {
15
+ logger.error(`Invalid YAML file: ${inputPath}`);
16
+ return exitSync(1);
17
+ }
18
+ if (!yamlSchema.include) {
19
+ logger.error("No include property found in YAML schema");
20
+ return exitSync(1);
21
+ }
22
+ const output = [];
23
+ for (const target of targets) {
24
+ const mergedYaml = JSON.parse(JSON.stringify(originalYaml));
25
+ let translatedJson;
26
+ try {
27
+ translatedJson = JSON.parse(target.translatedContent);
28
+ } catch {
29
+ translatedJson = {};
30
+ }
31
+ for (const [jsonPointer, translatedValue] of Object.entries(translatedJson)) try {
32
+ if (JSONPointer.get(mergedYaml, jsonPointer) == null) continue;
33
+ JSONPointer.set(mergedYaml, jsonPointer, translatedValue);
34
+ } catch {}
35
+ if (yamlSchema.transform) applyTransformations(mergedYaml, yamlSchema.transform, target.targetLocale, defaultLocale);
36
+ output.push(YAML.stringify(mergedYaml));
37
+ }
38
+ if (!output.length) return [originalContent];
39
+ return output;
61
40
  }
41
+ //#endregion
42
+ export { mergeYaml as default };
43
+
44
+ //# sourceMappingURL=mergeYaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeYaml.js","names":[],"sources":["../../../src/formats/yaml/mergeYaml.ts"],"sourcesContent":["import JSONPointer from 'jsonpointer';\nimport { exitSync } from '../../console/logging.js';\nimport { logger } from '../../console/logger.js';\nimport { AdditionalOptions } from '../../types/index.js';\nimport { validateYamlSchema } from './utils.js';\nimport YAML from 'yaml';\nimport { applyTransformations } from '../json/mergeJson.js';\n\nexport default function mergeYaml(\n originalContent: string,\n inputPath: string,\n options: AdditionalOptions,\n targets: {\n translatedContent: string;\n targetLocale: string;\n }[],\n defaultLocale: string\n): string[] {\n const yamlSchema = validateYamlSchema(options, inputPath);\n if (!yamlSchema) {\n return targets.map((target) => target.translatedContent);\n }\n\n let originalYaml: unknown;\n try {\n originalYaml = YAML.parse(originalContent);\n } catch {\n logger.error(`Invalid YAML file: ${inputPath}`);\n return exitSync(1);\n }\n // Unreachable (validated in validateYamlSchema, included for type check)\n if (!yamlSchema.include) {\n logger.error('No include property found in YAML schema');\n return exitSync(1);\n }\n\n // Handle include\n const output: string[] = [];\n for (const target of targets) {\n // Must clone the original YAML to avoid mutations\n const mergedYaml = JSON.parse(JSON.stringify(originalYaml));\n\n let translatedJson: Record<string, unknown>;\n try {\n translatedJson = JSON.parse(target.translatedContent);\n } catch {\n // If parsing fails, treat as empty object to avoid crashes\n translatedJson = {};\n }\n\n for (const [jsonPointer, translatedValue] of Object.entries(\n translatedJson\n )) {\n try {\n // Try to get the value - if this succeeds, the pointer exists\n if (JSONPointer.get(mergedYaml, jsonPointer) == null) {\n continue;\n }\n // Set the new value regardless of what the current value is (including null/falsy)\n JSONPointer.set(mergedYaml, jsonPointer, translatedValue);\n } catch {\n // Silently ignore invalid or non-existent JSON pointers\n }\n }\n\n // Apply transformations if they exist\n if (yamlSchema.transform) {\n applyTransformations(\n mergedYaml,\n yamlSchema.transform,\n target.targetLocale,\n defaultLocale\n );\n }\n\n output.push(YAML.stringify(mergedYaml));\n }\n\n if (!output.length) {\n return [originalContent];\n }\n\n return output;\n}\n"],"mappings":";;;;;;;AAQA,SAAwB,UACtB,iBACA,WACA,SACA,SAIA,eACU;CACV,MAAM,aAAa,mBAAmB,SAAS,UAAU;AACzD,KAAI,CAAC,WACH,QAAO,QAAQ,KAAK,WAAW,OAAO,kBAAkB;CAG1D,IAAI;AACJ,KAAI;AACF,iBAAe,KAAK,MAAM,gBAAgB;SACpC;AACN,SAAO,MAAM,sBAAsB,YAAY;AAC/C,SAAO,SAAS,EAAE;;AAGpB,KAAI,CAAC,WAAW,SAAS;AACvB,SAAO,MAAM,2CAA2C;AACxD,SAAO,SAAS,EAAE;;CAIpB,MAAM,SAAmB,EAAE;AAC3B,MAAK,MAAM,UAAU,SAAS;EAE5B,MAAM,aAAa,KAAK,MAAM,KAAK,UAAU,aAAa,CAAC;EAE3D,IAAI;AACJ,MAAI;AACF,oBAAiB,KAAK,MAAM,OAAO,kBAAkB;UAC/C;AAEN,oBAAiB,EAAE;;AAGrB,OAAK,MAAM,CAAC,aAAa,oBAAoB,OAAO,QAClD,eACD,CACC,KAAI;AAEF,OAAI,YAAY,IAAI,YAAY,YAAY,IAAI,KAC9C;AAGF,eAAY,IAAI,YAAY,aAAa,gBAAgB;UACnD;AAMV,MAAI,WAAW,UACb,sBACE,YACA,WAAW,WACX,OAAO,cACP,cACD;AAGH,SAAO,KAAK,KAAK,UAAU,WAAW,CAAC;;AAGzC,KAAI,CAAC,OAAO,OACV,QAAO,CAAC,gBAAgB;AAG1B,QAAO"}
@@ -1,24 +1,35 @@
1
- import { exitSync } from '../../console/logging.js';
2
- import { logger } from '../../console/logger.js';
3
- import YAML from 'yaml';
4
- import { validateYamlSchema } from './utils.js';
5
- import { flattenJsonWithStringFilter } from '../json/flattenJson.js';
6
- export default function parseYaml(content, filePath, options) {
7
- const yamlSchema = validateYamlSchema(options, filePath);
8
- if (!yamlSchema) {
9
- return { content, fileFormat: 'YAML' };
10
- }
11
- let yaml;
12
- try {
13
- yaml = YAML.parse(content);
14
- }
15
- catch {
16
- logger.error(`Invalid YAML file: ${filePath}`);
17
- return exitSync(1);
18
- }
19
- if (yamlSchema.include) {
20
- const flattenedYaml = flattenJsonWithStringFilter(yaml, yamlSchema.include);
21
- return { content: JSON.stringify(flattenedYaml), fileFormat: 'JSON' };
22
- }
23
- return { content, fileFormat: 'YAML' };
1
+ import { logger } from "../../console/logger.js";
2
+ import { exitSync } from "../../console/logging.js";
3
+ import { flattenJsonWithStringFilter } from "../json/flattenJson.js";
4
+ import { validateYamlSchema } from "./utils.js";
5
+ import YAML from "yaml";
6
+ //#region src/formats/yaml/parseYaml.ts
7
+ function parseYaml(content, filePath, options) {
8
+ const yamlSchema = validateYamlSchema(options, filePath);
9
+ if (!yamlSchema) return {
10
+ content,
11
+ fileFormat: "YAML"
12
+ };
13
+ let yaml;
14
+ try {
15
+ yaml = YAML.parse(content);
16
+ } catch {
17
+ logger.error(`Invalid YAML file: ${filePath}`);
18
+ return exitSync(1);
19
+ }
20
+ if (yamlSchema.include) {
21
+ const flattenedYaml = flattenJsonWithStringFilter(yaml, yamlSchema.include);
22
+ return {
23
+ content: JSON.stringify(flattenedYaml),
24
+ fileFormat: "JSON"
25
+ };
26
+ }
27
+ return {
28
+ content,
29
+ fileFormat: "YAML"
30
+ };
24
31
  }
32
+ //#endregion
33
+ export { parseYaml as default };
34
+
35
+ //# sourceMappingURL=parseYaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseYaml.js","names":[],"sources":["../../../src/formats/yaml/parseYaml.ts"],"sourcesContent":["import { AdditionalOptions } from '../../types/index.js';\nimport { exitSync } from '../../console/logging.js';\nimport { logger } from '../../console/logger.js';\nimport YAML from 'yaml';\nimport { validateYamlSchema } from './utils.js';\nimport { flattenJsonWithStringFilter } from '../json/flattenJson.js';\n\nexport default function parseYaml(\n content: string,\n filePath: string,\n options: AdditionalOptions\n): { content: string; fileFormat: 'JSON' | 'YAML' } {\n const yamlSchema = validateYamlSchema(options, filePath);\n if (!yamlSchema) {\n return { content, fileFormat: 'YAML' };\n }\n\n let yaml: unknown;\n try {\n yaml = YAML.parse(content);\n } catch {\n logger.error(`Invalid YAML file: ${filePath}`);\n return exitSync(1);\n }\n\n if (yamlSchema.include) {\n const flattenedYaml = flattenJsonWithStringFilter(yaml, yamlSchema.include);\n return { content: JSON.stringify(flattenedYaml), fileFormat: 'JSON' };\n }\n\n return { content, fileFormat: 'YAML' };\n}\n"],"mappings":";;;;;;AAOA,SAAwB,UACtB,SACA,UACA,SACkD;CAClD,MAAM,aAAa,mBAAmB,SAAS,SAAS;AACxD,KAAI,CAAC,WACH,QAAO;EAAE;EAAS,YAAY;EAAQ;CAGxC,IAAI;AACJ,KAAI;AACF,SAAO,KAAK,MAAM,QAAQ;SACpB;AACN,SAAO,MAAM,sBAAsB,WAAW;AAC9C,SAAO,SAAS,EAAE;;AAGpB,KAAI,WAAW,SAAS;EACtB,MAAM,gBAAgB,4BAA4B,MAAM,WAAW,QAAQ;AAC3E,SAAO;GAAE,SAAS,KAAK,UAAU,cAAc;GAAE,YAAY;GAAQ;;AAGvE,QAAO;EAAE;EAAS,YAAY;EAAQ"}
@@ -1,23 +1,21 @@
1
- import { exitSync } from '../../console/logging.js';
2
- import { logger } from '../../console/logger.js';
3
- import micromatch from 'micromatch';
1
+ import { logger } from "../../console/logger.js";
2
+ import { exitSync } from "../../console/logging.js";
3
+ import micromatch from "micromatch";
4
+ import path from "path";
5
+ //#region src/formats/yaml/utils.ts
4
6
  const { isMatch } = micromatch;
5
- import path from 'path';
6
- export function validateYamlSchema(options, filePath) {
7
- if (!options.yamlSchema) {
8
- return null;
9
- }
10
- // Check if the file matches any of the yaml schema globs
11
- const fileGlobs = Object.keys(options.yamlSchema);
12
- const matchingGlob = fileGlobs.find((fileGlob) => isMatch(path.relative(process.cwd(), filePath), fileGlob));
13
- if (!matchingGlob || !options.yamlSchema[matchingGlob]) {
14
- return null;
15
- }
16
- // Validate includes
17
- const yamlSchema = options.yamlSchema[matchingGlob];
18
- if (!yamlSchema.include) {
19
- logger.error('No include property found in YAML schema');
20
- return exitSync(1);
21
- }
22
- return yamlSchema;
7
+ function validateYamlSchema(options, filePath) {
8
+ if (!options.yamlSchema) return null;
9
+ const matchingGlob = Object.keys(options.yamlSchema).find((fileGlob) => isMatch(path.relative(process.cwd(), filePath), fileGlob));
10
+ if (!matchingGlob || !options.yamlSchema[matchingGlob]) return null;
11
+ const yamlSchema = options.yamlSchema[matchingGlob];
12
+ if (!yamlSchema.include) {
13
+ logger.error("No include property found in YAML schema");
14
+ return exitSync(1);
15
+ }
16
+ return yamlSchema;
23
17
  }
18
+ //#endregion
19
+ export { validateYamlSchema };
20
+
21
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../src/formats/yaml/utils.ts"],"sourcesContent":["import { AdditionalOptions, YamlSchema } from '../../types/index.js';\nimport { exitSync } from '../../console/logging.js';\nimport { logger } from '../../console/logger.js';\nimport micromatch from 'micromatch';\nconst { isMatch } = micromatch;\nimport path from 'path';\n\nexport function validateYamlSchema(\n options: AdditionalOptions,\n filePath: string\n): YamlSchema | null {\n if (!options.yamlSchema) {\n return null;\n }\n // Check if the file matches any of the yaml schema globs\n const fileGlobs = Object.keys(options.yamlSchema);\n const matchingGlob = fileGlobs.find((fileGlob) =>\n isMatch(path.relative(process.cwd(), filePath), fileGlob)\n );\n if (!matchingGlob || !options.yamlSchema[matchingGlob]) {\n return null;\n }\n\n // Validate includes\n const yamlSchema = options.yamlSchema[matchingGlob];\n if (!yamlSchema.include) {\n logger.error('No include property found in YAML schema');\n return exitSync(1);\n }\n return yamlSchema;\n}\n"],"mappings":";;;;;AAIA,MAAM,EAAE,YAAY;AAGpB,SAAgB,mBACd,SACA,UACmB;AACnB,KAAI,CAAC,QAAQ,WACX,QAAO;CAIT,MAAM,eADY,OAAO,KAAK,QAAQ,WACR,CAAC,MAAM,aACnC,QAAQ,KAAK,SAAS,QAAQ,KAAK,EAAE,SAAS,EAAE,SAAS,CAC1D;AACD,KAAI,CAAC,gBAAgB,CAAC,QAAQ,WAAW,cACvC,QAAO;CAIT,MAAM,aAAa,QAAQ,WAAW;AACtC,KAAI,CAAC,WAAW,SAAS;AACvB,SAAO,MAAM,2CAA2C;AACxD,SAAO,SAAS,EAAE;;AAEpB,QAAO"}
@@ -1,126 +1,94 @@
1
- import fs from 'fs/promises';
2
- import path from 'node:path';
3
- import { logger } from '../console/logger.js';
4
- import fg from 'fast-glob';
5
- import micromatch from 'micromatch';
1
+ import { logger } from "../console/logger.js";
2
+ import path from "node:path";
3
+ import fg from "fast-glob";
4
+ import micromatch from "micromatch";
5
+ import fs from "fs/promises";
6
+ //#region src/fs/clearLocaleDirs.ts
6
7
  /**
7
- * Extracts locale directories from translated file paths.
8
- * Groups files by their immediate parent containing a locale code.
9
- * For example: "snippets/es/api-test/file.mdx" -> "snippets/es"
10
- */
8
+ * Extracts locale directories from translated file paths.
9
+ * Groups files by their immediate parent containing a locale code.
10
+ * For example: "snippets/es/api-test/file.mdx" -> "snippets/es"
11
+ */
11
12
  function extractLocaleDirectories(filePaths, locales) {
12
- const localeDirs = new Set();
13
- const localeSet = new Set(locales);
14
- for (const filePath of filePaths) {
15
- const parts = filePath.split(path.sep);
16
- // Find directory segments that match the provided locales
17
- for (let i = 0; i < parts.length - 1; i++) {
18
- const segment = parts[i];
19
- if (localeSet.has(segment)) {
20
- // Found a locale directory, capture up to and including this segment
21
- const localeDir = parts.slice(0, i + 1).join(path.sep);
22
- localeDirs.add(localeDir);
23
- break;
24
- }
25
- }
26
- }
27
- return localeDirs;
13
+ const localeDirs = /* @__PURE__ */ new Set();
14
+ const localeSet = new Set(locales);
15
+ for (const filePath of filePaths) {
16
+ const parts = filePath.split(path.sep);
17
+ for (let i = 0; i < parts.length - 1; i++) {
18
+ const segment = parts[i];
19
+ if (localeSet.has(segment)) {
20
+ const localeDir = parts.slice(0, i + 1).join(path.sep);
21
+ localeDirs.add(localeDir);
22
+ break;
23
+ }
24
+ }
25
+ }
26
+ return localeDirs;
28
27
  }
29
28
  async function getAllFiles(dirPath) {
30
- return await fg(path.join(dirPath, '**/*'), {
31
- absolute: true,
32
- onlyFiles: true,
33
- });
29
+ return await fg(path.join(dirPath, "**/*"), {
30
+ absolute: true,
31
+ onlyFiles: true
32
+ });
34
33
  }
35
34
  async function getFilesToDelete(dirPath, excludePatterns, currentLocale, cwd) {
36
- const allFiles = await getAllFiles(dirPath);
37
- const absoluteCwd = path.resolve(cwd);
38
- const expandedExcludePatterns = excludePatterns.map((p) => {
39
- const resolvedPattern = path.isAbsolute(p) ? p : path.join(absoluteCwd, p);
40
- return resolvedPattern
41
- .replace(/\[locale\]/g, currentLocale)
42
- .replace(/\[locales\]/g, currentLocale);
43
- });
44
- const filesToKeep = micromatch(allFiles, expandedExcludePatterns, {
45
- dot: true,
46
- });
47
- const filesToKeepSet = new Set(filesToKeep);
48
- return allFiles.filter((file) => !filesToKeepSet.has(file));
35
+ const allFiles = await getAllFiles(dirPath);
36
+ const absoluteCwd = path.resolve(cwd);
37
+ const filesToKeep = micromatch(allFiles, excludePatterns.map((p) => {
38
+ return (path.isAbsolute(p) ? p : path.join(absoluteCwd, p)).replace(/\[locale\]/g, currentLocale).replace(/\[locales\]/g, currentLocale);
39
+ }), { dot: true });
40
+ const filesToKeepSet = new Set(filesToKeep);
41
+ return allFiles.filter((file) => !filesToKeepSet.has(file));
49
42
  }
50
43
  /**
51
- * Clears translated files before writing new translations
52
- * @param filePaths - Set of translated file paths to clear
53
- * @param locales - Array of locale codes to match against
54
- * @param excludePatterns - Optional array of glob patterns to exclude from clearing (supports [locale] and [locales])
55
- * @param cwd - Current working directory for resolving relative exclude patterns (defaults to process.cwd())
56
- */
57
- export async function clearLocaleDirs(filePaths, locales, excludePatterns, cwd = process.cwd()) {
58
- // Extract locale directories
59
- const localeDirs = extractLocaleDirectories(filePaths, locales);
60
- for (const dir of localeDirs) {
61
- try {
62
- await fs.stat(dir);
63
- // Extract locale from directory path
64
- const dirParts = dir.split(path.sep);
65
- const locale = locales.find((loc) => dirParts.includes(loc));
66
- if (!locale) {
67
- continue;
68
- }
69
- if (!excludePatterns?.length) {
70
- await fs.rm(dir, { recursive: true, force: true });
71
- logger.success(`Cleared locale directory: ${dir}`);
72
- continue;
73
- }
74
- const filesToDelete = await getFilesToDelete(dir, excludePatterns, locale, cwd);
75
- // Get all files for count comparison
76
- const allFiles = await getAllFiles(dir);
77
- for (const file of filesToDelete) {
78
- try {
79
- await fs.unlink(file);
80
- }
81
- catch (error) {
82
- if (error.code !== 'ENOENT') {
83
- logger.warn(`Failed to delete file ${file}: ${error}`);
84
- }
85
- }
86
- }
87
- // Clean up empty directories
88
- await cleanupEmptyDirs(dir);
89
- const excludedCount = allFiles.length - filesToDelete.length;
90
- if (excludedCount > 0) {
91
- logger.success(`Cleared locale directory: ${dir} (excluded ${excludedCount} file${excludedCount > 1 ? 's' : ''})`);
92
- }
93
- else {
94
- logger.success(`Cleared locale directory: ${dir}`);
95
- }
96
- }
97
- catch (error) {
98
- if (error.code !== 'ENOENT') {
99
- logger.warn(`Failed to clear locale directory ${dir}: ${error}`);
100
- }
101
- }
102
- }
44
+ * Clears translated files before writing new translations
45
+ * @param filePaths - Set of translated file paths to clear
46
+ * @param locales - Array of locale codes to match against
47
+ * @param excludePatterns - Optional array of glob patterns to exclude from clearing (supports [locale] and [locales])
48
+ * @param cwd - Current working directory for resolving relative exclude patterns (defaults to process.cwd())
49
+ */
50
+ async function clearLocaleDirs(filePaths, locales, excludePatterns, cwd = process.cwd()) {
51
+ const localeDirs = extractLocaleDirectories(filePaths, locales);
52
+ for (const dir of localeDirs) try {
53
+ await fs.stat(dir);
54
+ const dirParts = dir.split(path.sep);
55
+ const locale = locales.find((loc) => dirParts.includes(loc));
56
+ if (!locale) continue;
57
+ if (!excludePatterns?.length) {
58
+ await fs.rm(dir, {
59
+ recursive: true,
60
+ force: true
61
+ });
62
+ logger.success(`Cleared locale directory: ${dir}`);
63
+ continue;
64
+ }
65
+ const filesToDelete = await getFilesToDelete(dir, excludePatterns, locale, cwd);
66
+ const allFiles = await getAllFiles(dir);
67
+ for (const file of filesToDelete) try {
68
+ await fs.unlink(file);
69
+ } catch (error) {
70
+ if (error.code !== "ENOENT") logger.warn(`Failed to delete file ${file}: ${error}`);
71
+ }
72
+ await cleanupEmptyDirs(dir);
73
+ const excludedCount = allFiles.length - filesToDelete.length;
74
+ if (excludedCount > 0) logger.success(`Cleared locale directory: ${dir} (excluded ${excludedCount} file${excludedCount > 1 ? "s" : ""})`);
75
+ else logger.success(`Cleared locale directory: ${dir}`);
76
+ } catch (error) {
77
+ if (error.code !== "ENOENT") logger.warn(`Failed to clear locale directory ${dir}: ${error}`);
78
+ }
103
79
  }
104
80
  /**
105
- * Recursively removes empty directories
106
- * @param dirPath - The directory to clean up
107
- */
81
+ * Recursively removes empty directories
82
+ * @param dirPath - The directory to clean up
83
+ */
108
84
  async function cleanupEmptyDirs(dirPath) {
109
- try {
110
- const entries = await fs.readdir(dirPath, { withFileTypes: true });
111
- // Recursively clean subdirectories first
112
- for (const entry of entries) {
113
- if (entry.isDirectory()) {
114
- await cleanupEmptyDirs(path.join(dirPath, entry.name));
115
- }
116
- }
117
- // Check if directory is now empty
118
- const remainingEntries = await fs.readdir(dirPath);
119
- if (remainingEntries.length === 0) {
120
- await fs.rmdir(dirPath);
121
- }
122
- }
123
- catch {
124
- // Ignore errors - directory might not exist or might not be empty
125
- }
85
+ try {
86
+ const entries = await fs.readdir(dirPath, { withFileTypes: true });
87
+ for (const entry of entries) if (entry.isDirectory()) await cleanupEmptyDirs(path.join(dirPath, entry.name));
88
+ if ((await fs.readdir(dirPath)).length === 0) await fs.rmdir(dirPath);
89
+ } catch {}
126
90
  }
91
+ //#endregion
92
+ export { clearLocaleDirs };
93
+
94
+ //# sourceMappingURL=clearLocaleDirs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearLocaleDirs.js","names":[],"sources":["../../src/fs/clearLocaleDirs.ts"],"sourcesContent":["import fs from 'fs/promises';\nimport path from 'node:path';\nimport { logger } from '../console/logger.js';\nimport fg from 'fast-glob';\nimport micromatch from 'micromatch';\n\n/**\n * Extracts locale directories from translated file paths.\n * Groups files by their immediate parent containing a locale code.\n * For example: \"snippets/es/api-test/file.mdx\" -> \"snippets/es\"\n */\nfunction extractLocaleDirectories(\n filePaths: Set<string>,\n locales: string[]\n): Set<string> {\n const localeDirs = new Set<string>();\n const localeSet = new Set(locales);\n\n for (const filePath of filePaths) {\n const parts = filePath.split(path.sep);\n\n // Find directory segments that match the provided locales\n for (let i = 0; i < parts.length - 1; i++) {\n const segment = parts[i];\n if (localeSet.has(segment)) {\n // Found a locale directory, capture up to and including this segment\n const localeDir = parts.slice(0, i + 1).join(path.sep);\n localeDirs.add(localeDir);\n break;\n }\n }\n }\n\n return localeDirs;\n}\n\nasync function getAllFiles(dirPath: string): Promise<string[]> {\n return await fg(path.join(dirPath, '**/*'), {\n absolute: true,\n onlyFiles: true,\n });\n}\n\nasync function getFilesToDelete(\n dirPath: string,\n excludePatterns: string[],\n currentLocale: string,\n cwd: string\n): Promise<string[]> {\n const allFiles = await getAllFiles(dirPath);\n\n const absoluteCwd = path.resolve(cwd);\n const expandedExcludePatterns = excludePatterns.map((p) => {\n const resolvedPattern = path.isAbsolute(p) ? p : path.join(absoluteCwd, p);\n return resolvedPattern\n .replace(/\\[locale\\]/g, currentLocale)\n .replace(/\\[locales\\]/g, currentLocale);\n });\n\n const filesToKeep = micromatch(allFiles, expandedExcludePatterns, {\n dot: true,\n });\n\n const filesToKeepSet = new Set(filesToKeep);\n return allFiles.filter((file) => !filesToKeepSet.has(file));\n}\n\n/**\n * Clears translated files before writing new translations\n * @param filePaths - Set of translated file paths to clear\n * @param locales - Array of locale codes to match against\n * @param excludePatterns - Optional array of glob patterns to exclude from clearing (supports [locale] and [locales])\n * @param cwd - Current working directory for resolving relative exclude patterns (defaults to process.cwd())\n */\nexport async function clearLocaleDirs(\n filePaths: Set<string>,\n locales: string[],\n excludePatterns?: string[],\n cwd: string = process.cwd()\n): Promise<void> {\n // Extract locale directories\n const localeDirs = extractLocaleDirectories(filePaths, locales);\n\n for (const dir of localeDirs) {\n try {\n await fs.stat(dir);\n\n // Extract locale from directory path\n const dirParts = dir.split(path.sep);\n const locale = locales.find((loc) => dirParts.includes(loc));\n\n if (!locale) {\n continue;\n }\n\n if (!excludePatterns?.length) {\n await fs.rm(dir, { recursive: true, force: true });\n logger.success(`Cleared locale directory: ${dir}`);\n continue;\n }\n\n const filesToDelete = await getFilesToDelete(\n dir,\n excludePatterns,\n locale,\n cwd\n );\n\n // Get all files for count comparison\n const allFiles = await getAllFiles(dir);\n\n for (const file of filesToDelete) {\n try {\n await fs.unlink(file);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n logger.warn(`Failed to delete file ${file}: ${error}`);\n }\n }\n }\n\n // Clean up empty directories\n await cleanupEmptyDirs(dir);\n\n const excludedCount = allFiles.length - filesToDelete.length;\n if (excludedCount > 0) {\n logger.success(\n `Cleared locale directory: ${dir} (excluded ${excludedCount} file${excludedCount > 1 ? 's' : ''})`\n );\n } else {\n logger.success(`Cleared locale directory: ${dir}`);\n }\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n logger.warn(`Failed to clear locale directory ${dir}: ${error}`);\n }\n }\n }\n}\n\n/**\n * Recursively removes empty directories\n * @param dirPath - The directory to clean up\n */\nasync function cleanupEmptyDirs(dirPath: string): Promise<void> {\n try {\n const entries = await fs.readdir(dirPath, { withFileTypes: true });\n\n // Recursively clean subdirectories first\n for (const entry of entries) {\n if (entry.isDirectory()) {\n await cleanupEmptyDirs(path.join(dirPath, entry.name));\n }\n }\n\n // Check if directory is now empty\n const remainingEntries = await fs.readdir(dirPath);\n if (remainingEntries.length === 0) {\n await fs.rmdir(dirPath);\n }\n } catch {\n // Ignore errors - directory might not exist or might not be empty\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,yBACP,WACA,SACa;CACb,MAAM,6BAAa,IAAI,KAAa;CACpC,MAAM,YAAY,IAAI,IAAI,QAAQ;AAElC,MAAK,MAAM,YAAY,WAAW;EAChC,MAAM,QAAQ,SAAS,MAAM,KAAK,IAAI;AAGtC,OAAK,IAAI,IAAI,GAAG,IAAI,MAAM,SAAS,GAAG,KAAK;GACzC,MAAM,UAAU,MAAM;AACtB,OAAI,UAAU,IAAI,QAAQ,EAAE;IAE1B,MAAM,YAAY,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI;AACtD,eAAW,IAAI,UAAU;AACzB;;;;AAKN,QAAO;;AAGT,eAAe,YAAY,SAAoC;AAC7D,QAAO,MAAM,GAAG,KAAK,KAAK,SAAS,OAAO,EAAE;EAC1C,UAAU;EACV,WAAW;EACZ,CAAC;;AAGJ,eAAe,iBACb,SACA,iBACA,eACA,KACmB;CACnB,MAAM,WAAW,MAAM,YAAY,QAAQ;CAE3C,MAAM,cAAc,KAAK,QAAQ,IAAI;CAQrC,MAAM,cAAc,WAAW,UAPC,gBAAgB,KAAK,MAAM;AAEzD,UADwB,KAAK,WAAW,EAAE,GAAG,IAAI,KAAK,KAAK,aAAa,EAAE,EAEvE,QAAQ,eAAe,cAAc,CACrC,QAAQ,gBAAgB,cAAc;GAGqB,EAAE,EAChE,KAAK,MACN,CAAC;CAEF,MAAM,iBAAiB,IAAI,IAAI,YAAY;AAC3C,QAAO,SAAS,QAAQ,SAAS,CAAC,eAAe,IAAI,KAAK,CAAC;;;;;;;;;AAU7D,eAAsB,gBACpB,WACA,SACA,iBACA,MAAc,QAAQ,KAAK,EACZ;CAEf,MAAM,aAAa,yBAAyB,WAAW,QAAQ;AAE/D,MAAK,MAAM,OAAO,WAChB,KAAI;AACF,QAAM,GAAG,KAAK,IAAI;EAGlB,MAAM,WAAW,IAAI,MAAM,KAAK,IAAI;EACpC,MAAM,SAAS,QAAQ,MAAM,QAAQ,SAAS,SAAS,IAAI,CAAC;AAE5D,MAAI,CAAC,OACH;AAGF,MAAI,CAAC,iBAAiB,QAAQ;AAC5B,SAAM,GAAG,GAAG,KAAK;IAAE,WAAW;IAAM,OAAO;IAAM,CAAC;AAClD,UAAO,QAAQ,6BAA6B,MAAM;AAClD;;EAGF,MAAM,gBAAgB,MAAM,iBAC1B,KACA,iBACA,QACA,IACD;EAGD,MAAM,WAAW,MAAM,YAAY,IAAI;AAEvC,OAAK,MAAM,QAAQ,cACjB,KAAI;AACF,SAAM,GAAG,OAAO,KAAK;WACd,OAAO;AACd,OAAK,MAAgC,SAAS,SAC5C,QAAO,KAAK,yBAAyB,KAAK,IAAI,QAAQ;;AAM5D,QAAM,iBAAiB,IAAI;EAE3B,MAAM,gBAAgB,SAAS,SAAS,cAAc;AACtD,MAAI,gBAAgB,EAClB,QAAO,QACL,6BAA6B,IAAI,aAAa,cAAc,OAAO,gBAAgB,IAAI,MAAM,GAAG,GACjG;MAED,QAAO,QAAQ,6BAA6B,MAAM;UAE7C,OAAO;AACd,MAAK,MAAgC,SAAS,SAC5C,QAAO,KAAK,oCAAoC,IAAI,IAAI,QAAQ;;;;;;;AAUxE,eAAe,iBAAiB,SAAgC;AAC9D,KAAI;EACF,MAAM,UAAU,MAAM,GAAG,QAAQ,SAAS,EAAE,eAAe,MAAM,CAAC;AAGlE,OAAK,MAAM,SAAS,QAClB,KAAI,MAAM,aAAa,CACrB,OAAM,iBAAiB,KAAK,KAAK,SAAS,MAAM,KAAK,CAAC;AAM1D,OAAI,MAD2B,GAAG,QAAQ,QAAQ,EAC7B,WAAW,EAC9B,OAAM,GAAG,MAAM,QAAQ;SAEnB"}