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.
- package/CHANGELOG.md +22 -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.d.ts +1 -1
- package/dist/react/jsx/utils/resolveImportPath.js +125 -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
|
@@ -1,61 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { displayUpdatedConfigFile } from
|
|
3
|
-
import
|
|
1
|
+
import { logger } from "../../console/logger.js";
|
|
2
|
+
import { displayUpdatedConfigFile } from "../../console/logging.js";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
//#region src/fs/config/updateConfig.ts
|
|
4
5
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
// Apply null filter to remove values that were marked for removal
|
|
38
|
-
const filteredContent = applyNullFilter(mergedContent, options);
|
|
39
|
-
// write to file
|
|
40
|
-
const jsonContent = JSON.stringify(filteredContent, null, 2);
|
|
41
|
-
await fs.promises.writeFile(configFilepath, jsonContent, 'utf-8');
|
|
42
|
-
// show update in console
|
|
43
|
-
displayUpdatedConfigFile(configFilepath);
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
logger.error(`An error occurred while updating ${configFilepath}: ${error}`);
|
|
47
|
-
}
|
|
6
|
+
* Update the config file version id, locales, and projectId (if necessary)
|
|
7
|
+
* @param {string} configFilepath - The path to the config file.
|
|
8
|
+
* @param {UpdateConfigOptions} options - The options to update the config file with.
|
|
9
|
+
* @returns {Promise<void>} - A promise that resolves when the config file is updated.
|
|
10
|
+
*
|
|
11
|
+
* Hint: Mark a field as null to remove it from the config file.
|
|
12
|
+
*/
|
|
13
|
+
async function updateConfig(configFilepath, options) {
|
|
14
|
+
const { projectId, _versionId, _branchId, stageTranslations } = options;
|
|
15
|
+
const newContent = {
|
|
16
|
+
...projectId && { projectId },
|
|
17
|
+
..._versionId && { _versionId },
|
|
18
|
+
..._branchId && { _branchId },
|
|
19
|
+
...stageTranslations && { stageTranslations }
|
|
20
|
+
};
|
|
21
|
+
try {
|
|
22
|
+
let oldContent = {};
|
|
23
|
+
if (fs.existsSync(configFilepath)) {
|
|
24
|
+
const parsed = JSON.parse(await fs.promises.readFile(configFilepath, "utf-8"));
|
|
25
|
+
oldContent = typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
26
|
+
}
|
|
27
|
+
const filteredContent = applyNullFilter({
|
|
28
|
+
...oldContent,
|
|
29
|
+
...newContent
|
|
30
|
+
}, options);
|
|
31
|
+
const jsonContent = JSON.stringify(filteredContent, null, 2);
|
|
32
|
+
await fs.promises.writeFile(configFilepath, jsonContent, "utf-8");
|
|
33
|
+
displayUpdatedConfigFile(configFilepath);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
logger.error(`An error occurred while updating ${configFilepath}: ${error}`);
|
|
36
|
+
}
|
|
48
37
|
}
|
|
49
|
-
// --- Helper functions --- //
|
|
50
38
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
* Remove values from object if they were marked for removal
|
|
40
|
+
*/
|
|
53
41
|
function applyNullFilter(obj, filter) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
delete result[key];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return result;
|
|
42
|
+
const result = { ...obj };
|
|
43
|
+
for (const key of Object.keys(filter)) if (filter[key] === null) delete result[key];
|
|
44
|
+
return result;
|
|
61
45
|
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { updateConfig as default };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=updateConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateConfig.js","names":[],"sources":["../../../src/fs/config/updateConfig.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { displayUpdatedConfigFile } from '../../console/logging.js';\nimport { logger } from '../../console/logger.js';\n\n/**\n * Options for updating the config file.\n *\n * Since these are all string values, we can use null to mark them for removal\n */\ntype UpdateConfigOptions = {\n projectId?: string | null;\n _versionId?: string | null;\n _branchId?: string | null;\n stageTranslations?: boolean | null;\n};\n\n/**\n * Update the config file version id, locales, and projectId (if necessary)\n * @param {string} configFilepath - The path to the config file.\n * @param {UpdateConfigOptions} options - The options to update the config file with.\n * @returns {Promise<void>} - A promise that resolves when the config file is updated.\n *\n * Hint: Mark a field as null to remove it from the config file.\n */\nexport default async function updateConfig(\n configFilepath: string,\n options: UpdateConfigOptions\n): Promise<void> {\n // Filter out empty string values from the config object\n const { projectId, _versionId, _branchId, stageTranslations } = options;\n const newContent = {\n ...(projectId && { projectId }),\n ...(_versionId && { _versionId }),\n ...(_branchId && { _branchId }),\n // Omit when false\n ...(stageTranslations && { stageTranslations }),\n };\n\n try {\n // if file exists\n let oldContent: Record<string, unknown> = {};\n if (fs.existsSync(configFilepath)) {\n const parsed = JSON.parse(\n await fs.promises.readFile(configFilepath, 'utf-8')\n );\n oldContent =\n typeof parsed === 'object' && parsed !== null\n ? (parsed as Record<string, unknown>)\n : {};\n }\n\n // merge old and new content\n const mergedContent = {\n ...oldContent,\n ...newContent,\n };\n\n // Apply null filter to remove values that were marked for removal\n const filteredContent = applyNullFilter(mergedContent, options);\n\n // write to file\n const jsonContent = JSON.stringify(filteredContent, null, 2);\n await fs.promises.writeFile(configFilepath, jsonContent, 'utf-8');\n\n // show update in console\n displayUpdatedConfigFile(configFilepath);\n } catch (error) {\n logger.error(\n `An error occurred while updating ${configFilepath}: ${error}`\n );\n }\n}\n\n// --- Helper functions --- //\n\n/**\n * Remove values from object if they were marked for removal\n */\nfunction applyNullFilter<T extends Record<string, unknown>>(\n obj: T,\n filter: Partial<Record<keyof T, null | unknown>>\n): T {\n const result = { ...obj };\n for (const key of Object.keys(filter)) {\n if (filter[key] === null) {\n delete result[key];\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;;;;;;AAwBA,eAA8B,aAC5B,gBACA,SACe;CAEf,MAAM,EAAE,WAAW,YAAY,WAAW,sBAAsB;CAChE,MAAM,aAAa;EACjB,GAAI,aAAa,EAAE,WAAW;EAC9B,GAAI,cAAc,EAAE,YAAY;EAChC,GAAI,aAAa,EAAE,WAAW;EAE9B,GAAI,qBAAqB,EAAE,mBAAmB;EAC/C;AAED,KAAI;EAEF,IAAI,aAAsC,EAAE;AAC5C,MAAI,GAAG,WAAW,eAAe,EAAE;GACjC,MAAM,SAAS,KAAK,MAClB,MAAM,GAAG,SAAS,SAAS,gBAAgB,QAAQ,CACpD;AACD,gBACE,OAAO,WAAW,YAAY,WAAW,OACpC,SACD,EAAE;;EAUV,MAAM,kBAAkB,gBAAgB;GALtC,GAAG;GACH,GAAG;GAIgD,EAAE,QAAQ;EAG/D,MAAM,cAAc,KAAK,UAAU,iBAAiB,MAAM,EAAE;AAC5D,QAAM,GAAG,SAAS,UAAU,gBAAgB,aAAa,QAAQ;AAGjE,2BAAyB,eAAe;UACjC,OAAO;AACd,SAAO,MACL,oCAAoC,eAAe,IAAI,QACxD;;;;;;AASL,SAAS,gBACP,KACA,QACG;CACH,MAAM,SAAS,EAAE,GAAG,KAAK;AACzB,MAAK,MAAM,OAAO,OAAO,KAAK,OAAO,CACnC,KAAI,OAAO,SAAS,KAClB,QAAO,OAAO;AAGlB,QAAO"}
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { displayUpdatedVersionsFile } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
catch (error) {
|
|
17
|
-
logger.error(`An error occurred while updating ${versionFilepath}: ${error}`);
|
|
18
|
-
}
|
|
1
|
+
import { logger } from "../../console/logger.js";
|
|
2
|
+
import { displayUpdatedVersionsFile } from "../../console/logging.js";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
//#region src/fs/config/updateVersions.ts
|
|
6
|
+
const STAGED_VERSIONS_FILE = "staged-versions.json";
|
|
7
|
+
async function updateVersions({ configDirectory, versionData }) {
|
|
8
|
+
const versionFilepath = path.join(configDirectory, STAGED_VERSIONS_FILE);
|
|
9
|
+
try {
|
|
10
|
+
fs.mkdirSync(configDirectory, { recursive: true });
|
|
11
|
+
fs.writeFileSync(versionFilepath, JSON.stringify(versionData, null, 2));
|
|
12
|
+
displayUpdatedVersionsFile(versionFilepath);
|
|
13
|
+
} catch (error) {
|
|
14
|
+
logger.error(`An error occurred while updating ${versionFilepath}: ${error}`);
|
|
15
|
+
}
|
|
19
16
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
17
|
+
async function getStagedVersions(configDirectory) {
|
|
18
|
+
try {
|
|
19
|
+
const versionFilepath = path.join(configDirectory, STAGED_VERSIONS_FILE);
|
|
20
|
+
return JSON.parse(fs.readFileSync(versionFilepath, "utf8"));
|
|
21
|
+
} catch (error) {
|
|
22
|
+
logger.error(`An error occurred while getting staged versions: ${error}`);
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
30
25
|
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { getStagedVersions, updateVersions };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=updateVersions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateVersions.js","names":[],"sources":["../../../src/fs/config/updateVersions.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { displayUpdatedVersionsFile } from '../../console/logging.js';\nimport { logger } from '../../console/logger.js';\nimport path from 'node:path';\n\nconst STAGED_VERSIONS_FILE = 'staged-versions.json';\ntype StagedVersionData = Record<\n string, // fileId\n { fileName: string; versionId: string }\n>;\n// Update the versions.json file with the new version ids\n// of the translations that were sent to the API\nexport async function updateVersions({\n configDirectory,\n versionData,\n}: {\n configDirectory: string;\n versionData: StagedVersionData;\n}): Promise<void> {\n const versionFilepath = path.join(configDirectory, STAGED_VERSIONS_FILE);\n try {\n fs.mkdirSync(configDirectory, { recursive: true });\n fs.writeFileSync(versionFilepath, JSON.stringify(versionData, null, 2));\n\n // show update in console\n displayUpdatedVersionsFile(versionFilepath);\n } catch (error) {\n logger.error(\n `An error occurred while updating ${versionFilepath}: ${error}`\n );\n }\n}\n\nexport async function getStagedVersions(\n configDirectory: string\n): Promise<StagedVersionData> {\n try {\n const versionFilepath = path.join(configDirectory, STAGED_VERSIONS_FILE);\n const versionData = JSON.parse(fs.readFileSync(versionFilepath, 'utf8'));\n return versionData;\n } catch (error) {\n logger.error(`An error occurred while getting staged versions: ${error}`);\n return {};\n }\n}\n"],"mappings":";;;;;AAKA,MAAM,uBAAuB;AAO7B,eAAsB,eAAe,EACnC,iBACA,eAIgB;CAChB,MAAM,kBAAkB,KAAK,KAAK,iBAAiB,qBAAqB;AACxE,KAAI;AACF,KAAG,UAAU,iBAAiB,EAAE,WAAW,MAAM,CAAC;AAClD,KAAG,cAAc,iBAAiB,KAAK,UAAU,aAAa,MAAM,EAAE,CAAC;AAGvE,6BAA2B,gBAAgB;UACpC,OAAO;AACd,SAAO,MACL,oCAAoC,gBAAgB,IAAI,QACzD;;;AAIL,eAAsB,kBACpB,iBAC4B;AAC5B,KAAI;EACF,MAAM,kBAAkB,KAAK,KAAK,iBAAiB,qBAAqB;AAExE,SADoB,KAAK,MAAM,GAAG,aAAa,iBAAiB,OAAO,CACrD;UACX,OAAO;AACd,SAAO,MAAM,oDAAoD,QAAQ;AACzE,SAAO,EAAE"}
|
package/dist/fs/copyFile.js
CHANGED
|
@@ -1,39 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { logger } from "../console/logger.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
//#region src/fs/copyFile.ts
|
|
4
5
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (const sourcePath in copyFiles) {
|
|
31
|
-
for (const targetPath of copyFiles[sourcePath]) {
|
|
32
|
-
// Ensure the target directory exists
|
|
33
|
-
const targetDir = path.dirname(targetPath);
|
|
34
|
-
await fs.promises.mkdir(targetDir, { recursive: true });
|
|
35
|
-
// Copy the file
|
|
36
|
-
await fs.promises.copyFile(sourcePath, targetPath);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
6
|
+
* Copy a file to target locale without translation
|
|
7
|
+
*
|
|
8
|
+
* This is a naive approach, does not allow for wild cards
|
|
9
|
+
*/
|
|
10
|
+
async function copyFile(settings) {
|
|
11
|
+
if (!settings.options?.copyFiles || settings.options.copyFiles.length === 0) return;
|
|
12
|
+
const copyFiles = settings.options.copyFiles.reduce((paths, filePathTemplate) => {
|
|
13
|
+
const sourcePath = path.join(process.cwd(), filePathTemplate.replace("[locale]", settings.defaultLocale));
|
|
14
|
+
if (!fs.existsSync(sourcePath)) {
|
|
15
|
+
logger.error(`Failed to copy files: File path does not exist: ${sourcePath}`);
|
|
16
|
+
return paths;
|
|
17
|
+
}
|
|
18
|
+
paths[sourcePath] = [];
|
|
19
|
+
for (const locale of settings.locales) {
|
|
20
|
+
if (locale === settings.defaultLocale) continue;
|
|
21
|
+
const targetPath = path.join(process.cwd(), filePathTemplate.replace("[locale]", locale));
|
|
22
|
+
paths[sourcePath].push(targetPath);
|
|
23
|
+
}
|
|
24
|
+
return paths;
|
|
25
|
+
}, {});
|
|
26
|
+
for (const sourcePath in copyFiles) for (const targetPath of copyFiles[sourcePath]) {
|
|
27
|
+
const targetDir = path.dirname(targetPath);
|
|
28
|
+
await fs.promises.mkdir(targetDir, { recursive: true });
|
|
29
|
+
await fs.promises.copyFile(sourcePath, targetPath);
|
|
30
|
+
}
|
|
39
31
|
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { copyFile as default };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=copyFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyFile.js","names":[],"sources":["../../src/fs/copyFile.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\nimport type { Settings } from '../types/index.js';\nimport { logger } from '../console/logger.js';\n\ntype CopyFileSettings = Pick<Settings, 'defaultLocale' | 'locales' | 'options'>;\n\n/**\n * Copy a file to target locale without translation\n *\n * This is a naive approach, does not allow for wild cards\n */\nexport default async function copyFile(settings: CopyFileSettings) {\n if (!settings.options?.copyFiles || settings.options.copyFiles.length === 0) {\n return;\n }\n\n // Construct a map of source paths to target paths\n const copyFiles = settings.options.copyFiles.reduce(\n (paths: Record<string, string[]>, filePathTemplate: string) => {\n const sourcePath = path.join(\n process.cwd(),\n filePathTemplate.replace('[locale]', settings.defaultLocale)\n );\n if (!fs.existsSync(sourcePath)) {\n logger.error(\n `Failed to copy files: File path does not exist: ${sourcePath}`\n );\n return paths;\n }\n paths[sourcePath] = [];\n for (const locale of settings.locales) {\n if (locale === settings.defaultLocale) continue;\n const targetPath = path.join(\n process.cwd(),\n filePathTemplate.replace('[locale]', locale)\n );\n paths[sourcePath].push(targetPath);\n }\n return paths;\n },\n {} as Record<string, string[]>\n );\n\n // Copy each file to the target locale\n for (const sourcePath in copyFiles) {\n for (const targetPath of copyFiles[sourcePath]) {\n // Ensure the target directory exists\n const targetDir = path.dirname(targetPath);\n await fs.promises.mkdir(targetDir, { recursive: true });\n\n // Copy the file\n await fs.promises.copyFile(sourcePath, targetPath);\n }\n }\n}\n"],"mappings":";;;;;;;;;AAYA,eAA8B,SAAS,UAA4B;AACjE,KAAI,CAAC,SAAS,SAAS,aAAa,SAAS,QAAQ,UAAU,WAAW,EACxE;CAIF,MAAM,YAAY,SAAS,QAAQ,UAAU,QAC1C,OAAiC,qBAA6B;EAC7D,MAAM,aAAa,KAAK,KACtB,QAAQ,KAAK,EACb,iBAAiB,QAAQ,YAAY,SAAS,cAAc,CAC7D;AACD,MAAI,CAAC,GAAG,WAAW,WAAW,EAAE;AAC9B,UAAO,MACL,mDAAmD,aACpD;AACD,UAAO;;AAET,QAAM,cAAc,EAAE;AACtB,OAAK,MAAM,UAAU,SAAS,SAAS;AACrC,OAAI,WAAW,SAAS,cAAe;GACvC,MAAM,aAAa,KAAK,KACtB,QAAQ,KAAK,EACb,iBAAiB,QAAQ,YAAY,OAAO,CAC7C;AACD,SAAM,YAAY,KAAK,WAAW;;AAEpC,SAAO;IAET,EAAE,CACH;AAGD,MAAK,MAAM,cAAc,UACvB,MAAK,MAAM,cAAc,UAAU,aAAa;EAE9C,MAAM,YAAY,KAAK,QAAQ,WAAW;AAC1C,QAAM,GAAG,SAAS,MAAM,WAAW,EAAE,WAAW,MAAM,CAAC;AAGvD,QAAM,GAAG,SAAS,SAAS,YAAY,WAAW"}
|
|
@@ -1,34 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { logger } from "../console/logger.js";
|
|
2
|
+
import { DEFAULT_TRANSLATIONS_DIR } from "../utils/constants.js";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
//#region src/fs/createLoadTranslationsFile.ts
|
|
6
7
|
function toRelativeImportPath(relativePath) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
// Dynamic imports must use explicit relative specifiers; values like
|
|
12
|
-
// "src/_gt" are otherwise treated as package names by Vite and Node.
|
|
13
|
-
const hasExplicitRelativePrefix = normalizedPath === '..' ||
|
|
14
|
-
normalizedPath.startsWith('../') ||
|
|
15
|
-
normalizedPath.startsWith('./');
|
|
16
|
-
return hasExplicitRelativePrefix
|
|
17
|
-
? `${normalizedPath}/`
|
|
18
|
-
: `./${normalizedPath}/`;
|
|
8
|
+
const normalizedPath = relativePath.split(path.sep).join(path.posix.sep);
|
|
9
|
+
if (!normalizedPath) return "./";
|
|
10
|
+
return normalizedPath === ".." || normalizedPath.startsWith("../") || normalizedPath.startsWith("./") ? `${normalizedPath}/` : `./${normalizedPath}/`;
|
|
19
11
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const filePath = usingSrcDirectory
|
|
28
|
-
? path.join(appDirectory, 'src', 'loadTranslations.js')
|
|
29
|
-
: path.join(appDirectory, 'loadTranslations.js');
|
|
30
|
-
if (!fs.existsSync(filePath)) {
|
|
31
|
-
const loadTranslationsContent = `
|
|
12
|
+
async function createLoadTranslationsFile(appDirectory, translationsDir = DEFAULT_TRANSLATIONS_DIR, locales) {
|
|
13
|
+
const usingSrcDirectory = fs.existsSync(path.join(appDirectory, "src"));
|
|
14
|
+
const loadTranslationsDir = usingSrcDirectory ? path.join(appDirectory, "src") : appDirectory;
|
|
15
|
+
const publicPath = toRelativeImportPath(path.relative(loadTranslationsDir, path.resolve(appDirectory, translationsDir)));
|
|
16
|
+
const filePath = usingSrcDirectory ? path.join(appDirectory, "src", "loadTranslations.js") : path.join(appDirectory, "loadTranslations.js");
|
|
17
|
+
if (!fs.existsSync(filePath)) {
|
|
18
|
+
const loadTranslationsContent = `
|
|
32
19
|
export default async function loadTranslations(locale) {
|
|
33
20
|
try {
|
|
34
21
|
// Load translations from ${translationsDir} directory
|
|
@@ -41,23 +28,20 @@ export default async function loadTranslations(locale) {
|
|
|
41
28
|
}
|
|
42
29
|
}
|
|
43
30
|
`;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
catch (error) {
|
|
57
|
-
logger.error(`Failed to create translations directory: ${error}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
logger.info(`Found ${chalk.cyan('loadTranslations.js')} file at ${chalk.cyan(filePath)}. Skipping creation...`);
|
|
62
|
-
}
|
|
31
|
+
await fs.promises.writeFile(filePath, loadTranslationsContent);
|
|
32
|
+
logger.info(`Created ${chalk.cyan("loadTranslations.js")} file at ${chalk.cyan(filePath)}.`);
|
|
33
|
+
try {
|
|
34
|
+
await fs.promises.mkdir(translationsDir, { recursive: true });
|
|
35
|
+
for (const locale of locales) {
|
|
36
|
+
if (fs.existsSync(path.join(translationsDir, `${locale}.json`))) continue;
|
|
37
|
+
await fs.promises.writeFile(path.join(translationsDir, `${locale}.json`), "{}");
|
|
38
|
+
}
|
|
39
|
+
} catch (error) {
|
|
40
|
+
logger.error(`Failed to create translations directory: ${error}`);
|
|
41
|
+
}
|
|
42
|
+
} else logger.info(`Found ${chalk.cyan("loadTranslations.js")} file at ${chalk.cyan(filePath)}. Skipping creation...`);
|
|
63
43
|
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { createLoadTranslationsFile };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=createLoadTranslationsFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLoadTranslationsFile.js","names":[],"sources":["../../src/fs/createLoadTranslationsFile.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { logger } from '../console/logger.js';\nimport chalk from 'chalk';\nimport { DEFAULT_TRANSLATIONS_DIR } from '../utils/constants.js';\n\nfunction toRelativeImportPath(relativePath: string) {\n const normalizedPath = relativePath.split(path.sep).join(path.posix.sep);\n\n if (!normalizedPath) {\n return './';\n }\n\n // Dynamic imports must use explicit relative specifiers; values like\n // \"src/_gt\" are otherwise treated as package names by Vite and Node.\n const hasExplicitRelativePrefix =\n normalizedPath === '..' ||\n normalizedPath.startsWith('../') ||\n normalizedPath.startsWith('./');\n\n return hasExplicitRelativePrefix\n ? `${normalizedPath}/`\n : `./${normalizedPath}/`;\n}\n\nexport async function createLoadTranslationsFile(\n appDirectory: string,\n translationsDir: string = DEFAULT_TRANSLATIONS_DIR,\n locales: string[]\n) {\n const usingSrcDirectory = fs.existsSync(path.join(appDirectory, 'src'));\n\n const loadTranslationsDir = usingSrcDirectory\n ? path.join(appDirectory, 'src')\n : appDirectory;\n const relativePath = path.relative(\n loadTranslationsDir,\n path.resolve(appDirectory, translationsDir)\n );\n const publicPath = toRelativeImportPath(relativePath);\n\n const filePath = usingSrcDirectory\n ? path.join(appDirectory, 'src', 'loadTranslations.js')\n : path.join(appDirectory, 'loadTranslations.js');\n\n if (!fs.existsSync(filePath)) {\n const loadTranslationsContent = `\nexport default async function loadTranslations(locale) {\n try {\n // Load translations from ${translationsDir} directory\n // This matches the GT config files.gt.output path\n const t = await import(\\`${publicPath}\\${locale}.json\\`);\n return t.default;\n } catch (error) {\n console.warn(\\`Failed to load translations for locale \\${locale}:\\`, error);\n return {};\n }\n}\n`;\n await fs.promises.writeFile(filePath, loadTranslationsContent);\n logger.info(\n `Created ${chalk.cyan(\n 'loadTranslations.js'\n )} file at ${chalk.cyan(filePath)}.`\n );\n try {\n await fs.promises.mkdir(translationsDir, { recursive: true });\n // Create empty JSON files\n for (const locale of locales) {\n if (fs.existsSync(path.join(translationsDir, `${locale}.json`))) {\n continue;\n }\n await fs.promises.writeFile(\n path.join(translationsDir, `${locale}.json`),\n '{}'\n );\n }\n } catch (error) {\n logger.error(`Failed to create translations directory: ${error}`);\n }\n } else {\n logger.info(\n `Found ${chalk.cyan('loadTranslations.js')} file at ${chalk.cyan(\n filePath\n )}. Skipping creation...`\n );\n }\n}\n"],"mappings":";;;;;;AAMA,SAAS,qBAAqB,cAAsB;CAClD,MAAM,iBAAiB,aAAa,MAAM,KAAK,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI;AAExE,KAAI,CAAC,eACH,QAAO;AAUT,QAJE,mBAAmB,QACnB,eAAe,WAAW,MAAM,IAChC,eAAe,WAAW,KAAK,GAG7B,GAAG,eAAe,KAClB,KAAK,eAAe;;AAG1B,eAAsB,2BACpB,cACA,kBAA0B,0BAC1B,SACA;CACA,MAAM,oBAAoB,GAAG,WAAW,KAAK,KAAK,cAAc,MAAM,CAAC;CAEvE,MAAM,sBAAsB,oBACxB,KAAK,KAAK,cAAc,MAAM,GAC9B;CAKJ,MAAM,aAAa,qBAJE,KAAK,SACxB,qBACA,KAAK,QAAQ,cAAc,gBAAgB,CAEO,CAAC;CAErD,MAAM,WAAW,oBACb,KAAK,KAAK,cAAc,OAAO,sBAAsB,GACrD,KAAK,KAAK,cAAc,sBAAsB;AAElD,KAAI,CAAC,GAAG,WAAW,SAAS,EAAE;EAC5B,MAAM,0BAA0B;;;gCAGJ,gBAAgB;;+BAEjB,WAAW;;;;;;;;AAQtC,QAAM,GAAG,SAAS,UAAU,UAAU,wBAAwB;AAC9D,SAAO,KACL,WAAW,MAAM,KACf,sBACD,CAAC,WAAW,MAAM,KAAK,SAAS,CAAC,GACnC;AACD,MAAI;AACF,SAAM,GAAG,SAAS,MAAM,iBAAiB,EAAE,WAAW,MAAM,CAAC;AAE7D,QAAK,MAAM,UAAU,SAAS;AAC5B,QAAI,GAAG,WAAW,KAAK,KAAK,iBAAiB,GAAG,OAAO,OAAO,CAAC,CAC7D;AAEF,UAAM,GAAG,SAAS,UAChB,KAAK,KAAK,iBAAiB,GAAG,OAAO,OAAO,EAC5C,KACD;;WAEI,OAAO;AACd,UAAO,MAAM,4CAA4C,QAAQ;;OAGnE,QAAO,KACL,SAAS,MAAM,KAAK,sBAAsB,CAAC,WAAW,MAAM,KAC1D,SACD,CAAC,wBACH"}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { matchPyprojectDependency } from "./matchPyprojectDependency.js";
|
|
2
|
+
import { matchRequirementsTxtDependency } from "./matchRequirementsTxtDependency.js";
|
|
3
|
+
import { matchSetupPyDependency } from "./matchSetupPyDependency.js";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
//#region src/fs/determineFramework/detectPythonLibrary.ts
|
|
6
7
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Check setup.py
|
|
28
|
-
const setupPath = path.join(cwd, 'setup.py');
|
|
29
|
-
if (fs.existsSync(setupPath)) {
|
|
30
|
-
const content = fs.readFileSync(setupPath, 'utf8');
|
|
31
|
-
const result = matchSetupPyDependency(content);
|
|
32
|
-
if (result)
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
|
-
return null;
|
|
8
|
+
* Detect Python GT library from pyproject.toml, requirements.txt, or setup.py.
|
|
9
|
+
* Checks files in priority order: pyproject.toml → requirements.txt → setup.py.
|
|
10
|
+
*/
|
|
11
|
+
function detectPythonLibrary(cwd) {
|
|
12
|
+
const pyprojectPath = path.join(cwd, "pyproject.toml");
|
|
13
|
+
if (fs.existsSync(pyprojectPath)) {
|
|
14
|
+
const result = matchPyprojectDependency(fs.readFileSync(pyprojectPath, "utf8"));
|
|
15
|
+
if (result) return result;
|
|
16
|
+
}
|
|
17
|
+
const requirementsPath = path.join(cwd, "requirements.txt");
|
|
18
|
+
if (fs.existsSync(requirementsPath)) {
|
|
19
|
+
const result = matchRequirementsTxtDependency(fs.readFileSync(requirementsPath, "utf8"));
|
|
20
|
+
if (result) return result;
|
|
21
|
+
}
|
|
22
|
+
const setupPath = path.join(cwd, "setup.py");
|
|
23
|
+
if (fs.existsSync(setupPath)) {
|
|
24
|
+
const result = matchSetupPyDependency(fs.readFileSync(setupPath, "utf8"));
|
|
25
|
+
if (result) return result;
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
36
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { detectPythonLibrary };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=detectPythonLibrary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectPythonLibrary.js","names":[],"sources":["../../../src/fs/determineFramework/detectPythonLibrary.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\nimport { Libraries } from '../../types/libraries.js';\nimport { matchPyprojectDependency } from './matchPyprojectDependency.js';\nimport { matchRequirementsTxtDependency } from './matchRequirementsTxtDependency.js';\nimport { matchSetupPyDependency } from './matchSetupPyDependency.js';\n\n/**\n * Detect Python GT library from pyproject.toml, requirements.txt, or setup.py.\n * Checks files in priority order: pyproject.toml → requirements.txt → setup.py.\n */\nexport function detectPythonLibrary(\n cwd: string\n): typeof Libraries.GT_FLASK | typeof Libraries.GT_FASTAPI | null {\n // Check pyproject.toml\n const pyprojectPath = path.join(cwd, 'pyproject.toml');\n if (fs.existsSync(pyprojectPath)) {\n const content = fs.readFileSync(pyprojectPath, 'utf8');\n const result = matchPyprojectDependency(content);\n if (result) return result;\n }\n\n // Check requirements.txt\n const requirementsPath = path.join(cwd, 'requirements.txt');\n if (fs.existsSync(requirementsPath)) {\n const content = fs.readFileSync(requirementsPath, 'utf8');\n const result = matchRequirementsTxtDependency(content);\n if (result) return result;\n }\n\n // Check setup.py\n const setupPath = path.join(cwd, 'setup.py');\n if (fs.existsSync(setupPath)) {\n const content = fs.readFileSync(setupPath, 'utf8');\n const result = matchSetupPyDependency(content);\n if (result) return result;\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,oBACd,KACgE;CAEhE,MAAM,gBAAgB,KAAK,KAAK,KAAK,iBAAiB;AACtD,KAAI,GAAG,WAAW,cAAc,EAAE;EAEhC,MAAM,SAAS,yBADC,GAAG,aAAa,eAAe,OACA,CAAC;AAChD,MAAI,OAAQ,QAAO;;CAIrB,MAAM,mBAAmB,KAAK,KAAK,KAAK,mBAAmB;AAC3D,KAAI,GAAG,WAAW,iBAAiB,EAAE;EAEnC,MAAM,SAAS,+BADC,GAAG,aAAa,kBAAkB,OACG,CAAC;AACtD,MAAI,OAAQ,QAAO;;CAIrB,MAAM,YAAY,KAAK,KAAK,KAAK,WAAW;AAC5C,KAAI,GAAG,WAAW,UAAU,EAAE;EAE5B,MAAM,SAAS,uBADC,GAAG,aAAa,WAAW,OACE,CAAC;AAC9C,MAAI,OAAQ,QAAO;;AAGrB,QAAO"}
|
|
@@ -1,65 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
if (dependencies['i18next-icu']) {
|
|
45
|
-
additionalModules.push('i18next-icu');
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// If no JS library found, check for Python project files
|
|
49
|
-
if (library === 'base') {
|
|
50
|
-
const pythonLibrary = detectPythonLibrary(cwd);
|
|
51
|
-
if (pythonLibrary) {
|
|
52
|
-
library = pythonLibrary;
|
|
53
|
-
}
|
|
54
|
-
else if (!fs.existsSync(path.join(cwd, 'package.json'))) {
|
|
55
|
-
logger.warn(chalk.yellow('No package.json or Python project file found in the current directory. Run this command from the root of your project.'));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Fallback to base if neither is found
|
|
59
|
-
return { library, additionalModules };
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
logger.error('Error determining framework: ' + String(error));
|
|
63
|
-
return { library: 'base', additionalModules: [] };
|
|
64
|
-
}
|
|
1
|
+
import { logger } from "../../console/logger.js";
|
|
2
|
+
import "../../types/libraries.js";
|
|
3
|
+
import { detectPythonLibrary } from "./detectPythonLibrary.js";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
//#region src/fs/determineFramework/index.ts
|
|
7
|
+
function determineLibrary() {
|
|
8
|
+
let library = "base";
|
|
9
|
+
const additionalModules = [];
|
|
10
|
+
try {
|
|
11
|
+
const cwd = process.cwd();
|
|
12
|
+
const packageJsonPath = path.join(cwd, "package.json");
|
|
13
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
14
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
15
|
+
const dependencies = {
|
|
16
|
+
...packageJson.dependencies,
|
|
17
|
+
...packageJson.devDependencies
|
|
18
|
+
};
|
|
19
|
+
if (dependencies["gt-next"]) library = "gt-next";
|
|
20
|
+
else if (dependencies["gt-tanstack-start"]) library = "gt-tanstack-start";
|
|
21
|
+
else if (dependencies["gt-react"]) library = "gt-react";
|
|
22
|
+
else if (dependencies["gt-react-native"]) library = "gt-react-native";
|
|
23
|
+
else if (dependencies["gt-node"]) library = "gt-node";
|
|
24
|
+
else if (dependencies["next-intl"]) library = "next-intl";
|
|
25
|
+
else if (dependencies["i18next"]) library = "i18next";
|
|
26
|
+
if (dependencies["i18next-icu"]) additionalModules.push("i18next-icu");
|
|
27
|
+
}
|
|
28
|
+
if (library === "base") {
|
|
29
|
+
const pythonLibrary = detectPythonLibrary(cwd);
|
|
30
|
+
if (pythonLibrary) library = pythonLibrary;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
library,
|
|
34
|
+
additionalModules
|
|
35
|
+
};
|
|
36
|
+
} catch (error) {
|
|
37
|
+
logger.error("Error determining framework: " + String(error));
|
|
38
|
+
return {
|
|
39
|
+
library: "base",
|
|
40
|
+
additionalModules: []
|
|
41
|
+
};
|
|
42
|
+
}
|
|
65
43
|
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { determineLibrary };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/fs/determineFramework/index.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\nimport { SupportedLibraries } from '../../types/index.js';\nimport { logger } from '../../console/logger.js';\nimport { Libraries } from '../../types/libraries.js';\nimport { detectPythonLibrary } from './detectPythonLibrary.js';\n\nexport function determineLibrary(): {\n library: SupportedLibraries;\n additionalModules: SupportedLibraries[];\n} {\n let library: SupportedLibraries = 'base';\n const additionalModules: SupportedLibraries[] = [];\n try {\n // Get the current working directory (where the CLI is being run)\n const cwd = process.cwd();\n const packageJsonPath = path.join(cwd, 'package.json');\n\n // Check if package.json exists\n if (fs.existsSync(packageJsonPath)) {\n // Read and parse package.json\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));\n const dependencies = {\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n };\n\n // Check for gt-next or gt-react in dependencies\n if (dependencies[Libraries.GT_NEXT]) {\n library = Libraries.GT_NEXT;\n } else if (dependencies[Libraries.GT_TANSTACK_START]) {\n library = Libraries.GT_TANSTACK_START;\n } else if (dependencies[Libraries.GT_REACT]) {\n library = Libraries.GT_REACT;\n } else if (dependencies[Libraries.GT_REACT_NATIVE]) {\n library = Libraries.GT_REACT_NATIVE;\n } else if (dependencies[Libraries.GT_NODE]) {\n library = Libraries.GT_NODE;\n } else if (dependencies['next-intl']) {\n library = 'next-intl';\n } else if (dependencies['i18next']) {\n library = 'i18next';\n }\n\n if (dependencies['i18next-icu']) {\n additionalModules.push('i18next-icu');\n }\n }\n\n // If no JS library found, check for Python project files\n if (library === 'base') {\n const pythonLibrary = detectPythonLibrary(cwd);\n if (pythonLibrary) {\n library = pythonLibrary;\n }\n }\n\n // Fallback to base if neither is found\n return { library, additionalModules };\n } catch (error) {\n logger.error('Error determining framework: ' + String(error));\n return { library: 'base', additionalModules: [] };\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,mBAGd;CACA,IAAI,UAA8B;CAClC,MAAM,oBAA0C,EAAE;AAClD,KAAI;EAEF,MAAM,MAAM,QAAQ,KAAK;EACzB,MAAM,kBAAkB,KAAK,KAAK,KAAK,eAAe;AAGtD,MAAI,GAAG,WAAW,gBAAgB,EAAE;GAElC,MAAM,cAAc,KAAK,MAAM,GAAG,aAAa,iBAAiB,OAAO,CAAC;GACxE,MAAM,eAAe;IACnB,GAAG,YAAY;IACf,GAAG,YAAY;IAChB;AAGD,OAAI,aAAA,WACF,WAAA;YACS,aAAA,qBACT,WAAA;YACS,aAAA,YACT,WAAA;YACS,aAAA,mBACT,WAAA;YACS,aAAA,WACT,WAAA;YACS,aAAa,aACtB,WAAU;YACD,aAAa,WACtB,WAAU;AAGZ,OAAI,aAAa,eACf,mBAAkB,KAAK,cAAc;;AAKzC,MAAI,YAAY,QAAQ;GACtB,MAAM,gBAAgB,oBAAoB,IAAI;AAC9C,OAAI,cACF,WAAU;;AAKd,SAAO;GAAE;GAAS;GAAmB;UAC9B,OAAO;AACd,SAAO,MAAM,kCAAkC,OAAO,MAAM,CAAC;AAC7D,SAAO;GAAE,SAAS;GAAQ,mBAAmB,EAAE;GAAE"}
|