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/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js
CHANGED
|
@@ -1,122 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isStaticExpression } from
|
|
3
|
-
import {
|
|
4
|
-
import { warnInvalidFormatSync } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { containsDeriveCall } from
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import { SURROUNDING_LINE_COUNT } from '../../../../../utils/constants.js';
|
|
14
|
-
// Handle CommonJS/ESM interop
|
|
1
|
+
import "../../../../../utils/constants.js";
|
|
2
|
+
import { isStaticExpression } from "../../../evaluateJsx.js";
|
|
3
|
+
import { GT_ATTRIBUTES_WITH_SUGAR } from "../../constants.js";
|
|
4
|
+
import { warnInvalidFormatSync, warnInvalidMaxCharsSync, warnNonStaticExpressionSync } from "../../../../../console/index.js";
|
|
5
|
+
import { mapAttributeName } from "../../mapAttributeName.js";
|
|
6
|
+
import { isNumberLiteral } from "../../isNumberLiteral.js";
|
|
7
|
+
import { containsDeriveCall } from "../derivation/containsDeriveCall.js";
|
|
8
|
+
import { extractSourceCode } from "../../extractSourceCode.js";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import * as t from "@babel/types";
|
|
11
|
+
import generateModule from "@babel/generator";
|
|
12
|
+
//#region src/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.ts
|
|
15
13
|
const generate = generateModule.default || generateModule;
|
|
16
14
|
/**
|
|
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
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
...inlineMetadata,
|
|
48
|
-
filePaths: relativeFilepath ? [relativeFilepath] : undefined,
|
|
49
|
-
...(sourceCode && { sourceCode }),
|
|
50
|
-
};
|
|
15
|
+
* Extracts inline metadata from a string entry
|
|
16
|
+
* @param metadata - The metadata record to inject the data into
|
|
17
|
+
* @param entry - The string entry to extract the metadata from
|
|
18
|
+
* @param output - The output to use
|
|
19
|
+
* @param config - The configuration to use
|
|
20
|
+
* @returns The inline metadata
|
|
21
|
+
*
|
|
22
|
+
* @note - this function does not automatically append the index to the id, this must be done manually in the caller.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
function extractStringEntryMetadata({ options, output, config, nodeLoc, surroundingLineCount = 5 }) {
|
|
26
|
+
const relativeFilepath = path.relative(process.cwd(), config.file);
|
|
27
|
+
const inlineMetadata = extractInlineMetadata({
|
|
28
|
+
options,
|
|
29
|
+
output,
|
|
30
|
+
config
|
|
31
|
+
});
|
|
32
|
+
let sourceCode;
|
|
33
|
+
if (config.includeSourceCodeContext && nodeLoc?.start?.line && nodeLoc?.end?.line) {
|
|
34
|
+
const entry = extractSourceCode(config.file, nodeLoc.start.line, nodeLoc.end.line, surroundingLineCount);
|
|
35
|
+
if (entry && relativeFilepath) sourceCode = { [relativeFilepath]: [entry] };
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
...inlineMetadata,
|
|
39
|
+
filePaths: relativeFilepath ? [relativeFilepath] : void 0,
|
|
40
|
+
...sourceCode && { sourceCode }
|
|
41
|
+
};
|
|
51
42
|
}
|
|
52
|
-
// ----- Helper Functions ----- //
|
|
53
43
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
function extractInlineMetadata({ options, output, config
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
else if (typeof result.value === 'string') {
|
|
93
|
-
// Add the maxChars value to the metadata
|
|
94
|
-
metadata[mappedKey] = Math.abs(Number(result.value));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else if (mappedKey === 'format') {
|
|
98
|
-
// Handle format attribute - validate allowed values
|
|
99
|
-
const validFormats = ['ICU', 'STRING', 'I18NEXT'];
|
|
100
|
-
if (typeof result.value === 'string' &&
|
|
101
|
-
validFormats.includes(result.value)) {
|
|
102
|
-
metadata[mappedKey] = result.value;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
output.warnings.add(warnInvalidFormatSync(config.file, String(result.value), `${prop.loc?.start?.line}:${prop.loc?.start?.column}`));
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
// Add the $context or $id or other attributes value to the metadata
|
|
110
|
-
// TODO: why are we including everything? arent we only interested in relevant inline metadata?
|
|
111
|
-
metadata[mappedKey] = result.value;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
...metadata,
|
|
120
|
-
...(contextDeriveExpr && { contextDeriveExpr }),
|
|
121
|
-
};
|
|
44
|
+
* Extracts inline metadata specified e.g. gt('Hello', { $context: 'greeting' })
|
|
45
|
+
* @param options - The options to extract the metadata from
|
|
46
|
+
* @param output - The output to use
|
|
47
|
+
* @param config - The configuration to use
|
|
48
|
+
* @param index - The index of the string entry
|
|
49
|
+
* @returns The inline metadata
|
|
50
|
+
*/
|
|
51
|
+
function extractInlineMetadata({ options, output, config }) {
|
|
52
|
+
const metadata = {};
|
|
53
|
+
let contextDeriveExpr;
|
|
54
|
+
if (options && options.type === "ObjectExpression") options.properties.forEach((prop) => {
|
|
55
|
+
if (prop.type === "ObjectProperty" && prop.key.type === "Identifier") {
|
|
56
|
+
const attribute = prop.key.name;
|
|
57
|
+
if (GT_ATTRIBUTES_WITH_SUGAR.includes(attribute) && t.isExpression(prop.value)) {
|
|
58
|
+
const result = isStaticExpression(prop.value);
|
|
59
|
+
if (!result.isStatic) if (mapAttributeName(attribute) === "context" && containsDeriveCall(prop.value)) contextDeriveExpr = prop.value;
|
|
60
|
+
else output.errors.push(warnNonStaticExpressionSync(config.file, attribute, generate(prop.value).code, `${prop.loc?.start?.line}:${prop.loc?.start?.column}`));
|
|
61
|
+
if (result.isStatic && result.value != null && !config.ignoreInlineMetadata) {
|
|
62
|
+
const mappedKey = mapAttributeName(attribute);
|
|
63
|
+
if (mappedKey === "maxChars") {
|
|
64
|
+
if (typeof result.value === "string" && (isNaN(Number(result.value)) || !isNumberLiteral(prop.value)) || !Number.isInteger(Number(result.value))) output.errors.push(warnInvalidMaxCharsSync(config.file, generate(prop).code, `${prop.loc?.start?.line}:${prop.loc?.start?.column}`));
|
|
65
|
+
else if (typeof result.value === "string") metadata[mappedKey] = Math.abs(Number(result.value));
|
|
66
|
+
} else if (mappedKey === "format") if (typeof result.value === "string" && [
|
|
67
|
+
"ICU",
|
|
68
|
+
"STRING",
|
|
69
|
+
"I18NEXT"
|
|
70
|
+
].includes(result.value)) metadata[mappedKey] = result.value;
|
|
71
|
+
else output.warnings.add(warnInvalidFormatSync(config.file, String(result.value), `${prop.loc?.start?.line}:${prop.loc?.start?.column}`));
|
|
72
|
+
else metadata[mappedKey] = result.value;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
...metadata,
|
|
79
|
+
...contextDeriveExpr && { contextDeriveExpr }
|
|
80
|
+
};
|
|
122
81
|
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { extractStringEntryMetadata };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=extractStringEntryMetadata.js.map
|
package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractStringEntryMetadata.js","names":["pathModule"],"sources":["../../../../../../src/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.ts"],"sourcesContent":["import * as t from '@babel/types';\nimport { ParsingConfig } from '../types.js';\nimport { ParsingOutput } from '../types.js';\nimport { isStaticExpression } from '../../../evaluateJsx.js';\nimport { warnInvalidMaxCharsSync } from '../../../../../console/index.js';\nimport { warnInvalidFormatSync } from '../../../../../console/index.js';\nimport { warnNonStaticExpressionSync } from '../../../../../console/index.js';\nimport { GT_ATTRIBUTES_WITH_SUGAR } from '../../constants.js';\nimport { containsDeriveCall } from '../derivation/containsDeriveCall.js';\nimport generateModule from '@babel/generator';\nimport { mapAttributeName } from '../../mapAttributeName.js';\nimport pathModule from 'node:path';\nimport { isNumberLiteral } from '../../isNumberLiteral.js';\nimport { extractSourceCode } from '../../extractSourceCode.js';\nimport type { SourceCode } from '../../extractSourceCode.js';\nimport { SURROUNDING_LINE_COUNT } from '../../../../../utils/constants.js';\n\n// Handle CommonJS/ESM interop\nconst generate = generateModule.default || generateModule;\n\n/**\n * Metadata record type\n */\nexport type InlineMetadata = {\n maxChars?: number;\n context?: string;\n id?: string;\n hash?: string;\n format?: string;\n filePaths?: string[];\n sourceCode?: Record<string, SourceCode[]>;\n contextDeriveExpr?: t.Expression;\n};\n\n/**\n * Extracts inline metadata from a string entry\n * @param metadata - The metadata record to inject the data into\n * @param entry - The string entry to extract the metadata from\n * @param output - The output to use\n * @param config - The configuration to use\n * @returns The inline metadata\n *\n * @note - this function does not automatically append the index to the id, this must be done manually in the caller.\n *\n */\nexport function extractStringEntryMetadata({\n options,\n output,\n config,\n nodeLoc,\n surroundingLineCount = SURROUNDING_LINE_COUNT,\n}: {\n options?: t.CallExpression['arguments'][number];\n output: ParsingOutput;\n config: ParsingConfig;\n nodeLoc?: {\n start?: { line: number } | null;\n end?: { line: number } | null;\n } | null;\n surroundingLineCount?: number;\n}): InlineMetadata {\n // extract filepath for entry\n const relativeFilepath = pathModule.relative(process.cwd(), config.file);\n\n // extract inline metadata\n const inlineMetadata = extractInlineMetadata({\n options,\n output,\n config,\n });\n\n // extract surrounding lines from source file\n let sourceCode: Record<string, SourceCode[]> | undefined;\n if (\n config.includeSourceCodeContext &&\n nodeLoc?.start?.line &&\n nodeLoc?.end?.line\n ) {\n const entry = extractSourceCode(\n config.file,\n nodeLoc.start.line,\n nodeLoc.end.line,\n surroundingLineCount\n );\n if (entry && relativeFilepath) {\n sourceCode = { [relativeFilepath]: [entry] };\n }\n }\n\n return {\n ...inlineMetadata,\n filePaths: relativeFilepath ? [relativeFilepath] : undefined,\n ...(sourceCode && { sourceCode }),\n };\n}\n\n// ----- Helper Functions ----- //\n\n/**\n * Extracts inline metadata specified e.g. gt('Hello', { $context: 'greeting' })\n * @param options - The options to extract the metadata from\n * @param output - The output to use\n * @param config - The configuration to use\n * @param index - The index of the string entry\n * @returns The inline metadata\n */\nfunction extractInlineMetadata({\n options,\n output,\n config,\n}: {\n options?: t.CallExpression['arguments'][number];\n output: ParsingOutput;\n config: ParsingConfig;\n}): InlineMetadata {\n const metadata: Record<string, string | number | string[]> = {};\n let contextDeriveExpr: t.Expression | undefined;\n if (options && options.type === 'ObjectExpression') {\n options.properties.forEach((prop) => {\n if (prop.type === 'ObjectProperty' && prop.key.type === 'Identifier') {\n const attribute = prop.key.name;\n if (\n GT_ATTRIBUTES_WITH_SUGAR.includes(\n attribute as (typeof GT_ATTRIBUTES_WITH_SUGAR)[number]\n ) &&\n t.isExpression(prop.value)\n ) {\n const result = isStaticExpression(prop.value);\n if (!result.isStatic) {\n const mappedKey = mapAttributeName(attribute);\n if (mappedKey === 'context' && containsDeriveCall(prop.value)) {\n contextDeriveExpr = prop.value;\n } else {\n output.errors.push(\n warnNonStaticExpressionSync(\n config.file,\n attribute,\n generate(prop.value).code,\n `${prop.loc?.start?.line}:${prop.loc?.start?.column}`\n )\n );\n }\n }\n if (\n result.isStatic &&\n result.value != null &&\n !config.ignoreInlineMetadata\n ) {\n const mappedKey = mapAttributeName(attribute);\n if (mappedKey === 'maxChars') {\n // Handle maxChars attribute\n if (\n (typeof result.value === 'string' &&\n (isNaN(Number(result.value)) ||\n !isNumberLiteral(prop.value))) ||\n !Number.isInteger(Number(result.value))\n ) {\n output.errors.push(\n warnInvalidMaxCharsSync(\n config.file,\n generate(prop).code,\n `${prop.loc?.start?.line}:${prop.loc?.start?.column}`\n )\n );\n } else if (typeof result.value === 'string') {\n // Add the maxChars value to the metadata\n metadata[mappedKey] = Math.abs(Number(result.value));\n }\n } else if (mappedKey === 'format') {\n // Handle format attribute - validate allowed values\n const validFormats = ['ICU', 'STRING', 'I18NEXT'];\n if (\n typeof result.value === 'string' &&\n validFormats.includes(result.value)\n ) {\n metadata[mappedKey] = result.value;\n } else {\n output.warnings.add(\n warnInvalidFormatSync(\n config.file,\n String(result.value),\n `${prop.loc?.start?.line}:${prop.loc?.start?.column}`\n )\n );\n }\n } else {\n // Add the $context or $id or other attributes value to the metadata\n // TODO: why are we including everything? arent we only interested in relevant inline metadata?\n metadata[mappedKey] = result.value;\n }\n }\n }\n }\n });\n }\n\n return {\n ...metadata,\n ...(contextDeriveExpr && { contextDeriveExpr }),\n };\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAM,WAAW,eAAe,WAAW;;;;;;;;;;;;AA2B3C,SAAgB,2BAA2B,EACzC,SACA,QACA,QACA,SACA,uBAAA,KAUiB;CAEjB,MAAM,mBAAmBA,KAAW,SAAS,QAAQ,KAAK,EAAE,OAAO,KAAK;CAGxE,MAAM,iBAAiB,sBAAsB;EAC3C;EACA;EACA;EACD,CAAC;CAGF,IAAI;AACJ,KACE,OAAO,4BACP,SAAS,OAAO,QAChB,SAAS,KAAK,MACd;EACA,MAAM,QAAQ,kBACZ,OAAO,MACP,QAAQ,MAAM,MACd,QAAQ,IAAI,MACZ,qBACD;AACD,MAAI,SAAS,iBACX,cAAa,GAAG,mBAAmB,CAAC,MAAM,EAAE;;AAIhD,QAAO;EACL,GAAG;EACH,WAAW,mBAAmB,CAAC,iBAAiB,GAAG,KAAA;EACnD,GAAI,cAAc,EAAE,YAAY;EACjC;;;;;;;;;;AAaH,SAAS,sBAAsB,EAC7B,SACA,QACA,UAKiB;CACjB,MAAM,WAAuD,EAAE;CAC/D,IAAI;AACJ,KAAI,WAAW,QAAQ,SAAS,mBAC9B,SAAQ,WAAW,SAAS,SAAS;AACnC,MAAI,KAAK,SAAS,oBAAoB,KAAK,IAAI,SAAS,cAAc;GACpE,MAAM,YAAY,KAAK,IAAI;AAC3B,OACE,yBAAyB,SACvB,UACD,IACD,EAAE,aAAa,KAAK,MAAM,EAC1B;IACA,MAAM,SAAS,mBAAmB,KAAK,MAAM;AAC7C,QAAI,CAAC,OAAO,SAEV,KADkB,iBAAiB,UACtB,KAAK,aAAa,mBAAmB,KAAK,MAAM,CAC3D,qBAAoB,KAAK;QAEzB,QAAO,OAAO,KACZ,4BACE,OAAO,MACP,WACA,SAAS,KAAK,MAAM,CAAC,MACrB,GAAG,KAAK,KAAK,OAAO,KAAK,GAAG,KAAK,KAAK,OAAO,SAC9C,CACF;AAGL,QACE,OAAO,YACP,OAAO,SAAS,QAChB,CAAC,OAAO,sBACR;KACA,MAAM,YAAY,iBAAiB,UAAU;AAC7C,SAAI,cAAc;UAGb,OAAO,OAAO,UAAU,aACtB,MAAM,OAAO,OAAO,MAAM,CAAC,IAC1B,CAAC,gBAAgB,KAAK,MAAM,KAChC,CAAC,OAAO,UAAU,OAAO,OAAO,MAAM,CAAC,CAEvC,QAAO,OAAO,KACZ,wBACE,OAAO,MACP,SAAS,KAAK,CAAC,MACf,GAAG,KAAK,KAAK,OAAO,KAAK,GAAG,KAAK,KAAK,OAAO,SAC9C,CACF;eACQ,OAAO,OAAO,UAAU,SAEjC,UAAS,aAAa,KAAK,IAAI,OAAO,OAAO,MAAM,CAAC;gBAE7C,cAAc,SAGvB,KACE,OAAO,OAAO,UAAU,YACxB;MAHoB;MAAO;MAAU;MAGzB,CAAC,SAAS,OAAO,MAAM,CAEnC,UAAS,aAAa,OAAO;SAE7B,QAAO,SAAS,IACd,sBACE,OAAO,MACP,OAAO,OAAO,MAAM,EACpB,GAAG,KAAK,KAAK,OAAO,KAAK,GAAG,KAAK,KAAK,OAAO,SAC9C,CACF;SAKH,UAAS,aAAa,OAAO;;;;GAKrC;AAGJ,QAAO;EACL,GAAG;EACH,GAAI,qBAAqB,EAAE,mBAAmB;EAC/C"}
|
package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { deriveExpression } from
|
|
1
|
+
import { deriveExpression } from "../derivation/index.js";
|
|
2
|
+
//#region src/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.ts
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
* For the processTranslationCall function, this function handles the case where a string with derive is used.
|
|
5
|
+
* @param arg - The argument to parse
|
|
6
|
+
* @param metadata - The metadata to use
|
|
7
|
+
* @param tPath - The path to the argument
|
|
8
|
+
* @param config - The configuration to use
|
|
9
|
+
* @param output - The output to use
|
|
10
|
+
* @param index - Current index in array of strings being extracted
|
|
11
|
+
*/
|
|
12
|
+
function handleDeriveTranslationCall({ arg, metadata, tPath, config, output, index, contextVariants }) {
|
|
13
|
+
deriveExpression({
|
|
14
|
+
tPath,
|
|
15
|
+
expr: arg,
|
|
16
|
+
metadata,
|
|
17
|
+
config,
|
|
18
|
+
output,
|
|
19
|
+
index,
|
|
20
|
+
contextVariants
|
|
21
|
+
});
|
|
21
22
|
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { handleDeriveTranslationCall };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=handleDeriveTranslationCall.js.map
|
package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleDeriveTranslationCall.js","names":[],"sources":["../../../../../../src/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.ts"],"sourcesContent":["import { NodePath } from '@babel/traverse';\nimport * as t from '@babel/types';\nimport { ParsingConfig } from '../types.js';\nimport { ParsingOutput } from '../types.js';\nimport { deriveExpression } from '../derivation/index.js';\nimport { InlineMetadata } from './extractStringEntryMetadata.js';\n\n/**\n * For the processTranslationCall function, this function handles the case where a string with derive is used.\n * @param arg - The argument to parse\n * @param metadata - The metadata to use\n * @param tPath - The path to the argument\n * @param config - The configuration to use\n * @param output - The output to use\n * @param index - Current index in array of strings being extracted\n */\nexport function handleDeriveTranslationCall({\n arg,\n metadata,\n tPath,\n config,\n output,\n index,\n contextVariants,\n}: {\n arg: t.Expression;\n metadata: InlineMetadata;\n tPath: NodePath;\n config: ParsingConfig;\n output: ParsingOutput;\n index?: number;\n contextVariants?: string[];\n}): void {\n deriveExpression({\n tPath,\n expr: arg,\n metadata,\n config,\n output,\n index,\n contextVariants,\n });\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,4BAA4B,EAC1C,KACA,UACA,OACA,QACA,QACA,OACA,mBASO;AACP,kBAAiB;EACf;EACA,MAAM;EACN;EACA;EACA;EACA;EACA;EACD,CAAC"}
|
package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import generateModule from
|
|
4
|
-
|
|
1
|
+
import { warnNonStringSync, warnTemplateLiteralSync } from "../../../../../console/index.js";
|
|
2
|
+
import * as t from "@babel/types";
|
|
3
|
+
import generateModule from "@babel/generator";
|
|
4
|
+
//#region src/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.ts
|
|
5
5
|
const generate = generateModule.default || generateModule;
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// Specific error for template literals
|
|
18
|
-
output.errors.push(warnTemplateLiteralSync(config.file, generate(arg).code, `${arg.loc?.start?.line}:${arg.loc?.start?.column}`));
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
// Generic error
|
|
22
|
-
output.errors.push(warnNonStringSync(config.file, generate(arg).code, `${arg.loc?.start?.line}:${arg.loc?.start?.column}`));
|
|
23
|
-
}
|
|
7
|
+
* For the processTranslationCall function, this function handles the case where a other translation call is used.
|
|
8
|
+
* Error is pushed if the other translation call is used.
|
|
9
|
+
* @param arg - The argument to parse
|
|
10
|
+
* @param config - The configuration to use
|
|
11
|
+
* @param output - The output to use
|
|
12
|
+
*/
|
|
13
|
+
function handleInvalidTranslationCall({ arg, config, output }) {
|
|
14
|
+
if (config.ignoreDynamicContent) return;
|
|
15
|
+
if (t.isTemplateLiteral(arg)) output.errors.push(warnTemplateLiteralSync(config.file, generate(arg).code, `${arg.loc?.start?.line}:${arg.loc?.start?.column}`));
|
|
16
|
+
else output.errors.push(warnNonStringSync(config.file, generate(arg).code, `${arg.loc?.start?.line}:${arg.loc?.start?.column}`));
|
|
24
17
|
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { handleInvalidTranslationCall };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=handleInvalidTranslationCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleInvalidTranslationCall.js","names":[],"sources":["../../../../../../src/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.ts"],"sourcesContent":["import * as t from '@babel/types';\nimport { ParsingConfig, ParsingOutput } from '../types.js';\nimport {\n warnNonStringSync,\n warnTemplateLiteralSync,\n} from '../../../../../console/index.js';\nimport generateModule from '@babel/generator';\n\n// Handle CommonJS/ESM interop\nconst generate = generateModule.default || generateModule;\n\n/**\n * For the processTranslationCall function, this function handles the case where a other translation call is used.\n * Error is pushed if the other translation call is used.\n * @param arg - The argument to parse\n * @param config - The configuration to use\n * @param output - The output to use\n */\nexport function handleInvalidTranslationCall({\n arg,\n config,\n output,\n}: {\n arg: t.ArgumentPlaceholder | t.SpreadElement | t.Expression;\n config: ParsingConfig;\n output: ParsingOutput;\n}): void {\n if (config.ignoreDynamicContent) return;\n\n if (t.isTemplateLiteral(arg)) {\n // Specific error for template literals\n output.errors.push(\n warnTemplateLiteralSync(\n config.file,\n generate(arg).code,\n `${arg.loc?.start?.line}:${arg.loc?.start?.column}`\n )\n );\n } else {\n // Generic error\n output.errors.push(\n warnNonStringSync(\n config.file,\n generate(arg).code,\n `${arg.loc?.start?.line}:${arg.loc?.start?.column}`\n )\n );\n }\n}\n"],"mappings":";;;;AASA,MAAM,WAAW,eAAe,WAAW;;;;;;;;AAS3C,SAAgB,6BAA6B,EAC3C,KACA,QACA,UAKO;AACP,KAAI,OAAO,qBAAsB;AAEjC,KAAI,EAAE,kBAAkB,IAAI,CAE1B,QAAO,OAAO,KACZ,wBACE,OAAO,MACP,SAAS,IAAI,CAAC,MACd,GAAG,IAAI,KAAK,OAAO,KAAK,GAAG,IAAI,KAAK,OAAO,SAC5C,CACF;KAGD,QAAO,OAAO,KACZ,kBACE,OAAO,MACP,SAAS,IAAI,CAAC,MACd,GAAG,IAAI,KAAK,OAAO,KAAK,GAAG,IAAI,KAAK,OAAO,SAC5C,CACF"}
|
package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
|
-
import { isValidIcu } from
|
|
2
|
-
import { warnInvalidIcuSync } from
|
|
3
|
-
import { randomUUID } from
|
|
1
|
+
import { isValidIcu } from "../../../evaluateJsx.js";
|
|
2
|
+
import { warnInvalidIcuSync } from "../../../../../console/index.js";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
//#region src/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
output.updates.push({
|
|
43
|
-
dataFormat: (metadata.format || 'ICU'),
|
|
44
|
-
source,
|
|
45
|
-
metadata: {
|
|
46
|
-
...metadata,
|
|
47
|
-
// Add the index if an id and index is provided (for handling when registering an array of strings)
|
|
48
|
-
...(metadata.id && index != null && { id: `${metadata.id}.${index}` }),
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
}
|
|
6
|
+
* For the processTranslationCall function, this function handles the case where a string literal or template literal is used.
|
|
7
|
+
* @param arg - The argument to parse
|
|
8
|
+
* @param metadata - The metadata to use
|
|
9
|
+
* @param config - The configuration to use
|
|
10
|
+
* @param output - The output to use
|
|
11
|
+
* @param index - The index of the argument
|
|
12
|
+
* @param contextVariants - Optional derive context variants for cross-product
|
|
13
|
+
*/
|
|
14
|
+
function handleLiteralTranslationCall({ arg, metadata, config, output, index, contextVariants }) {
|
|
15
|
+
const source = arg.type === "StringLiteral" ? arg.value : arg.quasis[0].value.raw;
|
|
16
|
+
if (!config.ignoreInvalidIcu && (!metadata.format || metadata.format === "ICU")) {
|
|
17
|
+
const { isValid, error } = isValidIcu(source);
|
|
18
|
+
if (!isValid) {
|
|
19
|
+
output.warnings.add(warnInvalidIcuSync(config.file, source, error ?? "Unknown error", `${arg.loc?.start?.line}:${arg.loc?.start?.column}`));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (contextVariants) {
|
|
24
|
+
const staticId = `derive-temp-id-${randomUUID()}`;
|
|
25
|
+
for (const context of contextVariants) output.updates.push({
|
|
26
|
+
dataFormat: metadata.format || "ICU",
|
|
27
|
+
source,
|
|
28
|
+
metadata: {
|
|
29
|
+
...metadata,
|
|
30
|
+
context,
|
|
31
|
+
...metadata.id && index != null && { id: `${metadata.id}.${index}` },
|
|
32
|
+
staticId
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
} else output.updates.push({
|
|
36
|
+
dataFormat: metadata.format || "ICU",
|
|
37
|
+
source,
|
|
38
|
+
metadata: {
|
|
39
|
+
...metadata,
|
|
40
|
+
...metadata.id && index != null && { id: `${metadata.id}.${index}` }
|
|
41
|
+
}
|
|
42
|
+
});
|
|
52
43
|
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { handleLiteralTranslationCall };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=handleLiteralTranslationCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleLiteralTranslationCall.js","names":[],"sources":["../../../../../../src/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.ts"],"sourcesContent":["import * as t from '@babel/types';\nimport type { DataFormat } from '@generaltranslation/format/types';\nimport { ParsingConfig } from '../types.js';\nimport { ParsingOutput } from '../types.js';\nimport { isValidIcu } from '../../../evaluateJsx.js';\nimport { warnInvalidIcuSync } from '../../../../../console/index.js';\nimport { InlineMetadata } from './extractStringEntryMetadata.js';\nimport { randomUUID } from 'node:crypto';\n\n/**\n * For the processTranslationCall function, this function handles the case where a string literal or template literal is used.\n * @param arg - The argument to parse\n * @param metadata - The metadata to use\n * @param config - The configuration to use\n * @param output - The output to use\n * @param index - The index of the argument\n * @param contextVariants - Optional derive context variants for cross-product\n */\nexport function handleLiteralTranslationCall({\n arg,\n metadata,\n config,\n output,\n index,\n contextVariants,\n}: {\n arg: t.StringLiteral | t.TemplateLiteral;\n metadata: InlineMetadata;\n config: ParsingConfig;\n output: ParsingOutput;\n index?: number;\n contextVariants?: string[];\n}): void {\n // ignore dynamic content flag is triggered, check strings are valid ICU\n const source =\n arg.type === 'StringLiteral' ? arg.value : arg.quasis[0].value.raw;\n\n // Validate is ICU — skip for non-ICU formats\n if (\n !config.ignoreInvalidIcu &&\n (!metadata.format || metadata.format === 'ICU')\n ) {\n const { isValid, error } = isValidIcu(source);\n if (!isValid) {\n output.warnings.add(\n warnInvalidIcuSync(\n config.file,\n source,\n error ?? 'Unknown error',\n `${arg.loc?.start?.line}:${arg.loc?.start?.column}`\n )\n );\n return;\n }\n }\n\n if (contextVariants) {\n const staticId = `derive-temp-id-${randomUUID()}`;\n for (const context of contextVariants) {\n output.updates.push({\n dataFormat: (metadata.format || 'ICU') as DataFormat,\n source,\n metadata: {\n ...metadata,\n context,\n ...(metadata.id &&\n index != null && { id: `${metadata.id}.${index}` }),\n staticId,\n },\n });\n }\n } else {\n output.updates.push({\n dataFormat: (metadata.format || 'ICU') as DataFormat,\n source,\n metadata: {\n ...metadata,\n // Add the index if an id and index is provided (for handling when registering an array of strings)\n ...(metadata.id && index != null && { id: `${metadata.id}.${index}` }),\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,SAAgB,6BAA6B,EAC3C,KACA,UACA,QACA,QACA,OACA,mBAQO;CAEP,MAAM,SACJ,IAAI,SAAS,kBAAkB,IAAI,QAAQ,IAAI,OAAO,GAAG,MAAM;AAGjE,KACE,CAAC,OAAO,qBACP,CAAC,SAAS,UAAU,SAAS,WAAW,QACzC;EACA,MAAM,EAAE,SAAS,UAAU,WAAW,OAAO;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAO,SAAS,IACd,mBACE,OAAO,MACP,QACA,SAAS,iBACT,GAAG,IAAI,KAAK,OAAO,KAAK,GAAG,IAAI,KAAK,OAAO,SAC5C,CACF;AACD;;;AAIJ,KAAI,iBAAiB;EACnB,MAAM,WAAW,kBAAkB,YAAY;AAC/C,OAAK,MAAM,WAAW,gBACpB,QAAO,QAAQ,KAAK;GAClB,YAAa,SAAS,UAAU;GAChC;GACA,UAAU;IACR,GAAG;IACH;IACA,GAAI,SAAS,MACX,SAAS,QAAQ,EAAE,IAAI,GAAG,SAAS,GAAG,GAAG,SAAS;IACpD;IACD;GACF,CAAC;OAGJ,QAAO,QAAQ,KAAK;EAClB,YAAa,SAAS,UAAU;EAChC;EACA,UAAU;GACR,GAAG;GAEH,GAAI,SAAS,MAAM,SAAS,QAAQ,EAAE,IAAI,GAAG,SAAS,GAAG,GAAG,SAAS;GACtE;EACF,CAAC"}
|
|
@@ -1,61 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "../../../../../utils/constants.js";
|
|
2
|
+
import { nodeToStrings } from "../../parseString.js";
|
|
3
|
+
import { handleDerivation } from "../derivation/handleDerivation.js";
|
|
4
|
+
import { routeTranslationCall } from "./routeTranslationCall.js";
|
|
5
|
+
import { extractStringEntryMetadata } from "./extractStringEntryMetadata.js";
|
|
6
|
+
//#region src/react/jsx/utils/stringParsing/processTranslationCall/index.ts
|
|
6
7
|
/**
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
// Route tx call to appropriate handler
|
|
53
|
-
routeTranslationCall({
|
|
54
|
-
tPath,
|
|
55
|
-
config,
|
|
56
|
-
output,
|
|
57
|
-
arg,
|
|
58
|
-
metadata,
|
|
59
|
-
contextVariants,
|
|
60
|
-
});
|
|
8
|
+
* Processes a single translation function call (e.g., t('hello world', { id: 'greeting' })).
|
|
9
|
+
* Extracts the translatable string content and metadata, then adds it to the updates array.
|
|
10
|
+
*
|
|
11
|
+
* Handles:
|
|
12
|
+
* - String literals: t('hello')
|
|
13
|
+
* - Template literals without expressions: t(`hello`)
|
|
14
|
+
* - Metadata extraction from options object
|
|
15
|
+
* - Error reporting for non-derivable expressions and template literals with expressions
|
|
16
|
+
*
|
|
17
|
+
* @param tPath - The path to the translation call
|
|
18
|
+
* @param config - The configuration to use
|
|
19
|
+
* @param output - The output to use
|
|
20
|
+
*/
|
|
21
|
+
function processTranslationCall(tPath, config, output) {
|
|
22
|
+
if (tPath.parent.type !== "CallExpression" || tPath.parent.arguments.length === 0) return;
|
|
23
|
+
const arg = tPath.parent.arguments[0];
|
|
24
|
+
const metadata = extractStringEntryMetadata({
|
|
25
|
+
options: tPath.parent.arguments.at(1),
|
|
26
|
+
output,
|
|
27
|
+
config,
|
|
28
|
+
nodeLoc: tPath.parent.loc,
|
|
29
|
+
surroundingLineCount: 5
|
|
30
|
+
});
|
|
31
|
+
let contextVariants;
|
|
32
|
+
if (metadata.contextDeriveExpr) {
|
|
33
|
+
const contextNode = handleDerivation({
|
|
34
|
+
expr: metadata.contextDeriveExpr,
|
|
35
|
+
tPath,
|
|
36
|
+
file: config.file,
|
|
37
|
+
parsingOptions: config.parsingOptions,
|
|
38
|
+
errors: output.errors,
|
|
39
|
+
warnings: output.warnings
|
|
40
|
+
});
|
|
41
|
+
if (contextNode) contextVariants = nodeToStrings(contextNode);
|
|
42
|
+
delete metadata.contextDeriveExpr;
|
|
43
|
+
}
|
|
44
|
+
routeTranslationCall({
|
|
45
|
+
tPath,
|
|
46
|
+
config,
|
|
47
|
+
output,
|
|
48
|
+
arg,
|
|
49
|
+
metadata,
|
|
50
|
+
contextVariants
|
|
51
|
+
});
|
|
61
52
|
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { processTranslationCall };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/react/jsx/utils/stringParsing/processTranslationCall/index.ts"],"sourcesContent":["import { NodePath } from '@babel/traverse';\nimport { ParsingConfig } from '../types.js';\nimport { ParsingOutput } from '../types.js';\nimport { routeTranslationCall } from './routeTranslationCall.js';\nimport { extractStringEntryMetadata } from './extractStringEntryMetadata.js';\nimport { SURROUNDING_LINE_COUNT } from '../../../../../utils/constants.js';\nimport { handleDerivation } from '../derivation/handleDerivation.js';\nimport { nodeToStrings } from '../../parseString.js';\n\n/**\n * Processes a single translation function call (e.g., t('hello world', { id: 'greeting' })).\n * Extracts the translatable string content and metadata, then adds it to the updates array.\n *\n * Handles:\n * - String literals: t('hello')\n * - Template literals without expressions: t(`hello`)\n * - Metadata extraction from options object\n * - Error reporting for non-derivable expressions and template literals with expressions\n *\n * @param tPath - The path to the translation call\n * @param config - The configuration to use\n * @param output - The output to use\n */\nexport function processTranslationCall(\n tPath: NodePath,\n config: ParsingConfig,\n output: ParsingOutput\n): void {\n if (\n tPath.parent.type !== 'CallExpression' ||\n tPath.parent.arguments.length === 0\n ) {\n return;\n }\n\n // Get arg and options\n const arg = tPath.parent.arguments[0];\n const options = tPath.parent.arguments.at(1);\n\n // get metadata and id from options\n const metadata = extractStringEntryMetadata({\n options,\n output,\n config,\n nodeLoc: tPath.parent.loc,\n surroundingLineCount: SURROUNDING_LINE_COUNT,\n });\n\n // Resolve derive context variants if present\n let contextVariants: string[] | undefined;\n if (metadata.contextDeriveExpr) {\n const contextNode = handleDerivation({\n expr: metadata.contextDeriveExpr,\n tPath,\n file: config.file,\n parsingOptions: config.parsingOptions,\n errors: output.errors,\n warnings: output.warnings,\n });\n if (contextNode) {\n contextVariants = nodeToStrings(contextNode);\n }\n delete metadata.contextDeriveExpr;\n }\n\n // Route tx call to appropriate handler\n routeTranslationCall({\n tPath,\n config,\n output,\n arg,\n metadata,\n contextVariants,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,uBACd,OACA,QACA,QACM;AACN,KACE,MAAM,OAAO,SAAS,oBACtB,MAAM,OAAO,UAAU,WAAW,EAElC;CAIF,MAAM,MAAM,MAAM,OAAO,UAAU;CAInC,MAAM,WAAW,2BAA2B;EAC1C,SAJc,MAAM,OAAO,UAAU,GAAG,EAIjC;EACP;EACA;EACA,SAAS,MAAM,OAAO;EACtB,sBAAA;EACD,CAAC;CAGF,IAAI;AACJ,KAAI,SAAS,mBAAmB;EAC9B,MAAM,cAAc,iBAAiB;GACnC,MAAM,SAAS;GACf;GACA,MAAM,OAAO;GACb,gBAAgB,OAAO;GACvB,QAAQ,OAAO;GACf,UAAU,OAAO;GAClB,CAAC;AACF,MAAI,YACF,mBAAkB,cAAc,YAAY;AAE9C,SAAO,SAAS;;AAIlB,sBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;EACD,CAAC"}
|