gt 2.14.35 → 2.14.36
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.
- package/CHANGELOG.md +16 -1
- package/dist/api/collectUserEditDiffs.js +112 -155
- package/dist/api/collectUserEditDiffs.js.map +1 -0
- package/dist/api/downloadFileBatch.js +164 -241
- package/dist/api/downloadFileBatch.js.map +1 -0
- package/dist/api/saveLocalEdits.js +37 -41
- package/dist/api/saveLocalEdits.js.map +1 -0
- package/dist/bin/bin-entry.js +17 -7
- package/dist/bin/bin-entry.js.map +1 -0
- package/dist/bin/bin-main.js +43 -61
- package/dist/bin/bin-main.js.map +1 -0
- package/dist/cli/base.js +382 -497
- package/dist/cli/base.js.map +1 -0
- package/dist/cli/commands/download.js +41 -49
- package/dist/cli/commands/download.js.map +1 -0
- package/dist/cli/commands/enqueue.js +26 -25
- package/dist/cli/commands/enqueue.js.map +1 -0
- package/dist/cli/commands/setupProject.js +33 -36
- package/dist/cli/commands/setupProject.js.map +1 -0
- package/dist/cli/commands/stage.js +53 -61
- package/dist/cli/commands/stage.js.map +1 -0
- package/dist/cli/commands/translate.js +75 -112
- package/dist/cli/commands/translate.js.map +1 -0
- package/dist/cli/commands/upload.js +185 -213
- package/dist/cli/commands/upload.js.map +1 -0
- package/dist/cli/commands/utils/validation.js +39 -34
- package/dist/cli/commands/utils/validation.js.map +1 -0
- package/dist/cli/flags.js +35 -62
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/inline.js +112 -137
- package/dist/cli/inline.js.map +1 -0
- package/dist/cli/next.js +17 -12
- package/dist/cli/next.js.map +1 -0
- package/dist/cli/node.js +19 -15
- package/dist/cli/node.js.map +1 -0
- package/dist/cli/python.js +13 -8
- package/dist/cli/python.js.map +1 -0
- package/dist/cli/react.js +61 -78
- package/dist/cli/react.js.map +1 -0
- package/dist/config/defaults.js +16 -11
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/generateSettings.js +167 -269
- package/dist/config/generateSettings.js.map +1 -0
- package/dist/config/optionPresets.js +78 -96
- package/dist/config/optionPresets.js.map +1 -0
- package/dist/config/resolveConfig.js +27 -32
- package/dist/config/resolveConfig.js.map +1 -0
- package/dist/config/utils.js +7 -3
- package/dist/config/utils.js.map +1 -0
- package/dist/config/validateSettings.js +19 -30
- package/dist/config/validateSettings.js.map +1 -0
- package/dist/console/colors.js +18 -13
- package/dist/console/colors.js.map +1 -0
- package/dist/console/displayTranslateSummary.js +40 -37
- package/dist/console/displayTranslateSummary.js.map +1 -0
- package/dist/console/formatting.js +8 -5
- package/dist/console/formatting.js.map +1 -0
- package/dist/console/index.d.ts +11 -9
- package/dist/console/index.js +53 -50
- package/dist/console/index.js.map +1 -0
- package/dist/console/inkFields.d.ts +23 -0
- package/dist/console/inkFields.js +87 -0
- package/dist/console/inkFields.js.map +1 -0
- package/dist/console/inkLayout.d.ts +7 -0
- package/dist/console/inkLayout.js +139 -0
- package/dist/console/inkLayout.js.map +1 -0
- package/dist/console/inkLocaleData.d.ts +4 -0
- package/dist/console/inkLocaleData.js +32 -0
- package/dist/console/inkLocaleData.js.map +1 -0
- package/dist/console/inkPrompts.d.ts +8 -0
- package/dist/console/inkPrompts.js +496 -0
- package/dist/console/inkPrompts.js.map +1 -0
- package/dist/console/inkSession.d.ts +3 -0
- package/dist/console/inkSession.js +42 -0
- package/dist/console/inkSession.js.map +1 -0
- package/dist/console/inkTerminal.d.ts +4 -0
- package/dist/console/inkTerminal.js +15 -0
- package/dist/console/inkTerminal.js.map +1 -0
- package/dist/console/inkTypes.d.ts +66 -0
- package/dist/console/inkTypes.js +1 -0
- package/dist/console/inkUtils.d.ts +24 -0
- package/dist/console/inkUtils.js +87 -0
- package/dist/console/inkUtils.js.map +1 -0
- package/dist/console/logger.js +209 -249
- package/dist/console/logger.js.map +1 -0
- package/dist/console/logging.d.ts +14 -0
- package/dist/console/logging.js +203 -162
- package/dist/console/logging.js.map +1 -0
- package/dist/console/promptParsing.d.ts +5 -0
- package/dist/console/promptParsing.js +28 -0
- package/dist/console/promptParsing.js.map +1 -0
- package/dist/console/terminalSession.d.ts +5 -0
- package/dist/console/terminalSession.js +38 -0
- package/dist/console/terminalSession.js.map +1 -0
- package/dist/extraction/index.js +3 -2
- package/dist/extraction/mapToUpdates.js +19 -18
- package/dist/extraction/mapToUpdates.js.map +1 -0
- package/dist/extraction/postProcess.js +68 -86
- package/dist/extraction/postProcess.js.map +1 -0
- package/dist/formats/files/aggregateFiles.js +223 -304
- package/dist/formats/files/aggregateFiles.js.map +1 -0
- package/dist/formats/files/collectFiles.js +53 -54
- package/dist/formats/files/collectFiles.js.map +1 -0
- package/dist/formats/files/convertToFileTranslationData.js +21 -19
- package/dist/formats/files/convertToFileTranslationData.js.map +1 -0
- package/dist/formats/files/fileMapping.js +82 -119
- package/dist/formats/files/fileMapping.js.map +1 -0
- package/dist/formats/files/preprocess/mdx.js +15 -12
- package/dist/formats/files/preprocess/mdx.js.map +1 -0
- package/dist/formats/files/preprocess/mintlify.js +15 -13
- package/dist/formats/files/preprocess/mintlify.js.map +1 -0
- package/dist/formats/files/preprocessContent.js +20 -21
- package/dist/formats/files/preprocessContent.js.map +1 -0
- package/dist/formats/files/save.js +18 -15
- package/dist/formats/files/save.js.map +1 -0
- package/dist/formats/files/supportedFiles.js +27 -22
- package/dist/formats/files/supportedFiles.js.map +1 -0
- package/dist/formats/files/transformFormat.js +93 -100
- package/dist/formats/files/transformFormat.js.map +1 -0
- package/dist/formats/json/extractJson.js +83 -110
- package/dist/formats/json/extractJson.js.map +1 -0
- package/dist/formats/json/flattenJson.js +41 -48
- package/dist/formats/json/flattenJson.js.map +1 -0
- package/dist/formats/json/jsonPath.js +20 -15
- package/dist/formats/json/jsonPath.js.map +1 -0
- package/dist/formats/json/jsonPointer.js +17 -17
- package/dist/formats/json/jsonPointer.js.map +1 -0
- package/dist/formats/json/mergeJson.js +230 -371
- package/dist/formats/json/mergeJson.js.map +1 -0
- package/dist/formats/json/parseJson.js +74 -111
- package/dist/formats/json/parseJson.js.map +1 -0
- package/dist/formats/json/transformJson.js +53 -61
- package/dist/formats/json/transformJson.js.map +1 -0
- package/dist/formats/json/utils.js +158 -187
- package/dist/formats/json/utils.js.map +1 -0
- package/dist/formats/parseKeyedMetadata.js +85 -106
- package/dist/formats/parseKeyedMetadata.js.map +1 -0
- package/dist/formats/utils.js +13 -23
- package/dist/formats/utils.js.map +1 -0
- package/dist/formats/yaml/extractYaml.js +32 -31
- package/dist/formats/yaml/extractYaml.js.map +1 -0
- package/dist/formats/yaml/mergeYaml.js +43 -60
- package/dist/formats/yaml/mergeYaml.js.map +1 -0
- package/dist/formats/yaml/parseYaml.js +34 -23
- package/dist/formats/yaml/parseYaml.js.map +1 -0
- package/dist/formats/yaml/utils.js +19 -21
- package/dist/formats/yaml/utils.js.map +1 -0
- package/dist/fs/clearLocaleDirs.js +82 -114
- package/dist/fs/clearLocaleDirs.js.map +1 -0
- package/dist/fs/config/downloadedVersions.js +174 -188
- package/dist/fs/config/downloadedVersions.js.map +1 -0
- package/dist/fs/config/loadConfig.js +12 -8
- package/dist/fs/config/loadConfig.js.map +1 -0
- package/dist/fs/config/parseFilesConfig.js +166 -227
- package/dist/fs/config/parseFilesConfig.js.map +1 -0
- package/dist/fs/config/setupConfig.js +43 -52
- package/dist/fs/config/setupConfig.js.map +1 -0
- package/dist/fs/config/updateConfig.js +44 -56
- package/dist/fs/config/updateConfig.js.map +1 -0
- package/dist/fs/config/updateVersions.js +27 -28
- package/dist/fs/config/updateVersions.js.map +1 -0
- package/dist/fs/copyFile.js +33 -37
- package/dist/fs/copyFile.js.map +1 -0
- package/dist/fs/createLoadTranslationsFile.js +32 -48
- package/dist/fs/createLoadTranslationsFile.js.map +1 -0
- package/dist/fs/determineFramework/detectPythonLibrary.js +30 -34
- package/dist/fs/determineFramework/detectPythonLibrary.js.map +1 -0
- package/dist/fs/determineFramework/index.js +46 -64
- package/dist/fs/determineFramework/index.js.map +1 -0
- package/dist/fs/determineFramework/matchPyprojectDependency.js +65 -78
- package/dist/fs/determineFramework/matchPyprojectDependency.js.map +1 -0
- package/dist/fs/determineFramework/matchRequirementsTxtDependency.js +21 -19
- package/dist/fs/determineFramework/matchRequirementsTxtDependency.js.map +1 -0
- package/dist/fs/determineFramework/matchSetupPyDependency.js +60 -81
- package/dist/fs/determineFramework/matchSetupPyDependency.js.map +1 -0
- package/dist/fs/determineFramework/resolveGtDependency.js +15 -15
- package/dist/fs/determineFramework/resolveGtDependency.js.map +1 -0
- package/dist/fs/findFilepath.js +63 -78
- package/dist/fs/findFilepath.js.map +1 -0
- package/dist/fs/loadJSON.js +18 -15
- package/dist/fs/loadJSON.js.map +1 -0
- package/dist/fs/matchFiles.js +12 -7
- package/dist/fs/matchFiles.js.map +1 -0
- package/dist/fs/saveJSON.js +10 -6
- package/dist/fs/saveJSON.js.map +1 -0
- package/dist/fs/utils.js +19 -15
- package/dist/fs/utils.js.map +1 -0
- package/dist/functions.d.ts +2 -1
- package/dist/functions.js +3 -6
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +6 -2
- package/dist/generated/version.js.map +1 -0
- package/dist/git/branches.js +77 -83
- package/dist/git/branches.js.map +1 -0
- package/dist/hooks/postProcess.js +97 -114
- package/dist/hooks/postProcess.js.map +1 -0
- package/dist/index.js +23 -31
- package/dist/index.js.map +1 -0
- package/dist/locadex/setupFlow.js +11 -8
- package/dist/locadex/setupFlow.js.map +1 -0
- package/dist/main.js +17 -7
- package/dist/main.js.map +1 -0
- package/dist/next/config/parseNextConfig.js +32 -51
- package/dist/next/config/parseNextConfig.js.map +1 -0
- package/dist/next/jsx/utils.js +25 -37
- package/dist/next/jsx/utils.js.map +1 -0
- package/dist/next/parse/handleInitGT.js +87 -154
- package/dist/next/parse/handleInitGT.js.map +1 -0
- package/dist/next/parse/wrapContent.js +136 -158
- package/dist/next/parse/wrapContent.js.map +1 -0
- package/dist/python/parse/createPythonInlineUpdates.js +36 -33
- package/dist/python/parse/createPythonInlineUpdates.js.map +1 -0
- package/dist/react/config/createESBuildConfig.js +115 -115
- package/dist/react/config/createESBuildConfig.js.map +1 -0
- package/dist/react/jsx/evaluateJsx.js +90 -124
- package/dist/react/jsx/evaluateJsx.js.map +1 -0
- package/dist/react/jsx/utils/buildImportMap.js +24 -28
- package/dist/react/jsx/utils/buildImportMap.js.map +1 -0
- package/dist/react/jsx/utils/constants.js +79 -87
- package/dist/react/jsx/utils/constants.js.map +1 -0
- package/dist/react/jsx/utils/extractSourceCode.js +36 -37
- package/dist/react/jsx/utils/extractSourceCode.js.map +1 -0
- package/dist/react/jsx/utils/getCalleeNameFromExpression.js +30 -30
- package/dist/react/jsx/utils/getCalleeNameFromExpression.js.map +1 -0
- package/dist/react/jsx/utils/getPathsAndAliases.js +70 -105
- package/dist/react/jsx/utils/getPathsAndAliases.js.map +1 -0
- package/dist/react/jsx/utils/isNumberLiteral.js +13 -11
- package/dist/react/jsx/utils/isNumberLiteral.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js +103 -148
- package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/autoInsertion.js +305 -389
- package/dist/react/jsx/utils/jsxParsing/autoInsertion.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js +122 -193
- package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js +50 -64
- package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js +41 -68
- package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/parseJsx.js +760 -1107
- package/dist/react/jsx/utils/jsxParsing/parseJsx.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/parseTProps.js +35 -71
- package/dist/react/jsx/utils/jsxParsing/parseTProps.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js +39 -58
- package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js.map +1 -0
- package/dist/react/jsx/utils/jsxParsing/types.js +10 -24
- package/dist/react/jsx/utils/jsxParsing/types.js.map +1 -0
- package/dist/react/jsx/utils/mapAttributeName.js +13 -13
- package/dist/react/jsx/utils/mapAttributeName.js.map +1 -0
- package/dist/react/jsx/utils/parseAst.js +142 -272
- package/dist/react/jsx/utils/parseAst.js.map +1 -0
- package/dist/react/jsx/utils/parseString.js +726 -1090
- package/dist/react/jsx/utils/parseString.js.map +1 -0
- package/dist/react/jsx/utils/parseStringFunction.js +274 -401
- package/dist/react/jsx/utils/parseStringFunction.js.map +1 -0
- package/dist/react/jsx/utils/resolveImportPath.js +104 -108
- package/dist/react/jsx/utils/resolveImportPath.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js +18 -24
- package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js +412 -579
- package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/derivation/index.js +57 -67
- package/dist/react/jsx/utils/stringParsing/derivation/index.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js +26 -36
- package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js +29 -24
- package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js +34 -32
- package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js +80 -117
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js +24 -19
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js +18 -21
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js +45 -50
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js +54 -59
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js.map +1 -0
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js +56 -69
- package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js.map +1 -0
- package/dist/react/jsx/utils/validateStringFunction.js +21 -29
- package/dist/react/jsx/utils/validateStringFunction.js.map +1 -0
- package/dist/react/jsx/wrapJsx.js +192 -375
- package/dist/react/jsx/wrapJsx.js.map +1 -0
- package/dist/react/parse/addVitePlugin/index.js +40 -34
- package/dist/react/parse/addVitePlugin/index.js.map +1 -0
- package/dist/react/parse/addVitePlugin/installCompiler.js +18 -20
- package/dist/react/parse/addVitePlugin/installCompiler.js.map +1 -0
- package/dist/react/parse/addVitePlugin/updateViteConfig.js +107 -111
- package/dist/react/parse/addVitePlugin/updateViteConfig.js.map +1 -0
- package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js +23 -26
- package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js.map +1 -0
- package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js +29 -43
- package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js.map +1 -0
- package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js +70 -104
- package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js.map +1 -0
- package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js +23 -29
- package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js.map +1 -0
- package/dist/react/parse/createDictionaryUpdates.js +121 -185
- package/dist/react/parse/createDictionaryUpdates.js.map +1 -0
- package/dist/react/parse/createInlineUpdates.js +123 -139
- package/dist/react/parse/createInlineUpdates.js.map +1 -0
- package/dist/react/parse/wrapContent.js +131 -156
- package/dist/react/parse/wrapContent.js.map +1 -0
- package/dist/react/utils/flattenDictionary.js +55 -70
- package/dist/react/utils/flattenDictionary.js.map +1 -0
- package/dist/react/utils/getEntryAndMetadata.js +14 -10
- package/dist/react/utils/getEntryAndMetadata.js.map +1 -0
- package/dist/react/utils/getVariableName.js +36 -33
- package/dist/react/utils/getVariableName.js.map +1 -0
- package/dist/setup/detectFramework.js +85 -102
- package/dist/setup/detectFramework.js.map +1 -0
- package/dist/setup/frameworkUtils.js +17 -28
- package/dist/setup/frameworkUtils.js.map +1 -0
- package/dist/setup/userInput.js +24 -31
- package/dist/setup/userInput.js.map +1 -0
- package/dist/setup/wizard.js +141 -143
- package/dist/setup/wizard.js.map +1 -0
- package/dist/state/mintlifyRefMap.js +12 -9
- package/dist/state/mintlifyRefMap.js.map +1 -0
- package/dist/state/recentDownloads.js +26 -23
- package/dist/state/recentDownloads.js.map +1 -0
- package/dist/state/translateWarnings.js +17 -8
- package/dist/state/translateWarnings.js.map +1 -0
- package/dist/translation/parse.js +77 -98
- package/dist/translation/parse.js.map +1 -0
- package/dist/translation/stage.js +28 -43
- package/dist/translation/stage.js.map +1 -0
- package/dist/translation/validate.js +68 -91
- package/dist/translation/validate.js.map +1 -0
- package/dist/types/libraries.js +93 -91
- package/dist/types/libraries.js.map +1 -0
- package/dist/types/parsing.js +19 -10
- package/dist/types/parsing.js.map +1 -0
- package/dist/utils/addExplicitAnchorIds.js +270 -389
- package/dist/utils/addExplicitAnchorIds.js.map +1 -0
- package/dist/utils/calculateTimeoutMs.js +11 -6
- package/dist/utils/calculateTimeoutMs.js.map +1 -0
- package/dist/utils/constants.js +15 -12
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/credentials.js +67 -114
- package/dist/utils/credentials.js.map +1 -0
- package/dist/utils/fetch.js +22 -20
- package/dist/utils/fetch.js.map +1 -0
- package/dist/utils/flattenJsonFiles.js +27 -34
- package/dist/utils/flattenJsonFiles.js.map +1 -0
- package/dist/utils/gitDiff.js +30 -32
- package/dist/utils/gitDiff.js.map +1 -0
- package/dist/utils/gt.js +7 -2
- package/dist/utils/gt.js.map +1 -0
- package/dist/utils/hash.js +14 -9
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/headers.js +10 -13
- package/dist/utils/headers.js.map +1 -0
- package/dist/utils/installPackage.js +70 -75
- package/dist/utils/installPackage.js.map +1 -0
- package/dist/utils/localizeRelativeAssets.js +114 -157
- package/dist/utils/localizeRelativeAssets.js.map +1 -0
- package/dist/utils/localizeStaticImports.js +229 -371
- package/dist/utils/localizeStaticImports.js.map +1 -0
- package/dist/utils/localizeStaticUrls.js +241 -424
- package/dist/utils/localizeStaticUrls.js.map +1 -0
- package/dist/utils/mintlifyTitleFallback.js +64 -72
- package/dist/utils/mintlifyTitleFallback.js.map +1 -0
- package/dist/utils/monorepoVersionCheck.js +177 -215
- package/dist/utils/monorepoVersionCheck.js.map +1 -0
- package/dist/utils/packageInfo.js +17 -16
- package/dist/utils/packageInfo.js.map +1 -0
- package/dist/utils/packageJson.js +51 -66
- package/dist/utils/packageJson.js.map +1 -0
- package/dist/utils/packageManager.js +237 -260
- package/dist/utils/packageManager.js.map +1 -0
- package/dist/utils/parse/needsCJS.js +36 -69
- package/dist/utils/parse/needsCJS.js.map +1 -0
- package/dist/utils/persistPostprocessHashes.js +30 -32
- package/dist/utils/persistPostprocessHashes.js.map +1 -0
- package/dist/utils/processAnchorIds.js +32 -54
- package/dist/utils/processAnchorIds.js.map +1 -0
- package/dist/utils/processOpenApi.js +469 -578
- package/dist/utils/processOpenApi.js.map +1 -0
- package/dist/utils/resolveMintlifyRefs.js +89 -105
- package/dist/utils/resolveMintlifyRefs.js.map +1 -0
- package/dist/utils/resolvePublish.js +46 -54
- package/dist/utils/resolvePublish.js.map +1 -0
- package/dist/utils/sanitizeFileContent.js +20 -27
- package/dist/utils/sanitizeFileContent.js.map +1 -0
- package/dist/utils/sharedStaticAssets.js +248 -366
- package/dist/utils/sharedStaticAssets.js.map +1 -0
- package/dist/utils/splitMintlifyLanguageRefs.js +208 -282
- package/dist/utils/splitMintlifyLanguageRefs.js.map +1 -0
- package/dist/utils/validateMdx.js +26 -23
- package/dist/utils/validateMdx.js.map +1 -0
- package/dist/utils/wrapPlainUrls.js +58 -70
- package/dist/utils/wrapPlainUrls.js.map +1 -0
- package/dist/workflows/download.js +92 -126
- package/dist/workflows/download.js.map +1 -0
- package/dist/workflows/enqueue.js +47 -54
- package/dist/workflows/enqueue.js.map +1 -0
- package/dist/workflows/publish.js +29 -29
- package/dist/workflows/publish.js.map +1 -0
- package/dist/workflows/setupProject.js +39 -40
- package/dist/workflows/setupProject.js.map +1 -0
- package/dist/workflows/stage.js +61 -65
- package/dist/workflows/stage.js.map +1 -0
- package/dist/workflows/steps/BranchStep.js +118 -163
- package/dist/workflows/steps/BranchStep.js.map +1 -0
- package/dist/workflows/steps/DownloadStep.js +107 -137
- package/dist/workflows/steps/DownloadStep.js.map +1 -0
- package/dist/workflows/steps/EnqueueStep.js +32 -32
- package/dist/workflows/steps/EnqueueStep.js.map +1 -0
- package/dist/workflows/steps/PollJobsStep.js +208 -292
- package/dist/workflows/steps/PollJobsStep.js.map +1 -0
- package/dist/workflows/steps/PublishStep.js +33 -38
- package/dist/workflows/steps/PublishStep.js.map +1 -0
- package/dist/workflows/steps/SetupStep.js +71 -72
- package/dist/workflows/steps/SetupStep.js.map +1 -0
- package/dist/workflows/steps/TagStep.js +39 -44
- package/dist/workflows/steps/TagStep.js.map +1 -0
- package/dist/workflows/steps/UploadSourcesStep.js +108 -140
- package/dist/workflows/steps/UploadSourcesStep.js.map +1 -0
- package/dist/workflows/steps/UploadTranslationsStep.js +61 -71
- package/dist/workflows/steps/UploadTranslationsStep.js.map +1 -0
- package/dist/workflows/steps/UserEditDiffsStep.js +32 -34
- package/dist/workflows/steps/UserEditDiffsStep.js.map +1 -0
- package/dist/workflows/steps/WorkflowStep.js +6 -2
- package/dist/workflows/steps/WorkflowStep.js.map +1 -0
- package/dist/workflows/upload.js +45 -46
- package/dist/workflows/upload.js.map +1 -0
- package/package.json +14 -7
package/dist/formats/utils.js
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import YAML from
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
2
|
-
import { exitSync } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { validateYamlSchema } from
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import micromatch from
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
2
|
-
import path from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
81
|
+
* Recursively removes empty directories
|
|
82
|
+
* @param dirPath - The directory to clean up
|
|
83
|
+
*/
|
|
108
84
|
async function cleanupEmptyDirs(dirPath) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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"}
|