@intlayer/cli 8.4.0 → 8.4.1
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/dist/cjs/IntlayerEventListener.cjs +1 -1
- package/dist/cjs/IntlayerEventListener.cjs.map +1 -1
- package/dist/cjs/_utils_asset-ghp_Cjwk.cjs +2 -0
- package/dist/cjs/auth/login.cjs +1 -1
- package/dist/cjs/auth/login.cjs.map +1 -1
- package/dist/cjs/build.cjs +1 -1
- package/dist/cjs/build.cjs.map +1 -1
- package/dist/cjs/{_virtual/_rolldown/runtime.cjs → chunk-Bmb41Sf3.cjs} +1 -1
- package/dist/cjs/ci.cjs +1 -1
- package/dist/cjs/ci.cjs.map +1 -1
- package/dist/cjs/cli.cjs +1 -1
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/config.cjs +1 -1
- package/dist/cjs/config.cjs.map +1 -1
- package/dist/cjs/editor.cjs +1 -1
- package/dist/cjs/editor.cjs.map +1 -1
- package/dist/cjs/extract.cjs +1 -1
- package/dist/cjs/extract.cjs.map +1 -1
- package/dist/cjs/fill/fill.cjs +1 -1
- package/dist/cjs/fill/fill.cjs.map +1 -1
- package/dist/cjs/fill/formatAutoFilledFilePath.cjs +1 -1
- package/dist/cjs/fill/formatAutoFilledFilePath.cjs.map +1 -1
- package/dist/cjs/fill/formatFillData.cjs +1 -1
- package/dist/cjs/fill/formatFillData.cjs.map +1 -1
- package/dist/cjs/fill/listTranslationsTasks.cjs +1 -1
- package/dist/cjs/fill/listTranslationsTasks.cjs.map +1 -1
- package/dist/cjs/fill/translateDictionary.cjs +1 -1
- package/dist/cjs/fill/translateDictionary.cjs.map +1 -1
- package/dist/cjs/fill/writeFill.cjs +1 -1
- package/dist/cjs/fill/writeFill.cjs.map +1 -1
- package/dist/cjs/getTargetDictionary.cjs +1 -1
- package/dist/cjs/getTargetDictionary.cjs.map +1 -1
- package/dist/cjs/init.cjs +1 -1
- package/dist/cjs/init.cjs.map +1 -1
- package/dist/cjs/initMCP.cjs +1 -1
- package/dist/cjs/initMCP.cjs.map +1 -1
- package/dist/cjs/initSkills.cjs +1 -1
- package/dist/cjs/initSkills.cjs.map +1 -1
- package/dist/cjs/listContentDeclaration.cjs +1 -1
- package/dist/cjs/listContentDeclaration.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +1 -1
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/liveSync.cjs +1 -1
- package/dist/cjs/liveSync.cjs.map +1 -1
- package/dist/cjs/pull.cjs +1 -1
- package/dist/cjs/pull.cjs.map +1 -1
- package/dist/cjs/push/pullLog.cjs +1 -1
- package/dist/cjs/push/pullLog.cjs.map +1 -1
- package/dist/cjs/push/push.cjs +1 -1
- package/dist/cjs/push/push.cjs.map +1 -1
- package/dist/cjs/pushConfig.cjs +1 -1
- package/dist/cjs/pushConfig.cjs.map +1 -1
- package/dist/cjs/pushLog.cjs +1 -1
- package/dist/cjs/pushLog.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDoc.cjs +1 -1
- package/dist/cjs/reviewDoc/reviewDoc.cjs.map +1 -1
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs +1 -1
- package/dist/cjs/reviewDoc/reviewDocBlockAware.cjs.map +1 -1
- package/dist/cjs/searchDoc.cjs +1 -1
- package/dist/cjs/searchDoc.cjs.map +1 -1
- package/dist/cjs/test/listMissingTranslations.cjs +1 -1
- package/dist/cjs/test/listMissingTranslations.cjs.map +1 -1
- package/dist/cjs/test/test.cjs +1 -1
- package/dist/cjs/test/test.cjs.map +1 -1
- package/dist/cjs/translateDoc/index.cjs +1 -1
- package/dist/cjs/translateDoc/translateDoc.cjs +1 -1
- package/dist/cjs/translateDoc/translateDoc.cjs.map +1 -1
- package/dist/cjs/translateDoc/translateFile.cjs +1 -1
- package/dist/cjs/translateDoc/translateFile.cjs.map +1 -1
- package/dist/cjs/translation-alignment/fingerprintBlock.cjs +1 -1
- package/dist/cjs/translation-alignment/fingerprintBlock.cjs.map +1 -1
- package/dist/cjs/utils/calculateChunks.cjs +1 -1
- package/dist/cjs/utils/calculateChunks.cjs.map +1 -1
- package/dist/cjs/utils/checkAccess.cjs +1 -1
- package/dist/cjs/utils/checkAccess.cjs.map +1 -1
- package/dist/cjs/utils/checkLastUpdateTime.cjs +1 -1
- package/dist/cjs/utils/checkLastUpdateTime.cjs.map +1 -1
- package/dist/cjs/utils/chunkInference.cjs +1 -1
- package/dist/cjs/utils/chunkInference.cjs.map +1 -1
- package/dist/cjs/utils/getIsFileUpdatedRecently.cjs +1 -1
- package/dist/cjs/utils/getIsFileUpdatedRecently.cjs.map +1 -1
- package/dist/cjs/utils/getParentPackageJSON.cjs +1 -1
- package/dist/cjs/utils/getParentPackageJSON.cjs.map +1 -1
- package/dist/cjs/utils/mapChunksBetweenFiles.cjs +1 -1
- package/dist/cjs/utils/mapChunksBetweenFiles.cjs.map +1 -1
- package/dist/cjs/utils/openBrowser.cjs +1 -1
- package/dist/cjs/utils/openBrowser.cjs.map +1 -1
- package/dist/cjs/utils/setupAI.cjs +1 -1
- package/dist/cjs/utils/setupAI.cjs.map +1 -1
- package/dist/cjs/watch.cjs +1 -1
- package/dist/cjs/watch.cjs.map +1 -1
- package/dist/esm/{_virtual/_utils_asset.mjs → _utils_asset-B187VPMw.mjs} +1 -1
- package/dist/esm/cli.mjs +1 -1
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/editor-D8BGlLzF.mjs +2 -0
- package/dist/esm/editor-D8BGlLzF.mjs.map +1 -0
- package/dist/esm/editor.mjs +1 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/reviewDoc/reviewDoc.mjs +1 -1
- package/dist/esm/reviewDoc/reviewDoc.mjs.map +1 -1
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs +1 -1
- package/dist/esm/reviewDoc/reviewDocBlockAware.mjs.map +1 -1
- package/dist/esm/translateDoc/index.mjs +1 -1
- package/dist/esm/translateDoc/translateDoc.mjs +1 -1
- package/dist/esm/translateDoc/translateDoc.mjs.map +1 -1
- package/dist/esm/translateDoc/translateFile.mjs +1 -1
- package/dist/esm/translateDoc/translateFile.mjs.map +1 -1
- package/dist/types/fill/fill.d.ts +1 -1
- package/dist/types/fill/translateDictionary.d.ts +1 -1
- package/dist/types/getTargetDictionary-RBSRtaQj.d.ts +19 -0
- package/dist/types/getTargetDictionary-RBSRtaQj.d.ts.map +1 -0
- package/dist/types/getTargetDictionary.d.ts +2 -19
- package/dist/types/index.d.ts +2 -2
- package/dist/types/listMissingTranslations-DxKw7nqI.d.ts +28 -0
- package/dist/types/listMissingTranslations-DxKw7nqI.d.ts.map +1 -0
- package/dist/types/reviewDoc/reviewDocBlockAware.d.ts +1 -1
- package/dist/types/setupAI-Bosjx7ah.d.ts +21 -0
- package/dist/types/setupAI-Bosjx7ah.d.ts.map +1 -0
- package/dist/types/test/index.d.ts +2 -2
- package/dist/types/test/listMissingTranslations.d.ts +2 -28
- package/dist/types/test/test.d.ts +2 -11
- package/dist/types/test-DUTiJR5_.d.ts +11 -0
- package/dist/types/test-DUTiJR5_.d.ts.map +1 -0
- package/dist/types/translateDoc/index.d.ts +1 -1
- package/dist/types/translateDoc/translateDoc.d.ts +1 -1
- package/dist/types/translateDoc/translateFile.d.ts +1 -1
- package/dist/types/translateDoc/types.d.ts +2 -48
- package/dist/types/types-BKvc3FmV.d.ts +48 -0
- package/dist/types/types-BKvc3FmV.d.ts.map +1 -0
- package/dist/types/utils/chunkInference.d.ts +1 -1
- package/dist/types/utils/setupAI.d.ts +2 -21
- package/package.json +12 -12
- package/dist/cjs/_virtual/_utils_asset.cjs +0 -2
- package/dist/esm/_virtual/_rolldown/runtime.mjs +0 -1
- package/dist/esm/editor.mjs.map +0 -1
- package/dist/types/getTargetDictionary.d.ts.map +0 -1
- package/dist/types/test/listMissingTranslations.d.ts.map +0 -1
- package/dist/types/test/test.d.ts.map +0 -1
- package/dist/types/translateDoc/types.d.ts.map +0 -1
- package/dist/types/utils/setupAI.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateFile.mjs","names":[],"sources":["../../../src/translateDoc/translateFile.ts"],"sourcesContent":["import { mkdirSync, writeFileSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { dirname, relative } from 'node:path';\nimport { performance } from 'node:perf_hooks';\nimport { readAsset } from 'utils:asset';\nimport { formatLocale, formatPath } from '@intlayer/chokidar/utils';\nimport {\n ANSIColors,\n colon,\n colorize,\n colorizeNumber,\n getAppLogger,\n} from '@intlayer/config/logger';\nimport { retryManager } from '@intlayer/config/utils';\nimport { chunkText } from '../utils/calculateChunks';\nimport { chunkInference } from '../utils/chunkInference';\nimport { fixChunkStartEndChars } from '../utils/fixChunkStartEndChars';\nimport type { TranslateFileOptions } from './types';\nimport { sanitizeChunk, validateTranslation } from './validation';\n\nexport const translateFile = async ({\n baseFilePath,\n outputFilePath,\n locale,\n baseLocale,\n configuration,\n errorState,\n aiOptions,\n customInstructions,\n aiClient,\n aiConfig,\n flushStrategy = 'incremental',\n onChunkReceive,\n limit, // The Global Limiter\n}: TranslateFileOptions): Promise<string | null> => {\n if (errorState.shouldStop) return null;\n\n const appLogger = getAppLogger(configuration, { config: { prefix: '' } });\n const fileStartTime = performance.now();\n\n try {\n const fileContent = await readFile(baseFilePath, 'utf-8');\n const chunks = chunkText(fileContent);\n const totalChunks = chunks.length;\n\n const filePrefixText = `${ANSIColors.GREY_DARK}[${formatPath(baseFilePath)}${ANSIColors.GREY_DARK}] `;\n const filePrefix = `${colon(filePrefixText, { colSize: 40 })}${ANSIColors.RESET}`;\n const prefixText = `${ANSIColors.GREY_DARK}[${formatPath(baseFilePath)}${ANSIColors.GREY_DARK}][${formatLocale(locale)}${ANSIColors.GREY_DARK}] `;\n const prefix = `${colon(prefixText, { colSize: 40 })}${ANSIColors.RESET}`;\n\n appLogger(\n `${filePrefix}Split into ${colorizeNumber(totalChunks)} chunks. Queuing...`\n );\n\n const basePrompt = readAsset('./prompts/TRANSLATE_PROMPT.md', 'utf-8')\n .replaceAll('{{localeName}}', `${formatLocale(locale, false)}`)\n .replaceAll('{{baseLocaleName}}', `${formatLocale(baseLocale, false)}`)\n .replace('{{applicationContext}}', aiOptions?.applicationContext ?? '-')\n .replace('{{customInstructions}}', customInstructions ?? '-');\n\n const translatedParts: string[] = new Array(totalChunks).fill('');\n\n // Fallback if no limiter is provided (runs immediately)\n const runTask = limit ?? ((fn) => fn());\n\n // MAP CHUNKS TO GLOBAL TASKS\n // This pushes ALL chunks for this file into the Global Queue immediately.\n // They will execute whenever the global concurrency slots open up.\n const tasks = chunks.map((chunk, i) =>\n runTask(async () => {\n if (errorState.shouldStop) return null;\n\n const chunkLogger = getAppLogger(configuration, {\n config: {\n prefix: `${prefix} ${ANSIColors.GREY_DARK}[${i + 1}/${totalChunks}] ${ANSIColors.RESET}`,\n },\n });\n\n const chunkStartTime = performance.now();\n const isFirstChunk = i === 0;\n const fileToTranslateCurrentChunk = chunk.content;\n\n // Context Preparation\n const getPrevChunkPrompt = () =>\n `>>> CONTEXT: PREVIOUS SOURCE CONTENT <<<\\n\\`\\`\\`\\n` +\n (chunks[i - 1]?.content ?? '') +\n `\\n\\`\\`\\`\\n>>> END PREVIOUS CONTEXT <<<`;\n\n const getBaseChunkContextPrompt = () =>\n `>>> CONTEXT: NEXT CONTENT <<<\\n\\`\\`\\`\\n` +\n (chunks[i + 1]?.content ?? '') +\n `\\n\\`\\`\\`\\n>>> END NEXT CONTEXT <<<`;\n\n chunkLogger('Process started');\n\n const chunkTranslation = retryManager(async () => {\n const result = await chunkInference(\n [\n { role: 'system', content: basePrompt },\n ...(chunks[i + 1]\n ? [\n {\n role: 'system',\n content: getBaseChunkContextPrompt(),\n } as const,\n ]\n : []),\n ...(isFirstChunk\n ? []\n : [{ role: 'system', content: getPrevChunkPrompt() } as const]),\n {\n role: 'system',\n content: [\n `You are translating TARGET CHUNK (${i + 1}/${totalChunks}).`,\n `Translate ONLY the target chunk. Preserve frontmatter/code exactly.`,\n ].join('\\n'),\n },\n {\n role: 'user',\n content: `>>> TARGET CHUNK START <<<\\n${fileToTranslateCurrentChunk}\\n>>> TARGET CHUNK END <<<`,\n },\n ],\n aiOptions,\n configuration,\n aiClient,\n aiConfig\n );\n\n let processedChunk = sanitizeChunk(\n result?.fileContent,\n fileToTranslateCurrentChunk\n );\n processedChunk = fixChunkStartEndChars(\n processedChunk,\n fileToTranslateCurrentChunk\n );\n\n const isValid = validateTranslation(\n fileToTranslateCurrentChunk,\n processedChunk,\n chunkLogger\n );\n\n if (!isValid) {\n // Throwing an error here signals retryManager to try again\n throw new Error(\n `Validation failed for chunk ${i + 1}/${totalChunks}`\n );\n }\n\n return { content: processedChunk, tokens: result.tokenUsed };\n });\n\n const { content: translatedChunk, tokens } = await chunkTranslation();\n const chunkEndTime = performance.now();\n const chunkDuration = (chunkEndTime - chunkStartTime).toFixed(0);\n\n // Store Result\n translatedParts[i] = translatedChunk;\n\n if (onChunkReceive) {\n onChunkReceive(translatedChunk, i, totalChunks);\n }\n\n // Incremental Flush Strategy\n if (flushStrategy === 'incremental') {\n const isContiguous = translatedParts\n .slice(0, i + 1)\n .every((p) => p && p !== '');\n\n if (isContiguous) {\n let endIdx = 0;\n while (\n endIdx < totalChunks &&\n translatedParts[endIdx] &&\n translatedParts[endIdx] !== ''\n ) {\n endIdx++;\n }\n const currentContent = translatedParts.slice(0, endIdx).join('');\n // Write asynchronously/sync is fine here as node handles file locks reasonably well for single process\n mkdirSync(dirname(outputFilePath), { recursive: true });\n writeFileSync(outputFilePath, currentContent);\n }\n }\n\n chunkLogger(\n [\n `${colorizeNumber(tokens)} tokens used `,\n `${ANSIColors.GREY_DARK}in ${colorizeNumber(chunkDuration)}ms${ANSIColors.RESET}`,\n ].join('')\n );\n })\n );\n\n // Wait for all chunks for this specific file/locale to finish\n await Promise.all(tasks);\n\n // Final Flush\n const fullContent = translatedParts.join('');\n if (flushStrategy === 'end' || flushStrategy === 'incremental') {\n mkdirSync(dirname(outputFilePath), { recursive: true });\n writeFileSync(outputFilePath, fullContent);\n }\n\n const fileEndTime = performance.now();\n const totalDuration = ((fileEndTime - fileStartTime) / 1000).toFixed(2);\n const relativePath = relative(configuration.system.baseDir, outputFilePath);\n\n appLogger(\n `${colorize('✔', ANSIColors.GREEN)} File ${formatPath(relativePath)} completed in ${colorizeNumber(totalDuration)}s.`\n );\n\n return fullContent;\n } catch (error: any) {\n errorState.count++;\n const errorMessage = error?.message ?? JSON.stringify(error);\n appLogger(`${colorize('✖', ANSIColors.RED)} Error: ${errorMessage}`);\n if (errorState.count >= errorState.maxErrors) errorState.shouldStop = true;\n return null;\n }\n};\n"],"mappings":"yvBAoBA,MAAa,EAAgB,MAAO,CAClC,eACA,iBACA,SACA,aACA,gBACA,aACA,YACA,qBACA,WACA,WACA,gBAAgB,cAChB,iBACA,WACkD,CAClD,GAAI,EAAW,WAAY,OAAO,KAElC,IAAM,EAAY,EAAa,EAAe,CAAE,OAAQ,CAAE,OAAQ,GAAI,CAAE,CAAC,CACnE,EAAgB,EAAY,KAAK,CAEvC,GAAI,CAEF,IAAM,EAAS,EADK,MAAM,EAAS,EAAc,QAAQ,CACpB,CAC/B,EAAc,EAAO,OAGrB,EAAa,GAAG,EADC,GAAG,EAAW,UAAU,GAAG,EAAW,EAAa,GAAG,EAAW,UAAU,IACtD,CAAE,QAAS,GAAI,CAAC,GAAG,EAAW,QAEpE,EAAS,GAAG,EADC,GAAG,EAAW,UAAU,GAAG,EAAW,EAAa,GAAG,EAAW,UAAU,IAAI,EAAa,EAAO,GAAG,EAAW,UAAU,IAC1G,CAAE,QAAS,GAAI,CAAC,GAAG,EAAW,QAElE,EACE,GAAG,EAAW,aAAa,EAAe,EAAY,CAAC,qBACxD,CAED,IAAM,EAAa,EAAU,gCAAiC,QAAQ,CACnE,WAAW,iBAAkB,GAAG,EAAa,EAAQ,GAAM,GAAG,CAC9D,WAAW,qBAAsB,GAAG,EAAa,EAAY,GAAM,GAAG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ts"],"sourcesContent":["import { mkdirSync, writeFileSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { dirname, relative } from 'node:path';\nimport { performance } from 'node:perf_hooks';\nimport { readAsset } from 'utils:asset';\nimport { formatLocale, formatPath } from '@intlayer/chokidar/utils';\nimport {\n ANSIColors,\n colon,\n colorize,\n colorizeNumber,\n getAppLogger,\n} from '@intlayer/config/logger';\nimport { retryManager } from '@intlayer/config/utils';\nimport { chunkText } from '../utils/calculateChunks';\nimport { chunkInference } from '../utils/chunkInference';\nimport { fixChunkStartEndChars } from '../utils/fixChunkStartEndChars';\nimport type { TranslateFileOptions } from './types';\nimport { sanitizeChunk, validateTranslation } from './validation';\n\nexport const translateFile = async ({\n baseFilePath,\n outputFilePath,\n locale,\n baseLocale,\n configuration,\n errorState,\n aiOptions,\n customInstructions,\n aiClient,\n aiConfig,\n flushStrategy = 'incremental',\n onChunkReceive,\n limit, // The Global Limiter\n}: TranslateFileOptions): Promise<string | null> => {\n if (errorState.shouldStop) return null;\n\n const appLogger = getAppLogger(configuration, { config: { prefix: '' } });\n const fileStartTime = performance.now();\n\n try {\n const fileContent = await readFile(baseFilePath, 'utf-8');\n const chunks = chunkText(fileContent);\n const totalChunks = chunks.length;\n\n const filePrefixText = `${ANSIColors.GREY_DARK}[${formatPath(baseFilePath)}${ANSIColors.GREY_DARK}] `;\n const filePrefix = `${colon(filePrefixText, { colSize: 40 })}${ANSIColors.RESET}`;\n const prefixText = `${ANSIColors.GREY_DARK}[${formatPath(baseFilePath)}${ANSIColors.GREY_DARK}][${formatLocale(locale)}${ANSIColors.GREY_DARK}] `;\n const prefix = `${colon(prefixText, { colSize: 40 })}${ANSIColors.RESET}`;\n\n appLogger(\n `${filePrefix}Split into ${colorizeNumber(totalChunks)} chunks. Queuing...`\n );\n\n const basePrompt = readAsset('./prompts/TRANSLATE_PROMPT.md', 'utf-8')\n .replaceAll('{{localeName}}', `${formatLocale(locale, false)}`)\n .replaceAll('{{baseLocaleName}}', `${formatLocale(baseLocale, false)}`)\n .replace('{{applicationContext}}', aiOptions?.applicationContext ?? '-')\n .replace('{{customInstructions}}', customInstructions ?? '-');\n\n const translatedParts: string[] = new Array(totalChunks).fill('');\n\n // Fallback if no limiter is provided (runs immediately)\n const runTask = limit ?? ((fn) => fn());\n\n // MAP CHUNKS TO GLOBAL TASKS\n // This pushes ALL chunks for this file into the Global Queue immediately.\n // They will execute whenever the global concurrency slots open up.\n const tasks = chunks.map((chunk, i) =>\n runTask(async () => {\n if (errorState.shouldStop) return null;\n\n const chunkLogger = getAppLogger(configuration, {\n config: {\n prefix: `${prefix} ${ANSIColors.GREY_DARK}[${i + 1}/${totalChunks}] ${ANSIColors.RESET}`,\n },\n });\n\n const chunkStartTime = performance.now();\n const isFirstChunk = i === 0;\n const fileToTranslateCurrentChunk = chunk.content;\n\n // Context Preparation\n const getPrevChunkPrompt = () =>\n `>>> CONTEXT: PREVIOUS SOURCE CONTENT <<<\\n\\`\\`\\`\\n` +\n (chunks[i - 1]?.content ?? '') +\n `\\n\\`\\`\\`\\n>>> END PREVIOUS CONTEXT <<<`;\n\n const getBaseChunkContextPrompt = () =>\n `>>> CONTEXT: NEXT CONTENT <<<\\n\\`\\`\\`\\n` +\n (chunks[i + 1]?.content ?? '') +\n `\\n\\`\\`\\`\\n>>> END NEXT CONTEXT <<<`;\n\n chunkLogger('Process started');\n\n const chunkTranslation = retryManager(async () => {\n const result = await chunkInference(\n [\n { role: 'system', content: basePrompt },\n ...(chunks[i + 1]\n ? [\n {\n role: 'system',\n content: getBaseChunkContextPrompt(),\n } as const,\n ]\n : []),\n ...(isFirstChunk\n ? []\n : [{ role: 'system', content: getPrevChunkPrompt() } as const]),\n {\n role: 'system',\n content: [\n `You are translating TARGET CHUNK (${i + 1}/${totalChunks}).`,\n `Translate ONLY the target chunk. Preserve frontmatter/code exactly.`,\n ].join('\\n'),\n },\n {\n role: 'user',\n content: `>>> TARGET CHUNK START <<<\\n${fileToTranslateCurrentChunk}\\n>>> TARGET CHUNK END <<<`,\n },\n ],\n aiOptions,\n configuration,\n aiClient,\n aiConfig\n );\n\n let processedChunk = sanitizeChunk(\n result?.fileContent,\n fileToTranslateCurrentChunk\n );\n processedChunk = fixChunkStartEndChars(\n processedChunk,\n fileToTranslateCurrentChunk\n );\n\n const isValid = validateTranslation(\n fileToTranslateCurrentChunk,\n processedChunk,\n chunkLogger\n );\n\n if (!isValid) {\n // Throwing an error here signals retryManager to try again\n throw new Error(\n `Validation failed for chunk ${i + 1}/${totalChunks}`\n );\n }\n\n return { content: processedChunk, tokens: result.tokenUsed };\n });\n\n const { content: translatedChunk, tokens } = await chunkTranslation();\n const chunkEndTime = performance.now();\n const chunkDuration = (chunkEndTime - chunkStartTime).toFixed(0);\n\n // Store Result\n translatedParts[i] = translatedChunk;\n\n if (onChunkReceive) {\n onChunkReceive(translatedChunk, i, totalChunks);\n }\n\n // Incremental Flush Strategy\n if (flushStrategy === 'incremental') {\n const isContiguous = translatedParts\n .slice(0, i + 1)\n .every((p) => p && p !== '');\n\n if (isContiguous) {\n let endIdx = 0;\n while (\n endIdx < totalChunks &&\n translatedParts[endIdx] &&\n translatedParts[endIdx] !== ''\n ) {\n endIdx++;\n }\n const currentContent = translatedParts.slice(0, endIdx).join('');\n // Write asynchronously/sync is fine here as node handles file locks reasonably well for single process\n mkdirSync(dirname(outputFilePath), { recursive: true });\n writeFileSync(outputFilePath, currentContent);\n }\n }\n\n chunkLogger(\n [\n `${colorizeNumber(tokens)} tokens used `,\n `${ANSIColors.GREY_DARK}in ${colorizeNumber(chunkDuration)}ms${ANSIColors.RESET}`,\n ].join('')\n );\n })\n );\n\n // Wait for all chunks for this specific file/locale to finish\n await Promise.all(tasks);\n\n // Final Flush\n const fullContent = translatedParts.join('');\n if (flushStrategy === 'end' || flushStrategy === 'incremental') {\n mkdirSync(dirname(outputFilePath), { recursive: true });\n writeFileSync(outputFilePath, fullContent);\n }\n\n const fileEndTime = performance.now();\n const totalDuration = ((fileEndTime - fileStartTime) / 1000).toFixed(2);\n const relativePath = relative(configuration.system.baseDir, outputFilePath);\n\n appLogger(\n `${colorize('✔', ANSIColors.GREEN)} File ${formatPath(relativePath)} completed in ${colorizeNumber(totalDuration)}s.`\n );\n\n return fullContent;\n } catch (error: any) {\n errorState.count++;\n const errorMessage = error?.message ?? JSON.stringify(error);\n appLogger(`${colorize('✖', ANSIColors.RED)} Error: ${errorMessage}`);\n if (errorState.count >= errorState.maxErrors) errorState.shouldStop = true;\n return null;\n }\n};\n"],"mappings":"ivBAoBA,MAAa,EAAgB,MAAO,CAClC,eACA,iBACA,SACA,aACA,gBACA,aACA,YACA,qBACA,WACA,WACA,gBAAgB,cAChB,iBACA,WACkD,CAClD,GAAI,EAAW,WAAY,OAAO,KAElC,IAAM,EAAY,EAAa,EAAe,CAAE,OAAQ,CAAE,OAAQ,GAAI,CAAE,CAAC,CACnE,EAAgB,EAAY,KAAK,CAEvC,GAAI,CAEF,IAAM,EAAS,EADK,MAAM,EAAS,EAAc,QAAQ,CACpB,CAC/B,EAAc,EAAO,OAGrB,EAAa,GAAG,EADC,GAAG,EAAW,UAAU,GAAG,EAAW,EAAa,GAAG,EAAW,UAAU,IACtD,CAAE,QAAS,GAAI,CAAC,GAAG,EAAW,QAEpE,EAAS,GAAG,EADC,GAAG,EAAW,UAAU,GAAG,EAAW,EAAa,GAAG,EAAW,UAAU,IAAI,EAAa,EAAO,GAAG,EAAW,UAAU,IAC1G,CAAE,QAAS,GAAI,CAAC,GAAG,EAAW,QAElE,EACE,GAAG,EAAW,aAAa,EAAe,EAAY,CAAC,qBACxD,CAED,IAAM,EAAa,EAAU,gCAAiC,QAAQ,CACnE,WAAW,iBAAkB,GAAG,EAAa,EAAQ,GAAM,GAAG,CAC9D,WAAW,qBAAsB,GAAG,EAAa,EAAY,GAAM,GAAG,CACtE,QAAQ,yBAA0B,GAAW,oBAAsB,IAAI,CACvE,QAAQ,yBAA0B,GAAsB,IAAI,CAEzD,EAAgC,MAAM,EAAY,CA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,EAAiB,EAAG,EAAY,CAI7C,IAAkB,eACC,EAClB,MAAM,EAAG,EAAI,EAAE,CACf,MAAO,GAAM,GAAK,IAAM,GAAG,CAEZ,CAChB,IAAI,EAAS,EACb,KACE,EAAS,GACT,EAAgB,IAChB,EAAgB,KAAY,IAE5B,IAEF,IAAM,EAAiB,EAAgB,MAAM,EAAG,EAAO,CAAC,KAAK,GAAG,CAEhE,EAAU,EAAQ,EAAe,CAAE,CAAE,UAAW,GAAM,CAAC,CACvD,EAAc,EAAgB,EAAe,CAIjD,EACE,CACE,GAAG,EAAe,EAAO,CAAC,eAC1B,GAAG,EAAW,UAAU,KAAK,EAAe,EAAc,CAAC,IAAI,EAAW,QAC3E,CAAC,KAAK,GAAG,CACX,EACD,CACH,CAGD,MAAM,QAAQ,IAAI,EAAM,CAGxB,IAAM,EAAc,EAAgB,KAAK,GAAG,EACxC,IAAkB,OAAS,IAAkB,iBAC/C,EAAU,EAAQ,EAAe,CAAE,CAAE,UAAW,GAAM,CAAC,CACvD,EAAc,EAAgB,EAAY,EAI5C,IAAM,IADc,EAAY,KAAK,CACC,GAAiB,KAAM,QAAQ,EAAE,CACjE,EAAe,EAAS,EAAc,OAAO,QAAS,EAAe,CAM3E,OAJA,EACE,GAAG,EAAS,IAAK,EAAW,MAAM,CAAC,QAAQ,EAAW,EAAa,CAAC,gBAAgB,EAAe,EAAc,CAAC,IACnH,CAEM,QACA,EAAY,CACnB,EAAW,QACX,IAAM,EAAe,GAAO,SAAW,KAAK,UAAU,EAAM,CAG5D,OAFA,EAAU,GAAG,EAAS,IAAK,EAAW,IAAI,CAAC,UAAU,IAAe,CAChE,EAAW,OAAS,EAAW,YAAW,EAAW,WAAa,IAC/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetTargetDictionaryOptions } from "../getTargetDictionary.js";
|
|
1
|
+
import { t as GetTargetDictionaryOptions } from "../getTargetDictionary-RBSRtaQj.js";
|
|
2
2
|
import { AIOptions } from "@intlayer/api";
|
|
3
3
|
import { ListGitFilesOptions } from "@intlayer/chokidar/cli";
|
|
4
4
|
import { Locale } from "@intlayer/types/allLocales";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranslationTask } from "./listTranslationsTasks.js";
|
|
2
|
-
import { AIClient } from "../
|
|
2
|
+
import { t as AIClient } from "../setupAI-Bosjx7ah.js";
|
|
3
3
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
4
4
|
import { AIOptions } from "@intlayer/api";
|
|
5
5
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
2
|
+
import { ListGitFilesOptions } from "@intlayer/chokidar/cli";
|
|
3
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
+
|
|
5
|
+
//#region src/getTargetDictionary.d.ts
|
|
6
|
+
declare const ensureArray: <T>(value: T | T[]) => T[];
|
|
7
|
+
type GetTargetDictionaryOptions = {
|
|
8
|
+
file?: string | string[];
|
|
9
|
+
keys?: string | string[];
|
|
10
|
+
excludedKeys?: string | string[];
|
|
11
|
+
filter?: (entry: Dictionary) => boolean;
|
|
12
|
+
pathFilter?: string | string[];
|
|
13
|
+
gitOptions?: ListGitFilesOptions;
|
|
14
|
+
configOptions?: GetConfigurationOptions;
|
|
15
|
+
};
|
|
16
|
+
declare const getTargetUnmergedDictionaries: (options?: GetTargetDictionaryOptions) => Promise<Dictionary[]>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ensureArray as n, getTargetUnmergedDictionaries as r, GetTargetDictionaryOptions as t };
|
|
19
|
+
//# sourceMappingURL=getTargetDictionary-RBSRtaQj.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTargetDictionary-RBSRtaQj.d.ts","names":[],"sources":["../../src/getTargetDictionary.ts"],"mappings":";;;;;cASa,WAAA,MAAkB,KAAA,EAAO,CAAA,GAAI,CAAA,OAAM,CAAA;AAAA,KAGpC,0BAAA;EACV,IAAA;EACA,IAAA;EACA,YAAA;EACA,MAAA,IAAU,KAAA,EAAO,UAAA;EACjB,UAAA;EACA,UAAA,GAAa,mBAAA;EACb,aAAA,GAAgB,uBAAA;AAAA;AAAA,cAGL,6BAAA,GACX,OAAA,GAAU,0BAAA,KACT,OAAA,CAAQ,UAAA"}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
|
|
5
|
-
//#region src/getTargetDictionary.d.ts
|
|
6
|
-
declare const ensureArray: <T>(value: T | T[]) => T[];
|
|
7
|
-
type GetTargetDictionaryOptions = {
|
|
8
|
-
file?: string | string[];
|
|
9
|
-
keys?: string | string[];
|
|
10
|
-
excludedKeys?: string | string[];
|
|
11
|
-
filter?: (entry: Dictionary) => boolean;
|
|
12
|
-
pathFilter?: string | string[];
|
|
13
|
-
gitOptions?: ListGitFilesOptions;
|
|
14
|
-
configOptions?: GetConfigurationOptions;
|
|
15
|
-
};
|
|
16
|
-
declare const getTargetUnmergedDictionaries: (options?: GetTargetDictionaryOptions) => Promise<Dictionary[]>;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { GetTargetDictionaryOptions, ensureArray, getTargetUnmergedDictionaries };
|
|
19
|
-
//# sourceMappingURL=getTargetDictionary.d.ts.map
|
|
1
|
+
import { n as ensureArray, r as getTargetUnmergedDictionaries, t as GetTargetDictionaryOptions } from "./getTargetDictionary-RBSRtaQj.js";
|
|
2
|
+
export { GetTargetDictionaryOptions, ensureArray, getTargetUnmergedDictionaries };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import { push } from "./push/push.js";
|
|
|
13
13
|
import { pushConfig } from "./pushConfig.js";
|
|
14
14
|
import { reviewDoc } from "./reviewDoc/reviewDoc.js";
|
|
15
15
|
import { searchDoc } from "./searchDoc.js";
|
|
16
|
-
import {
|
|
17
|
-
import { testMissingTranslations } from "./test
|
|
16
|
+
import { n as listMissingTranslationsWithConfig, t as listMissingTranslations } from "./listMissingTranslations-DxKw7nqI.js";
|
|
17
|
+
import { t as testMissingTranslations } from "./test-DUTiJR5_.js";
|
|
18
18
|
import { translateDoc } from "./translateDoc/translateDoc.js";
|
|
19
19
|
export * from "@intlayer/chokidar/cli";
|
|
20
20
|
export * from "@intlayer/chokidar/utils";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
3
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
4
|
+
|
|
5
|
+
//#region src/test/listMissingTranslations.d.ts
|
|
6
|
+
declare const listMissingTranslationsWithConfig: (configuration: IntlayerConfig) => {
|
|
7
|
+
missingTranslations: {
|
|
8
|
+
key: string;
|
|
9
|
+
filePath?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
locales: Locale[];
|
|
12
|
+
}[];
|
|
13
|
+
missingLocales: Locale[];
|
|
14
|
+
missingRequiredLocales: Locale[];
|
|
15
|
+
};
|
|
16
|
+
declare const listMissingTranslations: (configurationOptions?: GetConfigurationOptions) => {
|
|
17
|
+
missingTranslations: {
|
|
18
|
+
key: string;
|
|
19
|
+
filePath?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
locales: Locale[];
|
|
22
|
+
}[];
|
|
23
|
+
missingLocales: Locale[];
|
|
24
|
+
missingRequiredLocales: Locale[];
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { listMissingTranslationsWithConfig as n, listMissingTranslations as t };
|
|
28
|
+
//# sourceMappingURL=listMissingTranslations-DxKw7nqI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listMissingTranslations-DxKw7nqI.d.ts","names":[],"sources":["../../src/test/listMissingTranslations.ts"],"mappings":";;;;;cAYa,iCAAA,GACX,aAAA,EAAe,cAAA;;;;;aASJ,MAAA;EAAA;;;;cAmEA,uBAAA,GACX,oBAAA,GAAuB,uBAAA;;;;;aApEZ,MAAA;EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AIClient } from "../
|
|
1
|
+
import { t as AIClient } from "../setupAI-Bosjx7ah.js";
|
|
2
2
|
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
3
3
|
import { AIOptions } from "@intlayer/api";
|
|
4
4
|
import { Locale } from "@intlayer/types/allLocales";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
|
+
import * as _intlayer_ai0 from "@intlayer/ai";
|
|
3
|
+
import { AIConfig, AIOptions } from "@intlayer/ai";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/setupAI.d.ts
|
|
6
|
+
type AIClient = typeof _intlayer_ai0;
|
|
7
|
+
type SetupAIResult = {
|
|
8
|
+
aiClient?: AIClient;
|
|
9
|
+
aiConfig?: AIConfig;
|
|
10
|
+
isCustomAI: boolean;
|
|
11
|
+
hasAIAccess: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Checks if the @intlayer/ai package is available and configured when an API key is provided.
|
|
15
|
+
* If API key is present but package is missing, logs a warning.
|
|
16
|
+
* Also checks if the user has access to AI (either via local key or CMS auth).
|
|
17
|
+
*/
|
|
18
|
+
declare const setupAI: (configuration: IntlayerConfig, aiOptions?: AIOptions) => Promise<SetupAIResult | undefined>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { setupAI as n, AIClient as t };
|
|
21
|
+
//# sourceMappingURL=setupAI-Bosjx7ah.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupAI-Bosjx7ah.d.ts","names":[],"sources":["../../src/utils/setupAI.ts"],"mappings":";;;;;KAUY,QAAA,UAAQ,aAAA;AAAA,KAEf,aAAA;EACH,QAAA,GAAW,QAAA;EACX,QAAA,GAAW,QAAA;EACX,UAAA;EACA,WAAA;AAAA;;AANmD;;;;cA4BxC,OAAA,GACX,aAAA,EAAe,cAAA,EACf,SAAA,GAAY,SAAA,KACX,OAAA,CAAQ,aAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { testMissingTranslations } from "
|
|
1
|
+
import { n as listMissingTranslationsWithConfig, t as listMissingTranslations } from "../listMissingTranslations-DxKw7nqI.js";
|
|
2
|
+
import { t as testMissingTranslations } from "../test-DUTiJR5_.js";
|
|
3
3
|
export { listMissingTranslations, listMissingTranslationsWithConfig, testMissingTranslations };
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { Locale } from "@intlayer/types/allLocales";
|
|
4
|
-
|
|
5
|
-
//#region src/test/listMissingTranslations.d.ts
|
|
6
|
-
declare const listMissingTranslationsWithConfig: (configuration: IntlayerConfig) => {
|
|
7
|
-
missingTranslations: {
|
|
8
|
-
key: string;
|
|
9
|
-
filePath?: string;
|
|
10
|
-
id?: string;
|
|
11
|
-
locales: Locale[];
|
|
12
|
-
}[];
|
|
13
|
-
missingLocales: Locale[];
|
|
14
|
-
missingRequiredLocales: Locale[];
|
|
15
|
-
};
|
|
16
|
-
declare const listMissingTranslations: (configurationOptions?: GetConfigurationOptions) => {
|
|
17
|
-
missingTranslations: {
|
|
18
|
-
key: string;
|
|
19
|
-
filePath?: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
locales: Locale[];
|
|
22
|
-
}[];
|
|
23
|
-
missingLocales: Locale[];
|
|
24
|
-
missingRequiredLocales: Locale[];
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
export { listMissingTranslations, listMissingTranslationsWithConfig };
|
|
28
|
-
//# sourceMappingURL=listMissingTranslations.d.ts.map
|
|
1
|
+
import { n as listMissingTranslationsWithConfig, t as listMissingTranslations } from "../listMissingTranslations-DxKw7nqI.js";
|
|
2
|
+
export { listMissingTranslations, listMissingTranslationsWithConfig };
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/test/test.d.ts
|
|
4
|
-
type ListMissingTranslationsOptions = {
|
|
5
|
-
configOptions?: GetConfigurationOptions;
|
|
6
|
-
build?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare const testMissingTranslations: (options?: ListMissingTranslationsOptions) => Promise<void>;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { testMissingTranslations };
|
|
11
|
-
//# sourceMappingURL=test.d.ts.map
|
|
1
|
+
import { t as testMissingTranslations } from "../test-DUTiJR5_.js";
|
|
2
|
+
export { testMissingTranslations };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
2
|
+
|
|
3
|
+
//#region src/test/test.d.ts
|
|
4
|
+
type ListMissingTranslationsOptions = {
|
|
5
|
+
configOptions?: GetConfigurationOptions;
|
|
6
|
+
build?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const testMissingTranslations: (options?: ListMissingTranslationsOptions) => Promise<void>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { testMissingTranslations as t };
|
|
11
|
+
//# sourceMappingURL=test-DUTiJR5_.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-DUTiJR5_.d.ts","names":[],"sources":["../../src/test/test.ts"],"mappings":";;;KAgBK,8BAAA;EACH,aAAA,GAAgB,uBAAA;EAChB,KAAA;AAAA;AAAA,cAGW,uBAAA,GACX,OAAA,GAAU,8BAAA,KAA8B,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TranslateFileOptions, i as TranslateDocOptions, n as FlushStrategy, r as LimitFunction, t as ErrorState } from "../types-BKvc3FmV.js";
|
|
2
2
|
import { translateDoc } from "./translateDoc.js";
|
|
3
3
|
import { translateFile } from "./translateFile.js";
|
|
4
4
|
import { sanitizeChunk, validateTranslation } from "./validation.js";
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
4
|
-
import { ListGitFilesOptions } from "@intlayer/chokidar/cli";
|
|
5
|
-
import { Locale } from "@intlayer/types/allLocales";
|
|
6
|
-
import { AIConfig, AIOptions } from "@intlayer/ai";
|
|
7
|
-
|
|
8
|
-
//#region src/translateDoc/types.d.ts
|
|
9
|
-
type ErrorState = {
|
|
10
|
-
count: number;
|
|
11
|
-
maxErrors: number;
|
|
12
|
-
shouldStop: boolean;
|
|
13
|
-
};
|
|
14
|
-
type FlushStrategy = 'incremental' | 'end' | 'none';
|
|
15
|
-
type LimitFunction = (fn: () => Promise<any>, ...args: any[]) => Promise<any>;
|
|
16
|
-
type TranslateFileOptions = {
|
|
17
|
-
baseFilePath: string;
|
|
18
|
-
outputFilePath: string;
|
|
19
|
-
locale: Locale;
|
|
20
|
-
baseLocale: Locale;
|
|
21
|
-
configuration: IntlayerConfig;
|
|
22
|
-
errorState: ErrorState;
|
|
23
|
-
aiOptions?: AIOptions;
|
|
24
|
-
customInstructions?: string;
|
|
25
|
-
aiClient?: AIClient;
|
|
26
|
-
aiConfig?: AIConfig;
|
|
27
|
-
flushStrategy?: FlushStrategy;
|
|
28
|
-
onChunkReceive?: (chunk: string, index: number, total: number) => void;
|
|
29
|
-
limit?: LimitFunction;
|
|
30
|
-
};
|
|
31
|
-
type TranslateDocOptions = {
|
|
32
|
-
docPattern: string[];
|
|
33
|
-
locales: Locale[];
|
|
34
|
-
excludedGlobPattern: string[];
|
|
35
|
-
baseLocale: Locale;
|
|
36
|
-
aiOptions?: AIOptions;
|
|
37
|
-
nbSimultaneousFileProcessed?: number;
|
|
38
|
-
configOptions?: GetConfigurationOptions;
|
|
39
|
-
customInstructions?: string;
|
|
40
|
-
skipIfModifiedBefore?: number | string | Date;
|
|
41
|
-
skipIfModifiedAfter?: number | string | Date;
|
|
42
|
-
skipIfExists?: boolean;
|
|
43
|
-
gitOptions?: ListGitFilesOptions;
|
|
44
|
-
flushStrategy?: FlushStrategy;
|
|
45
|
-
};
|
|
46
|
-
//#endregion
|
|
47
|
-
export { ErrorState, FlushStrategy, LimitFunction, TranslateDocOptions, TranslateFileOptions };
|
|
48
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { a as TranslateFileOptions, i as TranslateDocOptions, n as FlushStrategy, r as LimitFunction, t as ErrorState } from "../types-BKvc3FmV.js";
|
|
2
|
+
export { ErrorState, FlushStrategy, LimitFunction, TranslateDocOptions, TranslateFileOptions };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as AIClient } from "./setupAI-Bosjx7ah.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
4
|
+
import { ListGitFilesOptions } from "@intlayer/chokidar/cli";
|
|
5
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
6
|
+
import { AIConfig, AIOptions } from "@intlayer/ai";
|
|
7
|
+
|
|
8
|
+
//#region src/translateDoc/types.d.ts
|
|
9
|
+
type ErrorState = {
|
|
10
|
+
count: number;
|
|
11
|
+
maxErrors: number;
|
|
12
|
+
shouldStop: boolean;
|
|
13
|
+
};
|
|
14
|
+
type FlushStrategy = 'incremental' | 'end' | 'none';
|
|
15
|
+
type LimitFunction = (fn: () => Promise<any>, ...args: any[]) => Promise<any>;
|
|
16
|
+
type TranslateFileOptions = {
|
|
17
|
+
baseFilePath: string;
|
|
18
|
+
outputFilePath: string;
|
|
19
|
+
locale: Locale;
|
|
20
|
+
baseLocale: Locale;
|
|
21
|
+
configuration: IntlayerConfig;
|
|
22
|
+
errorState: ErrorState;
|
|
23
|
+
aiOptions?: AIOptions;
|
|
24
|
+
customInstructions?: string;
|
|
25
|
+
aiClient?: AIClient;
|
|
26
|
+
aiConfig?: AIConfig;
|
|
27
|
+
flushStrategy?: FlushStrategy;
|
|
28
|
+
onChunkReceive?: (chunk: string, index: number, total: number) => void;
|
|
29
|
+
limit?: LimitFunction;
|
|
30
|
+
};
|
|
31
|
+
type TranslateDocOptions = {
|
|
32
|
+
docPattern: string[];
|
|
33
|
+
locales: Locale[];
|
|
34
|
+
excludedGlobPattern: string[];
|
|
35
|
+
baseLocale: Locale;
|
|
36
|
+
aiOptions?: AIOptions;
|
|
37
|
+
nbSimultaneousFileProcessed?: number;
|
|
38
|
+
configOptions?: GetConfigurationOptions;
|
|
39
|
+
customInstructions?: string;
|
|
40
|
+
skipIfModifiedBefore?: number | string | Date;
|
|
41
|
+
skipIfModifiedAfter?: number | string | Date;
|
|
42
|
+
skipIfExists?: boolean;
|
|
43
|
+
gitOptions?: ListGitFilesOptions;
|
|
44
|
+
flushStrategy?: FlushStrategy;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { TranslateFileOptions as a, TranslateDocOptions as i, FlushStrategy as n, LimitFunction as r, ErrorState as t };
|
|
48
|
+
//# sourceMappingURL=types-BKvc3FmV.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BKvc3FmV.d.ts","names":[],"sources":["../../src/translateDoc/types.ts"],"mappings":";;;;;;;;KAOY,UAAA;EACV,KAAA;EACA,SAAA;EACA,UAAA;AAAA;AAAA,KAGU,aAAA;AAAA,KAGA,aAAA,IACV,EAAA,QAAU,OAAA,UACP,IAAA,YACA,OAAA;AAAA,KAEO,oBAAA;EACV,YAAA;EACA,cAAA;EACA,MAAA,EAAQ,MAAA;EACR,UAAA,EAAY,MAAA;EACZ,aAAA,EAAe,cAAA;EACf,UAAA,EAAY,UAAA;EACZ,SAAA,GAAY,SAAA;EACZ,kBAAA;EACA,QAAA,GAAW,QAAA;EACX,QAAA,GAAW,QAAA;EACX,aAAA,GAAgB,aAAA;EAChB,cAAA,IAAkB,KAAA,UAAe,KAAA,UAAe,KAAA;EAChD,KAAA,GAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA;EACV,UAAA;EACA,OAAA,EAAS,MAAA;EACT,mBAAA;EACA,UAAA,EAAY,MAAA;EACZ,SAAA,GAAY,SAAA;EACZ,2BAAA;EACA,aAAA,GAAgB,uBAAA;EAChB,kBAAA;EACA,oBAAA,qBAAyC,IAAA;EACzC,mBAAA,qBAAwC,IAAA;EACxC,YAAA;EACA,UAAA,GAAa,mBAAA;EACb,aAAA,GAAgB,aAAA;AAAA"}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { AIConfig, AIOptions } from "@intlayer/ai";
|
|
4
|
-
|
|
5
|
-
//#region src/utils/setupAI.d.ts
|
|
6
|
-
type AIClient = typeof _intlayer_ai0;
|
|
7
|
-
type SetupAIResult = {
|
|
8
|
-
aiClient?: AIClient;
|
|
9
|
-
aiConfig?: AIConfig;
|
|
10
|
-
isCustomAI: boolean;
|
|
11
|
-
hasAIAccess: boolean;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Checks if the @intlayer/ai package is available and configured when an API key is provided.
|
|
15
|
-
* If API key is present but package is missing, logs a warning.
|
|
16
|
-
* Also checks if the user has access to AI (either via local key or CMS auth).
|
|
17
|
-
*/
|
|
18
|
-
declare const setupAI: (configuration: IntlayerConfig, aiOptions?: AIOptions) => Promise<SetupAIResult | undefined>;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { AIClient, setupAI };
|
|
21
|
-
//# sourceMappingURL=setupAI.d.ts.map
|
|
1
|
+
import { n as setupAI, t as AIClient } from "../setupAI-Bosjx7ah.js";
|
|
2
|
+
export { AIClient, setupAI };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/cli",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides uniform command-line interface scripts for Intlayer, used in packages like intlayer-cli and intlayer.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@clack/prompts": "0.11.0",
|
|
70
|
-
"@intlayer/ai": "8.4.
|
|
71
|
-
"@intlayer/api": "8.4.
|
|
72
|
-
"@intlayer/babel": "8.4.
|
|
73
|
-
"@intlayer/chokidar": "8.4.
|
|
74
|
-
"@intlayer/config": "8.4.
|
|
75
|
-
"@intlayer/core": "8.4.
|
|
76
|
-
"@intlayer/dictionaries-entry": "8.4.
|
|
77
|
-
"@intlayer/remote-dictionaries-entry": "8.4.
|
|
78
|
-
"@intlayer/types": "8.4.
|
|
79
|
-
"@intlayer/unmerged-dictionaries-entry": "8.4.
|
|
70
|
+
"@intlayer/ai": "8.4.1",
|
|
71
|
+
"@intlayer/api": "8.4.1",
|
|
72
|
+
"@intlayer/babel": "8.4.1",
|
|
73
|
+
"@intlayer/chokidar": "8.4.1",
|
|
74
|
+
"@intlayer/config": "8.4.1",
|
|
75
|
+
"@intlayer/core": "8.4.1",
|
|
76
|
+
"@intlayer/dictionaries-entry": "8.4.1",
|
|
77
|
+
"@intlayer/remote-dictionaries-entry": "8.4.1",
|
|
78
|
+
"@intlayer/types": "8.4.1",
|
|
79
|
+
"@intlayer/unmerged-dictionaries-entry": "8.4.1",
|
|
80
80
|
"commander": "14.0.3",
|
|
81
81
|
"enquirer": "^2.4.1",
|
|
82
82
|
"eventsource": "4.1.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"vitest": "4.1.0"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@intlayer/ai": "8.4.
|
|
96
|
+
"@intlayer/ai": "8.4.1"
|
|
97
97
|
},
|
|
98
98
|
"peerDependenciesMeta": {
|
|
99
99
|
"@intlayer/ai": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./_rolldown/runtime.cjs`);let e=require(`node:fs`),t=require(`node:path`),n=require(`node:url`);const r=()=>{try{return(0,t.dirname)((0,n.fileURLToPath)(require(`url`).pathToFileURL(__filename).href))}catch{return typeof __dirname<`u`?__dirname:process.cwd()}},i=e=>{let n=e;for(let e=0;e<12;e++){if((0,t.basename)(n)===`dist`)return n;let e=(0,t.resolve)(n,`..`);if(e===n)break;n=e}return null},a=e=>{if(!e)return null;try{if(e.startsWith(`file://`))return(0,n.fileURLToPath)(e)}catch{}return e},o=()=>{let e=Error.prepareStackTrace;try{Error.prepareStackTrace=(e,t)=>t;let e=Error();Error.captureStackTrace(e,o);let n=e.stack||[],r=e=>e.includes(`${t.sep}_virtual${t.sep}`)||e.includes(`/_virtual/`);for(let e of n){let n=a(typeof e.getFileName==`function`?e.getFileName():null);if(n&&!(n.includes(`node:internal`)||n.includes(`${t.sep}internal${t.sep}modules${t.sep}`))&&!r(n))return(0,t.dirname)(n)}for(let e of n){let n=a(typeof e.getFileName==`function`?e.getFileName():null);if(n)return(0,t.dirname)(n)}}catch{}finally{Error.prepareStackTrace=e}return r()},s=(n,a=`utf8`)=>{let s=r(),c=i(s)??(0,t.resolve)(s,`..`,`..`,`dist`),l=(0,t.join)(c,`assets`),u=[],d=(0,t.relative)(c,o()).split(`\\`).join(`/`).replace(/^(?:dist\/)?(?:esm|cjs)\//,``).replace(/^_virtual\//,``);if(n.startsWith(`./`)||n.startsWith(`../`)){let r=(0,t.resolve)(l,d,n);if(u.push(r),(0,e.existsSync)(r))return(0,e.readFileSync)(r,a)}let f=(0,t.join)(l,n);if(u.push(f),(0,e.existsSync)(f))return(0,e.readFileSync)(f,a);if(d){let r=(0,t.join)(l,d,n);if(u.push(r),(0,e.existsSync)(r))return(0,e.readFileSync)(r,a)}let p=[`readAsset: file not found.`,`Searched:`,...u.map(e=>`- ${e}`)].join(`
|
|
2
|
-
`);throw Error(p)};exports.readAsset=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});export{e as __require};
|
package/dist/esm/editor.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.mjs","names":["pathResolve","pathDirname"],"sources":["../../src/editor.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport { createRequire } from 'node:module';\nimport { dirname as pathDirname, resolve as pathResolve } from 'node:path';\nimport { isESModule } from '@intlayer/config/utils';\n\ntype StartEditorOptions = {\n env?: string;\n envFile?: string;\n};\n\nexport const startEditor = (options: StartEditorOptions): void => {\n const args: string[] = ['start'];\n\n if (options.env) args.push('--env', options.env);\n if (options.envFile) args.push('--env-file', options.envFile);\n\n const spawnNodeProcess = (binPath: string) =>\n spawn(process.execPath, [binPath, ...args], {\n stdio: 'inherit',\n env: { ...process.env },\n });\n\n const spawnWith = (cmd: string, cmdArgs: string[]) =>\n spawn(cmd, cmdArgs, {\n stdio: 'inherit',\n env: { ...process.env },\n });\n\n try {\n const requireFunction = isESModule\n ? createRequire(import.meta.url)\n : require;\n const pkgJsonPath = requireFunction.resolve('intlayer-editor/package.json');\n const pkgDir = pathDirname(pkgJsonPath);\n const binPath = pathResolve(pkgDir, 'bin', 'intlayer-editor.mjs');\n\n const child = spawnNodeProcess(binPath);\n child.on('error', () => runFallback());\n child.on('exit', (code) => {\n if (code === 255) process.exit(code ?? 0);\n });\n } catch {\n runFallback();\n }\n\n function runFallback() {\n const bun = spawnWith('bun', ['dlx', 'intlayer-editor', ...args]);\n bun.on('error', () => {\n const npx = spawnWith('npx', ['-y', 'intlayer-editor', ...args]);\n npx.on('error', (err) => {\n console.error('Unable to execute intlayer-editor via bun or npx.');\n console.error(String(err?.message ?? err));\n process.exit(1);\n });\n });\n }\n};\n"],"mappings":"yPAUA,MAAa,E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,GAAa,mBAAA;EACb,aAAA,GAAgB,uBAAA;AAAA;AAAA,cAGL,6BAAA,GACX,OAAA,GAAU,0BAAA,KACT,OAAA,CAAQ,UAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listMissingTranslations.d.ts","names":[],"sources":["../../../src/test/listMissingTranslations.ts"],"mappings":";;;;;cAYa,iCAAA,GACX,aAAA,EAAe,cAAA;;;;;aASJ,MAAA;EAAA;;;;cAmEA,uBAAA,GACX,oBAAA,GAAuB,uBAAA;;;;;aApEZ,MAAA;EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","names":[],"sources":["../../../src/test/test.ts"],"mappings":";;;KAgBK,8BAAA;EACH,aAAA,GAAgB,uBAAA;EAChB,KAAA;AAAA;AAAA,cAGW,uBAAA,GACX,OAAA,GAAU,8BAAA,KAA8B,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/translateDoc/types.ts"],"mappings":";;;;;;;;KAOY,UAAA;EACV,KAAA;EACA,SAAA;EACA,UAAA;AAAA;AAAA,KAGU,aAAA;AAAA,KAGA,aAAA,IACV,EAAA,QAAU,OAAA,UACP,IAAA,YACA,OAAA;AAAA,KAEO,oBAAA;EACV,YAAA;EACA,cAAA;EACA,MAAA,EAAQ,MAAA;EACR,UAAA,EAAY,MAAA;EACZ,aAAA,EAAe,cAAA;EACf,UAAA,EAAY,UAAA;EACZ,SAAA,GAAY,SAAA;EACZ,kBAAA;EACA,QAAA,GAAW,QAAA;EACX,QAAA,GAAW,QAAA;EACX,aAAA,GAAgB,aAAA;EAChB,cAAA,IAAkB,KAAA,UAAe,KAAA,UAAe,KAAA;EAChD,KAAA,GAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA;EACV,UAAA;EACA,OAAA,EAAS,MAAA;EACT,mBAAA;EACA,UAAA,EAAY,MAAA;EACZ,SAAA,GAAY,SAAA;EACZ,2BAAA;EACA,aAAA,GAAgB,uBAAA;EAChB,kBAAA;EACA,oBAAA,qBAAyC,IAAA;EACzC,mBAAA,qBAAwC,IAAA;EACxC,YAAA;EACA,UAAA,GAAa,mBAAA;EACb,aAAA,GAAgB,aAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupAI.d.ts","names":[],"sources":["../../../src/utils/setupAI.ts"],"mappings":";;;;;KAUY,QAAA,UAAQ,aAAA;AAAA,KAEf,aAAA;EACH,QAAA,GAAW,QAAA;EACX,QAAA,GAAW,QAAA;EACX,UAAA;EACA,WAAA;AAAA;;AANmD;;;;cA4BxC,OAAA,GACX,aAAA,EAAe,cAAA,EACf,SAAA,GAAY,SAAA,KACX,OAAA,CAAQ,aAAA"}
|