@intlayer/engine 9.0.0-canary.12
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/README.md +330 -0
- package/dist/assets/initConfig/templates/cjs.txt +140 -0
- package/dist/assets/initConfig/templates/json.txt +98 -0
- package/dist/assets/initConfig/templates/mjs.txt +140 -0
- package/dist/assets/initConfig/templates/ts.txt +139 -0
- package/dist/assets/installSkills/LICENCE.md +201 -0
- package/dist/assets/installSkills/skills/angular.md +159 -0
- package/dist/assets/installSkills/skills/astro.md +40 -0
- package/dist/assets/installSkills/skills/cli.md +68 -0
- package/dist/assets/installSkills/skills/compiler.md +32 -0
- package/dist/assets/installSkills/skills/config.md +63 -0
- package/dist/assets/installSkills/skills/content.md +377 -0
- package/dist/assets/installSkills/skills/next-js.md +130 -0
- package/dist/assets/installSkills/skills/preact.md +83 -0
- package/dist/assets/installSkills/skills/react.md +105 -0
- package/dist/assets/installSkills/skills/remote-content.md +31 -0
- package/dist/assets/installSkills/skills/solid.md +90 -0
- package/dist/assets/installSkills/skills/svelte.md +84 -0
- package/dist/assets/installSkills/skills/usage.md +44 -0
- package/dist/assets/installSkills/skills/vue.md +56 -0
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/cjs/_virtual/_utils_asset.cjs +98 -0
- package/dist/cjs/build.cjs +60 -0
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +80 -0
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/index.cjs +6 -0
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs +27 -0
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +206 -0
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +59 -0
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +49 -0
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +51 -0
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs.map +1 -0
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +62 -0
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs.map +1 -0
- package/dist/cjs/cleanOutputDir.cjs +31 -0
- package/dist/cjs/cleanOutputDir.cjs.map +1 -0
- package/dist/cjs/cleanRemovedContentDeclaration.cjs +97 -0
- package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -0
- package/dist/cjs/cli.cjs +48 -0
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +71 -0
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +43 -0
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +25 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +26 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +26 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +25 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +25 -0
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs.map +1 -0
- package/dist/cjs/createDictionaryEntryPoint/index.cjs +16 -0
- package/dist/cjs/createType/createModuleAugmentation.cjs +126 -0
- package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -0
- package/dist/cjs/createType/createType.cjs +30 -0
- package/dist/cjs/createType/createType.cjs.map +1 -0
- package/dist/cjs/createType/index.cjs +8 -0
- package/dist/cjs/detectFormatCommand.cjs +33 -0
- package/dist/cjs/detectFormatCommand.cjs.map +1 -0
- package/dist/cjs/docReview/alignBlocks.cjs +79 -0
- package/dist/cjs/docReview/alignBlocks.cjs.map +1 -0
- package/dist/cjs/docReview/computeSimilarity.cjs +42 -0
- package/dist/cjs/docReview/computeSimilarity.cjs.map +1 -0
- package/dist/cjs/docReview/fingerprintBlock.cjs +35 -0
- package/dist/cjs/docReview/fingerprintBlock.cjs.map +1 -0
- package/dist/cjs/docReview/index.cjs +25 -0
- package/dist/cjs/docReview/mapChangedLinesToBlocks.cjs +27 -0
- package/dist/cjs/docReview/mapChangedLinesToBlocks.cjs.map +1 -0
- package/dist/cjs/docReview/normalizeBlock.cjs +34 -0
- package/dist/cjs/docReview/normalizeBlock.cjs.map +1 -0
- package/dist/cjs/docReview/pipeline.cjs +144 -0
- package/dist/cjs/docReview/pipeline.cjs.map +1 -0
- package/dist/cjs/docReview/planActions.cjs +58 -0
- package/dist/cjs/docReview/planActions.cjs.map +1 -0
- package/dist/cjs/docReview/rebuildDocument.cjs +65 -0
- package/dist/cjs/docReview/rebuildDocument.cjs.map +1 -0
- package/dist/cjs/docReview/reviewReport.cjs +200 -0
- package/dist/cjs/docReview/reviewReport.cjs.map +1 -0
- package/dist/cjs/docReview/segmentDocument.cjs +134 -0
- package/dist/cjs/docReview/segmentDocument.cjs.map +1 -0
- package/dist/cjs/docReview/types.cjs +0 -0
- package/dist/cjs/fetchDistantDictionaries.cjs +53 -0
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -0
- package/dist/cjs/filterInvalidDictionaries.cjs +57 -0
- package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -0
- package/dist/cjs/formatDictionary.cjs +60 -0
- package/dist/cjs/formatDictionary.cjs.map +1 -0
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +83 -0
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +1 -0
- package/dist/cjs/getContentDeclarationFileTemplate/index.cjs +4 -0
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +35 -0
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs.map +1 -0
- package/dist/cjs/handleContentDeclarationFileChange.cjs +56 -0
- package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -0
- package/dist/cjs/handleContentDeclarationFileMoved.cjs +25 -0
- package/dist/cjs/handleContentDeclarationFileMoved.cjs.map +1 -0
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +38 -0
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -0
- package/dist/cjs/init/cms.cjs +140 -0
- package/dist/cjs/init/cms.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/index.cjs +27 -0
- package/dist/cjs/init/frameworkSetup/index.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/detect.cjs +56 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/detect.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +107 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs +163 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/templates.cjs +122 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/templates.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs +196 -0
- package/dist/cjs/init/frameworkSetup/nextAppRouter/transforms.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/detect.cjs +31 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/detect.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +76 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs +116 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/templates.cjs +106 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/templates.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/transforms.cjs +141 -0
- package/dist/cjs/init/frameworkSetup/tanstackStart/transforms.cjs.map +1 -0
- package/dist/cjs/init/frameworkSetup/types.cjs +0 -0
- package/dist/cjs/init/index.cjs +521 -0
- package/dist/cjs/init/index.cjs.map +1 -0
- package/dist/cjs/init/utils/astImports.cjs +56 -0
- package/dist/cjs/init/utils/astImports.cjs.map +1 -0
- package/dist/cjs/init/utils/configManipulation.cjs +516 -0
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -0
- package/dist/cjs/init/utils/fileSystem.cjs +231 -0
- package/dist/cjs/init/utils/fileSystem.cjs.map +1 -0
- package/dist/cjs/init/utils/githubActions.cjs +159 -0
- package/dist/cjs/init/utils/githubActions.cjs.map +1 -0
- package/dist/cjs/init/utils/index.cjs +51 -0
- package/dist/cjs/init/utils/jsonParser.cjs +43 -0
- package/dist/cjs/init/utils/jsonParser.cjs.map +1 -0
- package/dist/cjs/init/utils/nextCompilerBabel.cjs +119 -0
- package/dist/cjs/init/utils/nextCompilerBabel.cjs.map +1 -0
- package/dist/cjs/init/utils/packageManager.cjs +303 -0
- package/dist/cjs/init/utils/packageManager.cjs.map +1 -0
- package/dist/cjs/init/utils/tsConfig.cjs +19 -0
- package/dist/cjs/init/utils/tsConfig.cjs.map +1 -0
- package/dist/cjs/initConfig/index.cjs +49 -0
- package/dist/cjs/initConfig/index.cjs.map +1 -0
- package/dist/cjs/installLSP.cjs +58 -0
- package/dist/cjs/installLSP.cjs.map +1 -0
- package/dist/cjs/installMCP/installMCP.cjs +51 -0
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -0
- package/dist/cjs/installSkills/index.cjs +307 -0
- package/dist/cjs/installSkills/index.cjs.map +1 -0
- package/dist/cjs/listDictionariesPath.cjs +43 -0
- package/dist/cjs/listDictionariesPath.cjs.map +1 -0
- package/dist/cjs/listGitFiles.cjs +105 -0
- package/dist/cjs/listGitFiles.cjs.map +1 -0
- package/dist/cjs/listProjects.cjs +48 -0
- package/dist/cjs/listProjects.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +56 -0
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/index.cjs +14 -0
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +133 -0
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +128 -0
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +28 -0
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs +45 -0
- package/dist/cjs/loadDictionaries/loadMarkdownContentDeclaration.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +63 -0
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadYamlContentDeclaration.cjs +27 -0
- package/dist/cjs/loadDictionaries/loadYamlContentDeclaration.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/log.cjs +138 -0
- package/dist/cjs/loadDictionaries/log.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs +64 -0
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs.map +1 -0
- package/dist/cjs/logConfigDetails.cjs +40 -0
- package/dist/cjs/logConfigDetails.cjs.map +1 -0
- package/dist/cjs/prepareIntlayer.cjs +104 -0
- package/dist/cjs/prepareIntlayer.cjs.map +1 -0
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs +31 -0
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs.map +1 -0
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs +13 -0
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs.map +1 -0
- package/dist/cjs/scan/analyzeBundleContent.cjs +182 -0
- package/dist/cjs/scan/analyzeBundleContent.cjs.map +1 -0
- package/dist/cjs/scan/calculateScore.cjs +65 -0
- package/dist/cjs/scan/calculateScore.cjs.map +1 -0
- package/dist/cjs/scan/checks.cjs +274 -0
- package/dist/cjs/scan/checks.cjs.map +1 -0
- package/dist/cjs/scan/index.cjs +31 -0
- package/dist/cjs/scan/parseHtml.cjs +127 -0
- package/dist/cjs/scan/parseHtml.cjs.map +1 -0
- package/dist/cjs/scan/scanWebsite.cjs +205 -0
- package/dist/cjs/scan/scanWebsite.cjs.map +1 -0
- package/dist/cjs/scan/types.cjs +0 -0
- package/dist/cjs/utils/autoDecorateContent.cjs +90 -0
- package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -0
- package/dist/cjs/utils/buildComponentFilesList.cjs +94 -0
- package/dist/cjs/utils/buildComponentFilesList.cjs.map +1 -0
- package/dist/cjs/utils/buildFilesList.cjs +84 -0
- package/dist/cjs/utils/buildFilesList.cjs.map +1 -0
- package/dist/cjs/utils/chunkJSON.cjs +337 -0
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -0
- package/dist/cjs/utils/formatter.cjs +18 -0
- package/dist/cjs/utils/formatter.cjs.map +1 -0
- package/dist/cjs/utils/getChunk.cjs +35 -0
- package/dist/cjs/utils/getChunk.cjs.map +1 -0
- package/dist/cjs/utils/getContentExtension.cjs +30 -0
- package/dist/cjs/utils/getContentExtension.cjs.map +1 -0
- package/dist/cjs/utils/getFormatFromExtension.cjs +41 -0
- package/dist/cjs/utils/getFormatFromExtension.cjs.map +1 -0
- package/dist/cjs/utils/getPathHash.cjs +22 -0
- package/dist/cjs/utils/getPathHash.cjs.map +1 -0
- package/dist/cjs/utils/index.cjs +50 -0
- package/dist/cjs/utils/mergeChunks.cjs +29 -0
- package/dist/cjs/utils/mergeChunks.cjs.map +1 -0
- package/dist/cjs/utils/pLimit.cjs +134 -0
- package/dist/cjs/utils/pLimit.cjs.map +1 -0
- package/dist/cjs/utils/parallelize.cjs +12 -0
- package/dist/cjs/utils/parallelize.cjs.map +1 -0
- package/dist/cjs/utils/parallelizeGlobal.cjs +30 -0
- package/dist/cjs/utils/parallelizeGlobal.cjs.map +1 -0
- package/dist/cjs/utils/readDictionariesFromDisk.cjs +25 -0
- package/dist/cjs/utils/readDictionariesFromDisk.cjs.map +1 -0
- package/dist/cjs/utils/reduceObjectFormat.cjs +70 -0
- package/dist/cjs/utils/reduceObjectFormat.cjs.map +1 -0
- package/dist/cjs/utils/resolveObjectPromises.cjs +22 -0
- package/dist/cjs/utils/resolveObjectPromises.cjs.map +1 -0
- package/dist/cjs/utils/resolveRelativePath.cjs +22 -0
- package/dist/cjs/utils/resolveRelativePath.cjs.map +1 -0
- package/dist/cjs/utils/runOnce.cjs +96 -0
- package/dist/cjs/utils/runOnce.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/bin.cjs +55 -0
- package/dist/cjs/utils/runParallel/bin.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/bootstrap.cjs +25 -0
- package/dist/cjs/utils/runParallel/bootstrap.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/index.cjs +102 -0
- package/dist/cjs/utils/runParallel/index.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/pidTree.cjs +146 -0
- package/dist/cjs/utils/runParallel/pidTree.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/ps.cjs +50 -0
- package/dist/cjs/utils/runParallel/ps.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/runTask.cjs +155 -0
- package/dist/cjs/utils/runParallel/runTask.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/spawnPosix.cjs +49 -0
- package/dist/cjs/utils/runParallel/spawnPosix.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/spawnWin32.cjs +44 -0
- package/dist/cjs/utils/runParallel/spawnWin32.cjs.map +1 -0
- package/dist/cjs/utils/runParallel/wmic.cjs +53 -0
- package/dist/cjs/utils/runParallel/wmic.cjs.map +1 -0
- package/dist/cjs/utils/sortAlphabetically.cjs +8 -0
- package/dist/cjs/utils/sortAlphabetically.cjs.map +1 -0
- package/dist/cjs/utils/splitTextByLine.cjs +12 -0
- package/dist/cjs/utils/splitTextByLine.cjs.map +1 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs +66 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs.map +1 -0
- package/dist/cjs/watcher.cjs +230 -0
- package/dist/cjs/watcher.cjs.map +1 -0
- package/dist/cjs/writeConfiguration/generateConfigurationContent.cjs +35 -0
- package/dist/cjs/writeConfiguration/generateConfigurationContent.cjs.map +1 -0
- package/dist/cjs/writeConfiguration/index.cjs +25 -0
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +29 -0
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/dictionaryStatus.cjs +0 -0
- package/dist/cjs/writeContentDeclaration/index.cjs +10 -0
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +95 -0
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs +417 -0
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs +128 -0
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +164 -0
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +93 -0
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +66 -0
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +44 -0
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs.map +1 -0
- package/dist/cjs/writeFileIfChanged.cjs +51 -0
- package/dist/cjs/writeFileIfChanged.cjs.map +1 -0
- package/dist/cjs/writeJsonIfChanged.cjs +18 -0
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -0
- package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
- package/dist/esm/_virtual/_utils_asset.mjs +97 -0
- package/dist/esm/build.mjs +26 -0
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +78 -0
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/index.mjs +4 -0
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs +25 -0
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +201 -0
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +56 -0
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +47 -0
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +49 -0
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs.map +1 -0
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +59 -0
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs.map +1 -0
- package/dist/esm/cleanOutputDir.mjs +29 -0
- package/dist/esm/cleanOutputDir.mjs.map +1 -0
- package/dist/esm/cleanRemovedContentDeclaration.mjs +94 -0
- package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -0
- package/dist/esm/cli.mjs +20 -0
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +69 -0
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +41 -0
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +22 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +23 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +23 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +22 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +22 -0
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs.map +1 -0
- package/dist/esm/createDictionaryEntryPoint/index.mjs +9 -0
- package/dist/esm/createType/createModuleAugmentation.mjs +122 -0
- package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -0
- package/dist/esm/createType/createType.mjs +27 -0
- package/dist/esm/createType/createType.mjs.map +1 -0
- package/dist/esm/createType/index.mjs +4 -0
- package/dist/esm/detectFormatCommand.mjs +31 -0
- package/dist/esm/detectFormatCommand.mjs.map +1 -0
- package/dist/esm/docReview/alignBlocks.mjs +78 -0
- package/dist/esm/docReview/alignBlocks.mjs.map +1 -0
- package/dist/esm/docReview/computeSimilarity.mjs +39 -0
- package/dist/esm/docReview/computeSimilarity.mjs.map +1 -0
- package/dist/esm/docReview/fingerprintBlock.mjs +32 -0
- package/dist/esm/docReview/fingerprintBlock.mjs.map +1 -0
- package/dist/esm/docReview/index.mjs +12 -0
- package/dist/esm/docReview/mapChangedLinesToBlocks.mjs +25 -0
- package/dist/esm/docReview/mapChangedLinesToBlocks.mjs.map +1 -0
- package/dist/esm/docReview/normalizeBlock.mjs +32 -0
- package/dist/esm/docReview/normalizeBlock.mjs.map +1 -0
- package/dist/esm/docReview/pipeline.mjs +142 -0
- package/dist/esm/docReview/pipeline.mjs.map +1 -0
- package/dist/esm/docReview/planActions.mjs +56 -0
- package/dist/esm/docReview/planActions.mjs.map +1 -0
- package/dist/esm/docReview/rebuildDocument.mjs +62 -0
- package/dist/esm/docReview/rebuildDocument.mjs.map +1 -0
- package/dist/esm/docReview/reviewReport.mjs +196 -0
- package/dist/esm/docReview/reviewReport.mjs.map +1 -0
- package/dist/esm/docReview/segmentDocument.mjs +131 -0
- package/dist/esm/docReview/segmentDocument.mjs.map +1 -0
- package/dist/esm/docReview/types.mjs +0 -0
- package/dist/esm/fetchDistantDictionaries.mjs +51 -0
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -0
- package/dist/esm/filterInvalidDictionaries.mjs +53 -0
- package/dist/esm/filterInvalidDictionaries.mjs.map +1 -0
- package/dist/esm/formatDictionary.mjs +55 -0
- package/dist/esm/formatDictionary.mjs.map +1 -0
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +81 -0
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +1 -0
- package/dist/esm/getContentDeclarationFileTemplate/index.mjs +3 -0
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs +33 -0
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs.map +1 -0
- package/dist/esm/handleContentDeclarationFileChange.mjs +54 -0
- package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -0
- package/dist/esm/handleContentDeclarationFileMoved.mjs +23 -0
- package/dist/esm/handleContentDeclarationFileMoved.mjs.map +1 -0
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +36 -0
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -0
- package/dist/esm/init/cms.mjs +131 -0
- package/dist/esm/init/cms.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/index.mjs +26 -0
- package/dist/esm/init/frameworkSetup/index.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/detect.mjs +52 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/detect.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +104 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs +157 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/templates.mjs +113 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/templates.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs +193 -0
- package/dist/esm/init/frameworkSetup/nextAppRouter/transforms.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/detect.mjs +28 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/detect.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +73 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs +108 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/templates.mjs +102 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/templates.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/transforms.mjs +139 -0
- package/dist/esm/init/frameworkSetup/tanstackStart/transforms.mjs.map +1 -0
- package/dist/esm/init/frameworkSetup/types.mjs +0 -0
- package/dist/esm/init/index.mjs +518 -0
- package/dist/esm/init/index.mjs.map +1 -0
- package/dist/esm/init/utils/astImports.mjs +51 -0
- package/dist/esm/init/utils/astImports.mjs.map +1 -0
- package/dist/esm/init/utils/configManipulation.mjs +499 -0
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -0
- package/dist/esm/init/utils/fileSystem.mjs +222 -0
- package/dist/esm/init/utils/fileSystem.mjs.map +1 -0
- package/dist/esm/init/utils/githubActions.mjs +155 -0
- package/dist/esm/init/utils/githubActions.mjs.map +1 -0
- package/dist/esm/init/utils/index.mjs +10 -0
- package/dist/esm/init/utils/jsonParser.mjs +41 -0
- package/dist/esm/init/utils/jsonParser.mjs.map +1 -0
- package/dist/esm/init/utils/nextCompilerBabel.mjs +115 -0
- package/dist/esm/init/utils/nextCompilerBabel.mjs.map +1 -0
- package/dist/esm/init/utils/packageManager.mjs +294 -0
- package/dist/esm/init/utils/packageManager.mjs.map +1 -0
- package/dist/esm/init/utils/tsConfig.mjs +17 -0
- package/dist/esm/init/utils/tsConfig.mjs.map +1 -0
- package/dist/esm/initConfig/index.mjs +47 -0
- package/dist/esm/initConfig/index.mjs.map +1 -0
- package/dist/esm/installLSP.mjs +55 -0
- package/dist/esm/installLSP.mjs.map +1 -0
- package/dist/esm/installMCP/installMCP.mjs +47 -0
- package/dist/esm/installMCP/installMCP.mjs.map +1 -0
- package/dist/esm/installSkills/index.mjs +299 -0
- package/dist/esm/installSkills/index.mjs.map +1 -0
- package/dist/esm/listDictionariesPath.mjs +39 -0
- package/dist/esm/listDictionariesPath.mjs.map +1 -0
- package/dist/esm/listGitFiles.mjs +101 -0
- package/dist/esm/listGitFiles.mjs.map +1 -0
- package/dist/esm/listProjects.mjs +44 -0
- package/dist/esm/listProjects.mjs.map +1 -0
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +54 -0
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs.map +1 -0
- package/dist/esm/loadDictionaries/index.mjs +6 -0
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +128 -0
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +125 -0
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +26 -0
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs +43 -0
- package/dist/esm/loadDictionaries/loadMarkdownContentDeclaration.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +60 -0
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadYamlContentDeclaration.mjs +25 -0
- package/dist/esm/loadDictionaries/loadYamlContentDeclaration.mjs.map +1 -0
- package/dist/esm/loadDictionaries/log.mjs +135 -0
- package/dist/esm/loadDictionaries/log.mjs.map +1 -0
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs +62 -0
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs.map +1 -0
- package/dist/esm/logConfigDetails.mjs +37 -0
- package/dist/esm/logConfigDetails.mjs.map +1 -0
- package/dist/esm/prepareIntlayer.mjs +100 -0
- package/dist/esm/prepareIntlayer.mjs.map +1 -0
- package/dist/esm/reduceDictionaryContent/applyMask.mjs +29 -0
- package/dist/esm/reduceDictionaryContent/applyMask.mjs.map +1 -0
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs +11 -0
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs.map +1 -0
- package/dist/esm/scan/analyzeBundleContent.mjs +180 -0
- package/dist/esm/scan/analyzeBundleContent.mjs.map +1 -0
- package/dist/esm/scan/calculateScore.mjs +61 -0
- package/dist/esm/scan/calculateScore.mjs.map +1 -0
- package/dist/esm/scan/checks.mjs +265 -0
- package/dist/esm/scan/checks.mjs.map +1 -0
- package/dist/esm/scan/index.mjs +7 -0
- package/dist/esm/scan/parseHtml.mjs +115 -0
- package/dist/esm/scan/parseHtml.mjs.map +1 -0
- package/dist/esm/scan/scanWebsite.mjs +203 -0
- package/dist/esm/scan/scanWebsite.mjs.map +1 -0
- package/dist/esm/scan/types.mjs +0 -0
- package/dist/esm/utils/autoDecorateContent.mjs +87 -0
- package/dist/esm/utils/autoDecorateContent.mjs.map +1 -0
- package/dist/esm/utils/buildComponentFilesList.mjs +91 -0
- package/dist/esm/utils/buildComponentFilesList.mjs.map +1 -0
- package/dist/esm/utils/buildFilesList.mjs +80 -0
- package/dist/esm/utils/buildFilesList.mjs.map +1 -0
- package/dist/esm/utils/chunkJSON.mjs +334 -0
- package/dist/esm/utils/chunkJSON.mjs.map +1 -0
- package/dist/esm/utils/formatter.mjs +14 -0
- package/dist/esm/utils/formatter.mjs.map +1 -0
- package/dist/esm/utils/getChunk.mjs +34 -0
- package/dist/esm/utils/getChunk.mjs.map +1 -0
- package/dist/esm/utils/getContentExtension.mjs +28 -0
- package/dist/esm/utils/getContentExtension.mjs.map +1 -0
- package/dist/esm/utils/getFormatFromExtension.mjs +38 -0
- package/dist/esm/utils/getFormatFromExtension.mjs.map +1 -0
- package/dist/esm/utils/getPathHash.mjs +20 -0
- package/dist/esm/utils/getPathHash.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +22 -0
- package/dist/esm/utils/mergeChunks.mjs +27 -0
- package/dist/esm/utils/mergeChunks.mjs.map +1 -0
- package/dist/esm/utils/pLimit.mjs +131 -0
- package/dist/esm/utils/pLimit.mjs.map +1 -0
- package/dist/esm/utils/parallelize.mjs +11 -0
- package/dist/esm/utils/parallelize.mjs.map +1 -0
- package/dist/esm/utils/parallelizeGlobal.mjs +27 -0
- package/dist/esm/utils/parallelizeGlobal.mjs.map +1 -0
- package/dist/esm/utils/readDictionariesFromDisk.mjs +23 -0
- package/dist/esm/utils/readDictionariesFromDisk.mjs.map +1 -0
- package/dist/esm/utils/reduceObjectFormat.mjs +67 -0
- package/dist/esm/utils/reduceObjectFormat.mjs.map +1 -0
- package/dist/esm/utils/resolveObjectPromises.mjs +20 -0
- package/dist/esm/utils/resolveObjectPromises.mjs.map +1 -0
- package/dist/esm/utils/resolveRelativePath.mjs +20 -0
- package/dist/esm/utils/resolveRelativePath.mjs.map +1 -0
- package/dist/esm/utils/runOnce.mjs +93 -0
- package/dist/esm/utils/runOnce.mjs.map +1 -0
- package/dist/esm/utils/runParallel/bin.mjs +53 -0
- package/dist/esm/utils/runParallel/bin.mjs.map +1 -0
- package/dist/esm/utils/runParallel/bootstrap.mjs +23 -0
- package/dist/esm/utils/runParallel/bootstrap.mjs.map +1 -0
- package/dist/esm/utils/runParallel/index.mjs +100 -0
- package/dist/esm/utils/runParallel/index.mjs.map +1 -0
- package/dist/esm/utils/runParallel/pidTree.mjs +143 -0
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -0
- package/dist/esm/utils/runParallel/ps.mjs +47 -0
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -0
- package/dist/esm/utils/runParallel/runTask.mjs +153 -0
- package/dist/esm/utils/runParallel/runTask.mjs.map +1 -0
- package/dist/esm/utils/runParallel/spawnPosix.mjs +47 -0
- package/dist/esm/utils/runParallel/spawnPosix.mjs.map +1 -0
- package/dist/esm/utils/runParallel/spawnWin32.mjs +42 -0
- package/dist/esm/utils/runParallel/spawnWin32.mjs.map +1 -0
- package/dist/esm/utils/runParallel/wmic.mjs +50 -0
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -0
- package/dist/esm/utils/sortAlphabetically.mjs +6 -0
- package/dist/esm/utils/sortAlphabetically.mjs.map +1 -0
- package/dist/esm/utils/splitTextByLine.mjs +10 -0
- package/dist/esm/utils/splitTextByLine.mjs.map +1 -0
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs +64 -0
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs.map +1 -0
- package/dist/esm/watcher.mjs +226 -0
- package/dist/esm/watcher.mjs.map +1 -0
- package/dist/esm/writeConfiguration/generateConfigurationContent.mjs +33 -0
- package/dist/esm/writeConfiguration/generateConfigurationContent.mjs.map +1 -0
- package/dist/esm/writeConfiguration/index.mjs +22 -0
- package/dist/esm/writeConfiguration/index.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +27 -0
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/dictionaryStatus.mjs +0 -0
- package/dist/esm/writeContentDeclaration/index.mjs +6 -0
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +92 -0
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs +412 -0
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs +125 -0
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +162 -0
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +91 -0
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +64 -0
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +42 -0
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +1 -0
- package/dist/esm/writeFileIfChanged.mjs +49 -0
- package/dist/esm/writeFileIfChanged.mjs.map +1 -0
- package/dist/esm/writeJsonIfChanged.mjs +17 -0
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -0
- package/dist/types/build.d.ts +26 -0
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +25 -0
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/index.d.ts +3 -0
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +11 -0
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +77 -0
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +25 -0
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +40 -0
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts +29 -0
- package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +34 -0
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts.map +1 -0
- package/dist/types/cleanOutputDir.d.ts +7 -0
- package/dist/types/cleanOutputDir.d.ts.map +1 -0
- package/dist/types/cleanRemovedContentDeclaration.d.ts +11 -0
- package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -0
- package/dist/types/cli.d.ts +21 -0
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +14 -0
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +10 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/index.d.ts +8 -0
- package/dist/types/createType/createModuleAugmentation.d.ts +9 -0
- package/dist/types/createType/createModuleAugmentation.d.ts.map +1 -0
- package/dist/types/createType/createType.d.ts +12 -0
- package/dist/types/createType/createType.d.ts.map +1 -0
- package/dist/types/createType/index.d.ts +3 -0
- package/dist/types/detectFormatCommand.d.ts +7 -0
- package/dist/types/detectFormatCommand.d.ts.map +1 -0
- package/dist/types/docReview/alignBlocks.d.ts +18 -0
- package/dist/types/docReview/alignBlocks.d.ts.map +1 -0
- package/dist/types/docReview/computeSimilarity.d.ts +22 -0
- package/dist/types/docReview/computeSimilarity.d.ts.map +1 -0
- package/dist/types/docReview/fingerprintBlock.d.ts +18 -0
- package/dist/types/docReview/fingerprintBlock.d.ts.map +1 -0
- package/dist/types/docReview/index.d.ts +12 -0
- package/dist/types/docReview/mapChangedLinesToBlocks.d.ts +15 -0
- package/dist/types/docReview/mapChangedLinesToBlocks.d.ts.map +1 -0
- package/dist/types/docReview/normalizeBlock.d.ts +18 -0
- package/dist/types/docReview/normalizeBlock.d.ts.map +1 -0
- package/dist/types/docReview/pipeline.d.ts +46 -0
- package/dist/types/docReview/pipeline.d.ts.map +1 -0
- package/dist/types/docReview/planActions.d.ts +18 -0
- package/dist/types/docReview/planActions.d.ts.map +1 -0
- package/dist/types/docReview/rebuildDocument.d.ts +46 -0
- package/dist/types/docReview/rebuildDocument.d.ts.map +1 -0
- package/dist/types/docReview/reviewReport.d.ts +82 -0
- package/dist/types/docReview/reviewReport.d.ts.map +1 -0
- package/dist/types/docReview/segmentDocument.d.ts +40 -0
- package/dist/types/docReview/segmentDocument.d.ts.map +1 -0
- package/dist/types/docReview/types.d.ts +73 -0
- package/dist/types/docReview/types.d.ts.map +1 -0
- package/dist/types/fetchDistantDictionaries.d.ts +16 -0
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -0
- package/dist/types/filterInvalidDictionaries.d.ts +12 -0
- package/dist/types/filterInvalidDictionaries.d.ts.map +1 -0
- package/dist/types/formatDictionary.d.ts +62 -0
- package/dist/types/formatDictionary.d.ts.map +1 -0
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts +7 -0
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts.map +1 -0
- package/dist/types/getContentDeclarationFileTemplate/index.d.ts +2 -0
- package/dist/types/handleAdditionalContentDeclarationFile.d.ts +7 -0
- package/dist/types/handleAdditionalContentDeclarationFile.d.ts.map +1 -0
- package/dist/types/handleContentDeclarationFileChange.d.ts +7 -0
- package/dist/types/handleContentDeclarationFileChange.d.ts.map +1 -0
- package/dist/types/handleContentDeclarationFileMoved.d.ts +7 -0
- package/dist/types/handleContentDeclarationFileMoved.d.ts.map +1 -0
- package/dist/types/handleUnlinkedContentDeclarationFile.d.ts +7 -0
- package/dist/types/handleUnlinkedContentDeclarationFile.d.ts.map +1 -0
- package/dist/types/init/cms.d.ts +51 -0
- package/dist/types/init/cms.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/index.d.ts +13 -0
- package/dist/types/init/frameworkSetup/index.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts +25 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/detect.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts +12 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/index.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts +56 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/restructure.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts +26 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/templates.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts +23 -0
- package/dist/types/init/frameworkSetup/nextAppRouter/transforms.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts +19 -0
- package/dist/types/init/frameworkSetup/tanstackStart/detect.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts +13 -0
- package/dist/types/init/frameworkSetup/tanstackStart/index.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts +68 -0
- package/dist/types/init/frameworkSetup/tanstackStart/restructure.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts +22 -0
- package/dist/types/init/frameworkSetup/tanstackStart/templates.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts +17 -0
- package/dist/types/init/frameworkSetup/tanstackStart/transforms.d.ts.map +1 -0
- package/dist/types/init/frameworkSetup/types.d.ts +43 -0
- package/dist/types/init/frameworkSetup/types.d.ts.map +1 -0
- package/dist/types/init/index.d.ts +46 -0
- package/dist/types/init/index.d.ts.map +1 -0
- package/dist/types/init/utils/astImports.d.ts +29 -0
- package/dist/types/init/utils/astImports.d.ts.map +1 -0
- package/dist/types/init/utils/configManipulation.d.ts +99 -0
- package/dist/types/init/utils/configManipulation.d.ts.map +1 -0
- package/dist/types/init/utils/fileSystem.d.ts +111 -0
- package/dist/types/init/utils/fileSystem.d.ts.map +1 -0
- package/dist/types/init/utils/githubActions.d.ts +19 -0
- package/dist/types/init/utils/githubActions.d.ts.map +1 -0
- package/dist/types/init/utils/index.d.ts +9 -0
- package/dist/types/init/utils/jsonParser.d.ts +8 -0
- package/dist/types/init/utils/jsonParser.d.ts.map +1 -0
- package/dist/types/init/utils/nextCompilerBabel.d.ts +53 -0
- package/dist/types/init/utils/nextCompilerBabel.d.ts.map +1 -0
- package/dist/types/init/utils/packageManager.d.ts +149 -0
- package/dist/types/init/utils/packageManager.d.ts.map +1 -0
- package/dist/types/init/utils/tsConfig.d.ts +8 -0
- package/dist/types/init/utils/tsConfig.d.ts.map +1 -0
- package/dist/types/initConfig/index.d.ts +10 -0
- package/dist/types/initConfig/index.d.ts.map +1 -0
- package/dist/types/installLSP.d.ts +12 -0
- package/dist/types/installLSP.d.ts.map +1 -0
- package/dist/types/installMCP/installMCP.d.ts +11 -0
- package/dist/types/installMCP/installMCP.d.ts.map +1 -0
- package/dist/types/installSkills/index.d.ts +42 -0
- package/dist/types/installSkills/index.d.ts.map +1 -0
- package/dist/types/listDictionariesPath.d.ts +17 -0
- package/dist/types/listDictionariesPath.d.ts.map +1 -0
- package/dist/types/listGitFiles.d.ts +27 -0
- package/dist/types/listGitFiles.d.ts.map +1 -0
- package/dist/types/listProjects.d.ts +26 -0
- package/dist/types/listProjects.d.ts.map +1 -0
- package/dist/types/loadDictionaries/getIntlayerBundle.d.ts +7 -0
- package/dist/types/loadDictionaries/getIntlayerBundle.d.ts.map +1 -0
- package/dist/types/loadDictionaries/index.d.ts +5 -0
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +15 -0
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadDictionaries.d.ts +23 -0
- package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +8 -0
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts +7 -0
- package/dist/types/loadDictionaries/loadMarkdownContentDeclaration.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +15 -0
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts +7 -0
- package/dist/types/loadDictionaries/loadYamlContentDeclaration.d.ts.map +1 -0
- package/dist/types/loadDictionaries/log.d.ts +36 -0
- package/dist/types/loadDictionaries/log.d.ts.map +1 -0
- package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts +7 -0
- package/dist/types/loadDictionaries/logTypeScriptErrors.d.ts.map +1 -0
- package/dist/types/logConfigDetails.d.ts +7 -0
- package/dist/types/logConfigDetails.d.ts.map +1 -0
- package/dist/types/prepareIntlayer.d.ts +15 -0
- package/dist/types/prepareIntlayer.d.ts.map +1 -0
- package/dist/types/reduceDictionaryContent/applyMask.d.ts +7 -0
- package/dist/types/reduceDictionaryContent/applyMask.d.ts.map +1 -0
- package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts +7 -0
- package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts.map +1 -0
- package/dist/types/scan/analyzeBundleContent.d.ts +16 -0
- package/dist/types/scan/analyzeBundleContent.d.ts.map +1 -0
- package/dist/types/scan/calculateScore.d.ts +65 -0
- package/dist/types/scan/calculateScore.d.ts.map +1 -0
- package/dist/types/scan/checks.d.ts +38 -0
- package/dist/types/scan/checks.d.ts.map +1 -0
- package/dist/types/scan/index.d.ts +7 -0
- package/dist/types/scan/parseHtml.d.ts +54 -0
- package/dist/types/scan/parseHtml.d.ts.map +1 -0
- package/dist/types/scan/scanWebsite.d.ts +18 -0
- package/dist/types/scan/scanWebsite.d.ts.map +1 -0
- package/dist/types/scan/types.d.ts +76 -0
- package/dist/types/scan/types.d.ts.map +1 -0
- package/dist/types/utils/autoDecorateContent.d.ts +13 -0
- package/dist/types/utils/autoDecorateContent.d.ts.map +1 -0
- package/dist/types/utils/buildComponentFilesList.d.ts +28 -0
- package/dist/types/utils/buildComponentFilesList.d.ts.map +1 -0
- package/dist/types/utils/buildFilesList.d.ts +62 -0
- package/dist/types/utils/buildFilesList.d.ts.map +1 -0
- package/dist/types/utils/chunkJSON.d.ts +56 -0
- package/dist/types/utils/chunkJSON.d.ts.map +1 -0
- package/dist/types/utils/formatter.d.ts +9 -0
- package/dist/types/utils/formatter.d.ts.map +1 -0
- package/dist/types/utils/getChunk.d.ts +11 -0
- package/dist/types/utils/getChunk.d.ts.map +1 -0
- package/dist/types/utils/getContentExtension.d.ts +15 -0
- package/dist/types/utils/getContentExtension.d.ts.map +1 -0
- package/dist/types/utils/getFormatFromExtension.d.ts +8 -0
- package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -0
- package/dist/types/utils/getPathHash.d.ts +8 -0
- package/dist/types/utils/getPathHash.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +21 -0
- package/dist/types/utils/mergeChunks.d.ts +5 -0
- package/dist/types/utils/mergeChunks.d.ts.map +1 -0
- package/dist/types/utils/pLimit.d.ts +16 -0
- package/dist/types/utils/pLimit.d.ts.map +1 -0
- package/dist/types/utils/parallelize.d.ts +5 -0
- package/dist/types/utils/parallelize.d.ts.map +1 -0
- package/dist/types/utils/parallelizeGlobal.d.ts +20 -0
- package/dist/types/utils/parallelizeGlobal.d.ts.map +1 -0
- package/dist/types/utils/readDictionariesFromDisk.d.ts +9 -0
- package/dist/types/utils/readDictionariesFromDisk.d.ts.map +1 -0
- package/dist/types/utils/reduceObjectFormat.d.ts +30 -0
- package/dist/types/utils/reduceObjectFormat.d.ts.map +1 -0
- package/dist/types/utils/resolveObjectPromises.d.ts +9 -0
- package/dist/types/utils/resolveObjectPromises.d.ts.map +1 -0
- package/dist/types/utils/resolveRelativePath.d.ts +5 -0
- package/dist/types/utils/resolveRelativePath.d.ts.map +1 -0
- package/dist/types/utils/runOnce.d.ts +45 -0
- package/dist/types/utils/runOnce.d.ts.map +1 -0
- package/dist/types/utils/runParallel/bin.d.ts +15 -0
- package/dist/types/utils/runParallel/bin.d.ts.map +1 -0
- package/dist/types/utils/runParallel/bootstrap.d.ts +5 -0
- package/dist/types/utils/runParallel/bootstrap.d.ts.map +1 -0
- package/dist/types/utils/runParallel/index.d.ts +14 -0
- package/dist/types/utils/runParallel/index.d.ts.map +1 -0
- package/dist/types/utils/runParallel/pidTree.d.ts +24 -0
- package/dist/types/utils/runParallel/pidTree.d.ts.map +1 -0
- package/dist/types/utils/runParallel/ps.d.ts +11 -0
- package/dist/types/utils/runParallel/ps.d.ts.map +1 -0
- package/dist/types/utils/runParallel/runTask.d.ts +26 -0
- package/dist/types/utils/runParallel/runTask.d.ts.map +1 -0
- package/dist/types/utils/runParallel/spawnPosix.d.ts +20 -0
- package/dist/types/utils/runParallel/spawnPosix.d.ts.map +1 -0
- package/dist/types/utils/runParallel/spawnWin32.d.ts +20 -0
- package/dist/types/utils/runParallel/spawnWin32.d.ts.map +1 -0
- package/dist/types/utils/runParallel/wmic.d.ts +11 -0
- package/dist/types/utils/runParallel/wmic.d.ts.map +1 -0
- package/dist/types/utils/sortAlphabetically.d.ts +5 -0
- package/dist/types/utils/sortAlphabetically.d.ts.map +1 -0
- package/dist/types/utils/splitTextByLine.d.ts +5 -0
- package/dist/types/utils/splitTextByLine.d.ts.map +1 -0
- package/dist/types/utils/verifyIdenticObjectFormat.d.ts +23 -0
- package/dist/types/utils/verifyIdenticObjectFormat.d.ts.map +1 -0
- package/dist/types/watcher.d.ts +17 -0
- package/dist/types/watcher.d.ts.map +1 -0
- package/dist/types/writeConfiguration/generateConfigurationContent.d.ts +7 -0
- package/dist/types/writeConfiguration/generateConfigurationContent.d.ts.map +1 -0
- package/dist/types/writeConfiguration/index.d.ts +8 -0
- package/dist/types/writeConfiguration/index.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts +12 -0
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +5 -0
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/index.d.ts +6 -0
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts +14 -0
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts +11 -0
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/transformJSONFile.d.ts +7 -0
- package/dist/types/writeContentDeclaration/transformJSONFile.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +19 -0
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts +14 -0
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts +8 -0
- package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeYamlFile.d.ts +8 -0
- package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -0
- package/dist/types/writeFileIfChanged.d.ts +11 -0
- package/dist/types/writeFileIfChanged.d.ts.map +1 -0
- package/dist/types/writeJsonIfChanged.d.ts +9 -0
- package/dist/types/writeJsonIfChanged.d.ts.map +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltRemoteDictionariesPath.cjs","names":["fg"],"sources":["../../../src/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltRemoteDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { remoteDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n await mkdir(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = fg.sync(\n `${normalizePath(remoteDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,iCAAiC,OAC5C,eACA,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,uBAAuB,YAAY,cAAc;AAGzD,KAAI,yBAAY,QAAQ,CACtB,mCAAY,SAAS,EAAE,WAAW,MAAM,CAAC;AAO3C,QAJmCA,kBAAG,KACpC,6CAAiB,sBAAsB,CAAC,YAGnB,CAAC,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,QAAQ;AACnC,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_fs_promises = require("node:fs/promises");
|
|
4
|
+
let node_path = require("node:path");
|
|
5
|
+
let fast_glob = require("fast-glob");
|
|
6
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
7
|
+
let node_fs = require("node:fs");
|
|
8
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
9
|
+
|
|
10
|
+
//#region src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts
|
|
11
|
+
/**
|
|
12
|
+
* This function generates a list of dictionaries in the main directory
|
|
13
|
+
*/
|
|
14
|
+
const getBuiltUnmergedDictionariesPath = async (configuration, excludeKeys = []) => {
|
|
15
|
+
const { unmergedDictionariesDir, mainDir } = configuration.system;
|
|
16
|
+
if (!(0, node_fs.existsSync)(mainDir)) await (0, node_fs_promises.mkdir)(mainDir, { recursive: true });
|
|
17
|
+
return (await (0, fast_glob.default)(`${(0, _intlayer_config_utils.normalizePath)(unmergedDictionariesDir)}/**/*.json`)).filter((path) => {
|
|
18
|
+
const key = (0, node_path.basename)(path, ".json");
|
|
19
|
+
return !excludeKeys.includes(key);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.getBuiltUnmergedDictionariesPath = getBuiltUnmergedDictionariesPath;
|
|
25
|
+
//# sourceMappingURL=getBuiltUnmergedDictionariesPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltUnmergedDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltUnmergedDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { unmergedDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n await mkdir(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(unmergedDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,mCAAmC,OAC9C,eACA,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,yBAAyB,YAAY,cAAc;AAG3D,KAAI,yBAAY,QAAQ,CACtB,mCAAY,SAAS,EAAE,WAAW,MAAM,CAAC;AAO3C,SAAO,6BAHL,6CAAiB,wBAAwB,CAAC,YAC3C,EAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,QAAQ;AACnC,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_createDictionaryEntryPoint_generateDictionaryListContent = require('./generateDictionaryListContent.cjs');
|
|
3
|
+
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./getBuiltDictionariesPath.cjs');
|
|
4
|
+
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require('./getBuiltDynamicDictionariesPath.cjs');
|
|
5
|
+
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require('./getBuiltFetchDictionariesPath.cjs');
|
|
6
|
+
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require('./getBuiltRemoteDictionariesPath.cjs');
|
|
7
|
+
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require('./getBuiltUnmergedDictionariesPath.cjs');
|
|
8
|
+
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint.cjs');
|
|
9
|
+
|
|
10
|
+
exports.createDictionaryEntryPoint = require_createDictionaryEntryPoint_createDictionaryEntryPoint.createDictionaryEntryPoint;
|
|
11
|
+
exports.generateDictionaryListContent = require_createDictionaryEntryPoint_generateDictionaryListContent.generateDictionaryListContent;
|
|
12
|
+
exports.getBuiltDictionariesPath = require_createDictionaryEntryPoint_getBuiltDictionariesPath.getBuiltDictionariesPath;
|
|
13
|
+
exports.getBuiltDynamicDictionariesPath = require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath.getBuiltDynamicDictionariesPath;
|
|
14
|
+
exports.getBuiltFetchDictionariesPath = require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath.getBuiltFetchDictionariesPath;
|
|
15
|
+
exports.getBuiltRemoteDictionariesPath = require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath.getBuiltRemoteDictionariesPath;
|
|
16
|
+
exports.getBuiltUnmergedDictionariesPath = require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath.getBuiltUnmergedDictionariesPath;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_writeFileIfChanged = require('../writeFileIfChanged.cjs');
|
|
4
|
+
const require_utils_getPathHash = require('../utils/getPathHash.cjs');
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
let fast_glob = require("fast-glob");
|
|
8
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
|
+
|
|
11
|
+
//#region src/createType/createModuleAugmentation.ts
|
|
12
|
+
const getTypeName = (key) => `${(0, _intlayer_config_utils.kebabCaseToCamelCase)(key)}Content`;
|
|
13
|
+
/** Returns lines like: [Locales.FRENCH]: 1; */
|
|
14
|
+
const formatLocales = (locales) => locales.map((locale) => ` "${locale}": 1;`).join("\n");
|
|
15
|
+
const zodToTsString = (schema) => {
|
|
16
|
+
if (!schema) return "any";
|
|
17
|
+
const def = schema._def ?? schema.def ?? schema;
|
|
18
|
+
switch (def.typeName ?? def.type) {
|
|
19
|
+
case "ZodString":
|
|
20
|
+
case "string": return "string";
|
|
21
|
+
case "ZodNumber":
|
|
22
|
+
case "number": return "number";
|
|
23
|
+
case "ZodBoolean":
|
|
24
|
+
case "boolean": return "boolean";
|
|
25
|
+
case "ZodNull":
|
|
26
|
+
case "null": return "null";
|
|
27
|
+
case "ZodUndefined":
|
|
28
|
+
case "undefined": return "undefined";
|
|
29
|
+
case "ZodArray":
|
|
30
|
+
case "array": return `${zodToTsString(def.type ?? def.element)}[]`;
|
|
31
|
+
case "ZodObject":
|
|
32
|
+
case "object": {
|
|
33
|
+
const shape = typeof def.shape === "function" ? def.shape() : def.shape;
|
|
34
|
+
if (!shape) return "Record<string, any>";
|
|
35
|
+
return `{\n${Object.entries(shape).map(([k, v]) => ` "${k}": ${zodToTsString(v)};`).join("\n")}\n }`;
|
|
36
|
+
}
|
|
37
|
+
case "ZodOptional":
|
|
38
|
+
case "optional": return `${zodToTsString(def.innerType ?? def.wrapped)} | undefined`;
|
|
39
|
+
case "ZodNullable":
|
|
40
|
+
case "nullable": return `${zodToTsString(def.innerType ?? def.wrapped)} | null`;
|
|
41
|
+
case "ZodUnion":
|
|
42
|
+
case "union": return (def.options ?? []).map(zodToTsString).join(" | ");
|
|
43
|
+
case "ZodIntersection":
|
|
44
|
+
case "intersection": return `${zodToTsString(def.left)} & ${zodToTsString(def.right)}`;
|
|
45
|
+
case "ZodEnum":
|
|
46
|
+
case "enum": return (def.values ?? []).map((v) => `"${v}"`).join(" | ");
|
|
47
|
+
case "ZodLiteral":
|
|
48
|
+
case "literal": {
|
|
49
|
+
const value = def.value;
|
|
50
|
+
return typeof value === "string" ? `"${value}"` : String(value);
|
|
51
|
+
}
|
|
52
|
+
default: return "any";
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
/** Generate the content of the module augmentation file */
|
|
56
|
+
const generateTypeIndexContent = (typeFiles, configuration, zodToTsFns) => {
|
|
57
|
+
const { internationalization, system, editor, routing } = configuration;
|
|
58
|
+
const { moduleAugmentationDir } = system;
|
|
59
|
+
const { enabled } = editor;
|
|
60
|
+
const { locales, requiredLocales, strictMode, defaultLocale } = internationalization;
|
|
61
|
+
let fileContent = "import \"intlayer\";\n";
|
|
62
|
+
const dictionariesRef = typeFiles.map((dictionaryPath) => ({
|
|
63
|
+
relativePath: `./${(0, node_path.relative)(moduleAugmentationDir, dictionaryPath)}`,
|
|
64
|
+
id: (0, node_path.basename)(dictionaryPath, (0, node_path.extname)(dictionaryPath)),
|
|
65
|
+
hash: `_${require_utils_getPathHash.getPathHash(dictionaryPath)}`
|
|
66
|
+
}));
|
|
67
|
+
for (const dictionary of dictionariesRef) fileContent += `import ${dictionary.hash} from '${dictionary.relativePath}';\n`;
|
|
68
|
+
fileContent += "\n";
|
|
69
|
+
const formattedDictionaryMap = dictionariesRef.map((dictionary) => ` "${dictionary.id}": typeof ${dictionary.hash};`).join("\n");
|
|
70
|
+
const declared = locales;
|
|
71
|
+
const requiredSanitized = requiredLocales?.length ? requiredLocales.filter((requiredLocales) => declared.includes(requiredLocales)) : declared;
|
|
72
|
+
const formattedDeclaredLocales = formatLocales(declared);
|
|
73
|
+
const formattedRequiredLocales = formatLocales(requiredSanitized);
|
|
74
|
+
const schemas = configuration.schemas ?? {};
|
|
75
|
+
const formattedSchemas = Object.entries(schemas).map(([key, schema]) => {
|
|
76
|
+
let typeStr = "any";
|
|
77
|
+
if (schema) try {
|
|
78
|
+
if (zodToTsFns) {
|
|
79
|
+
const { node } = zodToTsFns.zodToTs(schema, { auxiliaryTypeStore: zodToTsFns.createAuxiliaryTypeStore() });
|
|
80
|
+
if (node.kind !== 133) typeStr = zodToTsFns.printNode(node);
|
|
81
|
+
else typeStr = zodToTsString(schema);
|
|
82
|
+
} else typeStr = zodToTsString(schema);
|
|
83
|
+
} catch (_e) {
|
|
84
|
+
typeStr = zodToTsString(schema);
|
|
85
|
+
}
|
|
86
|
+
return ` "${key}": ${typeStr};`;
|
|
87
|
+
}).join("\n");
|
|
88
|
+
const strictKey = strictMode === "strict" ? "strict" : strictMode === "inclusive" ? "inclusive" : "loose";
|
|
89
|
+
/**
|
|
90
|
+
* Module augmentation that ONLY adds keys to registries.
|
|
91
|
+
* No types/aliases redefined here—avoids merge conflicts.
|
|
92
|
+
*/
|
|
93
|
+
fileContent += `declare module 'intlayer' {\n`;
|
|
94
|
+
fileContent += ` interface __DictionaryRegistry {\n${formattedDictionaryMap}\n }\n\n`;
|
|
95
|
+
fileContent += ` interface __DeclaredLocalesRegistry {\n${formattedDeclaredLocales}\n }\n\n`;
|
|
96
|
+
fileContent += ` interface __RequiredLocalesRegistry {\n${formattedRequiredLocales}\n }\n\n`;
|
|
97
|
+
fileContent += ` interface __SchemaRegistry {\n${formattedSchemas}\n }\n\n`;
|
|
98
|
+
fileContent += ` interface __StrictModeRegistry { mode: '${strictKey}' }\n\n`;
|
|
99
|
+
fileContent += ` interface __EditorRegistry { enabled : ${enabled} }\n\n`;
|
|
100
|
+
const routingMode = routing?.mode ?? "prefix-no-default";
|
|
101
|
+
fileContent += ` interface __RoutingRegistry { mode: '${routingMode}'; defaultLocale: '${defaultLocale}' }\n`;
|
|
102
|
+
fileContent += `}\n`;
|
|
103
|
+
return fileContent;
|
|
104
|
+
};
|
|
105
|
+
/** Generate the index file merging all the types */
|
|
106
|
+
const createModuleAugmentation = async (configuration) => {
|
|
107
|
+
const { moduleAugmentationDir, typesDir } = configuration.system;
|
|
108
|
+
await (0, node_fs_promises.mkdir)(moduleAugmentationDir, { recursive: true });
|
|
109
|
+
const dictionariesTypesDefinitions = await (0, fast_glob.default)((0, _intlayer_config_utils.normalizePath)(`${typesDir}/*.ts`), { ignore: ["**/*.d.ts"] });
|
|
110
|
+
let zodToTsFns = null;
|
|
111
|
+
try {
|
|
112
|
+
const mod = await import("zod-to-ts");
|
|
113
|
+
zodToTsFns = {
|
|
114
|
+
zodToTs: mod.zodToTs,
|
|
115
|
+
printNode: mod.printNode,
|
|
116
|
+
createAuxiliaryTypeStore: mod.createAuxiliaryTypeStore
|
|
117
|
+
};
|
|
118
|
+
} catch {}
|
|
119
|
+
const tsContent = generateTypeIndexContent(dictionariesTypesDefinitions, configuration, zodToTsFns);
|
|
120
|
+
await require_writeFileIfChanged.writeFileIfChanged((0, node_path.join)(moduleAugmentationDir, "intlayer.d.ts"), tsContent);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
exports.createModuleAugmentation = createModuleAugmentation;
|
|
125
|
+
exports.getTypeName = getTypeName;
|
|
126
|
+
//# sourceMappingURL=createModuleAugmentation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createModuleAugmentation.cjs","names":["getPathHash","writeFileIfChanged"],"sources":["../../../src/createType/createModuleAugmentation.ts"],"sourcesContent":["import { mkdir } from 'node:fs/promises';\nimport { basename, extname, join, relative } from 'node:path';\nimport { kebabCaseToCamelCase, normalizePath } from '@intlayer/config/utils';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\nimport { getPathHash } from '../utils';\nimport { writeFileIfChanged } from '../writeFileIfChanged';\n\nexport const getTypeName = (key: string): string =>\n `${kebabCaseToCamelCase(key)}Content`;\n\n/** Returns lines like: [Locales.FRENCH]: 1; */\nconst formatLocales = (locales: Locale[]) =>\n locales.map((locale) => ` \"${locale}\": 1;`).join('\\n');\n\nconst zodToTsString = (schema: any): string => {\n if (!schema) return 'any';\n\n // Support both real Zod objects (_def) and serialized versions (def or nested)\n const def = schema._def ?? schema.def ?? schema;\n\n // Handle serialized type names (sometimes 'type' instead of 'typeName')\n const typeName = def.typeName ?? def.type;\n\n switch (typeName) {\n case 'ZodString':\n case 'string':\n return 'string';\n case 'ZodNumber':\n case 'number':\n return 'number';\n case 'ZodBoolean':\n case 'boolean':\n return 'boolean';\n case 'ZodNull':\n case 'null':\n return 'null';\n case 'ZodUndefined':\n case 'undefined':\n return 'undefined';\n case 'ZodArray':\n case 'array':\n return `${zodToTsString(def.type ?? def.element)}[]`;\n case 'ZodObject':\n case 'object': {\n const shape = typeof def.shape === 'function' ? def.shape() : def.shape;\n if (!shape) return 'Record<string, any>';\n\n const entries = Object.entries(shape)\n .map(([k, v]) => ` \"${k}\": ${zodToTsString(v)};`)\n .join('\\n');\n return `{\\n${entries}\\n }`;\n }\n case 'ZodOptional':\n case 'optional':\n return `${zodToTsString(def.innerType ?? def.wrapped)} | undefined`;\n case 'ZodNullable':\n case 'nullable':\n return `${zodToTsString(def.innerType ?? def.wrapped)} | null`;\n case 'ZodUnion':\n case 'union': {\n const options = def.options ?? [];\n return options.map(zodToTsString).join(' | ');\n }\n case 'ZodIntersection':\n case 'intersection':\n return `${zodToTsString(def.left)} & ${zodToTsString(def.right)}`;\n case 'ZodEnum':\n case 'enum': {\n const values = def.values ?? [];\n return values.map((v: string) => `\"${v}\"`).join(' | ');\n }\n case 'ZodLiteral':\n case 'literal': {\n const value = def.value;\n return typeof value === 'string' ? `\"${value}\"` : String(value);\n }\n default:\n return 'any';\n }\n};\n\ntype ZodToTsFns = {\n zodToTs: (schema: any, opts?: any) => { node: any };\n printNode: (node: any) => string;\n createAuxiliaryTypeStore: () => any;\n};\n\n/** Generate the content of the module augmentation file */\nconst generateTypeIndexContent = (\n typeFiles: string[],\n configuration: IntlayerConfig,\n zodToTsFns: ZodToTsFns | null\n): string => {\n const { internationalization, system, editor, routing } = configuration;\n const { moduleAugmentationDir } = system;\n const { enabled } = editor;\n const { locales, requiredLocales, strictMode, defaultLocale } =\n internationalization;\n\n let fileContent = 'import \"intlayer\";\\n';\n\n // Build dictionary refs\n const dictionariesRef = typeFiles.map((dictionaryPath) => ({\n relativePath: `./${relative(moduleAugmentationDir, dictionaryPath)}`,\n id: basename(dictionaryPath, extname(dictionaryPath)),\n hash: `_${getPathHash(dictionaryPath)}`,\n }));\n\n // Import all dictionaries\n for (const dictionary of dictionariesRef) {\n fileContent += `import ${dictionary.hash} from '${dictionary.relativePath}';\\n`;\n }\n fileContent += '\\n';\n\n // Dictionary map entries (id: typeof <hash>)\n const formattedDictionaryMap: string = dictionariesRef\n .map((dictionary) => ` \"${dictionary.id}\": typeof ${dictionary.hash};`)\n .join('\\n');\n\n // Ensure required ⊆ declared; if empty, default required = declared\n const declared = locales;\n const requiredSanitized = requiredLocales?.length\n ? requiredLocales.filter((requiredLocales) =>\n declared.includes(requiredLocales)\n )\n : declared;\n\n const formattedDeclaredLocales = formatLocales(declared);\n const formattedRequiredLocales = formatLocales(requiredSanitized);\n\n // Build schema registry\n const schemas = configuration.schemas ?? {};\n const formattedSchemas = Object.entries(schemas)\n .map(([key, schema]) => {\n let typeStr = 'any';\n\n if (schema) {\n try {\n if (zodToTsFns) {\n const { node } = zodToTsFns.zodToTs(schema, {\n auxiliaryTypeStore: zodToTsFns.createAuxiliaryTypeStore(),\n });\n // 133 is the kind for AnyKeyword in TypeScript\n if ((node as any).kind !== 133) {\n typeStr = zodToTsFns.printNode(node);\n } else {\n typeStr = zodToTsString(schema);\n }\n } else {\n typeStr = zodToTsString(schema);\n }\n } catch (_e) {\n // Fallback to custom string generator\n typeStr = zodToTsString(schema);\n }\n }\n return ` \"${key}\": ${typeStr};`;\n })\n .join('\\n');\n\n // Choose strict mode registry key\n const strictKey =\n strictMode === 'strict'\n ? 'strict'\n : strictMode === 'inclusive'\n ? 'inclusive'\n : 'loose';\n\n /**\n * Module augmentation that ONLY adds keys to registries.\n * No types/aliases redefined here—avoids merge conflicts.\n */\n fileContent += `declare module 'intlayer' {\\n`;\n // Dictionaries registry\n fileContent += ` interface __DictionaryRegistry {\\n${formattedDictionaryMap}\\n }\\n\\n`;\n // Locales registries\n fileContent += ` interface __DeclaredLocalesRegistry {\\n${formattedDeclaredLocales}\\n }\\n\\n`;\n fileContent += ` interface __RequiredLocalesRegistry {\\n${formattedRequiredLocales}\\n }\\n\\n`;\n // Schema registry\n fileContent += ` interface __SchemaRegistry {\\n${formattedSchemas}\\n }\\n\\n`;\n // Resolved strict mode (narrow the literal at build time)\n fileContent += ` interface __StrictModeRegistry { mode: '${strictKey}' }\\n\\n`;\n // Editor registry\n fileContent += ` interface __EditorRegistry { enabled : ${enabled} }\\n\\n`;\n // Routing registry (mode + defaultLocale narrowed to literals)\n const routingMode = routing?.mode ?? 'prefix-no-default';\n fileContent += ` interface __RoutingRegistry { mode: '${routingMode}'; defaultLocale: '${defaultLocale}' }\\n`;\n fileContent += `}\\n`;\n\n return fileContent;\n};\n\n/** Generate the index file merging all the types */\nexport const createModuleAugmentation = async (\n configuration: IntlayerConfig\n) => {\n const { moduleAugmentationDir, typesDir } = configuration.system;\n\n await mkdir(moduleAugmentationDir, { recursive: true });\n\n const dictionariesTypesDefinitions: string[] = await fg(\n normalizePath(`${typesDir}/*.ts`),\n { ignore: ['**/*.d.ts'] }\n );\n\n let zodToTsFns: ZodToTsFns | null = null;\n try {\n const mod = await import('zod-to-ts');\n zodToTsFns = {\n zodToTs: mod.zodToTs,\n printNode: mod.printNode,\n createAuxiliaryTypeStore: mod.createAuxiliaryTypeStore,\n };\n } catch {\n // typescript peer dep not installed (plain JS project), use fallback\n }\n\n const tsContent = generateTypeIndexContent(\n dictionariesTypesDefinitions,\n configuration,\n zodToTsFns\n );\n\n const tsFilePath = join(moduleAugmentationDir, 'intlayer.d.ts');\n await writeFileIfChanged(tsFilePath, tsContent);\n};\n"],"mappings":";;;;;;;;;;;AASA,MAAa,eAAe,QAC1B,oDAAwB,IAAI,CAAC;;AAG/B,MAAM,iBAAiB,YACrB,QAAQ,KAAK,WAAW,QAAQ,OAAO,OAAO,CAAC,KAAK,KAAK;AAE3D,MAAM,iBAAiB,WAAwB;AAC7C,KAAI,CAAC,OAAQ,QAAO;CAGpB,MAAM,MAAM,OAAO,QAAQ,OAAO,OAAO;AAKzC,SAFiB,IAAI,YAAY,IAAI,MAErC;EACE,KAAK;EACL,KAAK,SACH,QAAO;EACT,KAAK;EACL,KAAK,SACH,QAAO;EACT,KAAK;EACL,KAAK,UACH,QAAO;EACT,KAAK;EACL,KAAK,OACH,QAAO;EACT,KAAK;EACL,KAAK,YACH,QAAO;EACT,KAAK;EACL,KAAK,QACH,QAAO,GAAG,cAAc,IAAI,QAAQ,IAAI,QAAQ,CAAC;EACnD,KAAK;EACL,KAAK,UAAU;GACb,MAAM,QAAQ,OAAO,IAAI,UAAU,aAAa,IAAI,OAAO,GAAG,IAAI;AAClE,OAAI,CAAC,MAAO,QAAO;AAKnB,UAAO,MAHS,OAAO,QAAQ,MAAM,CAClC,KAAK,CAAC,GAAG,OAAO,UAAU,EAAE,KAAK,cAAc,EAAE,CAAC,GAAG,CACrD,KAAK,KACY,CAAC;;EAEvB,KAAK;EACL,KAAK,WACH,QAAO,GAAG,cAAc,IAAI,aAAa,IAAI,QAAQ,CAAC;EACxD,KAAK;EACL,KAAK,WACH,QAAO,GAAG,cAAc,IAAI,aAAa,IAAI,QAAQ,CAAC;EACxD,KAAK;EACL,KAAK,QAEH,SADgB,IAAI,WAAW,EAAE,EAClB,IAAI,cAAc,CAAC,KAAK,MAAM;EAE/C,KAAK;EACL,KAAK,eACH,QAAO,GAAG,cAAc,IAAI,KAAK,CAAC,KAAK,cAAc,IAAI,MAAM;EACjE,KAAK;EACL,KAAK,OAEH,SADe,IAAI,UAAU,EAAE,EACjB,KAAK,MAAc,IAAI,EAAE,GAAG,CAAC,KAAK,MAAM;EAExD,KAAK;EACL,KAAK,WAAW;GACd,MAAM,QAAQ,IAAI;AAClB,UAAO,OAAO,UAAU,WAAW,IAAI,MAAM,KAAK,OAAO,MAAM;;EAEjE,QACE,QAAO;;;;AAWb,MAAM,4BACJ,WACA,eACA,eACW;CACX,MAAM,EAAE,sBAAsB,QAAQ,QAAQ,YAAY;CAC1D,MAAM,EAAE,0BAA0B;CAClC,MAAM,EAAE,YAAY;CACpB,MAAM,EAAE,SAAS,iBAAiB,YAAY,kBAC5C;CAEF,IAAI,cAAc;CAGlB,MAAM,kBAAkB,UAAU,KAAK,oBAAoB;EACzD,cAAc,6BAAc,uBAAuB,eAAe;EAClE,4BAAa,uCAAwB,eAAe,CAAC;EACrD,MAAM,IAAIA,sCAAY,eAAe;EACtC,EAAE;AAGH,MAAK,MAAM,cAAc,gBACvB,gBAAe,UAAU,WAAW,KAAK,SAAS,WAAW,aAAa;AAE5E,gBAAe;CAGf,MAAM,yBAAiC,gBACpC,KAAK,eAAe,QAAQ,WAAW,GAAG,YAAY,WAAW,KAAK,GAAG,CACzE,KAAK,KAAK;CAGb,MAAM,WAAW;CACjB,MAAM,oBAAoB,iBAAiB,SACvC,gBAAgB,QAAQ,oBACtB,SAAS,SAAS,gBAAgB,CACnC,GACD;CAEJ,MAAM,2BAA2B,cAAc,SAAS;CACxD,MAAM,2BAA2B,cAAc,kBAAkB;CAGjE,MAAM,UAAU,cAAc,WAAW,EAAE;CAC3C,MAAM,mBAAmB,OAAO,QAAQ,QAAQ,CAC7C,KAAK,CAAC,KAAK,YAAY;EACtB,IAAI,UAAU;AAEd,MAAI,OACF,KAAI;AACF,OAAI,YAAY;IACd,MAAM,EAAE,SAAS,WAAW,QAAQ,QAAQ,EAC1C,oBAAoB,WAAW,0BAA0B,EAC1D,CAAC;AAEF,QAAK,KAAa,SAAS,IACzB,WAAU,WAAW,UAAU,KAAK;QAEpC,WAAU,cAAc,OAAO;SAGjC,WAAU,cAAc,OAAO;WAE1B,IAAI;AAEX,aAAU,cAAc,OAAO;;AAGnC,SAAO,QAAQ,IAAI,KAAK,QAAQ;GAChC,CACD,KAAK,KAAK;CAGb,MAAM,YACJ,eAAe,WACX,WACA,eAAe,cACb,cACA;;;;;AAMR,gBAAe;AAEf,gBAAe,uCAAuC,uBAAuB;AAE7E,gBAAe,4CAA4C,yBAAyB;AACpF,gBAAe,4CAA4C,yBAAyB;AAEpF,gBAAe,mCAAmC,iBAAiB;AAEnE,gBAAe,6CAA6C,UAAU;AAEtE,gBAAe,4CAA4C,QAAQ;CAEnE,MAAM,cAAc,SAAS,QAAQ;AACrC,gBAAe,0CAA0C,YAAY,qBAAqB,cAAc;AACxG,gBAAe;AAEf,QAAO;;;AAIT,MAAa,2BAA2B,OACtC,kBACG;CACH,MAAM,EAAE,uBAAuB,aAAa,cAAc;AAE1D,mCAAY,uBAAuB,EAAE,WAAW,MAAM,CAAC;CAEvD,MAAM,+BAAyC,uEAC/B,GAAG,SAAS,OAAO,EACjC,EAAE,QAAQ,CAAC,YAAY,EAAE,CAC1B;CAED,IAAI,aAAgC;AACpC,KAAI;EACF,MAAM,MAAM,MAAM,OAAO;AACzB,eAAa;GACX,SAAS,IAAI;GACb,WAAW,IAAI;GACf,0BAA0B,IAAI;GAC/B;SACK;CAIR,MAAM,YAAY,yBAChB,8BACA,eACA,WACD;AAGD,OAAMC,kEADkB,uBAAuB,gBACZ,EAAE,UAAU"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_utils_parallelize = require('../utils/parallelize.cjs');
|
|
4
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
|
|
7
|
+
//#region src/createType/createType.ts
|
|
8
|
+
const generateTypeScriptType = (dictionary) => {
|
|
9
|
+
return `/* eslint-disable */\nexport default ${JSON.stringify(dictionary, null, 2)} as const;\n`;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* This function generates a TypeScript type definition from a JSON object
|
|
13
|
+
*/
|
|
14
|
+
const createTypes = async (dictionaries, configuration) => {
|
|
15
|
+
const { system } = configuration;
|
|
16
|
+
const { typesDir } = system;
|
|
17
|
+
await (0, node_fs_promises.mkdir)(typesDir, { recursive: true });
|
|
18
|
+
return (await require_utils_parallelize.parallelize(dictionaries, async (dictionary) => {
|
|
19
|
+
if (!dictionary.key) return;
|
|
20
|
+
const typeDefinition = generateTypeScriptType(dictionary);
|
|
21
|
+
const outputPath = (0, node_path.resolve)(typesDir, `${dictionary.key}.ts`);
|
|
22
|
+
await (0, node_fs_promises.writeFile)(outputPath, typeDefinition);
|
|
23
|
+
return outputPath;
|
|
24
|
+
})).filter(Boolean);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.createTypes = createTypes;
|
|
29
|
+
exports.generateTypeScriptType = generateTypeScriptType;
|
|
30
|
+
//# sourceMappingURL=createType.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createType.cjs","names":["parallelize"],"sources":["../../../src/createType/createType.ts"],"sourcesContent":["import { mkdir, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type {\n Dictionary,\n QualifiedDictionaryGroup,\n} from '@intlayer/types/dictionary';\nimport { parallelize } from '../utils/parallelize';\n\nexport const generateTypeScriptType = (\n dictionary: Dictionary | QualifiedDictionaryGroup\n) => {\n const jsonString = JSON.stringify(dictionary, null, 2);\n\n return `/* eslint-disable */\\nexport default ${jsonString} as const;\\n`;\n};\n/**\n * This function generates a TypeScript type definition from a JSON object\n */\nexport const createTypes = async (\n dictionaries: (Dictionary | QualifiedDictionaryGroup)[],\n configuration: IntlayerConfig\n): Promise<string[]> => {\n const { system } = configuration;\n const { typesDir } = system;\n\n // Create type folders if they don't exist\n await mkdir(typesDir, { recursive: true });\n\n const results = await parallelize(\n dictionaries,\n async (dictionary): Promise<string | undefined> => {\n if (!dictionary.key) {\n return undefined;\n }\n\n const typeDefinition: string = generateTypeScriptType(dictionary);\n\n const outputPath: string = resolve(typesDir, `${dictionary.key}.ts`);\n\n await writeFile(outputPath, typeDefinition);\n\n return outputPath;\n }\n );\n\n return results.filter(Boolean) as string[];\n};\n"],"mappings":";;;;;;;AASA,MAAa,0BACX,eACG;AAGH,QAAO,wCAFY,KAAK,UAAU,YAAY,MAAM,EAEK,CAAC;;;;;AAK5D,MAAa,cAAc,OACzB,cACA,kBACsB;CACtB,MAAM,EAAE,WAAW;CACnB,MAAM,EAAE,aAAa;AAGrB,mCAAY,UAAU,EAAE,WAAW,MAAM,CAAC;AAmB1C,SAAO,MAjBeA,sCACpB,cACA,OAAO,eAA4C;AACjD,MAAI,CAAC,WAAW,IACd;EAGF,MAAM,iBAAyB,uBAAuB,WAAW;EAEjE,MAAM,oCAA6B,UAAU,GAAG,WAAW,IAAI,KAAK;AAEpE,wCAAgB,YAAY,eAAe;AAE3C,SAAO;GAEV,EAEc,OAAO,QAAQ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_createType_createModuleAugmentation = require('./createModuleAugmentation.cjs');
|
|
3
|
+
const require_createType_createType = require('./createType.cjs');
|
|
4
|
+
|
|
5
|
+
exports.createModuleAugmentation = require_createType_createModuleAugmentation.createModuleAugmentation;
|
|
6
|
+
exports.createTypes = require_createType_createType.createTypes;
|
|
7
|
+
exports.generateTypeScriptType = require_createType_createType.generateTypeScriptType;
|
|
8
|
+
exports.getTypeName = require_createType_createModuleAugmentation.getTypeName;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
4
|
+
|
|
5
|
+
//#region src/detectFormatCommand.ts
|
|
6
|
+
let cachedFormatCommand = null;
|
|
7
|
+
const detectFormatCommand = (configuration, projectRequireProp) => {
|
|
8
|
+
const { baseDir } = configuration.system;
|
|
9
|
+
const { formatCommand } = configuration.content;
|
|
10
|
+
const projectRequire = projectRequireProp ?? (0, _intlayer_config_utils.getProjectRequire)(baseDir);
|
|
11
|
+
if (formatCommand) return formatCommand;
|
|
12
|
+
if (cachedFormatCommand !== null) return cachedFormatCommand;
|
|
13
|
+
try {
|
|
14
|
+
projectRequire.resolve("prettier");
|
|
15
|
+
cachedFormatCommand = "prettier --write \"{{file}}\" --log-level silent";
|
|
16
|
+
return cachedFormatCommand;
|
|
17
|
+
} catch (_error) {}
|
|
18
|
+
try {
|
|
19
|
+
projectRequire.resolve("biome");
|
|
20
|
+
cachedFormatCommand = "biome format \"{{file}}\" --write --log-level none";
|
|
21
|
+
return cachedFormatCommand;
|
|
22
|
+
} catch (_error) {}
|
|
23
|
+
try {
|
|
24
|
+
projectRequire.resolve("eslint");
|
|
25
|
+
cachedFormatCommand = "eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"";
|
|
26
|
+
return cachedFormatCommand;
|
|
27
|
+
} catch (_error) {}
|
|
28
|
+
cachedFormatCommand = void 0;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.detectFormatCommand = detectFormatCommand;
|
|
33
|
+
//# sourceMappingURL=detectFormatCommand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectFormatCommand.cjs","names":[],"sources":["../../src/detectFormatCommand.ts"],"sourcesContent":["import { getProjectRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n\nlet cachedFormatCommand: string | undefined | null = null;\n\nexport const detectFormatCommand = (\n configuration: IntlayerConfig,\n projectRequireProp?: NodeJS.Require\n) => {\n const { baseDir } = configuration.system;\n const { formatCommand } = configuration.content;\n const projectRequire = projectRequireProp ?? getProjectRequire(baseDir);\n\n // Priority: Explicit configuration\n // We do not cache this because the user might change their config file active-session.\n if (formatCommand) {\n return formatCommand;\n }\n\n // Priority: Cached detection\n // If not null, we have already performed the expensive checks.\n if (cachedFormatCommand !== null) {\n return cachedFormatCommand;\n }\n\n // Perform Detection\n\n // Try Prettier\n try {\n projectRequire.resolve('prettier');\n cachedFormatCommand = 'prettier --write \"{{file}}\" --log-level silent';\n return cachedFormatCommand;\n } catch (_error) {\n // Prettier not found, continue\n }\n\n // Try Biome\n try {\n projectRequire.resolve('biome');\n cachedFormatCommand = 'biome format \"{{file}}\" --write --log-level none';\n return cachedFormatCommand;\n } catch (_error) {\n // Biome not found, continue\n }\n\n // Try ESLint\n try {\n projectRequire.resolve('eslint');\n cachedFormatCommand =\n 'eslint --fix \"{{file}}\" --quiet || node -e \"process.exit(0)\"';\n return cachedFormatCommand;\n } catch (_error) {\n // ESLint not found\n }\n\n // No formatter found\n // Set to undefined (not null) so we know we checked and found nothing.\n cachedFormatCommand = undefined;\n return undefined;\n};\n"],"mappings":";;;;;AAGA,IAAI,sBAAiD;AAErD,MAAa,uBACX,eACA,uBACG;CACH,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,EAAE,kBAAkB,cAAc;CACxC,MAAM,iBAAiB,oEAAwC,QAAQ;AAIvE,KAAI,cACF,QAAO;AAKT,KAAI,wBAAwB,KAC1B,QAAO;AAMT,KAAI;AACF,iBAAe,QAAQ,WAAW;AAClC,wBAAsB;AACtB,SAAO;UACA,QAAQ;AAKjB,KAAI;AACF,iBAAe,QAAQ,QAAQ;AAC/B,wBAAsB;AACtB,SAAO;UACA,QAAQ;AAKjB,KAAI;AACF,iBAAe,QAAQ,SAAS;AAChC,wBACE;AACF,SAAO;UACA,QAAQ;AAMjB,uBAAsB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_docReview_computeSimilarity = require('./computeSimilarity.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/docReview/alignBlocks.ts
|
|
5
|
+
/**
|
|
6
|
+
* Align the blocks of a base document with the blocks of its translation using a
|
|
7
|
+
* Needleman–Wunsch global alignment over anchor similarity and block type.
|
|
8
|
+
*
|
|
9
|
+
* Because prose differs across languages, the score is weighted toward the
|
|
10
|
+
* structural anchor (digits and symbols) rather than the words themselves.
|
|
11
|
+
*
|
|
12
|
+
* @param baseBlocks - Blocks of the base (source) document.
|
|
13
|
+
* @param targetBlocks - Blocks of the target (translated) document.
|
|
14
|
+
* @returns The ordered list of alignment pairs, including insertions and deletions.
|
|
15
|
+
*/
|
|
16
|
+
const alignBaseAndTargetBlocks = (baseBlocks, targetBlocks) => {
|
|
17
|
+
const baseLength = baseBlocks.length;
|
|
18
|
+
const targetLength = targetBlocks.length;
|
|
19
|
+
const scoreMatrix = Array.from({ length: baseLength + 1 }, () => Array.from({ length: targetLength + 1 }, () => 0));
|
|
20
|
+
const traceMatrix = Array.from({ length: baseLength + 1 }, () => Array.from({ length: targetLength + 1 }, () => "diagonal"));
|
|
21
|
+
const gapPenalty = -2;
|
|
22
|
+
const computeMatchScore = (baseIndex, targetIndex) => {
|
|
23
|
+
const baseBlock = baseBlocks[baseIndex];
|
|
24
|
+
const targetBlock = targetBlocks[targetIndex];
|
|
25
|
+
const typeBonus = baseBlock.type === targetBlock.type ? 2 : 0;
|
|
26
|
+
const anchorSimilarity = require_docReview_computeSimilarity.computeJaccardSimilarity(baseBlock.anchorText, targetBlock.anchorText, 3);
|
|
27
|
+
return typeBonus + (Math.min(baseBlock.content.length, targetBlock.content.length) / Math.max(baseBlock.content.length, targetBlock.content.length) > .75 ? 1 : 0) + anchorSimilarity * 8;
|
|
28
|
+
};
|
|
29
|
+
for (let i = 1; i <= baseLength; i += 1) {
|
|
30
|
+
scoreMatrix[i][0] = scoreMatrix[i - 1][0] + gapPenalty;
|
|
31
|
+
traceMatrix[i][0] = "up";
|
|
32
|
+
}
|
|
33
|
+
for (let j = 1; j <= targetLength; j += 1) {
|
|
34
|
+
scoreMatrix[0][j] = scoreMatrix[0][j - 1] + gapPenalty;
|
|
35
|
+
traceMatrix[0][j] = "left";
|
|
36
|
+
}
|
|
37
|
+
for (let i = 1; i <= baseLength; i += 1) for (let j = 1; j <= targetLength; j += 1) {
|
|
38
|
+
const match = scoreMatrix[i - 1][j - 1] + computeMatchScore(i - 1, j - 1);
|
|
39
|
+
const deleteGap = scoreMatrix[i - 1][j] + gapPenalty;
|
|
40
|
+
const insertGap = scoreMatrix[i][j - 1] + gapPenalty;
|
|
41
|
+
const best = Math.max(match, deleteGap, insertGap);
|
|
42
|
+
scoreMatrix[i][j] = best;
|
|
43
|
+
traceMatrix[i][j] = best === match ? "diagonal" : best === deleteGap ? "up" : "left";
|
|
44
|
+
}
|
|
45
|
+
const result = [];
|
|
46
|
+
let i = baseLength;
|
|
47
|
+
let j = targetLength;
|
|
48
|
+
while (i > 0 || j > 0) if (i > 0 && j > 0 && traceMatrix[i][j] === "diagonal") {
|
|
49
|
+
const baseIndex = i - 1;
|
|
50
|
+
const targetIndex = j - 1;
|
|
51
|
+
const similarityScore = require_docReview_computeSimilarity.computeJaccardSimilarity(baseBlocks[baseIndex].anchorText, targetBlocks[targetIndex].anchorText, 3);
|
|
52
|
+
result.unshift({
|
|
53
|
+
baseIndex,
|
|
54
|
+
targetIndex,
|
|
55
|
+
similarityScore
|
|
56
|
+
});
|
|
57
|
+
i -= 1;
|
|
58
|
+
j -= 1;
|
|
59
|
+
} else if (i > 0 && (j === 0 || traceMatrix[i][j] === "up")) {
|
|
60
|
+
result.unshift({
|
|
61
|
+
baseIndex: i - 1,
|
|
62
|
+
targetIndex: null,
|
|
63
|
+
similarityScore: 0
|
|
64
|
+
});
|
|
65
|
+
i -= 1;
|
|
66
|
+
} else if (j > 0 && (i === 0 || traceMatrix[i][j] === "left")) {
|
|
67
|
+
result.unshift({
|
|
68
|
+
baseIndex: -1,
|
|
69
|
+
targetIndex: j - 1,
|
|
70
|
+
similarityScore: 0
|
|
71
|
+
});
|
|
72
|
+
j -= 1;
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
exports.alignBaseAndTargetBlocks = alignBaseAndTargetBlocks;
|
|
79
|
+
//# sourceMappingURL=alignBlocks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alignBlocks.cjs","names":["computeJaccardSimilarity"],"sources":["../../../src/docReview/alignBlocks.ts"],"sourcesContent":["import { computeJaccardSimilarity } from './computeSimilarity';\nimport type { AlignmentPair, FingerprintedBlock } from './types';\n\n/**\n * Align the blocks of a base document with the blocks of its translation using a\n * Needleman–Wunsch global alignment over anchor similarity and block type.\n *\n * Because prose differs across languages, the score is weighted toward the\n * structural anchor (digits and symbols) rather than the words themselves.\n *\n * @param baseBlocks - Blocks of the base (source) document.\n * @param targetBlocks - Blocks of the target (translated) document.\n * @returns The ordered list of alignment pairs, including insertions and deletions.\n */\nexport const alignBaseAndTargetBlocks = (\n baseBlocks: FingerprintedBlock[],\n targetBlocks: FingerprintedBlock[]\n): AlignmentPair[] => {\n const baseLength = baseBlocks.length;\n const targetLength = targetBlocks.length;\n\n const scoreMatrix: number[][] = Array.from({ length: baseLength + 1 }, () =>\n Array.from({ length: targetLength + 1 }, () => 0)\n );\n const traceMatrix: ('diagonal' | 'up' | 'left')[][] = Array.from(\n { length: baseLength + 1 },\n () => Array.from({ length: targetLength + 1 }, () => 'diagonal')\n );\n\n const gapPenalty = -2;\n\n const computeMatchScore = (\n baseIndex: number,\n targetIndex: number\n ): number => {\n const baseBlock = baseBlocks[baseIndex];\n const targetBlock = targetBlocks[targetIndex];\n const typeBonus = baseBlock.type === targetBlock.type ? 2 : 0;\n const anchorSimilarity = computeJaccardSimilarity(\n baseBlock.anchorText,\n targetBlock.anchorText,\n 3\n );\n const lengthRatio =\n Math.min(baseBlock.content.length, targetBlock.content.length) /\n Math.max(baseBlock.content.length, targetBlock.content.length);\n const lengthBonus = lengthRatio > 0.75 ? 1 : 0;\n return typeBonus + lengthBonus + anchorSimilarity * 8; // weighted toward anchor similarity\n };\n\n // initialize first row and column\n for (let i = 1; i <= baseLength; i += 1) {\n scoreMatrix[i][0] = scoreMatrix[i - 1][0] + gapPenalty;\n traceMatrix[i][0] = 'up';\n }\n for (let j = 1; j <= targetLength; j += 1) {\n scoreMatrix[0][j] = scoreMatrix[0][j - 1] + gapPenalty;\n traceMatrix[0][j] = 'left';\n }\n\n // fill\n for (let i = 1; i <= baseLength; i += 1) {\n for (let j = 1; j <= targetLength; j += 1) {\n const match = scoreMatrix[i - 1][j - 1] + computeMatchScore(i - 1, j - 1);\n const deleteGap = scoreMatrix[i - 1][j] + gapPenalty;\n const insertGap = scoreMatrix[i][j - 1] + gapPenalty;\n\n const best = Math.max(match, deleteGap, insertGap);\n scoreMatrix[i][j] = best;\n traceMatrix[i][j] =\n best === match ? 'diagonal' : best === deleteGap ? 'up' : 'left';\n }\n }\n\n // traceback\n const result: AlignmentPair[] = [];\n let i = baseLength;\n let j = targetLength;\n while (i > 0 || j > 0) {\n if (i > 0 && j > 0 && traceMatrix[i][j] === 'diagonal') {\n const baseIndex = i - 1;\n const targetIndex = j - 1;\n const similarityScore = computeJaccardSimilarity(\n baseBlocks[baseIndex].anchorText,\n targetBlocks[targetIndex].anchorText,\n 3\n );\n result.unshift({ baseIndex, targetIndex, similarityScore });\n i -= 1;\n j -= 1;\n } else if (i > 0 && (j === 0 || traceMatrix[i][j] === 'up')) {\n result.unshift({\n baseIndex: i - 1,\n targetIndex: null,\n similarityScore: 0,\n });\n i -= 1;\n } else if (j > 0 && (i === 0 || traceMatrix[i][j] === 'left')) {\n // target block has no corresponding base block (deleted)\n result.unshift({\n baseIndex: -1,\n targetIndex: j - 1,\n similarityScore: 0,\n });\n j -= 1;\n }\n }\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,4BACX,YACA,iBACoB;CACpB,MAAM,aAAa,WAAW;CAC9B,MAAM,eAAe,aAAa;CAElC,MAAM,cAA0B,MAAM,KAAK,EAAE,QAAQ,aAAa,GAAG,QACnE,MAAM,KAAK,EAAE,QAAQ,eAAe,GAAG,QAAQ,EAAE,CAClD;CACD,MAAM,cAAgD,MAAM,KAC1D,EAAE,QAAQ,aAAa,GAAG,QACpB,MAAM,KAAK,EAAE,QAAQ,eAAe,GAAG,QAAQ,WAAW,CACjE;CAED,MAAM,aAAa;CAEnB,MAAM,qBACJ,WACA,gBACW;EACX,MAAM,YAAY,WAAW;EAC7B,MAAM,cAAc,aAAa;EACjC,MAAM,YAAY,UAAU,SAAS,YAAY,OAAO,IAAI;EAC5D,MAAM,mBAAmBA,6DACvB,UAAU,YACV,YAAY,YACZ,EACD;AAKD,SAAO,aAHL,KAAK,IAAI,UAAU,QAAQ,QAAQ,YAAY,QAAQ,OAAO,GAC9D,KAAK,IAAI,UAAU,QAAQ,QAAQ,YAAY,QAAQ,OAAO,GAC9B,MAAO,IAAI,KACZ,mBAAmB;;AAItD,MAAK,IAAI,IAAI,GAAG,KAAK,YAAY,KAAK,GAAG;AACvC,cAAY,GAAG,KAAK,YAAY,IAAI,GAAG,KAAK;AAC5C,cAAY,GAAG,KAAK;;AAEtB,MAAK,IAAI,IAAI,GAAG,KAAK,cAAc,KAAK,GAAG;AACzC,cAAY,GAAG,KAAK,YAAY,GAAG,IAAI,KAAK;AAC5C,cAAY,GAAG,KAAK;;AAItB,MAAK,IAAI,IAAI,GAAG,KAAK,YAAY,KAAK,EACpC,MAAK,IAAI,IAAI,GAAG,KAAK,cAAc,KAAK,GAAG;EACzC,MAAM,QAAQ,YAAY,IAAI,GAAG,IAAI,KAAK,kBAAkB,IAAI,GAAG,IAAI,EAAE;EACzE,MAAM,YAAY,YAAY,IAAI,GAAG,KAAK;EAC1C,MAAM,YAAY,YAAY,GAAG,IAAI,KAAK;EAE1C,MAAM,OAAO,KAAK,IAAI,OAAO,WAAW,UAAU;AAClD,cAAY,GAAG,KAAK;AACpB,cAAY,GAAG,KACb,SAAS,QAAQ,aAAa,SAAS,YAAY,OAAO;;CAKhE,MAAM,SAA0B,EAAE;CAClC,IAAI,IAAI;CACR,IAAI,IAAI;AACR,QAAO,IAAI,KAAK,IAAI,EAClB,KAAI,IAAI,KAAK,IAAI,KAAK,YAAY,GAAG,OAAO,YAAY;EACtD,MAAM,YAAY,IAAI;EACtB,MAAM,cAAc,IAAI;EACxB,MAAM,kBAAkBA,6DACtB,WAAW,WAAW,YACtB,aAAa,aAAa,YAC1B,EACD;AACD,SAAO,QAAQ;GAAE;GAAW;GAAa;GAAiB,CAAC;AAC3D,OAAK;AACL,OAAK;YACI,IAAI,MAAM,MAAM,KAAK,YAAY,GAAG,OAAO,OAAO;AAC3D,SAAO,QAAQ;GACb,WAAW,IAAI;GACf,aAAa;GACb,iBAAiB;GAClB,CAAC;AACF,OAAK;YACI,IAAI,MAAM,MAAM,KAAK,YAAY,GAAG,OAAO,SAAS;AAE7D,SAAO,QAAQ;GACb,WAAW;GACX,aAAa,IAAI;GACjB,iBAAiB;GAClB,CAAC;AACF,OAAK;;AAGT,QAAO"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/docReview/computeSimilarity.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generate the set of character shingles (substrings of a fixed length) for a
|
|
6
|
+
* piece of text. Whitespace is collapsed so the result is language agnostic.
|
|
7
|
+
*
|
|
8
|
+
* @param text - The text to shingle.
|
|
9
|
+
* @param shingleLength - The length of each shingle.
|
|
10
|
+
* @returns The set of unique shingles found in the text.
|
|
11
|
+
*/
|
|
12
|
+
const generateCharacterShingles = (text, shingleLength) => {
|
|
13
|
+
const normalized = text.replace(/\s+/g, " ").trim();
|
|
14
|
+
const set = /* @__PURE__ */ new Set();
|
|
15
|
+
if (normalized.length < shingleLength) {
|
|
16
|
+
if (normalized.length > 0) set.add(normalized);
|
|
17
|
+
return set;
|
|
18
|
+
}
|
|
19
|
+
for (let index = 0; index <= normalized.length - shingleLength; index += 1) set.add(normalized.slice(index, index + shingleLength));
|
|
20
|
+
return set;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Compute the Jaccard similarity between two strings using character shingles.
|
|
24
|
+
*
|
|
25
|
+
* @param a - First string.
|
|
26
|
+
* @param b - Second string.
|
|
27
|
+
* @param shingleLength - The shingle length (defaults to 3).
|
|
28
|
+
* @returns A score between 0 (disjoint) and 1 (identical).
|
|
29
|
+
*/
|
|
30
|
+
const computeJaccardSimilarity = (a, b, shingleLength = 3) => {
|
|
31
|
+
const setA = generateCharacterShingles(a, shingleLength);
|
|
32
|
+
const setB = generateCharacterShingles(b, shingleLength);
|
|
33
|
+
if (setA.size === 0 && setB.size === 0) return 1;
|
|
34
|
+
const intersectionSize = Array.from(setA).filter((token) => setB.has(token)).length;
|
|
35
|
+
const unionSize = new Set([...Array.from(setA), ...Array.from(setB)]).size;
|
|
36
|
+
return unionSize === 0 ? 0 : intersectionSize / unionSize;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.computeJaccardSimilarity = computeJaccardSimilarity;
|
|
41
|
+
exports.generateCharacterShingles = generateCharacterShingles;
|
|
42
|
+
//# sourceMappingURL=computeSimilarity.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeSimilarity.cjs","names":[],"sources":["../../../src/docReview/computeSimilarity.ts"],"sourcesContent":["/**\n * Generate the set of character shingles (substrings of a fixed length) for a\n * piece of text. Whitespace is collapsed so the result is language agnostic.\n *\n * @param text - The text to shingle.\n * @param shingleLength - The length of each shingle.\n * @returns The set of unique shingles found in the text.\n */\nexport const generateCharacterShingles = (\n text: string,\n shingleLength: number\n): Set<string> => {\n const normalized = text.replace(/\\s+/g, ' ').trim();\n const set = new Set<string>();\n if (normalized.length < shingleLength) {\n if (normalized.length > 0) {\n set.add(normalized);\n }\n return set;\n }\n for (let index = 0; index <= normalized.length - shingleLength; index += 1) {\n set.add(normalized.slice(index, index + shingleLength));\n }\n return set;\n};\n\n/**\n * Compute the Jaccard similarity between two strings using character shingles.\n *\n * @param a - First string.\n * @param b - Second string.\n * @param shingleLength - The shingle length (defaults to 3).\n * @returns A score between 0 (disjoint) and 1 (identical).\n */\nexport const computeJaccardSimilarity = (\n a: string,\n b: string,\n shingleLength: number = 3\n): number => {\n const setA = generateCharacterShingles(a, shingleLength);\n const setB = generateCharacterShingles(b, shingleLength);\n if (setA.size === 0 && setB.size === 0) return 1;\n const intersectionSize = Array.from(setA).filter((token) =>\n setB.has(token)\n ).length;\n const unionSize = new Set([...Array.from(setA), ...Array.from(setB)]).size;\n return unionSize === 0 ? 0 : intersectionSize / unionSize;\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,6BACX,MACA,kBACgB;CAChB,MAAM,aAAa,KAAK,QAAQ,QAAQ,IAAI,CAAC,MAAM;CACnD,MAAM,sBAAM,IAAI,KAAa;AAC7B,KAAI,WAAW,SAAS,eAAe;AACrC,MAAI,WAAW,SAAS,EACtB,KAAI,IAAI,WAAW;AAErB,SAAO;;AAET,MAAK,IAAI,QAAQ,GAAG,SAAS,WAAW,SAAS,eAAe,SAAS,EACvE,KAAI,IAAI,WAAW,MAAM,OAAO,QAAQ,cAAc,CAAC;AAEzD,QAAO;;;;;;;;;;AAWT,MAAa,4BACX,GACA,GACA,gBAAwB,MACb;CACX,MAAM,OAAO,0BAA0B,GAAG,cAAc;CACxD,MAAM,OAAO,0BAA0B,GAAG,cAAc;AACxD,KAAI,KAAK,SAAS,KAAK,KAAK,SAAS,EAAG,QAAO;CAC/C,MAAM,mBAAmB,MAAM,KAAK,KAAK,CAAC,QAAQ,UAChD,KAAK,IAAI,MAAM,CAChB,CAAC;CACF,MAAM,YAAY,IAAI,IAAI,CAAC,GAAG,MAAM,KAAK,KAAK,EAAE,GAAG,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC;AACtE,QAAO,cAAc,IAAI,IAAI,mBAAmB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_crypto = require("node:crypto");
|
|
4
|
+
node_crypto = require_runtime.__toESM(node_crypto);
|
|
5
|
+
|
|
6
|
+
//#region src/docReview/fingerprintBlock.ts
|
|
7
|
+
const computeStringDigest = (text) => node_crypto.default.createHash("sha256").update(text).digest("hex");
|
|
8
|
+
/**
|
|
9
|
+
* Compute content and context digests for a normalized block.
|
|
10
|
+
*
|
|
11
|
+
* The context key (digest of the surrounding blocks) lets the planner tell apart
|
|
12
|
+
* two blocks that share the same content but live in different sections.
|
|
13
|
+
*
|
|
14
|
+
* @param block - The block to fingerprint.
|
|
15
|
+
* @param previousBlock - The block immediately before, or `null` at the start.
|
|
16
|
+
* @param nextBlock - The block immediately after, or `null` at the end.
|
|
17
|
+
* @returns The block enriched with its digests.
|
|
18
|
+
*/
|
|
19
|
+
const fingerprintBlock = (block, previousBlock, nextBlock) => {
|
|
20
|
+
const semanticDigest = computeStringDigest(block.semanticText);
|
|
21
|
+
const anchorDigest = computeStringDigest(block.anchorText);
|
|
22
|
+
const compositeKey = `${semanticDigest}:${anchorDigest}`;
|
|
23
|
+
const contextKey = computeStringDigest(`${computeStringDigest(previousBlock?.semanticText ?? "")}:${computeStringDigest(nextBlock?.semanticText ?? "")}`);
|
|
24
|
+
return {
|
|
25
|
+
...block,
|
|
26
|
+
semanticDigest,
|
|
27
|
+
anchorDigest,
|
|
28
|
+
compositeKey,
|
|
29
|
+
contextKey
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.fingerprintBlock = fingerprintBlock;
|
|
35
|
+
//# sourceMappingURL=fingerprintBlock.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprintBlock.cjs","names":["crypto"],"sources":["../../../src/docReview/fingerprintBlock.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport type { FingerprintedBlock, NormalizedBlock } from './types';\n\nconst computeStringDigest = (text: string): string =>\n crypto.createHash('sha256').update(text).digest('hex');\n\n/**\n * Compute content and context digests for a normalized block.\n *\n * The context key (digest of the surrounding blocks) lets the planner tell apart\n * two blocks that share the same content but live in different sections.\n *\n * @param block - The block to fingerprint.\n * @param previousBlock - The block immediately before, or `null` at the start.\n * @param nextBlock - The block immediately after, or `null` at the end.\n * @returns The block enriched with its digests.\n */\nexport const fingerprintBlock = (\n block: NormalizedBlock,\n previousBlock: NormalizedBlock | null,\n nextBlock: NormalizedBlock | null\n): FingerprintedBlock => {\n const semanticDigest = computeStringDigest(block.semanticText);\n const anchorDigest = computeStringDigest(block.anchorText);\n const compositeKey = `${semanticDigest}:${anchorDigest}`;\n\n const previousDigest = computeStringDigest(previousBlock?.semanticText ?? '');\n const nextDigest = computeStringDigest(nextBlock?.semanticText ?? '');\n const contextKey = computeStringDigest(`${previousDigest}:${nextDigest}`);\n\n return {\n ...block,\n semanticDigest,\n anchorDigest,\n compositeKey,\n contextKey,\n };\n};\n"],"mappings":";;;;;;AAGA,MAAM,uBAAuB,SAC3BA,oBAAO,WAAW,SAAS,CAAC,OAAO,KAAK,CAAC,OAAO,MAAM;;;;;;;;;;;;AAaxD,MAAa,oBACX,OACA,eACA,cACuB;CACvB,MAAM,iBAAiB,oBAAoB,MAAM,aAAa;CAC9D,MAAM,eAAe,oBAAoB,MAAM,WAAW;CAC1D,MAAM,eAAe,GAAG,eAAe,GAAG;CAI1C,MAAM,aAAa,oBAAoB,GAFhB,oBAAoB,eAAe,gBAAgB,GAElB,CAAC,GADtC,oBAAoB,WAAW,gBAAgB,GACI,GAAG;AAEzE,QAAO;EACL,GAAG;EACH;EACA;EACA;EACA;EACD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_docReview_planActions = require('./planActions.cjs');
|
|
3
|
+
const require_docReview_normalizeBlock = require('./normalizeBlock.cjs');
|
|
4
|
+
const require_docReview_fingerprintBlock = require('./fingerprintBlock.cjs');
|
|
5
|
+
const require_docReview_computeSimilarity = require('./computeSimilarity.cjs');
|
|
6
|
+
const require_docReview_mapChangedLinesToBlocks = require('./mapChangedLinesToBlocks.cjs');
|
|
7
|
+
const require_docReview_alignBlocks = require('./alignBlocks.cjs');
|
|
8
|
+
const require_docReview_rebuildDocument = require('./rebuildDocument.cjs');
|
|
9
|
+
const require_docReview_segmentDocument = require('./segmentDocument.cjs');
|
|
10
|
+
const require_docReview_pipeline = require('./pipeline.cjs');
|
|
11
|
+
const require_docReview_reviewReport = require('./reviewReport.cjs');
|
|
12
|
+
|
|
13
|
+
exports.alignBaseAndTargetBlocks = require_docReview_alignBlocks.alignBaseAndTargetBlocks;
|
|
14
|
+
exports.buildAlignmentPlan = require_docReview_pipeline.buildAlignmentPlan;
|
|
15
|
+
exports.buildReviewReport = require_docReview_reviewReport.buildReviewReport;
|
|
16
|
+
exports.computeJaccardSimilarity = require_docReview_computeSimilarity.computeJaccardSimilarity;
|
|
17
|
+
exports.fingerprintBlock = require_docReview_fingerprintBlock.fingerprintBlock;
|
|
18
|
+
exports.formatReviewReport = require_docReview_reviewReport.formatReviewReport;
|
|
19
|
+
exports.generateCharacterShingles = require_docReview_computeSimilarity.generateCharacterShingles;
|
|
20
|
+
exports.identifySegmentsToReview = require_docReview_rebuildDocument.identifySegmentsToReview;
|
|
21
|
+
exports.mapChangedLinesToBlocks = require_docReview_mapChangedLinesToBlocks.mapChangedLinesToBlocks;
|
|
22
|
+
exports.mergeReviewedSegments = require_docReview_rebuildDocument.mergeReviewedSegments;
|
|
23
|
+
exports.normalizeBlock = require_docReview_normalizeBlock.normalizeBlock;
|
|
24
|
+
exports.planAlignmentActions = require_docReview_planActions.planAlignmentActions;
|
|
25
|
+
exports.segmentDocument = require_docReview_segmentDocument.segmentDocument;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/docReview/mapChangedLinesToBlocks.ts
|
|
4
|
+
/**
|
|
5
|
+
* Map a set of changed line numbers onto the indexes of the blocks that contain
|
|
6
|
+
* them.
|
|
7
|
+
*
|
|
8
|
+
* @param blocks - The ordered blocks of the base document.
|
|
9
|
+
* @param changedLines - 1-based line numbers that changed in the base document.
|
|
10
|
+
* @returns The set of block indexes touched by at least one changed line.
|
|
11
|
+
*/
|
|
12
|
+
const mapChangedLinesToBlocks = (blocks, changedLines) => {
|
|
13
|
+
const changedSet = /* @__PURE__ */ new Set();
|
|
14
|
+
if (!changedLines || changedLines.length === 0) return changedSet;
|
|
15
|
+
const changedLookup = new Set(changedLines);
|
|
16
|
+
blocks.forEach((block, index) => {
|
|
17
|
+
for (let line = block.lineStart; line <= block.lineEnd; line += 1) if (changedLookup.has(line)) {
|
|
18
|
+
changedSet.add(index);
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return changedSet;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.mapChangedLinesToBlocks = mapChangedLinesToBlocks;
|
|
27
|
+
//# sourceMappingURL=mapChangedLinesToBlocks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapChangedLinesToBlocks.cjs","names":[],"sources":["../../../src/docReview/mapChangedLinesToBlocks.ts"],"sourcesContent":["import type { Block, LineChange } from './types';\n\n/**\n * Map a set of changed line numbers onto the indexes of the blocks that contain\n * them.\n *\n * @param blocks - The ordered blocks of the base document.\n * @param changedLines - 1-based line numbers that changed in the base document.\n * @returns The set of block indexes touched by at least one changed line.\n */\nexport const mapChangedLinesToBlocks = (\n blocks: Block[],\n changedLines: LineChange[]\n): Set<number> => {\n const changedSet = new Set<number>();\n if (!changedLines || changedLines.length === 0) return changedSet;\n\n const changedLookup = new Set<number>(changedLines);\n\n blocks.forEach((block, index) => {\n for (let line = block.lineStart; line <= block.lineEnd; line += 1) {\n if (changedLookup.has(line)) {\n changedSet.add(index);\n break;\n }\n }\n });\n\n return changedSet;\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,2BACX,QACA,iBACgB;CAChB,MAAM,6BAAa,IAAI,KAAa;AACpC,KAAI,CAAC,gBAAgB,aAAa,WAAW,EAAG,QAAO;CAEvD,MAAM,gBAAgB,IAAI,IAAY,aAAa;AAEnD,QAAO,SAAS,OAAO,UAAU;AAC/B,OAAK,IAAI,OAAO,MAAM,WAAW,QAAQ,MAAM,SAAS,QAAQ,EAC9D,KAAI,cAAc,IAAI,KAAK,EAAE;AAC3B,cAAW,IAAI,MAAM;AACrB;;GAGJ;AAEF,QAAO"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/docReview/normalizeBlock.ts
|
|
4
|
+
const removeMarkdownFormatting = (text) => {
|
|
5
|
+
return text.replace(/`{1,3}[^`]*`{1,3}/g, " ").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/_([^_]+)_/g, "$1").replace(/~~([^~]+)~~/g, "$1").replace(/!?\[[^\]]*\]\([^)]*\)/g, " ").replace(/^\s*#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*[-*+]\s+/gm, "").replace(/^\s*\d+\.\s+/gm, "");
|
|
6
|
+
};
|
|
7
|
+
const collapseWhitespace = (text) => text.replace(/\s+/g, " ").trim();
|
|
8
|
+
const stripLettersKeepDigitsAndSymbols = (text) => {
|
|
9
|
+
return text.replace(/\p{L}+/gu, "");
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Derive the normalized representations of a block used for matching.
|
|
13
|
+
*
|
|
14
|
+
* - `semanticText`: markdown-stripped, lower-cased text (used to detect identical
|
|
15
|
+
* content across versions of the same language).
|
|
16
|
+
* - `anchorText`: only digits/symbols (used to align blocks across languages, as
|
|
17
|
+
* prose differs but structure such as numbers and punctuation is preserved).
|
|
18
|
+
*
|
|
19
|
+
* @param block - The block to normalize.
|
|
20
|
+
* @returns The block enriched with its normalized texts.
|
|
21
|
+
*/
|
|
22
|
+
const normalizeBlock = (block) => {
|
|
23
|
+
const semanticCollapsed = collapseWhitespace(removeMarkdownFormatting(block.content).toLowerCase());
|
|
24
|
+
const anchorCollapsed = collapseWhitespace(stripLettersKeepDigitsAndSymbols(block.content));
|
|
25
|
+
return {
|
|
26
|
+
...block,
|
|
27
|
+
semanticText: semanticCollapsed,
|
|
28
|
+
anchorText: anchorCollapsed
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.normalizeBlock = normalizeBlock;
|
|
34
|
+
//# sourceMappingURL=normalizeBlock.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeBlock.cjs","names":[],"sources":["../../../src/docReview/normalizeBlock.ts"],"sourcesContent":["import type { Block, NormalizedBlock } from './types';\n\nconst removeMarkdownFormatting = (text: string): string => {\n return text\n .replace(/`{1,3}[^`]*`{1,3}/g, ' ')\n .replace(/\\*\\*([^*]+)\\*\\*/g, '$1')\n .replace(/\\*([^*]+)\\*/g, '$1')\n .replace(/_([^_]+)_/g, '$1')\n .replace(/~~([^~]+)~~/g, '$1')\n .replace(/!?\\[[^\\]]*\\]\\([^)]*\\)/g, ' ')\n .replace(/^\\s*#{1,6}\\s+/gm, '')\n .replace(/^\\s*>\\s?/gm, '')\n .replace(/^\\s*[-*+]\\s+/gm, '')\n .replace(/^\\s*\\d+\\.\\s+/gm, '');\n};\n\nconst collapseWhitespace = (text: string): string =>\n text.replace(/\\s+/g, ' ').trim();\n\nconst stripLettersKeepDigitsAndSymbols = (text: string): string => {\n // Keep digits and non-letter characters, remove all letters (including accents)\n return text.replace(/\\p{L}+/gu, '');\n};\n\n/**\n * Derive the normalized representations of a block used for matching.\n *\n * - `semanticText`: markdown-stripped, lower-cased text (used to detect identical\n * content across versions of the same language).\n * - `anchorText`: only digits/symbols (used to align blocks across languages, as\n * prose differs but structure such as numbers and punctuation is preserved).\n *\n * @param block - The block to normalize.\n * @returns The block enriched with its normalized texts.\n */\nexport const normalizeBlock = (block: Block): NormalizedBlock => {\n const contentWithoutMarkdown = removeMarkdownFormatting(block.content);\n const semanticLowercased = contentWithoutMarkdown.toLowerCase();\n const semanticCollapsed = collapseWhitespace(semanticLowercased);\n\n const anchorOnlySymbols = stripLettersKeepDigitsAndSymbols(block.content);\n const anchorCollapsed = collapseWhitespace(anchorOnlySymbols);\n\n return {\n ...block,\n semanticText: semanticCollapsed,\n anchorText: anchorCollapsed,\n };\n};\n"],"mappings":";;;AAEA,MAAM,4BAA4B,SAAyB;AACzD,QAAO,KACJ,QAAQ,sBAAsB,IAAI,CAClC,QAAQ,oBAAoB,KAAK,CACjC,QAAQ,gBAAgB,KAAK,CAC7B,QAAQ,cAAc,KAAK,CAC3B,QAAQ,gBAAgB,KAAK,CAC7B,QAAQ,0BAA0B,IAAI,CACtC,QAAQ,mBAAmB,GAAG,CAC9B,QAAQ,cAAc,GAAG,CACzB,QAAQ,kBAAkB,GAAG,CAC7B,QAAQ,kBAAkB,GAAG;;AAGlC,MAAM,sBAAsB,SAC1B,KAAK,QAAQ,QAAQ,IAAI,CAAC,MAAM;AAElC,MAAM,oCAAoC,SAAyB;AAEjE,QAAO,KAAK,QAAQ,YAAY,GAAG;;;;;;;;;;;;;AAcrC,MAAa,kBAAkB,UAAkC;CAG/D,MAAM,oBAAoB,mBAFK,yBAAyB,MAAM,QACb,CAAC,aACa,CAAC;CAGhE,MAAM,kBAAkB,mBADE,iCAAiC,MAAM,QACL,CAAC;AAE7D,QAAO;EACL,GAAG;EACH,cAAc;EACd,YAAY;EACb"}
|