@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,138 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
4
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
5
|
+
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
6
|
+
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
7
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
8
|
+
|
|
9
|
+
//#region src/loadDictionaries/log.ts
|
|
10
|
+
var DictionariesLogger = class {
|
|
11
|
+
statuses = [];
|
|
12
|
+
spinnerTimer = null;
|
|
13
|
+
spinnerIndex = 0;
|
|
14
|
+
renderedLines = 0;
|
|
15
|
+
spinnerFrames = _intlayer_config_logger.spinnerFrames;
|
|
16
|
+
isFinished = false;
|
|
17
|
+
prefix;
|
|
18
|
+
lastRenderedState = "";
|
|
19
|
+
remoteCheckInProgress = false;
|
|
20
|
+
expectRemote = false;
|
|
21
|
+
remoteError;
|
|
22
|
+
pluginTotal = 0;
|
|
23
|
+
pluginDone = 0;
|
|
24
|
+
pluginError;
|
|
25
|
+
constructor() {
|
|
26
|
+
this.prefix = (0, _intlayer_config_logger.getPrefix)(_intlayer_config_built.log?.prefix) ?? "";
|
|
27
|
+
}
|
|
28
|
+
setExpectRemote(expect) {
|
|
29
|
+
this.expectRemote = expect;
|
|
30
|
+
}
|
|
31
|
+
startRemoteCheck() {
|
|
32
|
+
if (this.isFinished) return;
|
|
33
|
+
this.remoteCheckInProgress = true;
|
|
34
|
+
this.startSpinner();
|
|
35
|
+
this.render();
|
|
36
|
+
}
|
|
37
|
+
stopRemoteCheck() {
|
|
38
|
+
this.remoteCheckInProgress = false;
|
|
39
|
+
}
|
|
40
|
+
update(newStatuses) {
|
|
41
|
+
if (this.isFinished) return;
|
|
42
|
+
for (const status of newStatuses) {
|
|
43
|
+
const index = this.statuses.findIndex((s) => s.dictionaryKey === status.dictionaryKey && s.type === status.type);
|
|
44
|
+
if (index >= 0) this.statuses[index] = status;
|
|
45
|
+
else this.statuses.push(status);
|
|
46
|
+
}
|
|
47
|
+
const { remoteTotal } = this.computeProgress();
|
|
48
|
+
if (this.expectRemote && !this.remoteCheckInProgress && remoteTotal === 0) return;
|
|
49
|
+
this.startSpinner();
|
|
50
|
+
this.render();
|
|
51
|
+
}
|
|
52
|
+
finish() {
|
|
53
|
+
this.isFinished = true;
|
|
54
|
+
this.stopSpinner();
|
|
55
|
+
this.render();
|
|
56
|
+
}
|
|
57
|
+
startSpinner() {
|
|
58
|
+
if (this.spinnerTimer || this.isFinished) return;
|
|
59
|
+
this.spinnerTimer = setInterval(() => {
|
|
60
|
+
this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
|
|
61
|
+
this.render();
|
|
62
|
+
}, 100);
|
|
63
|
+
}
|
|
64
|
+
stopSpinner() {
|
|
65
|
+
if (!this.spinnerTimer) return;
|
|
66
|
+
clearInterval(this.spinnerTimer);
|
|
67
|
+
this.spinnerTimer = null;
|
|
68
|
+
}
|
|
69
|
+
setRemoteError = (error) => {
|
|
70
|
+
this.remoteError = (0, _intlayer_config_utils.extractErrorMessage)(error);
|
|
71
|
+
this.stopRemoteCheck();
|
|
72
|
+
this.render();
|
|
73
|
+
};
|
|
74
|
+
setPluginTotal(total) {
|
|
75
|
+
if (this.isFinished) return;
|
|
76
|
+
this.pluginTotal = total;
|
|
77
|
+
if (total > 0) this.startSpinner();
|
|
78
|
+
this.render();
|
|
79
|
+
}
|
|
80
|
+
setPluginDone(done) {
|
|
81
|
+
if (this.isFinished) return;
|
|
82
|
+
this.pluginDone = done;
|
|
83
|
+
this.render();
|
|
84
|
+
}
|
|
85
|
+
setPluginError(error) {
|
|
86
|
+
if (this.isFinished) return;
|
|
87
|
+
this.pluginError = (0, _intlayer_config_utils.extractErrorMessage)(error);
|
|
88
|
+
this.render();
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
const { localTotal, localDone, remoteTotal, remoteDone, pluginTotal, pluginDone } = this.computeProgress();
|
|
92
|
+
const frame = this.spinnerFrames[this.spinnerIndex];
|
|
93
|
+
const clock = (0, _intlayer_config_logger.colorize)(frame, _intlayer_config_colors.BLUE);
|
|
94
|
+
const lines = [];
|
|
95
|
+
const isLocalDone = localDone === localTotal;
|
|
96
|
+
const isRemoteDone = remoteDone === remoteTotal;
|
|
97
|
+
const isPluginDone = pluginDone === pluginTotal;
|
|
98
|
+
if (!(this.expectRemote && this.remoteCheckInProgress && remoteTotal === 0)) if (isLocalDone) lines.push(`${this.prefix} ${_intlayer_config_logger.v} Local content: ${(0, _intlayer_config_logger.colorize)(`${localDone}`, _intlayer_config_colors.GREEN)}${(0, _intlayer_config_logger.colorize)(`/${localTotal}`, _intlayer_config_colors.GREY)}`);
|
|
99
|
+
else lines.push(`${this.prefix} ${clock} Local content: ${(0, _intlayer_config_logger.colorize)(`${localDone}`, _intlayer_config_colors.BLUE)}${(0, _intlayer_config_logger.colorize)(`/${localTotal}`, _intlayer_config_colors.GREY)}`);
|
|
100
|
+
if (remoteTotal > 0 || this.remoteCheckInProgress || this.remoteError) if (this.remoteError) lines.push(`${this.prefix} ${_intlayer_config_logger.x} Remote content: ${(0, _intlayer_config_logger.colorize)(this.remoteError, _intlayer_config_colors.RED)}`);
|
|
101
|
+
else if (remoteTotal === 0) lines.push(`${this.prefix} ${clock} Remote content: ${(0, _intlayer_config_logger.colorize)("Check server", _intlayer_config_colors.BLUE)}`);
|
|
102
|
+
else if (isRemoteDone) lines.push(`${this.prefix} ${_intlayer_config_logger.v} Remote content: ${(0, _intlayer_config_logger.colorize)(`${remoteDone}`, _intlayer_config_colors.GREEN)}${(0, _intlayer_config_logger.colorize)(`/${remoteTotal}`, _intlayer_config_colors.GREY)}`);
|
|
103
|
+
else lines.push(`${this.prefix} ${clock} Remote content: ${(0, _intlayer_config_logger.colorize)(`${remoteDone}`, _intlayer_config_colors.BLUE)}${(0, _intlayer_config_logger.colorize)(`/${remoteTotal}`, _intlayer_config_colors.GREY)}`);
|
|
104
|
+
if (pluginTotal > 0 || this.pluginError) if (this.pluginError) lines.push(`${this.prefix} ${_intlayer_config_logger.x} Plugin content: ${(0, _intlayer_config_logger.colorize)(this.pluginError, _intlayer_config_colors.RED)}`);
|
|
105
|
+
else if (isPluginDone) lines.push(`${this.prefix} ${_intlayer_config_logger.v} Plugin content: ${(0, _intlayer_config_logger.colorize)(`${pluginDone}`, _intlayer_config_colors.GREEN)}${(0, _intlayer_config_logger.colorize)(`/${pluginTotal}`, _intlayer_config_colors.GREY)}`);
|
|
106
|
+
else lines.push(`${this.prefix} ${clock} Plugin content: ${(0, _intlayer_config_logger.colorize)(`${pluginDone}`, _intlayer_config_colors.BLUE)}${(0, _intlayer_config_logger.colorize)(`/${pluginTotal}`, _intlayer_config_colors.GREY)}`);
|
|
107
|
+
const currentState = lines.join("\n");
|
|
108
|
+
if (currentState === this.lastRenderedState) return;
|
|
109
|
+
this.lastRenderedState = currentState;
|
|
110
|
+
if (this.renderedLines > 0) process.stdout.write(`\x1b[${this.renderedLines}F`);
|
|
111
|
+
const totalLinesToClear = Math.max(this.renderedLines, lines.length);
|
|
112
|
+
for (let i = 0; i < totalLinesToClear; i++) {
|
|
113
|
+
process.stdout.write("\x1B[2K");
|
|
114
|
+
const line = lines[i];
|
|
115
|
+
if (line !== void 0) process.stdout.write(line);
|
|
116
|
+
process.stdout.write("\n");
|
|
117
|
+
}
|
|
118
|
+
this.renderedLines = lines.length;
|
|
119
|
+
}
|
|
120
|
+
computeProgress() {
|
|
121
|
+
const localKeys = new Set(this.statuses.filter((s) => s.type === "local").map((s) => s.dictionaryKey));
|
|
122
|
+
const localDoneKeys = new Set(this.statuses.filter((s) => s.type === "local" && (s.status === "built" || s.status === "error")).map((s) => s.dictionaryKey));
|
|
123
|
+
const remoteKeys = new Set(this.statuses.filter((s) => s.type === "remote").map((s) => s.dictionaryKey));
|
|
124
|
+
const remoteDoneKeys = new Set(this.statuses.filter((s) => s.type === "remote" && (s.status === "fetched" || s.status === "imported" || s.status === "error")).map((s) => s.dictionaryKey));
|
|
125
|
+
return {
|
|
126
|
+
localTotal: localKeys.size,
|
|
127
|
+
localDone: localDoneKeys.size,
|
|
128
|
+
remoteTotal: remoteKeys.size,
|
|
129
|
+
remoteDone: remoteDoneKeys.size,
|
|
130
|
+
pluginTotal: this.pluginTotal,
|
|
131
|
+
pluginDone: this.pluginDone
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
exports.DictionariesLogger = DictionariesLogger;
|
|
138
|
+
//# sourceMappingURL=log.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.cjs","names":["spinnerFrames","log","ANSIColors","v","x"],"sources":["../../../src/loadDictionaries/log.ts"],"sourcesContent":["import { log } from '@intlayer/config/built';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport {\n colorize,\n getPrefix,\n spinnerFrames,\n v,\n x,\n} from '@intlayer/config/logger';\nimport { extractErrorMessage } from '@intlayer/config/utils';\nimport type { DictionariesStatus } from './loadDictionaries';\n\nexport class DictionariesLogger {\n private statuses: DictionariesStatus[] = [];\n private spinnerTimer: NodeJS.Timeout | null = null;\n private spinnerIndex = 0;\n private renderedLines = 0;\n private readonly spinnerFrames = spinnerFrames;\n private isFinished = false;\n private readonly prefix: string;\n private lastRenderedState: string = '';\n private remoteCheckInProgress = false;\n private expectRemote = false;\n private remoteError: string | undefined;\n private pluginTotal = 0;\n private pluginDone = 0;\n private pluginError: string | undefined;\n\n constructor() {\n this.prefix = getPrefix(log?.prefix) ?? '';\n }\n\n setExpectRemote(expect: boolean) {\n this.expectRemote = expect;\n }\n\n startRemoteCheck() {\n if (this.isFinished) return;\n this.remoteCheckInProgress = true;\n this.startSpinner();\n this.render();\n }\n\n stopRemoteCheck() {\n this.remoteCheckInProgress = false;\n }\n\n update(newStatuses: DictionariesStatus[]) {\n if (this.isFinished) return;\n for (const status of newStatuses) {\n const index = this.statuses.findIndex(\n (s) =>\n s.dictionaryKey === status.dictionaryKey && s.type === status.type\n );\n if (index >= 0) {\n this.statuses[index] = status;\n } else {\n this.statuses.push(status);\n }\n }\n\n // If we expect remote fetch later, avoid rendering a local-only line first\n const { remoteTotal } = this.computeProgress();\n if (this.expectRemote && !this.remoteCheckInProgress && remoteTotal === 0) {\n // Do not start spinner or render yet; wait until remote check starts\n return;\n }\n\n this.startSpinner();\n this.render();\n }\n\n finish() {\n this.isFinished = true;\n this.stopSpinner();\n // Render final state and keep it visible\n this.render();\n }\n\n private startSpinner() {\n if (this.spinnerTimer || this.isFinished) return;\n this.spinnerTimer = setInterval(() => {\n this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;\n this.render();\n }, 100);\n }\n\n private stopSpinner() {\n if (!this.spinnerTimer) return;\n clearInterval(this.spinnerTimer);\n this.spinnerTimer = null;\n }\n\n public setRemoteError = (error?: Error) => {\n this.remoteError = extractErrorMessage(error);\n // Avoid rendering a transient remote-only line while the remote check flag is still true\n // Ensure local + remote are rendered together after a failure\n this.stopRemoteCheck();\n this.render();\n };\n\n setPluginTotal(total: number) {\n if (this.isFinished) return;\n this.pluginTotal = total;\n if (total > 0) {\n this.startSpinner();\n }\n this.render();\n }\n\n setPluginDone(done: number) {\n if (this.isFinished) return;\n this.pluginDone = done;\n this.render();\n }\n\n setPluginError(error?: Error) {\n if (this.isFinished) return;\n this.pluginError = extractErrorMessage(error);\n this.render();\n }\n\n private render() {\n const {\n localTotal,\n localDone,\n remoteTotal,\n remoteDone,\n pluginTotal,\n pluginDone,\n } = this.computeProgress();\n\n const frame = this.spinnerFrames[this.spinnerIndex];\n const clock = colorize(frame, ANSIColors.BLUE);\n const lines: string[] = [];\n\n const isLocalDone = localDone === localTotal;\n const isRemoteDone = remoteDone === remoteTotal;\n const isPluginDone = pluginDone === pluginTotal;\n\n const suppressLocalWhileCheckingRemote =\n this.expectRemote && this.remoteCheckInProgress && remoteTotal === 0;\n\n if (!suppressLocalWhileCheckingRemote) {\n if (isLocalDone) {\n lines.push(\n `${this.prefix} ${v} Local content: ${colorize(`${localDone}`, ANSIColors.GREEN)}${colorize(`/${localTotal}`, ANSIColors.GREY)}`\n );\n } else {\n lines.push(\n `${this.prefix} ${clock} Local content: ${colorize(`${localDone}`, ANSIColors.BLUE)}${colorize(`/${localTotal}`, ANSIColors.GREY)}`\n );\n }\n }\n\n // Single remote line: show error, check, or progress counts\n if (remoteTotal > 0 || this.remoteCheckInProgress || this.remoteError) {\n if (this.remoteError) {\n lines.push(\n `${this.prefix} ${x} Remote content: ${colorize(\n this.remoteError,\n ANSIColors.RED\n )}`\n );\n } else if (remoteTotal === 0) {\n lines.push(\n `${this.prefix} ${clock} Remote content: ${colorize('Check server', ANSIColors.BLUE)}`\n );\n } else if (isRemoteDone) {\n lines.push(\n `${this.prefix} ${v} Remote content: ${colorize(`${remoteDone}`, ANSIColors.GREEN)}${colorize(`/${remoteTotal}`, ANSIColors.GREY)}`\n );\n } else {\n lines.push(\n `${this.prefix} ${clock} Remote content: ${colorize(`${remoteDone}`, ANSIColors.BLUE)}${colorize(`/${remoteTotal}`, ANSIColors.GREY)}`\n );\n }\n }\n\n // Plugin line: show error or progress counts\n if (pluginTotal > 0 || this.pluginError) {\n if (this.pluginError) {\n lines.push(\n `${this.prefix} ${x} Plugin content: ${colorize(\n this.pluginError,\n ANSIColors.RED\n )}`\n );\n } else if (isPluginDone) {\n lines.push(\n `${this.prefix} ${v} Plugin content: ${colorize(`${pluginDone}`, ANSIColors.GREEN)}${colorize(`/${pluginTotal}`, ANSIColors.GREY)}`\n );\n } else {\n lines.push(\n `${this.prefix} ${clock} Plugin content: ${colorize(`${pluginDone}`, ANSIColors.BLUE)}${colorize(`/${pluginTotal}`, ANSIColors.GREY)}`\n );\n }\n }\n\n // Check if the state has changed to avoid duplicate rendering\n const currentState = lines.join('\\n');\n if (currentState === this.lastRenderedState) {\n return;\n }\n this.lastRenderedState = currentState;\n\n if (this.renderedLines > 0) {\n process.stdout.write(`\\x1b[${this.renderedLines}F`);\n }\n\n const totalLinesToClear = Math.max(this.renderedLines, lines.length);\n for (let i = 0; i < totalLinesToClear; i++) {\n process.stdout.write('\\x1b[2K');\n const line = lines[i];\n if (line !== undefined) {\n process.stdout.write(line);\n }\n process.stdout.write('\\n');\n }\n\n this.renderedLines = lines.length;\n }\n\n private computeProgress() {\n const localKeys = new Set(\n this.statuses\n .filter((s) => s.type === 'local')\n .map((s) => s.dictionaryKey)\n );\n\n const localDoneKeys = new Set(\n this.statuses\n .filter(\n (s) =>\n s.type === 'local' && (s.status === 'built' || s.status === 'error')\n )\n .map((s) => s.dictionaryKey)\n );\n\n const remoteKeys = new Set(\n this.statuses\n .filter((s) => s.type === 'remote')\n .map((s) => s.dictionaryKey)\n );\n\n const remoteDoneKeys = new Set(\n this.statuses\n .filter(\n (s) =>\n s.type === 'remote' &&\n (s.status === 'fetched' ||\n s.status === 'imported' ||\n s.status === 'error')\n )\n .map((s) => s.dictionaryKey)\n );\n\n return {\n localTotal: localKeys.size,\n localDone: localDoneKeys.size,\n remoteTotal: remoteKeys.size,\n remoteDone: remoteDoneKeys.size,\n pluginTotal: this.pluginTotal,\n pluginDone: this.pluginDone,\n } as const;\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
|
+
|
|
6
|
+
//#region src/loadDictionaries/logTypeScriptErrors.ts
|
|
7
|
+
const logTypeScriptErrors = async (filePaths, configuration) => {
|
|
8
|
+
const appLogger = (0, _intlayer_config_logger.getAppLogger)(configuration);
|
|
9
|
+
const filesToCheck = filePaths.filter((path) => {
|
|
10
|
+
const ext = (0, node_path.extname)(path);
|
|
11
|
+
return [
|
|
12
|
+
".ts",
|
|
13
|
+
".tsx",
|
|
14
|
+
".js",
|
|
15
|
+
".jsx",
|
|
16
|
+
".cjs",
|
|
17
|
+
".mjs",
|
|
18
|
+
".json"
|
|
19
|
+
].includes(ext);
|
|
20
|
+
});
|
|
21
|
+
if (filesToCheck.length === 0) return;
|
|
22
|
+
let ts;
|
|
23
|
+
try {
|
|
24
|
+
ts = (await import("typescript")).default || await import("typescript");
|
|
25
|
+
} catch {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const configFileName = ts.findConfigFile(configuration.system?.baseDir ?? process.cwd(), ts.sys.fileExists, "tsconfig.json");
|
|
29
|
+
let compilerOptions = {
|
|
30
|
+
noEmit: true,
|
|
31
|
+
allowJs: true,
|
|
32
|
+
resolveJsonModule: true
|
|
33
|
+
};
|
|
34
|
+
if (configFileName) {
|
|
35
|
+
const configFileText = ts.sys.readFile(configFileName);
|
|
36
|
+
if (configFileText) {
|
|
37
|
+
const configJson = ts.parseConfigFileTextToJson(configFileName, configFileText);
|
|
38
|
+
if (!configJson.error) {
|
|
39
|
+
const { incremental, tsBuildInfoFile, ...restOptions } = ts.parseJsonConfigFileContent(configJson.config, ts.sys, (0, node_path.dirname)(configFileName)).options;
|
|
40
|
+
compilerOptions = {
|
|
41
|
+
...compilerOptions,
|
|
42
|
+
...restOptions,
|
|
43
|
+
noEmit: true
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const program = ts.createProgram(filesToCheck, compilerOptions);
|
|
49
|
+
filesToCheck.forEach((filePath) => {
|
|
50
|
+
const sourceFile = program.getSourceFile(filePath);
|
|
51
|
+
if (!sourceFile) return;
|
|
52
|
+
ts.getPreEmitDiagnostics(program, sourceFile).forEach((diagnostic) => {
|
|
53
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
54
|
+
if (diagnostic.file && diagnostic.start !== void 0) {
|
|
55
|
+
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
56
|
+
appLogger(`TS Error in ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`, { level: "warn" });
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
exports.logTypeScriptErrors = logTypeScriptErrors;
|
|
64
|
+
//# sourceMappingURL=logTypeScriptErrors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logTypeScriptErrors.cjs","names":[],"sources":["../../../src/loadDictionaries/logTypeScriptErrors.ts"],"sourcesContent":["import { dirname, extname } from 'node:path';\nimport { getAppLogger } from '@intlayer/config/logger';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n\nexport const logTypeScriptErrors = async (\n filePaths: string[],\n configuration: IntlayerConfig\n) => {\n const appLogger = getAppLogger(configuration);\n\n const filesToCheck = filePaths.filter((path) => {\n const ext = extname(path);\n\n return ['.ts', '.tsx', '.js', '.jsx', '.cjs', '.mjs', '.json'].includes(\n ext\n );\n });\n\n if (filesToCheck.length === 0) return;\n\n let ts: typeof import('typescript');\n\n try {\n ts = (await import('typescript')).default || (await import('typescript'));\n } catch {\n // TypeScript not installed, skip type checking\n\n return;\n }\n\n const configFileName = ts.findConfigFile(\n configuration.system?.baseDir ?? process.cwd(),\n ts.sys.fileExists,\n 'tsconfig.json'\n );\n\n let compilerOptions: any = {\n noEmit: true,\n\n allowJs: true,\n\n resolveJsonModule: true,\n };\n\n if (configFileName) {\n const configFileText = ts.sys.readFile(configFileName);\n\n if (configFileText) {\n const configJson = ts.parseConfigFileTextToJson(\n configFileName,\n\n configFileText\n );\n\n if (!configJson.error) {\n const parsedConfig = ts.parseJsonConfigFileContent(\n configJson.config,\n\n ts.sys,\n\n dirname(configFileName)\n );\n\n const { incremental, tsBuildInfoFile, ...restOptions } =\n parsedConfig.options;\n\n compilerOptions = { ...compilerOptions, ...restOptions, noEmit: true };\n }\n }\n }\n\n const program = ts.createProgram(filesToCheck, compilerOptions);\n\n filesToCheck.forEach((filePath) => {\n const sourceFile = program.getSourceFile(filePath);\n\n if (!sourceFile) return;\n\n const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile);\n\n diagnostics.forEach((diagnostic) => {\n const message = ts.flattenDiagnosticMessageText(\n diagnostic.messageText,\n\n '\\n'\n );\n\n if (diagnostic.file && diagnostic.start !== undefined) {\n const { line, character } =\n diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n\n appLogger(\n `TS Error in ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`,\n\n { level: 'warn' }\n );\n }\n });\n });\n};\n"],"mappings":";;;;;;AAIA,MAAa,sBAAsB,OACjC,WACA,kBACG;CACH,MAAM,sDAAyB,cAAc;CAE7C,MAAM,eAAe,UAAU,QAAQ,SAAS;EAC9C,MAAM,6BAAc,KAAK;AAEzB,SAAO;GAAC;GAAO;GAAQ;GAAO;GAAQ;GAAQ;GAAQ;GAAQ,CAAC,SAC7D,IACD;GACD;AAEF,KAAI,aAAa,WAAW,EAAG;CAE/B,IAAI;AAEJ,KAAI;AACF,QAAM,MAAM,OAAO,eAAe,WAAY,MAAM,OAAO;SACrD;AAGN;;CAGF,MAAM,iBAAiB,GAAG,eACxB,cAAc,QAAQ,WAAW,QAAQ,KAAK,EAC9C,GAAG,IAAI,YACP,gBACD;CAED,IAAI,kBAAuB;EACzB,QAAQ;EAER,SAAS;EAET,mBAAmB;EACpB;AAED,KAAI,gBAAgB;EAClB,MAAM,iBAAiB,GAAG,IAAI,SAAS,eAAe;AAEtD,MAAI,gBAAgB;GAClB,MAAM,aAAa,GAAG,0BACpB,gBAEA,eACD;AAED,OAAI,CAAC,WAAW,OAAO;IASrB,MAAM,EAAE,aAAa,iBAAiB,GAAG,gBARpB,GAAG,2BACtB,WAAW,QAEX,GAAG,4BAEK,eAAe,CAIX,CAAC;AAEf,sBAAkB;KAAE,GAAG;KAAiB,GAAG;KAAa,QAAQ;KAAM;;;;CAK5E,MAAM,UAAU,GAAG,cAAc,cAAc,gBAAgB;AAE/D,cAAa,SAAS,aAAa;EACjC,MAAM,aAAa,QAAQ,cAAc,SAAS;AAElD,MAAI,CAAC,WAAY;AAIjB,EAFoB,GAAG,sBAAsB,SAAS,WAE3C,CAAC,SAAS,eAAe;GAClC,MAAM,UAAU,GAAG,6BACjB,WAAW,aAEX,KACD;AAED,OAAI,WAAW,QAAQ,WAAW,UAAU,QAAW;IACrD,MAAM,EAAE,MAAM,cACZ,WAAW,KAAK,8BAA8B,WAAW,MAAM;AAEjE,cACE,eAAe,WAAW,KAAK,SAAS,IAAI,OAAO,EAAE,GAAG,YAAY,EAAE,KAAK,WAE3E,EAAE,OAAO,QAAQ,CAClB;;IAEH;GACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_utils_formatter = require('./utils/formatter.cjs');
|
|
4
|
+
const require_utils_runOnce = require('./utils/runOnce.cjs');
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
7
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
8
|
+
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
9
|
+
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
10
|
+
let _intlayer_config_env = require("@intlayer/config/env");
|
|
11
|
+
|
|
12
|
+
//#region src/logConfigDetails.ts
|
|
13
|
+
const logConfigDetails = (options) => {
|
|
14
|
+
const { configuration, customConfiguration, numCustomConfiguration, configurationFilePath } = (0, _intlayer_config_node.getConfigurationAndFilePath)(options);
|
|
15
|
+
const appLogger = (0, _intlayer_config_logger.getAppLogger)(configuration);
|
|
16
|
+
require_utils_runOnce.runOnce((0, node_path.join)(configuration.system.baseDir, ".intlayer", "cache", "intlayer-config-locaded.lock"), () => {
|
|
17
|
+
if (numCustomConfiguration === 0) appLogger("Configuration file not found, using default configuration.", { isVerbose: true });
|
|
18
|
+
else {
|
|
19
|
+
const baseDir = configuration.system.baseDir;
|
|
20
|
+
const relativeOutputPath = (0, node_path.relative)(baseDir, configurationFilePath);
|
|
21
|
+
if (numCustomConfiguration === 1) {
|
|
22
|
+
const dotEnvFilePath = (0, _intlayer_config_env.getEnvFilePath)(options?.env, options?.envFile);
|
|
23
|
+
appLogger(`Configuration loaded ${require_utils_formatter.formatPath(relativeOutputPath)}${dotEnvFilePath ? ` - Env: ${require_utils_formatter.formatPath(dotEnvFilePath)}` : ""}`, { isVerbose: true });
|
|
24
|
+
} else appLogger(`Multiple configuration files found, using ${require_utils_formatter.formatPath(relativeOutputPath)}.`, { isVerbose: true });
|
|
25
|
+
}
|
|
26
|
+
if (customConfiguration) {
|
|
27
|
+
const validation = _intlayer_config_node.intlayerConfigSchema.safeParse(customConfiguration);
|
|
28
|
+
if (!validation.success) appLogger(`${_intlayer_config_logger.x} Invalid configuration:\n${validation.error.issues.map((error) => {
|
|
29
|
+
return `${(0, _intlayer_config_logger.colorizePath)(` - ${error.path.join(".")}:`)} ${(0, _intlayer_config_logger.colorize)(error.message, _intlayer_config_colors.GREY_DARK)}`;
|
|
30
|
+
}).join("\n")}`);
|
|
31
|
+
if (customConfiguration.build?.importMode) appLogger(`${(0, _intlayer_config_logger.colorize)("build.importMode", _intlayer_config_colors.BLUE)} is deprecated, use ${(0, _intlayer_config_logger.colorize)("dictionary.importMode", _intlayer_config_colors.BLUE)} instead`);
|
|
32
|
+
if (customConfiguration.compiler?.transformPattern) appLogger(`${(0, _intlayer_config_logger.colorize)("compiler.transformPattern", _intlayer_config_colors.BLUE)} is deprecated, use ${(0, _intlayer_config_logger.colorize)("build.traversePattern", _intlayer_config_colors.BLUE)} instead`);
|
|
33
|
+
if (customConfiguration.compiler?.excludePattern) appLogger(`${(0, _intlayer_config_logger.colorize)("compiler.excludePattern", _intlayer_config_colors.BLUE)} is deprecated, use ${(0, _intlayer_config_logger.colorize)("build.traversePattern", _intlayer_config_colors.BLUE)} instead`);
|
|
34
|
+
}
|
|
35
|
+
}, { cacheTimeoutMs: 1e3 * 60 });
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.logConfigDetails = logConfigDetails;
|
|
40
|
+
//# sourceMappingURL=logConfigDetails.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logConfigDetails.cjs","names":["formatPath","intlayerConfigSchema","x","ANSIColors"],"sources":["../../src/logConfigDetails.ts"],"sourcesContent":["import { join, relative } from 'node:path';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { getEnvFilePath } from '@intlayer/config/env';\nimport {\n colorize,\n colorizePath,\n getAppLogger,\n x,\n} from '@intlayer/config/logger';\nimport {\n type GetConfigurationOptions,\n getConfigurationAndFilePath,\n intlayerConfigSchema,\n} from '@intlayer/config/node';\nimport { formatPath, runOnce } from './utils';\n\nexport const logConfigDetails = (options?: GetConfigurationOptions) => {\n const {\n configuration,\n customConfiguration,\n numCustomConfiguration,\n configurationFilePath,\n } = getConfigurationAndFilePath(options);\n const appLogger = getAppLogger(configuration);\n\n runOnce(\n join(\n configuration.system.baseDir,\n '.intlayer',\n 'cache',\n 'intlayer-config-locaded.lock'\n ),\n () => {\n if (numCustomConfiguration === 0) {\n appLogger(\n 'Configuration file not found, using default configuration.',\n {\n isVerbose: true,\n }\n );\n } else {\n const baseDir = configuration.system.baseDir;\n const relativeOutputPath = relative(baseDir, configurationFilePath!);\n\n if (numCustomConfiguration === 1) {\n const dotEnvFilePath = getEnvFilePath(options?.env, options?.envFile);\n\n appLogger(\n `Configuration loaded ${formatPath(relativeOutputPath)}${dotEnvFilePath ? ` - Env: ${formatPath(dotEnvFilePath)}` : ''}`,\n {\n isVerbose: true,\n }\n );\n } else {\n appLogger(\n `Multiple configuration files found, using ${formatPath(relativeOutputPath)}.`,\n {\n isVerbose: true,\n }\n );\n }\n }\n\n if (customConfiguration) {\n const validation = intlayerConfigSchema.safeParse(customConfiguration);\n\n if (!validation.success) {\n const errorMessages = validation.error.issues\n .map((error) => {\n const path = colorizePath(` - ${error.path.join('.')}:`);\n const message = colorize(error.message, ANSIColors.GREY_DARK);\n return `${path} ${message}`;\n })\n .join('\\n');\n const errorMessage = `${x} Invalid configuration:\\n${errorMessages}`;\n\n appLogger(errorMessage);\n }\n\n if (customConfiguration.build?.importMode) {\n appLogger(\n `${colorize('build.importMode', ANSIColors.BLUE)} is deprecated, use ${colorize('dictionary.importMode', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.transformPattern) {\n appLogger(\n `${colorize('compiler.transformPattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n if (customConfiguration.compiler?.excludePattern) {\n appLogger(\n `${colorize('compiler.excludePattern', ANSIColors.BLUE)} is deprecated, use ${colorize('build.traversePattern', ANSIColors.BLUE)} instead`\n );\n }\n }\n },\n {\n cacheTimeoutMs: 1000 * 60, // 1 minute\n }\n );\n};\n"],"mappings":";;;;;;;;;;;;AAgBA,MAAa,oBAAoB,YAAsC;CACrE,MAAM,EACJ,eACA,qBACA,wBACA,iFAC8B,QAAQ;CACxC,MAAM,sDAAyB,cAAc;AAE7C,mDAEI,cAAc,OAAO,SACrB,aACA,SACA,+BACD,QACK;AACJ,MAAI,2BAA2B,EAC7B,WACE,8DACA,EACE,WAAW,MACZ,CACF;OACI;GACL,MAAM,UAAU,cAAc,OAAO;GACrC,MAAM,6CAA8B,SAAS,sBAAuB;AAEpE,OAAI,2BAA2B,GAAG;IAChC,MAAM,0DAAgC,SAAS,KAAK,SAAS,QAAQ;AAErE,cACE,wBAAwBA,mCAAW,mBAAmB,GAAG,iBAAiB,WAAWA,mCAAW,eAAe,KAAK,MACpH,EACE,WAAW,MACZ,CACF;SAED,WACE,6CAA6CA,mCAAW,mBAAmB,CAAC,IAC5E,EACE,WAAW,MACZ,CACF;;AAIL,MAAI,qBAAqB;GACvB,MAAM,aAAaC,2CAAqB,UAAU,oBAAoB;AAEtE,OAAI,CAAC,WAAW,QAUd,WAAU,GAFcC,0BAAE,2BAPJ,WAAW,MAAM,OACpC,KAAK,UAAU;AAGd,WAAO,6CAFmB,MAAM,MAAM,KAAK,KAAK,IAAI,CAAC,GAEvC,CAAC,yCADU,MAAM,SAASC,wBAAW,UAC1B;KACzB,CACD,KAAK,KAC0D,GAE3C;AAGzB,OAAI,oBAAoB,OAAO,WAC7B,WACE,yCAAY,oBAAoBA,wBAAW,KAAK,CAAC,4DAA+B,yBAAyBA,wBAAW,KAAK,CAAC,UAC3H;AAEH,OAAI,oBAAoB,UAAU,iBAChC,WACE,yCAAY,6BAA6BA,wBAAW,KAAK,CAAC,4DAA+B,yBAAyBA,wBAAW,KAAK,CAAC,UACpI;AAEH,OAAI,oBAAoB,UAAU,eAChC,WACE,yCAAY,2BAA2BA,wBAAW,KAAK,CAAC,4DAA+B,yBAAyBA,wBAAW,KAAK,CAAC,UAClI;;IAIP,EACE,gBAAgB,MAAO,IACxB,CACF"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
|
|
4
|
+
const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
|
|
5
|
+
const require_utils_runOnce = require('./utils/runOnce.cjs');
|
|
6
|
+
const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
|
|
7
|
+
const require_createType_createType = require('./createType/createType.cjs');
|
|
8
|
+
const require_listDictionariesPath = require('./listDictionariesPath.cjs');
|
|
9
|
+
const require_loadDictionaries_loadDictionaries = require('./loadDictionaries/loadDictionaries.cjs');
|
|
10
|
+
const require_buildIntlayerDictionary_writeRemoteDictionary = require('./buildIntlayerDictionary/writeRemoteDictionary.cjs');
|
|
11
|
+
const require_cleanOutputDir = require('./cleanOutputDir.cjs');
|
|
12
|
+
const require_writeConfiguration_index = require('./writeConfiguration/index.cjs');
|
|
13
|
+
let node_fs_promises = require("node:fs/promises");
|
|
14
|
+
let node_path = require("node:path");
|
|
15
|
+
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
16
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
17
|
+
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
18
|
+
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
19
|
+
let _intlayer_config_package_json = require("@intlayer/config/package.json");
|
|
20
|
+
_intlayer_config_package_json = require_runtime.__toESM(_intlayer_config_package_json);
|
|
21
|
+
|
|
22
|
+
//#region src/prepareIntlayer.ts
|
|
23
|
+
const DEFAULT_PREPARE_INTLAYER_OPTIONS = {
|
|
24
|
+
clean: false,
|
|
25
|
+
env: "dev",
|
|
26
|
+
format: ["cjs", "esm"],
|
|
27
|
+
cacheTimeoutMs: 1e3 * 60 * 60
|
|
28
|
+
};
|
|
29
|
+
const prepareIntlayer = async (configuration, options) => {
|
|
30
|
+
const appLogger = (0, _intlayer_config_logger.getAppLogger)(configuration);
|
|
31
|
+
const sentinelPath = (0, node_path.join)(configuration.system.cacheDir, "intlayer-prepared.lock");
|
|
32
|
+
const versionCache = (0, _intlayer_config_utils.cacheDisk)(configuration, ["intlayer-version"]);
|
|
33
|
+
const intlayerCacheVersion = await versionCache.get();
|
|
34
|
+
const isCorrectVersion = Boolean(intlayerCacheVersion && intlayerCacheVersion === _intlayer_config_package_json.default.version);
|
|
35
|
+
const isConfigSimilar = await require_writeConfiguration_index.isCachedConfigurationUpToDate(configuration);
|
|
36
|
+
const dictionariesWithStats = await require_listDictionariesPath.listDictionariesWithStats(configuration);
|
|
37
|
+
let isDictionaryChanged = false;
|
|
38
|
+
try {
|
|
39
|
+
const sentinelStats = await (0, node_fs_promises.stat)(sentinelPath);
|
|
40
|
+
isDictionaryChanged = dictionariesWithStats.some((dictionary) => dictionary.stats.mtime.getTime() > sentinelStats.mtime.getTime());
|
|
41
|
+
} catch {}
|
|
42
|
+
const hasPluginLoadDictionaries = (await Promise.all(configuration.plugins ?? [])).some((plugin) => Boolean(plugin.loadDictionaries));
|
|
43
|
+
const { clean, format, forceRun, onIsCached, cacheTimeoutMs, env } = {
|
|
44
|
+
...DEFAULT_PREPARE_INTLAYER_OPTIONS,
|
|
45
|
+
forceRun: !isCorrectVersion || !isConfigSimilar || isDictionaryChanged || hasPluginLoadDictionaries,
|
|
46
|
+
...options ?? {}
|
|
47
|
+
};
|
|
48
|
+
await require_utils_runOnce.runOnce(sentinelPath, async () => {
|
|
49
|
+
if (clean || !isCorrectVersion) await require_cleanOutputDir.cleanOutputDir(configuration);
|
|
50
|
+
await versionCache.set(_intlayer_config_package_json.default.version);
|
|
51
|
+
const preparationStartMs = Date.now();
|
|
52
|
+
appLogger(["Preparing Intlayer", (0, _intlayer_config_logger.colorize)(`(v${_intlayer_config_package_json.default.version})`, _intlayer_config_colors.GREY_DARK)]);
|
|
53
|
+
await require_writeConfiguration_index.writeConfiguration(configuration);
|
|
54
|
+
const configurationWrittenTime = Date.now();
|
|
55
|
+
appLogger(["Configuration written", (0, _intlayer_config_logger.colorize)(`(${configurationWrittenTime - preparationStartMs}ms)`, _intlayer_config_colors.GREY_DARK)], { isVerbose: true });
|
|
56
|
+
const dictionaries = await require_loadDictionaries_loadDictionaries.loadDictionaries(dictionariesWithStats.map((dictionary) => dictionary.path), configuration);
|
|
57
|
+
const dictionariesLoadedTime = Date.now();
|
|
58
|
+
appLogger(["Content loaded", (0, _intlayer_config_logger.colorize)([dictionaries.remoteDictionaries.length + dictionaries.pluginDictionaries.length > 0 ? [
|
|
59
|
+
`(Total: ${dictionariesLoadedTime - configurationWrittenTime}ms`,
|
|
60
|
+
dictionaries.localDictionaries.length > 0 ? ` - Local: ${dictionaries.time.localDictionaries}ms` : "",
|
|
61
|
+
dictionaries.remoteDictionaries.length > 0 ? ` - Remote: ${dictionaries.time.remoteDictionaries}ms` : "",
|
|
62
|
+
dictionaries.pluginDictionaries.length > 0 ? ` - Plugin: ${dictionaries.time.pluginDictionaries}ms` : "",
|
|
63
|
+
`)`
|
|
64
|
+
].join("") : `(${dictionariesLoadedTime - configurationWrittenTime}ms)`].join(""), _intlayer_config_colors.GREY_DARK)], { isVerbose: true });
|
|
65
|
+
const dictionariesOutput = await require_buildIntlayerDictionary_buildIntlayerDictionary.buildDictionary([
|
|
66
|
+
...dictionaries.localDictionaries,
|
|
67
|
+
...dictionaries.remoteDictionaries,
|
|
68
|
+
...dictionaries.pluginDictionaries
|
|
69
|
+
], configuration, {
|
|
70
|
+
formats: format,
|
|
71
|
+
importOtherDictionaries: false,
|
|
72
|
+
env
|
|
73
|
+
});
|
|
74
|
+
await require_buildIntlayerDictionary_writeRemoteDictionary.writeRemoteDictionary(dictionaries.remoteDictionaries, configuration);
|
|
75
|
+
await require_createType_createType.createTypes(Object.values(dictionariesOutput?.mergedDictionaries ?? {}).map((dictionary) => dictionary.dictionary), configuration);
|
|
76
|
+
await require_createDictionaryEntryPoint_createDictionaryEntryPoint.createDictionaryEntryPoint(configuration, { formats: options?.format });
|
|
77
|
+
const dictionariesBuiltTime = Date.now();
|
|
78
|
+
appLogger(["Dictionaries built", (0, _intlayer_config_logger.colorize)(`(${dictionariesBuiltTime - preparationStartMs}ms)`, _intlayer_config_colors.GREY_DARK)]);
|
|
79
|
+
await require_createType_createModuleAugmentation.createModuleAugmentation(configuration);
|
|
80
|
+
appLogger(["Module augmentation built", (0, _intlayer_config_logger.colorize)(`(${Date.now() - dictionariesBuiltTime}ms)`, _intlayer_config_colors.GREY_DARK)], { isVerbose: true });
|
|
81
|
+
for await (const plugin of configuration.plugins ?? []) {
|
|
82
|
+
const { unmergedDictionaries, mergedDictionaries } = dictionariesOutput;
|
|
83
|
+
await plugin.afterBuild?.({
|
|
84
|
+
dictionaries: {
|
|
85
|
+
unmergedDictionaries,
|
|
86
|
+
mergedDictionaries
|
|
87
|
+
},
|
|
88
|
+
configuration
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
appLogger([`Done`, (0, _intlayer_config_logger.colorize)(`${Date.now() - preparationStartMs}ms`, _intlayer_config_colors.GREEN)], {
|
|
92
|
+
level: "info",
|
|
93
|
+
isVerbose: true
|
|
94
|
+
});
|
|
95
|
+
}, {
|
|
96
|
+
forceRun,
|
|
97
|
+
onIsCached,
|
|
98
|
+
cacheTimeoutMs
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
exports.prepareIntlayer = prepareIntlayer;
|
|
104
|
+
//# sourceMappingURL=prepareIntlayer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareIntlayer.cjs","names":["packageJson","isCachedConfigurationUpToDate","listDictionariesWithStats","runOnce","cleanOutputDir","ANSIColors","writeConfiguration","loadDictionaries","buildDictionary","writeRemoteDictionary","createTypes","createDictionaryEntryPoint","createModuleAugmentation"],"sources":["../../src/prepareIntlayer.ts"],"sourcesContent":["import { stat } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport packageJson from '@intlayer/config/package.json' with { type: 'json' };\nimport { cacheDisk } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { buildDictionary } from './buildIntlayerDictionary/buildIntlayerDictionary';\nimport { writeRemoteDictionary } from './buildIntlayerDictionary/writeRemoteDictionary';\nimport { cleanOutputDir } from './cleanOutputDir';\nimport { createDictionaryEntryPoint } from './createDictionaryEntryPoint/createDictionaryEntryPoint';\nimport { createModuleAugmentation, createTypes } from './createType/index';\nimport { listDictionariesWithStats } from './listDictionariesPath';\nimport { loadDictionaries } from './loadDictionaries/loadDictionaries';\nimport { runOnce } from './utils/runOnce';\nimport {\n isCachedConfigurationUpToDate,\n writeConfiguration,\n} from './writeConfiguration';\n\ntype PrepareIntlayerOptions = {\n clean?: boolean;\n env?: 'prod' | 'dev';\n format?: ('cjs' | 'esm')[];\n forceRun?: boolean;\n cacheTimeoutMs?: number;\n onIsCached?: () => void | Promise<void>;\n};\n\nconst DEFAULT_PREPARE_INTLAYER_OPTIONS = {\n clean: false,\n env: 'dev',\n format: ['cjs', 'esm'],\n cacheTimeoutMs: 1000 * 60 * 60, // 1 hour\n} satisfies PrepareIntlayerOptions;\n\nexport const prepareIntlayer = async (\n configuration: IntlayerConfig,\n options?: PrepareIntlayerOptions\n) => {\n const appLogger = getAppLogger(configuration);\n\n const sentinelPath = join(\n configuration.system.cacheDir,\n 'intlayer-prepared.lock'\n );\n // Clean output dir if the intlayer version has changed\n const versionCache = cacheDisk(configuration, ['intlayer-version']);\n const intlayerCacheVersion = await versionCache.get();\n const isCorrectVersion = Boolean(\n intlayerCacheVersion && intlayerCacheVersion === packageJson.version\n );\n\n const isConfigSimilar = await isCachedConfigurationUpToDate(configuration);\n\n // Check if any dictionary has been changed to force a new rebuild\n const dictionariesWithStats = await listDictionariesWithStats(configuration);\n let isDictionaryChanged = false;\n try {\n // Try catch as sentinel file may not exist yet\n const sentinelStats = await stat(sentinelPath);\n isDictionaryChanged = dictionariesWithStats.some(\n (dictionary) =>\n dictionary.stats.mtime.getTime() > sentinelStats.mtime.getTime()\n );\n } catch {}\n\n const resolvedPlugins = await Promise.all(configuration.plugins ?? []);\n const hasPluginLoadDictionaries = resolvedPlugins.some((plugin) =>\n Boolean(plugin.loadDictionaries)\n ); // Disable cache if any plugin because it can have custom behavior\n\n const { clean, format, forceRun, onIsCached, cacheTimeoutMs, env } = {\n ...DEFAULT_PREPARE_INTLAYER_OPTIONS,\n forceRun:\n !isCorrectVersion ||\n !isConfigSimilar ||\n isDictionaryChanged ||\n hasPluginLoadDictionaries,\n ...(options ?? {}),\n };\n\n // Skip preparation if it has already been done recently\n await runOnce(\n sentinelPath,\n async () => {\n // comment because of issue with next and webpack\n // await checkVersionsConsistency(configuration);\n\n if (clean || !isCorrectVersion) {\n await cleanOutputDir(configuration);\n }\n\n await versionCache.set(packageJson.version);\n\n const preparationStartMs = Date.now();\n\n appLogger([\n 'Preparing Intlayer',\n colorize(`(v${packageJson.version})`, ANSIColors.GREY_DARK),\n ]);\n\n await writeConfiguration(configuration);\n\n const configurationWrittenTime = Date.now();\n\n appLogger(\n [\n 'Configuration written',\n colorize(\n `(${configurationWrittenTime - preparationStartMs}ms)`,\n ANSIColors.GREY_DARK\n ),\n ],\n {\n isVerbose: true,\n }\n );\n\n const contentDeclarationPaths = dictionariesWithStats.map(\n (dictionary) => dictionary.path\n );\n\n const dictionaries = await loadDictionaries(\n contentDeclarationPaths,\n configuration\n );\n\n const dictionariesLoadedTime = Date.now();\n\n appLogger(\n [\n 'Content loaded',\n colorize(\n [\n dictionaries.remoteDictionaries.length +\n dictionaries.pluginDictionaries.length >\n 0\n ? [\n `(Total: ${dictionariesLoadedTime - configurationWrittenTime}ms`,\n dictionaries.localDictionaries.length > 0\n ? ` - Local: ${dictionaries.time.localDictionaries}ms`\n : '',\n dictionaries.remoteDictionaries.length > 0\n ? ` - Remote: ${dictionaries.time.remoteDictionaries}ms`\n : '',\n dictionaries.pluginDictionaries.length > 0\n ? ` - Plugin: ${dictionaries.time.pluginDictionaries}ms`\n : '',\n `)`,\n ].join('')\n : `(${dictionariesLoadedTime - configurationWrittenTime}ms)`,\n ].join(''),\n ANSIColors.GREY_DARK\n ),\n ],\n {\n isVerbose: true,\n }\n );\n\n // Build local dictionaries\n const dictionariesOutput = await buildDictionary(\n [\n ...dictionaries.localDictionaries,\n ...dictionaries.remoteDictionaries,\n ...dictionaries.pluginDictionaries,\n ],\n configuration,\n { formats: format, importOtherDictionaries: false, env }\n );\n\n // Write remote dictionaries\n // Used as cache for next fetch\n await writeRemoteDictionary(\n dictionaries.remoteDictionaries,\n configuration\n );\n\n const dictionariesToBuild = Object.values(\n dictionariesOutput?.mergedDictionaries ?? {}\n ).map((dictionary) => dictionary.dictionary);\n\n await createTypes(dictionariesToBuild, configuration);\n\n await createDictionaryEntryPoint(configuration, {\n formats: options?.format,\n });\n\n const dictionariesBuiltTime = Date.now();\n\n appLogger([\n 'Dictionaries built',\n colorize(\n `(${dictionariesBuiltTime - preparationStartMs}ms)`,\n ANSIColors.GREY_DARK\n ),\n ]);\n\n await createModuleAugmentation(configuration);\n\n const moduleAugmentationBuiltTime = Date.now();\n\n appLogger(\n [\n 'Module augmentation built',\n colorize(\n `(${moduleAugmentationBuiltTime - dictionariesBuiltTime}ms)`,\n ANSIColors.GREY_DARK\n ),\n ],\n {\n isVerbose: true,\n }\n );\n\n // Plugin transformation\n // Allow plugins to post-process the final build output (e.g., write back ICU JSON)\n for await (const plugin of configuration.plugins ?? []) {\n const { unmergedDictionaries, mergedDictionaries } = dictionariesOutput;\n\n await plugin.afterBuild?.({\n dictionaries: {\n unmergedDictionaries,\n mergedDictionaries,\n },\n configuration,\n });\n }\n\n const preparationElapsedMs = Date.now() - preparationStartMs;\n appLogger(\n [`Done`, colorize(`${preparationElapsedMs}ms`, ANSIColors.GREEN)],\n {\n level: 'info',\n isVerbose: true,\n }\n );\n },\n {\n forceRun,\n onIsCached,\n cacheTimeoutMs,\n }\n );\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/reduceDictionaryContent/applyMask.ts
|
|
4
|
+
const applyMask = (full, mask) => {
|
|
5
|
+
if (mask === true) return full;
|
|
6
|
+
if (Array.isArray(mask) && Array.isArray(full)) return mask.map((m, i) => applyMask(full[i], m));
|
|
7
|
+
if (full && typeof full === "object" && "nodeType" in full) {
|
|
8
|
+
if (mask && typeof mask === "object") return full;
|
|
9
|
+
return full;
|
|
10
|
+
}
|
|
11
|
+
if (mask && typeof mask === "object" && full && typeof full === "object") {
|
|
12
|
+
const out = {};
|
|
13
|
+
const maskEntries = Object.entries(mask);
|
|
14
|
+
const allChildrenAreArrays = maskEntries.every(([, value]) => Array.isArray(value));
|
|
15
|
+
for (const [k, m] of maskEntries) {
|
|
16
|
+
const fullValue = full[k];
|
|
17
|
+
if (Array.isArray(m) && Array.isArray(fullValue)) {
|
|
18
|
+
const isTranslationNode = (val) => !!val && typeof val === "object" && "nodeType" in val;
|
|
19
|
+
const isArrayOfTranslationNodes = fullValue.every((item) => isTranslationNode(item));
|
|
20
|
+
if (!allChildrenAreArrays && !isArrayOfTranslationNodes) continue;
|
|
21
|
+
}
|
|
22
|
+
out[k] = applyMask(fullValue, m);
|
|
23
|
+
}
|
|
24
|
+
return out;
|
|
25
|
+
}
|
|
26
|
+
return full;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.applyMask = applyMask;
|
|
31
|
+
//# sourceMappingURL=applyMask.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyMask.cjs","names":[],"sources":["../../../src/reduceDictionaryContent/applyMask.ts"],"sourcesContent":["import type { Dictionary } from '@intlayer/types/dictionary';\n\nexport const applyMask = (full: Dictionary, mask: any): Dictionary => {\n // the mask \"true\" → we don't filter\n if (mask === true) {\n return full;\n }\n\n // arrays\n if (Array.isArray(mask) && Array.isArray(full)) {\n return mask.map((m, i) => applyMask(full[i], m)) as any;\n }\n\n // handle node with nodeType property\n if (full && typeof full === 'object' && 'nodeType' in full) {\n if (mask && typeof mask === 'object') {\n return full; // Keep the full object with nodeType intact\n }\n return full;\n }\n\n // generic object\n if (mask && typeof mask === 'object' && full && typeof full === 'object') {\n const out: any = {};\n const maskEntries = Object.entries(mask);\n const allChildrenAreArrays = maskEntries.every(([, value]) =>\n Array.isArray(value)\n );\n\n for (const [k, m] of maskEntries) {\n const fullValue = (full as any)[k];\n\n // If this child is an array, decide preservation rules.\n // - Preserve when all children at this level are arrays in the mask\n // - Also preserve when the array is an array of translation nodes\n if (Array.isArray(m) && Array.isArray(fullValue)) {\n const isTranslationNode = (val: unknown): boolean =>\n !!val && typeof val === 'object' && 'nodeType' in (val as any);\n const isArrayOfTranslationNodes = fullValue.every((item: any) =>\n isTranslationNode(item)\n );\n\n if (!allChildrenAreArrays && !isArrayOfTranslationNodes) {\n continue; // skip incidental arrays when mixed with non-arrays\n }\n }\n\n out[k] = applyMask(fullValue, m);\n }\n return out;\n }\n\n // unexpected case: we return the original value\n return full;\n};\n"],"mappings":";;;AAEA,MAAa,aAAa,MAAkB,SAA0B;AAEpE,KAAI,SAAS,KACX,QAAO;AAIT,KAAI,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAQ,KAAK,CAC5C,QAAO,KAAK,KAAK,GAAG,MAAM,UAAU,KAAK,IAAI,EAAE,CAAC;AAIlD,KAAI,QAAQ,OAAO,SAAS,YAAY,cAAc,MAAM;AAC1D,MAAI,QAAQ,OAAO,SAAS,SAC1B,QAAO;AAET,SAAO;;AAIT,KAAI,QAAQ,OAAO,SAAS,YAAY,QAAQ,OAAO,SAAS,UAAU;EACxE,MAAM,MAAW,EAAE;EACnB,MAAM,cAAc,OAAO,QAAQ,KAAK;EACxC,MAAM,uBAAuB,YAAY,OAAO,GAAG,WACjD,MAAM,QAAQ,MAAM,CACrB;AAED,OAAK,MAAM,CAAC,GAAG,MAAM,aAAa;GAChC,MAAM,YAAa,KAAa;AAKhC,OAAI,MAAM,QAAQ,EAAE,IAAI,MAAM,QAAQ,UAAU,EAAE;IAChD,MAAM,qBAAqB,QACzB,CAAC,CAAC,OAAO,OAAO,QAAQ,YAAY,cAAe;IACrD,MAAM,4BAA4B,UAAU,OAAO,SACjD,kBAAkB,KAAK,CACxB;AAED,QAAI,CAAC,wBAAwB,CAAC,0BAC5B;;AAIJ,OAAI,KAAK,UAAU,WAAW,EAAE;;AAElC,SAAO;;AAIT,QAAO"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_reduceDictionaryContent_applyMask = require('./applyMask.cjs');
|
|
4
|
+
let _intlayer_core_plugins = require("@intlayer/core/plugins");
|
|
5
|
+
|
|
6
|
+
//#region src/reduceDictionaryContent/reduceDictionaryContent.ts
|
|
7
|
+
const reduceDictionaryContent = (fullDictionary, partialDictionary) => {
|
|
8
|
+
return require_reduceDictionaryContent_applyMask.applyMask(fullDictionary, (0, _intlayer_core_plugins.getMaskContent)(partialDictionary));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.reduceDictionaryContent = reduceDictionaryContent;
|
|
13
|
+
//# sourceMappingURL=reduceDictionaryContent.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduceDictionaryContent.cjs","names":["applyMask"],"sources":["../../../src/reduceDictionaryContent/reduceDictionaryContent.ts"],"sourcesContent":["import { getMaskContent } from '@intlayer/core/plugins';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { applyMask } from './applyMask';\n\nexport const reduceDictionaryContent = (\n fullDictionary: Dictionary,\n partialDictionary: Dictionary\n) => {\n const mask = getMaskContent(partialDictionary);\n const result = applyMask(fullDictionary, mask);\n\n return result;\n};\n"],"mappings":";;;;;;AAIA,MAAa,2BACX,gBACA,sBACG;AAIH,QAFeA,oDAAU,2DADG,kBACiB,CAEhC"}
|